Hierarchy

Constructors

Properties

broadcastPollIntervalMs: undefined | number
broadcastTimeoutMs: undefined | number
registry: Registry

Methods

  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure), an error is thrown.

    If the transaction is not included in a block before the provided timeout, this errors with a TimeoutError.

    If the transaction is included in a block, a DeliverTxResponse is returned. The caller then usually needs to check for execution success or failure.

    Parameters

    • tx: Uint8Array
    • timeoutMs: number = 60_000
    • pollIntervalMs: number = 3_000

    Returns Promise<DeliverTxResponse>

  • Broadcasts a signed transaction to the network without monitoring it.

    If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure), an error is thrown.

    If the transaction is broadcasted, a string containing the hash of the transaction is returned. The caller then usually needs to check if the transaction was included in a block and was successful.

    Returns

    Returns the hash of the transaction

    Parameters

    • tx: Uint8Array

    Returns Promise<string>

  • Parameters

    • senderAddress: string
    • contractAddress: string
    • msg: any
    • fee: number | "auto" | StdFee
    • memo: string = ""
    • Optional funds: readonly Coin[]

    Returns Promise<ExecuteResult>

  • getCodes() returns all codes and is just looping through all pagination pages.

    This is potentially inefficient and advanced apps should consider creating their own query client to handle pagination together with the app's screens.

    Returns Promise<readonly Code[]>

  • getContracts() returns all contract instances for one code and is just looping through all pagination pages.

    This is potentially inefficient and advanced apps should consider creating their own query client to handle pagination together with the app's screens.

    Parameters

    • codeId: number

    Returns Promise<readonly string[]>

  • Parameters

    • senderAddress: string
    • contractAddress: string
    • codeId: number
    • migrateMsg: any
    • fee: number | "auto" | StdFee
    • memo: string = ""

    Returns Promise<MigrateResult>

  • Returns the data at the key if present (raw contract dependent storage data) or null if no data at this key.

    Promise is rejected when contract does not exist.

    Parameters

    • address: string
    • key: Uint8Array

    Returns Promise<null | Uint8Array>

  • Makes a smart query on the contract, returns the parsed JSON document.

    Promise is rejected when contract does not exist. Promise is rejected for invalid query format. Promise is rejected for invalid response format.

    Parameters

    • address: string
    • queryMsg: any

    Returns Promise<any>

  • Parameters

    • signerAddress: string
    • messages: readonly EncodeObject[]
    • fee: StdFee
    • memo: string
    • Optional explicitSignerData: SignerData
    • Optional timeoutHeight: bigint

    Returns Promise<TxRaw>

  • Creates a transaction with the given messages, fee, memo and timeout height. Then signs and broadcasts the transaction.

    Parameters

    • signerAddress: string

      The address that will sign transactions using this instance. The signer must be able to sign with this address.

    • messages: readonly EncodeObject[]
    • fee: number | "auto" | StdFee
    • memo: string = ""
    • Optional timeoutHeight: bigint

      (optional) timeout height to prevent the tx from being committed past a certain height

    Returns Promise<DeliverTxResponse>

  • Creates a transaction with the given messages, fee, memo and timeout height. Then signs and broadcasts the transaction.

    This method is useful if you want to send a transaction in broadcast, without waiting for it to be placed inside a block, because for example I would like to receive the hash to later track the transaction with another tool.

    Returns

    Returns the hash of the transaction

    Parameters

    • signerAddress: string

      The address that will sign transactions using this instance. The signer must be able to sign with this address.

    • messages: readonly EncodeObject[]
    • fee: number | "auto" | StdFee
    • memo: string = ""
    • Optional timeoutHeight: bigint

      (optional) timeout height to prevent the tx from being committed past a certain height

    Returns Promise<string>

  • Parameters

    • signerAddress: string
    • messages: readonly EncodeObject[]
    • memo: undefined | string

    Returns Promise<number>

  • Uploads code and returns a receipt, including the code ID

    Parameters

    • senderAddress: string
    • wasmCode: Uint8Array
    • fee: number | "auto" | StdFee
    • memo: string = ""
    • Optional instantiatePermission: AccessConfig

    Returns Promise<UploadResult>

Generated using TypeDoc