Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

  • new CosmWasmClient(tmClient: undefined | Tendermint34Client): CosmWasmClient

Methods

  • broadcastTx(tx: Uint8Array, timeoutMs?: number, pollIntervalMs?: number): Promise<DeliverTxResponse>
  • 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>

  • disconnect(): void
  • forceGetQueryClient(): QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
  • forceGetTmClient(): Tendermint34Client
  • getAccount(searchAddress: string): Promise<null | Account>
  • getBalance(address: string, searchDenom: string): Promise<Coin>
  • getBlock(height?: number): Promise<Block>
  • getChainId(): Promise<string>
  • getCodes(): Promise<readonly Code[]>
  • 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[]>

  • getContract(address: string): Promise<Contract>
  • getContracts(codeId: number): Promise<readonly string[]>
  • 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[]>

  • getHeight(): Promise<number>
  • getQueryClient(): undefined | QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
  • getSequence(address: string): Promise<SequenceResponse>
  • getTmClient(): undefined | Tendermint34Client
  • queryContractRaw(address: string, key: Uint8Array): Promise<null | Uint8Array>
  • 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>

  • queryContractSmart(address: string, queryMsg: any): Promise<any>
  • 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>

  • searchTx(query: SearchTxQuery, filter?: SearchTxFilter): Promise<readonly IndexedTx[]>

Generated using TypeDoc