Home

Tendermint RPC

v1.0.0
Base URL
https://atom-tendermint.nownodes.io

Authentication

api-keyAuthapiKey

API Key: api-key in header

Tendermint

Tendermint

Returns with the response from CheckTx. Does not wait for DeliverTx result.

GET
https://atom-tendermint.nownodes.io/broadcast_tx_sync

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

This method blocks until CheckTx returns and reports its result, but does not wait for the transaction to be included in a block. To know when the transaction is included in a block, check for the transaction event using JSON-RPC.

Parameters

txstringrequiredquery

The transaction

Response

200OK

Empty

500Internal Server Error

Error

Returns with the response from CheckTx. Does not wait for DeliverTx result.

GET
https://atom-tendermint.nownodes.io/broadcast_tx

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

This method blocks until CheckTx returns and reports its result, but does not wait for the transaction to be included in a block. To know when the transaction is included in a block, check for the transaction event using JSON-RPC.

Parameters

txstringrequiredquery

The transaction

Response

200OK

Empty

500Internal Server Error

Error

Returns right away, with no response. Does not wait for CheckTx nor DeliverTx results.

GET
https://atom-tendermint.nownodes.io/broadcast_tx_async

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

This method submits the transaction and returns immediately without waiting for the transaction to be checked (CheckTx) or committed. Too know when the transaction is included in a block, you can check for the transaction event using JSON-RPC.

Parameters

txstringrequiredquery

The transaction

Response

200OK

empty answer

500Internal Server Error

empty error

Returns with the responses from CheckTx and DeliverTx.

GET
https://atom-tendermint.nownodes.io/broadcast_tx_commit

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

This method waits for the transaction to be checked (CheckTx) and makes a best effort to wait for it to be committed into a block before returning. It will report an error if the request times out before the transaction commits. If CheckTx or DeliverTx fails, the RPC will succeed and report the failing (non-zero) ABCI result code.

WARNING: Use this only for testing and development. For production use, call broadcast_tx.

To know when a transaction is included in a block, check for the transaction event using JSON-RPC.

Parameters

txstringrequiredquery

The transaction

Response

200OK

empty answer

500Internal Server Error

empty error

Checks the transaction without executing it.

GET
https://atom-tendermint.nownodes.io/check_tx

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

The transaction won't be added to the mempool.

Please refer to https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting for formatting/encoding rules.

Parameters

txstringrequiredquery

The transaction

Response

200OK

ABCI application's CheckTx response

500Internal Server Error

empty error

Removes a transaction from the mempool.

GET
https://atom-tendermint.nownodes.io/remove_tx

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Parameters

txKeystringrequiredquery

The transaction key

Response

200OK

empty response.

500Internal Server Error

empty error.

Fetch events posted by the consensus node.

GET
https://atom-tendermint.nownodes.io/events

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Fetch a batch of events posted by the consensus node and matching a specified query string.

The query grammar is defined in pubsub/query/syntax. An empty query matches all events; otherwise a query comprises one or more terms comparing event metadata to target values. For example, to select new block events:

Copied!
tm.event = 'NewBlock'

Multiple terms can be combined with AND, for example to match the transaction event with a given hash, use:

Copied!
tm.event = 'Tx' AND tx.hash = 'EA7B33F'

The comparison operators include =, <, <=, >, >=, and CONTAINS. Operands may be strings (in single quotes), numbers, dates, or timestamps. In addition, the EXISTS operator allows you to check for the presence of an attribute regardless of its value.

Tendermint defines a tm.event attribute for all events. Transactions are also assigned tx.hash and tx.height attributes. Other attributes are provided by the application as ABCI Event records. The name of the event in the query is formed by combining the type and attribute key with a period. For example, given:

Copied!
[]abci.Event{{
    Type: "reward",
    Attributes: []abci.EventAttribute{
        {Key: "address", Value: "cosmos1xyz012pdq"},
        {Key: "amount", Value: "45.62"},
        {Key: "balance", Value: "100.390001"},
    },
}}

the query may refer to the names"reward.address,"reward.amount, and reward.balance, as in:

Copied!
reward.address EXISTS AND reward.balance > 45

The node maintains a log of all events within an operator-defined time window. The /events method returns the most recent items from the log that match the query. Each item returned includes a cursor that marks its location in the log. Cursors can be passed via the before and after parameters to fetch events earlier in the log.

Parameters

filterEventFilterquery
maxItemsintegerquery
afterstringquery
beforestringquery
waitTimeintegerquery

Response

200OK

Reports a batch of matching events

500Internal Server Error

Reports an error

Subscribe for events via WebSocket.

GET
https://atom-tendermint.nownodes.io/subscribe

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

To tell which events you want, you need to provide a query. query is a string, which has a form: "condition AND condition ..." (no OR at the moment). condition has a form: "key operation operand". key is a string with a restricted set of possible symbols ( \t\n\r\()"'=>< are not allowed). operation can be "=", "<", "<=", ">", ">=", "CONTAINS" AND "EXISTS". operand can be a string (escaped with single quotes), number, date or time.

Examples: tm.event = 'NewBlock' # new blocks tm.event = 'CompleteProposal' # node got a complete proposal tm.event = 'Tx' AND tx.hash = 'XYZ' # single transaction tm.event = 'Tx' AND tx.height = 5 # all txs of the fifth block tx.height = 5 # all txs of the fifth block

Tendermint provides a few predefined keys: tm.event, tx.hash and tx.height. Note for transactions, you can define additional keys by providing events with DeliverTx response.

import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" )

abci.ResponseDeliverTx{ Events: []abci.Event{ { Type: "rewards.withdraw", Attributes: []abci.EventAttribute{ {Key: "address", Value: "AddrA", Index: true}, {Key: "source", Value: "SrcX", Index: true}, {Key: "amount", Value: "...", Index: true}, {Key: "balance", Value: "...", Index: true}, }, }, { Type: "rewards.withdraw", Attributes: []abci.EventAttribute{ {Key: "address", Value: "AddrB", Index: true}, {Key: "source", Value: "SrcY", Index: true}, {Key: "amount", Value: "...", Index: true}, {Key: "balance", Value: "...", Index: true}, }, }, { Type: "transfer", Attributes: []abci.EventAttribute{ {Key: "sender", Value: "AddrC", Index: true}, {Key: "recipient", Value: "AddrD", Index: true}, {Key: "amount", Value: "...", Index: true}, }, }, }, }

All events are indexed by a composite key of the form {eventType}.{evenAttrKey}. In the above examples, the following keys would be indexed:

  • rewards.withdraw.address
  • rewards.withdraw.source
  • rewards.withdraw.amount
  • rewards.withdraw.balance
  • transfer.sender
  • transfer.recipient
  • transfer.amount

Multiple event types with duplicate keys are allowed and are meant to categorize unique and distinct events. In the above example, all events indexed under the key rewards.withdraw.address will have the following values stored and queryable:

  • AddrA
  • AddrB

To create a query for txs where address AddrA withdrew rewards: query.MustParse("tm.event = 'Tx' AND rewards.withdraw.address = 'AddrA'")

To create a query for txs where address AddrA withdrew rewards from source Y: query.MustParse("tm.event = 'Tx' AND rewards.withdraw.address = 'AddrA' AND rewards.withdraw.source = 'Y'")

To create a query for txs where AddrA transferred funds: query.MustParse("tm.event = 'Tx' AND transfer.sender = 'AddrA'")

The following queries would return no results: query.MustParse("tm.event = 'Tx' AND transfer.sender = 'AddrZ'") query.MustParse("tm.event = 'Tx' AND rewards.withdraw.address = 'AddrZ'") query.MustParse("tm.event = 'Tx' AND rewards.withdraw.source = 'W'")

Copied!
import rpchttp "github.com/tendermint/rpc/client/http"
import "github.com/tendermint/tendermint/types"

client, err := rpchttp.New("tcp://0.0.0.0:26657", "/websocket")
if err != nil {
  // handle error
}

err = client.Start()
if err != nil {
  // handle error
}
defer client.Stop()
ctx, cancel := context.WithTimeout(context.Background(), 1 * time.Second)
defer cancel()
query := "tm.event = 'Tx' AND tx.height = 3"
txs, err := client.Subscribe(ctx, "test-client", query)
if err != nil {
  // handle error
}

go func() {
 for e := range txs {
   fmt.Println("got ", e.Data.(types.EventDataTx))
   }
}()

NOTE: if you're not reading events fast enough, Tendermint might terminate the subscription.

Parameters

querystringrequiredquery

query is a string, which has a form: "condition AND condition ..." (no OR at the moment). condition has a form: "key operation operand". key is a string with a restricted set of possible symbols ( \t\n\r\()"'=>< are not allowed). operation can be "=", "<", "<=", ">", ">=", "CONTAINS". operand can be a string (escaped with single quotes), number, date or time.

Response

200OK

empty answer

500Internal Server Error

empty error

Unsubscribe from event on Websocket

GET
https://atom-tendermint.nownodes.io/unsubscribe

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Copied!
client, err := rpchttp.New("tcp://0.0.0.0:26657", "/websocket")
if err != nil {
  // handle error
}

err := client.Start()
if err != nil {
  // handle error
}
defer client.Stop()
query := "tm.event = 'Tx' AND tx.height = 3"
err = client.Unsubscribe(context.Background(), "test-client", query)
if err != nil {
  // handle error
}

Parameters

querystringrequiredquery

query is a string, which has a form: "condition AND condition ..." (no OR at the moment). condition has a form: "key operation operand". key is a string with a restricted set of possible symbols ( \t\n\r\()"'=>< are not allowed). operation can be "=", "<", "<=", ">", ">=", "CONTAINS". operand can be a string (escaped with single quotes), number, date or time.

Response

200OK

Answer

500Internal Server Error

Error

Unsubscribe from all events via WebSocket

GET
https://atom-tendermint.nownodes.io/unsubscribe_all

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Unsubscribe from all events via WebSocket

Response

200OK

empty answer

500Internal Server Error

empty error

Node heartbeat

GET
https://atom-tendermint.nownodes.io/health

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get node health. Returns empty result (200 OK) on success, no response - in case of an error.

Response

200OK

Gets Node Health

500Internal Server Error

empty error

Node Status

GET
https://atom-tendermint.nownodes.io/status

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get Tendermint status including node info, pubkey, latest block hash, app hash, block height, current max peer height, and time.

Response

200OK

Status of the node

500Internal Server Error

empty error

Network information

GET
https://atom-tendermint.nownodes.io/net_info

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get network info.

Response

200OK

empty answer

500Internal Server Error

empty error

Get block headers (max: 20) for minHeight <= height <= maxHeight.

GET
https://atom-tendermint.nownodes.io/blockchain

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get block headers for minHeight <= height maxHeight.

If maxHeight does not yet exist, blocks up to the current height will be returned. If minHeight does not exist (due to pruning), earliest existing height will be used.

At most 20 items will be returned. Block headers are returned in descending order (highest first).

Parameters

minHeightintegerquery

Minimum block height to return

maxHeightintegerquery

Maximum block height to return

Response

200OK

Block headers, returned in descending order (highest first).

500Internal Server Error

Error

Get the header at a specified height

GET
https://atom-tendermint.nownodes.io/header

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Retrieve the block header corresponding to a specified height.

Parameters

heightinteger0query

height to return. If no height is provided, it will fetch the latest height.

Response

200OK

Header information.

500Internal Server Error

Error

Get header by hash

GET
https://atom-tendermint.nownodes.io/header_by_hash

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Retrieve the block header corresponding to a block hash.

Parameters

hashstringrequiredquery

header hash

Response

200OK

Header information.

500Internal Server Error

Error

Get block at a specified height

GET
https://atom-tendermint.nownodes.io/block

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get Block.

Parameters

heightinteger0query

height to return. If no height is provided, it will fetch the latest block.

Response

200OK

Block information.

500Internal Server Error

Error

Get block by hash

GET
https://atom-tendermint.nownodes.io/block_by_hash

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get Block By Hash.

Parameters

hashstringrequiredquery

block hash

Response

200OK

Block information.

500Internal Server Error

Error

Get block results at a specified height

GET
https://atom-tendermint.nownodes.io/block_results

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get block_results.

Parameters

heightinteger0query

height to return. If no height is provided, it will fetch information regarding the latest block.

Response

200OK

Block results.

500Internal Server Error

Error

Get commit results at a specified height

GET
https://atom-tendermint.nownodes.io/commit

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get Commit.

Parameters

heightinteger0query

height to return. If no height is provided, it will fetch commit information regarding the latest block.

Response

200OK

Commit results.

canonical switches from false to true for block H once block H+1 has been committed. Until then it's subjective and only reflects what this node has seen so far.

500Internal Server Error

Error

Get validator set at a specified height

GET
https://atom-tendermint.nownodes.io/validators

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get Validators. Validators are sorted first by voting power (descending), then by address (ascending).

Parameters

heightinteger0query

height to return. If no height is provided, it will fetch validator set which corresponds to the latest block.

pageinteger1query

Page number (1-based)

per_pageinteger30query

Number of entries per page (max: 100)

Response

200OK

Commit results.

500Internal Server Error

Error

Get Genesis

GET
https://atom-tendermint.nownodes.io/genesis

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get the genesis document.

Response

200OK

Genesis results.

500Internal Server Error

Error

Get Genesis in paginated chunks

GET
https://atom-tendermint.nownodes.io/genesis_chunked

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get genesis document in a paginated/chunked format to make it easier to iterate through larger genesis structures.

Parameters

chunkIDinteger0query

Sequence number of the chunk to download.

Response

200OK

Genesis results.

500Internal Server Error

Error

Get consensus state

GET
https://atom-tendermint.nownodes.io/dump_consensus_state

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get consensus state.

Not safe to call from inside the ABCI application during a block execution.

Response

200OK

Complete consensus state.

500Internal Server Error

Error

Get consensus state

GET
https://atom-tendermint.nownodes.io/consensus_state

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get consensus state.

Not safe to call from inside the ABCI application during a block execution.

Response

200OK

consensus state results.

500Internal Server Error

Error

Get consensus parameters

GET
https://atom-tendermint.nownodes.io/consensus_params

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get consensus parameters.

Parameters

heightinteger0query

height to return. If no height is provided, it will fetch commit information regarding the latest block.

Response

200OK

consensus parameters results.

500Internal Server Error

Error

Get the list of unconfirmed transactions

GET
https://atom-tendermint.nownodes.io/unconfirmed_txs

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get list of unconfirmed transactions

Parameters

pageinteger1query

Page number (1-based)

per_pageinteger30query

Number of entries per page (max: 100)

Response

200OK

List of unconfirmed transactions

500Internal Server Error

Error

Get data about unconfirmed transactions

GET
https://atom-tendermint.nownodes.io/num_unconfirmed_txs

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get data about unconfirmed transactions

Response

200OK

status about unconfirmed transactions

500Internal Server Error

Error

Search for transactions

GET
https://atom-tendermint.nownodes.io/tx_search

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Search for transactions w/ their results.

See /subscribe for the query syntax.

Parameters

querystringrequiredquery

Query

provebooleanfalsequery

Include proofs of the transactions inclusion in the block

pageinteger1query

Page number (1-based)

per_pageinteger30query

Number of entries per page (max: 100)

order_bystringdescquery

Order in which transactions are sorted ("asc" or "desc"), by height & index. If empty, default sorting will be still applied.

Response

200OK

List of transactions

500Internal Server Error

Error

Search for blocks by BeginBlock and EndBlock events

GET
https://atom-tendermint.nownodes.io/block_search

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Search for blocks by BeginBlock and EndBlock events.

See /subscribe for the query syntax.

Parameters

querystringrequiredquery

Query

pageinteger1query

Page number (1-based)

per_pageinteger30query

Number of entries per page (max: 100)

order_bystringdescquery

Order in which blocks are sorted ("asc" or "desc"), by height. If empty, default sorting will be still applied.

Response

200OK

List of paginated blocks matching the search criteria.

500Internal Server Error

Error

Get transactions by hash

GET
https://atom-tendermint.nownodes.io/tx

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get a transaction

Parameters

hashstringrequiredquery

transaction Hash to retrive

provebooleanfalsequery

Include proofs of the transactions inclusion in the block

Response

200OK

Get a transaction

500Internal Server Error

Error

Get some info about the application.

GET
https://atom-tendermint.nownodes.io/abci_info

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get some info about the application.

Response

200OK

Get some info about the application.

500Internal Server Error

Error

Query the application for some information.

GET
https://atom-tendermint.nownodes.io/abci_query

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Query the application for some information.

Parameters

pathstringrequiredquery

Path to the data ("/a/b/c")

datastringrequiredquery

Data

heightinteger0query

Height (0 means latest)

provebooleanfalsequery

Include proofs of the transactions inclusion in the block

Response

200OK

Response of the submitted query

500Internal Server Error

Error

Broadcast evidence of the misbehavior.

GET
https://atom-tendermint.nownodes.io/broadcast_evidence

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Broadcast evidence of the misbehavior.

Parameters

evidencestringrequiredquery

JSON evidence

Response

200OK

Broadcast evidence of the misbehavior.

500Internal Server Error

Error