Constructors

  • Constructs a TxClient instance.

    Parameters

    • chainId: string

      The blockchain chain ID.

    • restUrl: string

      The REST URL of the blockchain node.

    • coinType: string

      The coin type identifier.

    • signer: Signer

      The object responsible for signing transactions (Signer).

    • account: Account

      The account information (Account).

    Returns TxClient

Properties

account: Account
broadcastTx: ((txBytesString) => Promise<SignAndBroadcastResponse>)

Broadcasts a signed transaction to the blockchain.

Type declaration

Param: txBytesString

The signed transaction as a base64 encoded string.

Returns

A Promise resolving to the broadcast transaction response (SignAndBroadcastResponse).

chainId: string
coinType: string
restUrl: string
sign: ((address, messages, fee, memo?) => Promise<string>)

Signs a transaction using the appropriate method based on the account type.

Type declaration

    • (address, messages, fee, memo?): Promise<string>
    • Signs a transaction using the appropriate method based on the account type.

      Parameters

      • address: string

        The address of the account.

      • messages: EncodeObject[]

        An array of messages to be included in the transaction (EncodeObject[]).

      • fee: StdFee

        The transaction fee information (StdFee).

      • Optional memo: string

        Optional transaction memo.

      Returns Promise<string>

      A Promise resolving to the signed transaction as a base64 encoded string.

Param: address

The address of the account.

Param: messages

An array of messages to be included in the transaction (EncodeObject[]).

Param: fee

The transaction fee information (StdFee).

Param: memo

Optional transaction memo.

Returns

A Promise resolving to the signed transaction as a base64 encoded string.

signAmino: ((address, messages, fee, memo?) => Promise<string>)

Signs a transaction using the Amino signing method.

Type declaration

    • (address, messages, fee, memo?): Promise<string>
    • Signs a transaction using the Amino signing method.

      Parameters

      • address: string

        The address of the account.

      • messages: EncodeObject[]

        An array of messages to be included in the transaction (EncodeObject[]).

      • fee: StdFee

        The transaction fee information (StdFee).

      • Optional memo: string

        Optional transaction memo.

      Returns Promise<string>

      A Promise resolving to the signed transaction as a base64 encoded string.

Param: address

The address of the account.

Param: messages

An array of messages to be included in the transaction (EncodeObject[]).

Param: fee

The transaction fee information (StdFee).

Param: memo

Optional transaction memo.

Returns

A Promise resolving to the signed transaction as a base64 encoded string.

signAndBroadcastTx: ((address, messages, fee, memo?) => Promise<SignAndBroadcastResponse>)

Signs and broadcasts a transaction.

Type declaration

    • (address, messages, fee, memo?): Promise<SignAndBroadcastResponse>
    • Signs and broadcasts a transaction.

      Parameters

      • address: string

        The address of the account.

      • messages: EncodeObject[]

        An array of messages to be included in the transaction (EncodeObject[]).

      • fee: StdFee

        The transaction fee information (StdFee).

      • Optional memo: string

        Optional transaction memo.

      Returns Promise<SignAndBroadcastResponse>

      A Promise resolving to the broadcast transaction response (SignAndBroadcastResponse).

Param: address

The address of the account.

Param: messages

An array of messages to be included in the transaction (EncodeObject[]).

Param: fee

The transaction fee information (StdFee).

Param: memo

Optional transaction memo.

Returns

A Promise resolving to the broadcast transaction response (SignAndBroadcastResponse).

signDirect: ((address, messages, fee, memo?) => Promise<string>)

Signs a transaction using the direct signing method.

Type declaration

    • (address, messages, fee, memo?): Promise<string>
    • Signs a transaction using the direct signing method.

      Parameters

      • address: string

        The address of the account.

      • messages: DecodeObject[]

        An array of messages to be included in the transaction (DecodeObject[]).

      • fee: StdFee

        The transaction fee information (StdFee).

      • Optional memo: string

        Optional transaction memo.

      Returns Promise<string>

      A Promise resolving to the signed transaction as a base64 encoded string.

Param: address

The address of the account.

Param: messages

An array of messages to be included in the transaction (DecodeObject[]).

Param: fee

The transaction fee information (StdFee).

Param: memo

Optional transaction memo.

Returns

A Promise resolving to the signed transaction as a base64 encoded string.

signer: Signer
submitTx: ((chainId, txBytesString) => Promise<{
    response: TransactionResponse;
    success: true;
}>)

Submits a transaction using the Skip API.

Type declaration

    • (chainId, txBytesString): Promise<{
          response: TransactionResponse;
          success: true;
      }>
    • Submits a transaction using the Skip API.

      Parameters

      • chainId: string

        The blockchain chain ID.

      • txBytesString: string

        The signed transaction as a base64 encoded string.

      Returns Promise<{
          response: TransactionResponse;
          success: true;
      }>

      A Promise resolving to the result of the transaction submission.

Param: chainId

The blockchain chain ID.

Param: txBytesString

The signed transaction as a base64 encoded string.

Returns

A Promise resolving to the result of the transaction submission.