Class SigningCosmWasmClient

Hierarchy

Constructors

Properties

aminoTypes: any
broadcastPollIntervalMs: number
broadcastTimeoutMs: number
gasPrice: any
registry: Registry
signAmino: any
signDirect: any
signer: any

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

    Returns Promise<DeliverTxResponse>

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

  • Parameters

    • searchAddress: string

    Returns Promise<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 Promise<number>

  • Returns QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension

  • Parameters

    • address: string

    Returns Promise<SequenceResponse>

  • Returns Tendermint34Client

  • Parameters

    • id: string

    Returns Promise<IndexedTx>

  • Parameters

    • senderAddress: string
    • codeId: number
    • 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>

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

    • query: SearchTxQuery
    • Optional filter: SearchTxFilter

    Returns Promise<readonly 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>

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

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

    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>

  • Parameters

    • endpoint: string | HttpEndpoint
    • 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 - 2023 Oraichain Foundation