Skip to content
LogoLogo

Tx

TxDecode

POST/cosmos/tx/v1beta1/decode

TxDecode decodes the transaction.

Request Body

application/json
tx_bytes
string

tx_bytes is the raw transaction.

Responses

TxDecodeAmino

POST/cosmos/tx/v1beta1/decode/amino

TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON.

Request Body

application/json
amino_binary
string

Responses

TxEncode

POST/cosmos/tx/v1beta1/encode

TxEncode encodes the transaction.

Request Body

application/json
tx
object

tx is the transaction to encode.

Responses

TxEncodeAmino

POST/cosmos/tx/v1beta1/encode/amino

TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes.

Request Body

application/json
amino_json
string

Responses

Simulate

POST/cosmos/tx/v1beta1/simulate

Simulate simulates executing a transaction for estimating gas usage.

Request Body

application/json
tx
object

tx is the transaction to simulate. Deprecated. Send raw tx bytes instead.

tx_bytes
string

tx_bytes is the raw transaction.

Responses

GetTxsEvent

GET/cosmos/tx/v1beta1/txs

GetTxsEvent fetches txs by event.

Query Parameters

events
string[]

events is the list of transaction event type. Deprecated post v0.47.x: use query instead, which should contain a valid events query.

pagination.key
string

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset
string <uint64>

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit
string <uint64>

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total
boolean

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

pagination.reverse
boolean

reverse is set to true if results are to be returned in the descending order.

order_by
string
  • ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case.
  • ORDER_BY_ASC: ORDER_BY_ASC defines ascending order
  • ORDER_BY_DESC: ORDER_BY_DESC defines descending order
Values
ORDER_BY_UNSPECIFIEDORDER_BY_ASCORDER_BY_DESC
page
string <uint64>

page is the page number to query, starts at 1. If not provided, will default to first page.

limit
string <uint64>

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

query
string

query defines the transaction event query that is proxied to Tendermint's TxSearch RPC method. The query must be valid.

Responses

BroadcastTx

POST/cosmos/tx/v1beta1/txs

BroadcastTx broadcast transaction.

Request Body

application/json
tx_bytes
string

tx_bytes is the raw transaction.

mode
string·default BROADCAST_MODE_UNSPECIFIED

BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method.

  • BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering
  • BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards.
  • BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for a CheckTx execution response only.
  • BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns immediately.
Values
BROADCAST_MODE_UNSPECIFIEDBROADCAST_MODE_BLOCKBROADCAST_MODE_SYNCBROADCAST_MODE_ASYNC

Responses

GetBlockWithTxs

GET/cosmos/tx/v1beta1/txs/block/{height}

GetBlockWithTxs fetches a block with decoded txs.

Path Parameters

heightRequired
string <int64>

height is the height of the block to query.

Query Parameters

pagination.key
string

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset
string <uint64>

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit
string <uint64>

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_total
boolean

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

pagination.reverse
boolean

reverse is set to true if results are to be returned in the descending order.

Responses

GetTx

GET/cosmos/tx/v1beta1/txs/{hash}

GetTx fetches a tx by hash.

Path Parameters

hashRequired
string

hash is the tx hash to query, encoded as a hex string.

Responses