Class IbcSigningClient<TQ, TT>

Type Parameters

Hierarchy

  • SigningStargateClient
    • IbcSigningClient

Implements

Constructors

Properties

address: string
broadcastPollIntervalMs: undefined | number
broadcastTimeoutMs: undefined | number
queries: TQ
registry: Registry
txLibrary: TT

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>

  • 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

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

    Returns Promise<DeliverTxResponse>

  • Returns void

  • Returns CometClient

  • Returns QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Queries all balances for all denoms that belong to this address.

    Uses the grpc queries (which iterates over the store internally), and we cannot get proofs from such a method.

    Parameters

    • address: string

    Returns Promise<readonly Coin[]>

  • Parameters

    • address: string
    • searchDenom: string

    Returns Promise<Coin>

  • Parameters

    • address: string

    Returns Promise<null | Coin>

  • Parameters

    • Optional height: number

    Returns Promise<Block>

  • Returns Promise<string>

  • Returns undefined | CometClient

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string

    Returns Promise<null | Coin>

  • Returns Promise<number>

  • Returns undefined | QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • address: string

    Returns Promise<SequenceResponse>

  • Parameters

    • id: string

    Returns Promise<null | IndexedTx>

  • Parameters

    • query: SearchTxQuery

    Returns Promise<IndexedTx[]>

  • Parameters

    • senderAddress: string
    • recipientAddress: string
    • transferAmount: Coin
    • sourcePort: string
    • sourceChannel: string
    • timeoutHeight: undefined | Height
    • timeoutTimestamp: undefined | number

      timeout in seconds

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

    Returns Promise<DeliverTxResponse>

    Deprecated

    This API does not support setting the memo field of MsgTransfer (only the transaction memo). We'll remove this method at some point because trying to wrap the various message types is a losing strategy. Please migrate to signAndBroadcast with an MsgTransferEncodeObject created in the caller code instead.

    See

    https://github.com/cosmos/cosmjs/issues/1493

  • Parameters

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

    Returns Promise<DeliverTxResponse>

  • Gets account number and sequence from the API, creates a sign doc, creates a single signature and assembles the signed transaction.

    The sign mode (SIGN_MODE_DIRECT or SIGN_MODE_LEGACY_AMINO_JSON) is determined by this client's signer.

    You can pass signer data (account number, sequence and chain ID) explicitly instead of querying them from the chain. This is needed when signing for a multisig account, but it also allows for offline signing (See the SigningStargateClient.offline constructor).

    Parameters

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

    Returns Promise<TxRaw>

  • Parameters

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

    Returns Promise<DeliverTxResponse>

  • 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
    • messages: readonly EncodeObject[]
    • fee: number | StdFee | "auto"
    • Optional memo: string
    • Optional timeoutHeight: bigint

    Returns Promise<string>

    Returns the hash of the transaction

  • Parameters

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

    Returns Promise<number>

  • Parameters

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

    Returns Promise<DeliverTxResponse>

  • Parameters

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

    Returns Promise<DeliverTxResponse>

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

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

    Parameters

    • endpoint: string | HttpEndpoint
    • Optional options: StargateClientOptions

    Returns Promise<StargateClient>

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

    Parameters

    • cometClient: CometClient
    • Optional options: StargateClientOptions

    Returns Promise<StargateClient>

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

    Parameters

    • cometClient: CometClient
    • signer: OfflineSigner
    • Optional options: SigningStargateClientOptions

    Returns Promise<SigningStargateClient>

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

    Returns Promise<SigningStargateClient>

Generated using TypeDoc