Skip to main content
This file defines the JSON-RPC spec of CometBFT. This is meant to be implemented by all clients.

Support

Timestamps

Timestamps in the RPC layer of CometBFT follows RFC3339Nano. The RFC3339Nano format removes trailing zeros from the seconds field. This means if a block has a timestamp like: 1985-04-12T23:20:50.5200000Z, the value returned in the RPC will be 1985-04-12T23:20:50.52Z.

Info Routes

Health

Node heartbeat

Parameters

None

Request

HTTP
JSONRPC

Response

Status

Get CometBFT status including node info, pubkey, latest block hash, app hash, block height and time.

Parameters

None

Request

HTTP
JSONRPC

Response

NetInfo

Network information

Parameters

None

Request

HTTP
JSONRPC

Response

Blockchain

Get block headers. Returned in descending order. May be limited in quantity.

Parameters

  • minHeight (integer): The lowest block to be returned in the response
  • maxHeight (integer): The highest block to be returned in the response

Request

HTTP
JSONRPC

Response

Block

Get block at a specified height.

Parameters

  • height (integer): height of the requested block. If no height is specified the latest block will be used.

Request

HTTP
JSONRPC

Response

BlockByHash

Parameters

  • hash (string): Hash of the block to query for.

Request

HTTP
JSONRPC

Response

BlockResults

Parameters

  • height (integer): Height of the block which contains the results. If no height is specified, the latest block height will be used

Request

HTTP
JSONRPC

Response

Commit

Parameters

  • height (integer): Height of the block the requested commit pertains to. If no height is set the latest commit will be returned.

Request

HTTP
JSONRPC

Response

Validators

Parameters

  • height (integer): Block height at which the validators were present on. If no height is set the latest commit will be returned.
  • page (integer):
  • per_page (integer):

Request

HTTP
JSONRPC

Response

Genesis

Get Genesis of the chain. If the response is large, this operation will return an error: use genesis_chunked instead.

Request

HTTP
JSONRPC

Response

GenesisChunked

Get the genesis document in a chunks to support easily transfering larger documents.

Parameters

  • chunk (integer): the index number of the chunk that you wish to fetch. These IDs are 0 indexed.

Request

HTTP
JSONRPC

Response

ConsensusParams

Get the consensus parameters.

Parameters

  • height (integer): Block height at which the consensus params would like to be fetched for.

Request

HTTP
JSONRPC

Response

UnconfirmedTxs

Get a list of unconfirmed transactions.

Parameters

  • limit (integer) The amount of txs to respond with.

Request

HTTP
JSONRPC

Response

NumUnconfirmedTxs

Get data about unconfirmed transactions.

Parameters

None

Request

HTTP
JSONRPC

Response

Tx

Parameters

  • hash (string): The hash of the transaction
  • prove (bool): If the response should include proof the transaction was included in a block.

Request

HTTP
JSONRPC

Response

Transaction Routes

BroadCastTxSync

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

Parameters

  • tx (string): The transaction encoded

Request

HTTP
JSONRPC

Response

BroadCastTxAsync

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

Parameters

  • tx (string): The transaction encoded

Request

HTTP
JSONRPC

Response

CheckTx

Checks the transaction without executing it.

Parameters

  • tx (string): String of the encoded transaction

Request

HTTP
JSONRPC

Response

ABCI Routes

ABCIInfo

Get some info about the application.

Parameters

None

Request

HTTP
JSONRPC

Response

ABCIQuery

Query the application for some information.

Parameters

  • path (string): Path to the data. This is defined by the application.
  • data (string): The data requested
  • height (integer): Height at which the data is being requested for.
  • prove (bool): Include proofs of the transactions inclusion in the block

Request

HTTP
JSONRPC

Response

Evidence Routes

BroadcastEvidence

Broadcast evidence of the misbehavior.

Parameters

  • evidence (string):

Request

HTTP

JSONRPC

Response