Returns with the response from CheckTx. Does not wait for DeliverTx result.
This method is deprecated in Tendermint v0.36, and will be
removed in v0.37. Use broadcast_tx, which has similar
semantics.
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. See https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
See https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting for formatting/encoding rules.
Query Parameters
The transaction
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/broadcast_tx_sync?tx=456"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"code": "0",
"data": "",
"log": "",
"codespace": "ibc",
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
},
"error": ""
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Returns with the response from CheckTx. Does not wait for DeliverTx result.
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. See https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
See https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting for formatting/encoding rules.
Query Parameters
The transaction
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/broadcast_tx?tx=456"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"code": "0",
"data": "",
"log": "",
"codespace": "ibc",
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
},
"error": ""
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Returns right away, with no response. Does not wait for CheckTx nor DeliverTx results.
This method is deprecated in Tendermint v0.36, and will be
removed in v0.37. Use broadcast_tx.
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. See https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
See https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting for formatting/encoding rules.
Query Parameters
The transaction
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/broadcast_tx_async?tx=123"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"code": "0",
"data": "",
"log": "",
"codespace": "ibc",
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
},
"error": ""
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Returns with the responses from CheckTx and DeliverTx.
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. See https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
See https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting for formatting/encoding rules.
Query Parameters
The transaction
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/broadcast_tx_commit?tx=785"{
"error": "",
"result": {
"height": "26682",
"hash": "75CA0F856A4DA078FC4911580360E70CEFB2EBEE",
"deliver_tx": {
"log": "",
"data": "",
"code": "0"
},
"check_tx": {
"log": "",
"data": "",
"code": "0"
}
},
"id": 0,
"jsonrpc": "2.0"
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Checks the transaction without executing it.
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.
Query Parameters
The transaction
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/check_tx?tx=785"{
"error": "",
"result": {
"code": "0",
"data": "",
"log": "",
"info": "",
"gas_wanted": "1",
"gas_used": "0",
"events": [
{
"type": "app",
"attributes": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
}
],
"codespace": "bank"
},
"id": 0,
"jsonrpc": "2.0"
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Removes a transaction from the mempool.
Query Parameters
The transaction key
Response Body
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/remove_tx?txKey=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Fetch events posted by the consensus node.
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:
tm.event = 'NewBlock'Multiple terms can be combined with AND, for example to match the transaction event with a given hash, use:
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:
[]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:
reward.address EXISTS AND reward.balance > 45The 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.
Query Parameters
Event filter query
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/events"{
"id": 0,
"jsonrpc": "2.0",
"items": [
{
"cursor": "0005d7c09065e9a7-01cf",
"data": {
"type": "tendermint/event/Tx",
"value": "string"
}
}
],
"more": true,
"oldest": "0005d7c09065e9a7-01cf",
"newest": "0005d7c090660099-0200"
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Subscribe for events via WebSocket.
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'")
See list of all possible events here https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants
For complete query syntax, check out https://godoc.org/github.com/tendermint/tendermint/libs/pubsub/query.
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.
Query Parameters
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 Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/subscribe?query=tm.event+%3D+%27Tx%27+AND+tx.height+%3D+5"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"property1": null,
"property2": null
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Unsubscribe from event on Websocket
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
}Query Parameters
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 Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/unsubscribe?query=tm.event+%3D+%27Tx%27+AND+tx.height+%3D+5"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"property1": null,
"property2": null
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Unsubscribe from all events via WebSocket
Unsubscribe from all events via WebSocket
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/unsubscribe_all"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"property1": null,
"property2": null
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Node heartbeat
Get node health. Returns empty result (200 OK) on success, no response - in case of an error.
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/health"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"property1": null,
"property2": null
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Node Status
Get Tendermint status including node info, pubkey, latest block hash, app hash, block height, current max peer height, and time.
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/status"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"node_info": {
"protocol_version": {
"p2p": "7",
"block": "10",
"app": "0"
},
"id": "5576458aef205977e18fd50b274e9b5d9014525a",
"listen_addr": "tcp://0.0.0.0:26656",
"network": "cosmoshub-2",
"version": "0.32.1",
"channels": "4020212223303800",
"moniker": "moniker-node",
"other": {
"tx_index": "on",
"rpc_address": "tcp://0.0.0.0:26657"
}
},
"sync_info": {
"latest_block_hash": "790BA84C3545FCCC49A5C629CEE6EA58A6E875C3862175BDC11EE7AF54703501",
"latest_app_hash": "C9AEBB441B787D9F1D846DE51F3826F4FD386108B59B08239653ABF59455C3F8",
"latest_block_height": "1262196",
"latest_block_time": "2019-08-01T11:52:22.818762194Z",
"earliest_block_hash": "790BA84C3545FCCC49A5C629CEE6EA58A6E875C3862175BDC11EE7AF54703501",
"earliest_app_hash": "C9AEBB441B787D9F1D846DE51F3826F4FD386108B59B08239653ABF59455C3F8",
"earliest_block_height": "1262196",
"earliest_block_time": "2019-08-01T11:52:22.818762194Z",
"max_peer_block_height": "1262196",
"catching_up": false,
"total_synced_time": "1000000000",
"remaining_time": "0",
"total_snapshots": "10",
"chunk_process_avg_time": "1000000000",
"snapshot_height": "1262196",
"snapshot_chunks_count": "10",
"snapshot_chunks_total": "100",
"backfilled_blocks": "10",
"backfill_blocks_total": "100"
},
"validator_info": {
"address": "5D6A51A8E9899C44079C6AF90618BA0369070E6E",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
},
"voting_power": "0"
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}curl -X GET "https://rpc-terp.zenchainlabs.io/net_info"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"listening": true,
"listeners": [
"Listener(@)"
],
"n_peers": "1",
"peers": [
{
"node_id": "",
"url": "<id>@95.179.155.35:2385>"
}
]
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Dial Seeds (Unsafe)
Dial a peer, this route in under unsafe, and has to manually enabled to use
Example: curl 'localhost:26657/dial_seeds?seeds=["[email protected]:26656","[email protected]:26656"]'
Query Parameters
list of seed nodes to dial
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/dial_seeds"{
"Log": "Dialing seeds in progress. See /net_info for details"
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Add Peers/Persistent Peers (unsafe)
Set a persistent peer, this route in under unsafe, and has to manually enabled to use.
Example: curl 'localhost:26657/dial_peers?peers=["[email protected]:26656","[email protected]:26656"]&persistent=false'
Query Parameters
Have the peers you are dialing be persistent
Have the peers you are dialing be unconditional
Have the peers you are dialing be private
array of peers to dial
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/dial_peers"{
"Log": "Dialing seeds in progress. See /net_info for details"
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Flush mempool of all unconfirmed transactions
Flush flushes out the mempool. It acquires a read-lock, fetches all the transactions currently in the transaction store and removes each transaction from the store and all indexes and finally resets the cache.
Note, flushing the mempool may leave the mempool in an inconsistent state.
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/unsafe_flush_mempool"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"property1": null,
"property2": null
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get block headers (max: 20) for minHeight <= height <= maxHeight.
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).
Query Parameters
Minimum block height to return
Maximum block height to return
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/blockchain"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"last_height": "1276718",
"block_metas": [
{
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"block_size": 1000000,
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"num_txs": "54"
}
]
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get the header at a specified height
Retrieve the block header corresponding to a specified height.
Query Parameters
height to return. If no height is provided, it will fetch the latest height.
0Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/header"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get header by hash
Retrieve the block header corresponding to a block hash.
Query Parameters
header hash
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/header_by_hash?hash=0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get block at a specified height
Get Block.
Query Parameters
height to return. If no height is provided, it will fetch the latest block.
0Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/block"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"block": {
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"data": [
"yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
],
"evidence": [
{
"type": "string",
"height": 0,
"time": 0,
"total_voting_power": 0,
"validator": {
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
},
"voting_power": 0,
"address": "string"
}
}
],
"last_commit": {
"height": 0,
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"signatures": [
{
"type": 2,
"height": "1262085",
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"timestamp": "2019-08-01T11:39:38.867269833Z",
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"validator_index": 0,
"signature": "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
}
]
}
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get block by hash
Get Block By Hash.
Query Parameters
block hash
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/block_by_hash?hash=0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"{
"id": 0,
"jsonrpc": "2.0",
"result": {
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"block": {
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"data": [
"yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
],
"evidence": [
{
"type": "string",
"height": 0,
"time": 0,
"total_voting_power": 0,
"validator": {
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
},
"voting_power": 0,
"address": "string"
}
}
],
"last_commit": {
"height": 0,
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"signatures": [
{
"type": 2,
"height": "1262085",
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"timestamp": "2019-08-01T11:39:38.867269833Z",
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"validator_index": 0,
"signature": "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
}
]
}
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get block results at a specified height
Get block_results.
Query Parameters
height to return. If no height is provided, it will fetch information regarding the latest block.
0Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/block_results"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"blocks": [
{
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"block": {
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"data": [
"yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
],
"evidence": [
{
"type": "string",
"height": 0,
"time": 0,
"total_voting_power": 0,
"validator": {
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
},
"voting_power": 0,
"address": "string"
}
}
],
"last_commit": {
"height": 0,
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"signatures": [
{
"type": 2,
"height": "1262085",
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"timestamp": "2019-08-01T11:39:38.867269833Z",
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"validator_index": 0,
"signature": "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
}
]
}
}
}
],
"total_count": 2
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get commit results at a specified height
Get Commit.
Query Parameters
height to return. If no height is provided, it will fetch commit information regarding the latest block.
0Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/commit"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"signed_header": {
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"commit": {
"height": "1311801",
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"signatures": [
{
"block_id_flag": 2,
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"timestamp": "2019-04-22T17:01:58.376629719Z",
"signature": "14jaTQXYRt8kbLKEhdHq7AXycrFImiLuZx50uOjs2+Zv+2i7RTG/jnObD07Jo2ubZ8xd7bNBJMqkgtkd0oQHAw=="
}
]
}
},
"canonical": true
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get validator set at a specified height
Get Validators. Validators are sorted first by voting power (descending), then by address (ascending).
Query Parameters
height to return. If no height is provided, it will fetch validator set which corresponds to the latest block.
0Page number (1-based)
1Number of entries per page (max: 100)
30Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/validators"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"block_height": "55",
"validators": [
{
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
],
"count": "1",
"total": "25"
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}curl -X GET "https://rpc-terp.zenchainlabs.io/genesis"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"genesis": {
"genesis_time": "2019-04-22T17:00:00Z",
"chain_id": "cosmoshub-2",
"initial_height": "2",
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_gas": "1000",
"time_iota_ms": "1000"
},
"evidence": {
"max_age": "100000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
},
"validators": [
{
"address": "B00A6323737F321EB0B8D59C6FD497A14B60938A",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "cOQZvh/h9ZioSeUMZB/1Vy1Xo5x2sjrVjlE/qHnYifM="
},
"power": "9328525",
"name": "Certus One"
}
],
"app_hash": "",
"app_state": {}
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get Genesis in paginated chunks
Get genesis document in a paginated/chunked format to make it easier to iterate through larger genesis structures.
Query Parameters
Sequence number of the chunk to download.
0Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/genesis_chunked"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"chunk": 0,
"total": 1,
"data": "Z2VuZXNpcwo="
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get consensus state
Get consensus state.
Not safe to call from inside the ABCI application during a block execution.
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/dump_consensus_state"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"round_state": {
"height": "1311801",
"round": 0,
"step": 3,
"start_time": "2019-08-05T11:28:49.064658805Z",
"commit_time": "2019-08-05T11:28:44.064658805Z",
"validators": {
"validators": [
{
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
],
"proposer": {
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
},
"locked_round": -1,
"valid_round": "-1",
"votes": [
{
"round": "0",
"prevotes": [
"nil-Vote",
"Vote{19:46A3F8B8393B 1311801/00/1(Prevote) 000000000000 64CE682305CB @ 2019-08-05T11:28:47.374703444Z}"
],
"prevotes_bit_array": "BA{100:___________________x________________________________________________________________________________} 209706/170220253 = 0.00",
"precommits": [
"nil-Vote"
],
"precommits_bit_array": "BA{100:____________________________________________________________________________________________________} 0/170220253 = 0.00"
}
],
"commit_round": -1,
"last_commit": {
"votes": [
"Vote{0:000001E443FD 1311800/00/2(Precommit) 3071ADB27D1A 77EE1B6B6847 @ 2019-08-05T11:28:43.810128139Z}"
],
"votes_bit_array": "BA{100:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} 170220253/170220253 = 1.00",
"peer_maj_23s": {}
},
"last_validators": {
"validators": [
{
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
],
"proposer": {
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
},
"triggered_timeout_precommit": false
},
"peers": [
{
"node_address": "[email protected]:26656",
"peer_state": {
"round_state": {
"height": "1311801",
"round": "0",
"step": 3,
"start_time": "2019-08-05T11:28:49.21730864Z",
"proposal": false,
"proposal_block_parts_header": {
"total": 0,
"hash": ""
},
"proposal_pol_round": -1,
"proposal_pol": "____________________________________________________________________________________________________",
"prevotes": "___________________x________________________________________________________________________________",
"precommits": "____________________________________________________________________________________________________",
"last_commit_round": 0,
"last_commit": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"catchup_commit_round": -1,
"catchup_commit": "____________________________________________________________________________________________________"
},
"stats": {
"votes": "1159558",
"block_parts": "4786"
}
}
}
]
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get consensus state
Get consensus state.
Not safe to call from inside the ABCI application during a block execution.
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/consensus_state"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"round_state": {
"height/round/step": "1262197/0/8",
"start_time": "2019-08-01T11:52:38.962730289Z",
"proposal_block_hash": "634ADAF1F402663BEC2ABC340ECE8B4B45AA906FA603272ACC5F5EED3097E009",
"locked_block_hash": "634ADAF1F402663BEC2ABC340ECE8B4B45AA906FA603272ACC5F5EED3097E009",
"valid_block_hash": "634ADAF1F402663BEC2ABC340ECE8B4B45AA906FA603272ACC5F5EED3097E009",
"height_vote_set": [
{
"round": 0,
"prevotes": [
"Vote{0:000001E443FD 1262197/00/1(Prevote) 634ADAF1F402 7BB974E1BA40 @ 2019-08-01T11:52:35.513572509Z}",
"nil-Vote"
],
"prevotes_bit_array": "BA{100:xxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} 169753436/170151262 = 1.00",
"precommits": [
"Vote{5:18C78D135C9D 1262197/00/2(Precommit) 634ADAF1F402 8B5EFFFEABCD @ 2019-08-01T11:52:36.25600005Z}",
"nil-Vote"
],
"precommits_bit_array": "BA{100:xxxxxx_xxxxx_xxxx_x_xxx_xx_xx_xx__x_x_x__xxxxxxxxxxxxxx_xxxx_xx_xxxxxx_xxxxxxxx_xxxx_xxx_x_xxxx__xxx} 118726247/170151262 = 0.70"
}
],
"proposer": {
"address": "D540AB022088612AC74B287D076DBFBC4A377A2E",
"index": 0
}
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get consensus parameters
Get consensus parameters.
Query Parameters
height to return. If no height is provided, it will fetch commit information regarding the latest block.
0Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/consensus_params"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"block_height": "1",
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_gas": "1000",
"time_iota_ms": "1000"
},
"evidence": {
"max_age": "100000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get the list of unconfirmed transactions
Get list of unconfirmed transactions
Query Parameters
Page number (1-based)
1Number of entries per page (max: 100)
30Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/unconfirmed_txs"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"n_txs": "82",
"total": "82",
"total_bytes": "19974",
"txs": [
"gAPwYl3uCjCMTXENChSMnIkb5ZpYHBKIZqecFEV2tuZr7xIUA75/FmYq9WymsOBJ0XSJ8yV8zmQKMIxNcQ0KFIyciRvlmlgcEohmp5wURXa25mvvEhQbrvwbvlNiT+Yjr86G+YQNx7kRVgowjE1xDQoUjJyJG+WaWBwSiGannBRFdrbma+8SFK2m+1oxgILuQLO55n8mWfnbIzyPCjCMTXENChSMnIkb5ZpYHBKIZqecFEV2tuZr7xIUQNGfkmhTNMis4j+dyMDIWXdIPiYKMIxNcQ0KFIyciRvlmlgcEohmp5wURXa25mvvEhS8sL0D0wwgGCItQwVowak5YB38KRIUCg4KBXVhdG9tEgUxMDA1NBDoxRgaagom61rphyECn8x7emhhKdRCB2io7aS/6Cpuq5NbVqbODmqOT3jWw6kSQKUresk+d+Gw0BhjiggTsu8+1voW+VlDCQ1GRYnMaFOHXhyFv7BCLhFWxLxHSAYT8a5XqoMayosZf9mANKdXArA="
]
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get data about unconfirmed transactions
Get data about unconfirmed transactions
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/num_unconfirmed_txs"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"n_txs": "31",
"total": "82",
"total_bytes": "19974"
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Search for transactions
Search for transactions w/ their results.
See /subscribe for the query syntax.
Query Parameters
Query
Include proofs of the transactions inclusion in the block
falsePage number (1-based)
1Number of entries per page (max: 100)
30Order in which transactions are sorted ("asc" or "desc"), by height & index. If empty, default sorting will be still applied.
"desc"Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/tx_search?query=tx.height%3D1000"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"txs": [
{
"hash": "D70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED",
"height": "1000",
"index": 0,
"tx_result": {
"log": "[{\"msg_index\":\"0\",\"success\":true,\"log\":\"\"}]",
"gas_wanted": "200000",
"gas_used": "28596",
"tags": {
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
},
"tx": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU=",
"proof": {
"RootHash": "72FE6BF6D4109105357AECE0A82E99D0F6288854D16D8767C5E72C57F876A14D",
"Data": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU=",
"Proof": {
"total": "2",
"index": "0",
"leaf_hash": "eoJxKCzF3m72Xiwb/Q43vJ37/2Sx8sfNS9JKJohlsYI=",
"aunts": [
"eWb+HG/eMmukrQj4vNGyFYb3nKQncAWacq4HF5eFzDY="
]
}
}
}
],
"total_count": "2"
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Search for blocks by BeginBlock and EndBlock events
Search for blocks by BeginBlock and EndBlock events.
See /subscribe for the query syntax.
Query Parameters
Query
Page number (1-based)
1Number of entries per page (max: 100)
30Order in which blocks are sorted ("asc" or "desc"), by height. If empty, default sorting will be still applied.
"desc"Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/block_search?query=block.height+%3E+1000+AND+valset.changed+%3E+0"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"height": "12",
"txs_results": [
{
"code": "0",
"data": "",
"log": "not enough gas",
"info": "",
"gas_wanted": "100",
"gas_used": "100",
"events": [
{
"type": "app",
"attributes": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
}
],
"codespace": "ibc"
}
],
"total_gas_used": "100",
"begin_block_events": [
{
"type": "app",
"attributes": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
}
],
"end_block": [
{
"type": "app",
"attributes": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
}
],
"validator_updates": [
{
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"power": "300"
}
],
"consensus_params_updates": {
"block": {
"max_bytes": "22020096",
"max_gas": "1000",
"time_iota_ms": "1000"
},
"evidence": {
"max_age": "100000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get transactions by hash
Get a transaction
Query Parameters
transaction Hash to retrive
Include proofs of the transactions inclusion in the block
falseResponse Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/tx?hash=0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"hash": "D70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED",
"height": "1000",
"index": 0,
"tx_result": {
"log": "[{\"msg_index\":\"0\",\"success\":true,\"log\":\"\"}]",
"gas_wanted": "200000",
"gas_used": "28596",
"tags": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
},
"tx": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU="
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Get some info about the application.
Get some info about the application.
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/abci_info"{
"jsonrpc": "2.0",
"id": 0,
"result": {
"response": {
"data": "{\"size\":0}",
"version": "0.16.1",
"app_version": "1314126"
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Query the application for some information.
Query the application for some information.
Query Parameters
Path to the data ("/a/b/c")
Data
Height (0 means latest)
0Include proofs of the transactions inclusion in the block
falseResponse Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/abci_query?path=%2Fa%2Fb%2Fc&data=IHAVENOIDEA"{
"error": "",
"result": {
"response": {
"log": "exists",
"height": "0",
"proof": "010114FED0DAD959F36091AD761C922ABA3CBF1D8349990101020103011406AA2262E2F448242DF2C2607C3CDC705313EE3B0001149D16177BC71E445476174622EA559715C293740C",
"value": "61626364",
"key": "61626364",
"index": "-1",
"code": "0"
}
},
"id": 0,
"jsonrpc": "2.0"
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Broadcast evidence of the misbehavior.
Broadcast evidence of the misbehavior.
Query Parameters
JSON evidence
Response Body
application/json
application/json
curl -X GET "https://rpc-terp.zenchainlabs.io/broadcast_evidence?evidence=JSON_EVIDENCE_encoded"{
"error": "",
"result": "",
"id": 0,
"jsonrpc": "2.0"
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}