Options
All
  • Public
  • Public/Protected
  • All
Menu

StarkNet.js Docs

Index

Type aliases

KeyPair

KeyPair: EC.KeyPair

Signature

Signature: EC.Signature

GetContractAddressesResponse

GetContractAddressesResponse: { Starknet: string; GpsStatementVerifier: string }

Type declaration

  • Starknet: string
  • GpsStatementVerifier: string

Status

Status: "NOT_RECEIVED" | "RECEIVED" | "PENDING" | "REJECTED" | "ACCEPTED_ONCHAIN"

TxStatus

TxStatus: "TRANSACTION_RECEIVED"

Type

Type: "DEPLOY" | "INVOKE_FUNCTION"

EntryPointType

EntryPointType: "EXTERNAL"

CompressedProgram

CompressedProgram: string

AbiEntry

AbiEntry: { name: string; type: "felt" | "felt*" | string }

Type declaration

  • name: string
  • type: "felt" | "felt*" | string

FunctionAbi

FunctionAbi: { inputs: AbiEntry[]; name: string; outputs: AbiEntry[]; type: "function"; stateMutability?: "view" }

Type declaration

  • inputs: AbiEntry[]
  • name: string
  • outputs: AbiEntry[]
  • type: "function"
  • Optional stateMutability?: "view"

StructAbi

StructAbi: { members: (AbiEntry & { offset: number })[]; name: string; size: number; type: "struct" }

Type declaration

  • members: (AbiEntry & { offset: number })[]
  • name: string
  • size: number
  • type: "struct"

Abi

EntryPointsByType

EntryPointsByType: object

Program

Program: object

CompiledContract

CompiledContract: { abi: Abi[]; entry_points_by_type: EntryPointsByType; program: Program }

Type declaration

CompressedCompiledContract

CompressedCompiledContract: Omit<CompiledContract, "program">

DeployTransaction

DeployTransaction: { type: "DEPLOY"; contract_definition: CompressedCompiledContract; contract_address_salt: BigNumberish; constructor_calldata: string[] }

Type declaration

InvokeFunctionTransaction

InvokeFunctionTransaction: { type: "INVOKE_FUNCTION"; contract_address: string; entry_point_selector: string; signature?: [BigNumberish, BigNumberish]; entry_point_type?: EntryPointType; calldata?: string[] }

Type declaration

  • type: "INVOKE_FUNCTION"
  • contract_address: string
  • entry_point_selector: string
  • Optional signature?: [BigNumberish, BigNumberish]
  • Optional entry_point_type?: EntryPointType
  • Optional calldata?: string[]

CallContractTransaction

CallContractTransaction: Omit<InvokeFunctionTransaction, "type">

Transaction

CallContractResponse

CallContractResponse: { result: string[] }

Type declaration

  • result: string[]

GetBlockResponse

GetBlockResponse: { sequence_number: number; state_root: string; block_hash: string; transactions: {}; timestamp: number; transaction_receipts: {}; previous_block_hash: string; status: Status }

Type declaration

  • sequence_number: number
  • state_root: string
  • block_hash: string
  • transactions: {}
  • timestamp: number
  • transaction_receipts: {}
    • [txHash: string]: { block_hash: string; transaction_hash: string; l2_to_l1_messages: { to_address: string; payload: string[]; from_address: string }[]; block_number: number; status: Status; transaction_index: number }
      • block_hash: string
      • transaction_hash: string
      • l2_to_l1_messages: { to_address: string; payload: string[]; from_address: string }[]
      • block_number: number
      • status: Status
      • transaction_index: number
  • previous_block_hash: string
  • status: Status

GetCodeResponse

GetCodeResponse: { bytecode: string[]; abi: Abi[] }

Type declaration

  • bytecode: string[]
  • abi: Abi[]

GetTransactionStatusResponse

GetTransactionStatusResponse: { tx_status: Status; block_hash: string }

Type declaration

  • tx_status: Status
  • block_hash: string

GetTransactionResponse

GetTransactionResponse: { status: Status; transaction: Transaction; block_hash: string; block_number: number; transaction_index: number; transaction_hash: string }

Type declaration

  • status: Status
  • transaction: Transaction
  • block_hash: string
  • block_number: number
  • transaction_index: number
  • transaction_hash: string

AddTransactionResponse

AddTransactionResponse: { code: TxStatus; transaction_hash: string; address?: string }

Type declaration

  • code: TxStatus
  • transaction_hash: string
  • Optional address?: string

Args

Args: {}

Type declaration

  • [inputName: string]: string | string[]

Calldata

Calldata: string[]

Functions

compileCalldata

  • Parameters

    Returns Calldata

Variables

defaultProvider

defaultProvider: Provider = ...

Generated using TypeDoc