Hierarchy (view full)

Constructors

  • Parameters

    • tmClient: undefined | TendermintClient

    Returns CosmWasmClient

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.

    Parameters

    • tx: Uint8Array

    Returns Promise<string>

    Returns the hash of the transaction

  • Returns void

  • Returns TendermintClient

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Parameters

    • address: string
    • searchDenom: string

    Returns Promise<Coin>

  • Parameters

    • Optional height: number

    Returns Promise<Block>

  • Returns Promise<string>

  • Parameters

    • codeId: number

    Returns Promise<CodeDetails>

  • 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[]>

  • Throws an error if no contract was found at the address

    Parameters

    • address: string

    Returns Promise<Contract>

  • Throws an error if no contract was found at the address

    Parameters

    • address: string

    Returns Promise<readonly ContractCodeHistoryEntry[]>

  • 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[]>

  • Returns a list of contract addresses created by the given creator. This just loops through all pagination pages.

    Parameters

    • creator: string

    Returns Promise<string[]>

  • Returns Promise<number>

  • Returns undefined | TendermintClient

  • Parameters

    • id: string

    Returns Promise<null | IndexedTx>

  • 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>

  • Creates an instance by connecting to the given Tendermint RPC endpoint.

    This uses auto-detection to decide between a Tendermint 0.37 and 0.34 client. To set the Tendermint client explicitly, use create.

    Parameters

    Returns Promise<CosmWasmClient>

  • Creates an instance from a manually created Tendermint client. Use this to use Tendermint37Client instead of Tendermint34Client.

    Parameters

    • tmClient: TendermintClient

    Returns Promise<CosmWasmClient>

Generated using TypeDoc