Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SignerInterface

Hierarchy

Implemented by

Index

Methods

Static Protected getNetworkFromName

  • getNetworkFromName(name: NetworkName): "https://alpha-mainnet.starknet.io" | "https://alpha4.starknet.io"
  • Parameters

    • name: NetworkName

    Returns "https://alpha-mainnet.starknet.io" | "https://alpha4.starknet.io"

Abstract addTransaction

getContractAddresses

callContract

getBlock

  • Gets the block information from a block ID.

    Parameters

    • Optional blockId: number

    Returns Promise<GetBlockResponse>

    the block object { block_id, previous_block_id, state_root, status, timestamp, transaction_receipts, transactions }

getCode

  • getCode(contractAddress: string, blockId?: number): Promise<GetCodeResponse>
  • Gets the code of the deployed contract.

    Parameters

    • contractAddress: string
    • Optional blockId: number

    Returns Promise<GetCodeResponse>

    Bytecode and ABI of compiled contract

getStorageAt

  • getStorageAt(contractAddress: string, key: number, blockId?: number): Promise<object>
  • Gets the contract's storage variable at a specific key.

    Parameters

    • contractAddress: string
    • key: number

      from getStorageVarAddress('') (WIP)

    • Optional blockId: number

    Returns Promise<object>

    the value of the storage variable

getTransactionStatus

getTransaction

  • Gets the transaction information from a tx id.

    Parameters

    Returns Promise<GetTransactionResponse>

    the transacton object { transaction_id, status, transaction, block_id?, block_number?, transaction_index?, transaction_failure_reason? }

deployContract

  • Deploys a given compiled contract (json) to starknet

    Parameters

    • contract: string | CompiledContract

      a json object containing the compiled contract

    • constructorCalldata: string[] = []
    • addressSalt: BigNumberish = ...

    Returns Promise<AddTransactionResponse>

    a confirmation of sending a transaction on the starknet contract

invokeFunction

  • Invokes a function on starknet

    Parameters

    • contractAddress: string

      target contract address for invoke

    • entrypointSelector: string

      target entrypoint selector for

    • Optional calldata: string[]

      (optional, default []) calldata

    • Optional signature: [BigNumberish, BigNumberish]

      (optional) signature to send along

    Returns Promise<AddTransactionResponse>

    response from addTransaction

waitForTx

  • waitForTx(txHash: BigNumberish, retryInterval?: number): Promise<void>
  • Parameters

    Returns Promise<void>

Constructors

constructor

Properties

Abstract address

address: string

baseUrl

baseUrl: string

feederGatewayUrl

feederGatewayUrl: string

gatewayUrl

gatewayUrl: string

Generated using TypeDoc