Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TxAPI

Hierarchy

Index

Constructors

constructor

Properties

lcd

Methods

broadcast

broadcastAsync

broadcastSync

  • NOTE: This is not a synchronous function and is unconventionally named. This function can be await as it returns a Promise.

    Broadcast the transaction using the "sync" mode, returning after DeliverTx() is performed.

    Parameters

    • tx: StdTx

      transaction to broadcast

    Returns Promise<SyncTxBroadcastResult>

create

  • Builds a StdSignMsg that is ready to be signed by a Key. The appropriate account number and sequence will be fetched live from the blockchain and added to the resultant StdSignMsg. If no fee is provided, fee will be automatically estimated using the parameters, simulated using a "dummy fee" with sourceAddress's nonzero denominations in its balance.

    Parameters

    • sourceAddress: string

      account address of signer

    • options: CreateTxOptions

      TX generation options

    Returns Promise<StdSignMsg>

encode

  • encode(tx: StdTx): Promise<string>

estimateFee

hash

  • hash(tx: StdTx): Promise<string>

search

txInfo

  • txInfo(txHash: string): Promise<TxInfo>

txInfosByHeight

  • txInfosByHeight(height: number | undefined): Promise<TxInfo[]>
  • Looks up transactions on the blockchain for the block height. If height is undefined, gets the transactions for the latest block.

    Parameters

    • height: number | undefined

      block height

    Returns Promise<TxInfo[]>