Hierarchy

  • SigningCosmWasmClient
    • SimulateCosmWasmClient

Constructors

Properties

broadcastPollIntervalMs: number
broadcastTimeoutMs: number
registry: Registry

Methods

  • Parameters

    • senderAddress: string
    • codeId: number
    • msg: any
    • label: string
    • salt: Uint8Array = null
    • Optional options: InstantiateOptions

    Returns Promise<InstantiateResult>

  • 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
    • Optional timeoutMs: number
    • Optional pollIntervalMs: number

    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

  • Parameters

    • senderAddress: string
    • contractAddress: string
    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<ChangeAdminResult>

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string
    • amount: Coin
    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<DeliverTxResponse>

  • Returns void

  • Parameters

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

    Returns Promise<ExecuteResult>

  • Like execute but allows executing multiple messages in one transaction.

    Parameters

    • senderAddress: string
    • instructions: readonly ExecuteInstruction[]
    • _fee: number | StdFee | "auto"
    • Optional _memo: string

    Returns Promise<ExecuteResult>

  • Returns QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension

  • Returns TendermintClient

  • Parameters

    • address: string
    • paginationKey: Uint8Array
    • Optional limit: number

    Returns Promise<QueryAllContractStateResponse>

  • 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 QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension

  • Returns TendermintClient

  • Parameters

    • id: string

    Returns Promise<IndexedTx>

  • Parameters

    • senderAddress: string
    • codeId: number
    • msg: any
    • label: string
    • Optional _fee: number | StdFee | "auto"
    • Optional options: InstantiateOptions

    Returns Promise<InstantiateResult>

  • Parameters

    • senderAddress: string
    • codeId: number
    • salt: Uint8Array
    • msg: any
    • label: string
    • _fee: number | StdFee | "auto"
    • Optional options: InstantiateOptions

    Returns Promise<InstantiateResult>

  • Parameters

    • senderAddress: string
    • contractAddress: string
    • codeId: number
    • migrateMsg: any
    • _fee: number | StdFee | "auto"
    • Optional _memo: string

    Returns Promise<MigrateResult>

  • Parameters

    • query: SearchTxQuery

    Returns Promise<IndexedTx[]>

  • Parameters

    • senderAddress: string
    • recipientAddress: string
    • amount: readonly Coin[]
    • _fee: number | StdFee | "auto"
    • Optional _memo: string

    Returns Promise<DeliverTxResponse>

  • Parameters

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

    Returns Promise<TxRaw>

  • Creates a transaction with the given messages, fee and memo. 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 | StdFee | "auto"
    • Optional memo: string

    Returns Promise<DeliverTxResponse>

  • Creates a transaction with the given messages, fee and memo. 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.

    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 | StdFee | "auto"
    • Optional memo: string

    Returns Promise<string>

    Returns the hash of the transaction

  • Parameters

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

    Returns Promise<number>

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string
    • amount: Coin
    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<DeliverTxResponse>

  • Parameters

    • senderAddress: string
    • contractAddress: string
    • newAdmin: string
    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<ChangeAdminResult>

  • Parameters

    • senderAddress: string
    • wasmCode: Uint8Array
    • _fee: number | StdFee | "auto"
    • Optional _memo: string

    Returns Promise<UploadResult>

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string
    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<DeliverTxResponse>

  • 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

    • endpoint: string | HttpEndpoint
    • Optional desiredHeight: number

    Returns Promise<CosmWasmClient>

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

    Parameters

    • endpoint: string | HttpEndpoint
    • signer: OfflineSigner
    • Optional options: SigningCosmWasmClientOptions

    Returns Promise<SigningCosmWasmClient>

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

    Parameters

    • tmClient: TendermintClient

    Returns Promise<CosmWasmClient>

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

    Parameters

    • tmClient: TendermintClient
    • signer: OfflineSigner
    • Optional options: SigningCosmWasmClientOptions

    Returns Promise<SigningCosmWasmClient>

  • Creates a client in offline mode.

    This should only be used in niche cases where you know exactly what you're doing, e.g. when building an offline signing application.

    When you try to use online functionality with such a signer, an exception will be raised.

    Parameters

    • signer: OfflineSigner
    • Optional options: SigningCosmWasmClientOptions

    Returns Promise<SigningCosmWasmClient>

©2020 - 2024 Oraichain Foundation