Tendermint-RPC API
Supported methods for Alchemy Crypto.org Tendermint RPC API.

Alchemy Tendermint API

Here you will find a list of all the methods Alchemy supports for Tendermint.
There might be methods supported by Crypto.org nodes but not by Alchemy. See the full list of Tendermint API methods on the official documentation.

RPC Protocols

There are two RPC protocols that are supported for Alchemy Tendermint.

URI/HTTP

A REST like interface.
1
curl https://cro-croeseid.alchemyapi.io/your-api-key/tendermint/block?height=5
Copied!

JSONRPC/HTTP

JSONRPC requests can be POST'd to the root RPC endpoint via HTTP.
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "block", "params": ["5"], "id": 1}' https://cro-croeseid.alchemyapi.io/your-api-key/tendermint/
Copied!

API Key

We've created an API key called your-api-key so you can easily copy and paste these sample requests above and below. However, you should replace your-api-key with your own API key when developing.

Arguments

Arguments which expect strings or byte arrays may be passed as quoted strings, like "abc" or as 0x- prefixed strings like 0x616263

Error Codes

Unlike direct Crypto.org nodes, Alchemy will return a 200response for every request served. This means even requests that resulted in an error will get back a 200 response and the corresponding error message. If the request was unable to be served by the nodes at all, users will receive a 500 response error code.

Information

Calls to get information related to the Node API.

health

Get node health.

Parameters

none

Returns

none

Example

Request
URI
JSON-RPC
1
curl https://cro-croeseid.alchemyapi.io/your-api-key/tendermint/health
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "health", "params": [], "id": 1}' https://cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": {}
5
}
Copied!

Example requests below have not been updated. When making requests please use:

1
https://cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!

status

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

Parameters

none

Returns

Status of the node

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/status
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "status", "params": [], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"id": 0,
3
"jsonrpc": "2.0",
4
"result": {
5
"node_info": {
6
"protocol_version": {
7
"p2p": "7",
8
"block": "10",
9
"app": "0"
10
},
11
"id": "5576458aef205977e18fd50b274e9b5d9014525a",
12
"listen_addr": "tcp:0.0.0.0:26656",
13
"network": "cosmoshub-2",
14
"version": "0.32.1",
15
"channels": "4020212223303800",
16
"moniker": "moniker-node",
17
"other": {
18
"tx_index": "on",
19
"rpc_address": "tcp:0.0.0.0:26657"
20
}
21
},
22
"sync_info": {
23
"latest_block_hash": "790BA84C3545FCCC49A5C629CEE6EA58A6E875C3862175BDC11EE7AF54703501",
24
"latest_app_hash": "C9AEBB441B787D9F1D846DE51F3826F4FD386108B59B08239653ABF59455C3F8",
25
"latest_block_height": "1262196",
26
"latest_block_time": "2019-08-01T11:52:22.818762194Z",
27
"earliest_block_hash": "790BA84C3545FCCC49A5C629CEE6EA58A6E875C3862175BDC11EE7AF54703501",
28
"earliest_app_hash": "C9AEBB441B787D9F1D846DE51F3826F4FD386108B59B08239653ABF59455C3F8",
29
"earliest_block_height": "1262196",
30
"earliest_block_time": "2019-08-01T11:52:22.818762194Z",
31
"catching_up": false
32
},
33
"validator_info": {
34
"address": "5D6A51A8E9899C44079C6AF90618BA0369070E6E",
35
"pub_key": {
36
"type": "tendermint/PubKeyEd25519",
37
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
38
},
39
"voting_power": "0"
40
}
41
}
42
}
Copied!

blockchain

Get block headers (max: 20) 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

    minHeight - integer, minimum block height to return
    maxHeight - integer, maximum block height to return

Returns

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

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/blockchain?minHeight=1&maxHeight=2
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "blockchain", "params": ["1", "2"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"id": 0,
3
"jsonrpc": "2.0",
4
"result": {
5
"last_height": "1276718",
6
"block_metas": [
7
{
8
"block_id": {
9
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
10
"parts": {
11
"total": 1,
12
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
13
}
14
},
15
"block_size": 1000000,
16
"header": {
17
"version": {
18
"block": "10",
19
"app": "0"
20
},
21
"chain_id": "cosmoshub-2",
22
"height": "12",
23
"time": "2019-04-22T17:01:51.701356223Z",
24
"last_block_id": {
25
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
26
"parts": {
27
"total": 1,
28
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
29
}
30
},
31
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
32
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
33
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
34
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
35
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
36
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
37
"last_results_hash": "",
38
"evidence_hash": "",
39
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
40
},
41
"num_txs": "54"
42
}
43
]
44
}
45
}
Copied!

block

Get block at a specified height.

Parameters

    height - integer, height to return. If no height is provided, it will fetch the latest block. Default value = 0

Returns

Network info.

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/block?height=1
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "block", "params": ["1"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"id": 0,
3
"jsonrpc": "2.0",
4
"result": {
5
"block_id": {
6
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
7
"parts": {
8
"total": 1,
9
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
10
}
11
},
12
"block": {
13
"header": {
14
"version": {
15
"block": "10",
16
"app": "0"
17
},
18
"chain_id": "cosmoshub-2",
19
"height": "12",
20
"time": "2019-04-22T17:01:51.701356223Z",
21
"last_block_id": {
22
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
23
"parts": {
24
"total": 1,
25
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
26
}
27
},
28
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
29
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
30
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
31
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
32
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
33
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
34
"last_results_hash": "",
35
"evidence_hash": "",
36
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
37
},
38
"data": [
39
"yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
40
],
41
"evidence": [
42
{
43
"type": "string",
44
"height": 0,
45
"time": 0,
46
"total_voting_power": 0,
47
"validator": {
48
"pub_key": {
49
"type": "tendermint/PubKeyEd25519",
50
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
51
},
52
"voting_power": 0,
53
"address": "string"
54
}
55
}
56
],
57
"last_commit": {
58
"height": 0,
59
"round": 0,
60
"block_id": {
61
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
62
"parts": {
63
"total": 1,
64
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
65
}
66
},
67
"signatures": [
68
{
69
"type": 2,
70
"height": "1262085",
71
"round": 0,
72
"block_id": {
73
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
74
"parts": {
75
"total": 1,
76
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
77
}
78
},
79
"timestamp": "2019-08-01T11:39:38.867269833Z",
80
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
81
"validator_index": 0,
82
"signature": "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
83
}
84
]
85
}
86
}
87
}
88
}
Copied!

block_by_hash

Get block by hash.

Parameters

    hash - string, block hash

Returns

Block information.

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/block_by_hash?hash=0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "block_by_hash", "params": ["0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"id": 0,
3
"jsonrpc": "2.0",
4
"result": {
5
"block_id": {
6
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
7
"parts": {
8
"total": 1,
9
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
10
}
11
},
12
"block": {
13
"header": {
14
"version": {
15
"block": "10",
16
"app": "0"
17
},
18
"chain_id": "cosmoshub-2",
19
"height": "12",
20
"time": "2019-04-22T17:01:51.701356223Z",
21
"last_block_id": {
22
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
23
"parts": {
24
"total": 1,
25
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
26
}
27
},
28
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
29
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
30
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
31
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
32
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
33
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
34
"last_results_hash": "",
35
"evidence_hash": "",
36
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
37
},
38
"data": [
39
"yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
40
],
41
"evidence": [
42
{
43
"type": "string",
44
"height": 0,
45
"time": 0,
46
"total_voting_power": 0,
47
"validator": {
48
"pub_key": {
49
"type": "tendermint/PubKeyEd25519",
50
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
51
},
52
"voting_power": 0,
53
"address": "string"
54
}
55
}
56
],
57
"last_commit": {
58
"height": 0,
59
"round": 0,
60
"block_id": {
61
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
62
"parts": {
63
"total": 1,
64
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
65
}
66
},
67
"signatures": [
68
{
69
"type": 2,
70
"height": "1262085",
71
"round": 0,
72
"block_id": {
73
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
74
"parts": {
75
"total": 1,
76
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
77
}
78
},
79
"timestamp": "2019-08-01T11:39:38.867269833Z",
80
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
81
"validator_index": 0,
82
"signature": "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
83
}
84
]
85
}
86
}
87
}
88
}
Copied!

block_results

Get block results at a specified height.

Parameters

    height - integer, height to return. If no height is provided, it will fetch informations regarding the latest block. Default value = 0

Returns

Block results.

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/block_results?height=1
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "block_results", "params": ["1"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"height": "12",
6
"txs_results": [
7
{
8
"code": "0",
9
"data": "",
10
"log": "not enough gas",
11
"info": "",
12
"gas_wanted": "100",
13
"gas_used": "100",
14
"events": [
15
{
16
"type": "app",
17
"attributes": [
18
{
19
"key": "YWN0aW9u",
20
"value": "c2VuZA==",
21
"index": false
22
}
23
]
24
}
25
],
26
"codespace": "ibc"
27
}
28
],
29
"begin_block_events": [
30
{
31
"type": "app",
32
"attributes": [
33
{
34
"key": "YWN0aW9u",
35
"value": "c2VuZA==",
36
"index": false
37
}
38
]
39
}
40
],
41
"end_block": [
42
{
43
"type": "app",
44
"attributes": [
45
{
46
"key": "YWN0aW9u",
47
"value": "c2VuZA==",
48
"index": false
49
}
50
]
51
}
52
],
53
"validator_updates": [
54
{
55
"pub_key": {
56
"type": "tendermint/PubKeyEd25519",
57
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
58
},
59
"power": "300"
60
}
61
],
62
"consensus_params_updates": {
63
"block": {
64
"max_bytes": "22020096",
65
"max_gas": "1000",
66
"time_iota_ms": "1000"
67
},
68
"evidence": {
69
"max_age": "100000"
70
},
71
"validator": {
72
"pub_key_types": [
73
"ed25519"
74
]
75
}
76
}
77
}
78
}
Copied!

commit

Get commit results at a specified height.

Parameters

    height - integer, height to return. If no height is provided, it will fetch commit information regarding the latest block. Default value = 0

Returns

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

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/commit?height=1
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "commit", "params": ["1"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"signed_header": {
6
"header": {
7
"version": {
8
"block": "10",
9
"app": "0"
10
},
11
"chain_id": "cosmoshub-2",
12
"height": "12",
13
"time": "2019-04-22T17:01:51.701356223Z",
14
"last_block_id": {
15
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
16
"parts": {
17
"total": 1,
18
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
19
}
20
},
21
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
22
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
23
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
24
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
25
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
26
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
27
"last_results_hash": "",
28
"evidence_hash": "",
29
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
30
},
31
"commit": {
32
"height": "1311801",
33
"round": 0,
34
"block_id": {
35
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
36
"parts": {
37
"total": 1,
38
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
39
}
40
},
41
"signatures": [
42
{
43
"block_id_flag": 2,
44
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
45
"timestamp": "2019-04-22T17:01:58.376629719Z",
46
"signature": "14jaTQXYRt8kbLKEhdHq7AXycrFImiLuZx50uOjs2+Zv+2i7RTG/jnObD07Jo2ubZ8xd7bNBJMqkgtkd0oQHAw=="
47
}
48
]
49
}
50
},
51
"canonical": true
52
}
53
}
Copied!

validators

Get validator set at a specified height. Validators are sorted first by voting power (descending), then by address (ascending).

Parameters

    height - integer, height to return. If no height is provided, it will fetch validator set which corresponds to the latest block. Default value = 0
    page - integer, page number (1-based). Default value = 1
    per_page - integer, number of entries per page (max: 100). Default value: 30

Returns

Commit results.

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/validators?height=1&page=1&per_page=30
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "validators", "params": ["1","1","30"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"block_height": "55",
6
"validators": [
7
{
8
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
9
"pub_key": {
10
"type": "tendermint/PubKeyEd25519",
11
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
12
},
13
"voting_power": "239727",
14
"proposer_priority": "-11896414"
15
}
16
],
17
"count": "1",
18
"total": "25"
19
}
20
}
Copied!

genesis

Get genesis.

Parameters

none

Returns

Genesis results.

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/genesis
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "genesis", "params": [], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"genesis": {
6
"genesis_time": "2019-04-22T17:00:00Z",
7
"chain_id": "cosmoshub-2",
8
"initial_height": "2",
9
"consensus_params": {
10
"block": {
11
"max_bytes": "22020096",
12
"max_gas": "1000",
13
"time_iota_ms": "1000"
14
},
15
"evidence": {
16
"max_age": "100000"
17
},
18
"validator": {
19
"pub_key_types": [
20
"ed25519"
21
]
22
}
23
},
24
"validators": [
25
{
26
"address": "B00A6323737F321EB0B8D59C6FD497A14B60938A",
27
"pub_key": {
28
"type": "tendermint/PubKeyEd25519",
29
"value": "cOQZvh/h9ZioSeUMZB/1Vy1Xo5x2sjrVjlE/qHnYifM="
30
},
31
"power": "9328525",
32
"name": "Certus One"
33
}
34
],
35
"app_hash": "",
36
"app_state": {}
37
}
38
}
39
}
Copied!

unconfirmed_txs

Get the list of unconfirmed transactions.

Parameters

    limit - integer, Maximum number of unconfirmed transactions to return (max 100). Default value 30

Returns

List of unconfirmed transactions.

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/unconfirmed_txs?limit=1
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "unconfirmed_txs", "params": ["1"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"n_txs": "82",
6
"total": "82",
7
"total_bytes": "19974",
8
"txs": [
9
"gAPwYl3uCjCMTXENChSMnIkb5ZpYHBKIZqecFEV2tuZr7xIUA75/FmYq9WymsOBJ0XSJ8yV8zmQKMIxNcQ0KFIyciRvlmlgcEohmp5wURXa25mvvEhQbrvwbvlNiT+Yjr86G+YQNx7kRVgowjE1xDQoUjJyJG+WaWBwSiGannBRFdrbma+8SFK2m+1oxgILuQLO55n8mWfnbIzyPCjCMTXENChSMnIkb5ZpYHBKIZqecFEV2tuZr7xIUQNGfkmhTNMis4j+dyMDIWXdIPiYKMIxNcQ0KFIyciRvlmlgcEohmp5wURXa25mvvEhS8sL0D0wwgGCItQwVowak5YB38KRIUCg4KBXVhdG9tEgUxMDA1NBDoxRgaagom61rphyECn8x7emhhKdRCB2io7aS/6Cpuq5NbVqbODmqOT3jWw6kSQKUresk+d+Gw0BhjiggTsu8+1voW+VlDCQ1GRYnMaFOHXhyFv7BCLhFWxLxHSAYT8a5XqoMayosZf9mANKdXArA="
10
]
11
}
12
}
Copied!

num_unconfirmed_txs

Get data about unconfirmed transactions.

Parameters

none

Returns

Status about unconfirmed transactions.

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/num_unconfirmed_txs
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "num_unconfirmed_txs", "params": [], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"n_txs": "31",
6
"total": "82",
7
"total_bytes": "19974"
8
}
9
}
Copied!
Search for transactions with their results.

Parameters

    query - string, required query.
    prove - boolean, include proofs of the transactions inclusion in the block. Default value = false
    page - integer, page number (1-based). Default value = 1
    per_page - integer, number of entries per page (max: 100). Default value = 30.
    order_by - string, Order in which transactions are sorted ("asc" or "desc"), by height & index. If empty, default sorting will be still applied. Default value = asc

Returns

List of unconfirmed transactions.

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/tx_search?query=tx.height%3D1000&prove=true&page=1&per_page=30&order_by=asc
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "tx_search", "params": ["3D1000", "true", "1", "30", "asc"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"txs": [
6
{
7
"hash": "D70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED",
8
"height": "1000",
9
"index": 0,
10
"tx_result": {
11
"log": "[{\"msg_index\":\"0\",\"success\":true,\"log\":\"\"}]",
12
"gas_wanted": "200000",
13
"gas_used": "28596",
14
"tags": {
15
"key": "YWN0aW9u",
16
"value": "c2VuZA==",
17
"index": false
18
}
19
},
20
"tx": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU=",
21
"proof": {
22
"RootHash": "72FE6BF6D4109105357AECE0A82E99D0F6288854D16D8767C5E72C57F876A14D",
23
"Data": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU=",
24
"Proof": {
25
"total": "2",
26
"index": "0",
27
"leaf_hash": "eoJxKCzF3m72Xiwb/Q43vJ37/2Sx8sfNS9JKJohlsYI=",
28
"aunts": [
29
"eWb+HG/eMmukrQj4vNGyFYb3nKQncAWacq4HF5eFzDY="
30
]
31
}
32
}
33
}
34
],
35
"total_count": "2"
36
}
37
}
Copied!

tx

Get transactions by hash.

Parameters

    hash - string, required transaction hash to retrieve
    prove - boolean, include proofs of the transactions inclusion in the block. Default value = false

Returns

Transaction info.

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/tx?hash=0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED&prove=true
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "tx", "params": ["0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED", "true"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"hash": "D70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED",
6
"height": "1000",
7
"index": 0,
8
"tx_result": {
9
"log": "[{\"msg_index\":\"0\",\"success\":true,\"log\":\"\"}]",
10
"gas_wanted": "200000",
11
"gas_used": "28596",
12
"tags": [
13
{
14
"key": "YWN0aW9u",
15
"value": "c2VuZA==",
16
"index": false
17
}
18
]
19
},
20
"tx": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU="
21
}
22
}
Copied!

Transactions

Methods for broadcasting transactions.

broadcast_tx_sync

Returns with the response from check_tx, does not wait for DeliverTx result.

WebSocket Subscription

If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSONRPC via a websocket. However, Alchemy does not currently support WebSocket subscriptions for crypto.org nodes.
You can view how to use websockets on the Tendermint docs. If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen:
    1.
    malicious node can drop or pretend it had committed your tx
    2.
    malicious proposer (not necessary the one you're communicating with) can drop transactions, which might become valid in the future
Please refer to this page for formatting/encoding rules.

Parameters

    tx - string, the transaction

Returns

none

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/broadcast_tx_sync?tx=456
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "broadcast_tx_sync", "params": ["456"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"code": "0",
6
"data": "",
7
"log": "",
8
"codespace": "ibc",
9
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
10
},
11
"error": ""
12
}
Copied!

broadcast_tx_async

Returns right away, with no response, does not wait for check_tx nor DeliverTx result.
See hint above in broadcast_tx_sync, the same applies.

Parameters

    tx - string, the transaction

Returns

none

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/broadcast_tx_async?tx=123
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "broadcast_tx_async", "params": ["123"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 0,
4
"result": {
5
"code": "0",
6
"data": "",
7
"log": "",
8
"codespace": "ibc",
9
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
10
},
11
"error": ""
12
}
Copied!

broadcast_tx_commit

Returns with the responses from CheckTX and DeliverTx.
IMPORTANT: use only for testing and development. In production, use broadcast_tx_sync or broadcast_tx_async.
CONTRACT: only returns error if mempool.CheckTx() errs or if we timeout waiting for tx to commit.
If CheckTx or DeliverTx fail, no error will be returned, but the returned result will contain a non-OK ABCI code.
Please refer to the Tendermint documentation for formatting/encoding rules

Parameters

    tx - string, required transaction

Returns

none

Example

Request
URI
JSON-RPC
1
curl cro-croeseid.alchemyapi.io/your-api-key/tendermint/broadcast_tx_commit?tx=785
Copied!
1
curl --header "Content-Type: application/json" --request POST --data '{"method": "broadcast_tx_commit", "params": ["785"], "id": 0}' cro-croeseid.alchemyapi.io/your-api-key/tendermint
Copied!
Result
1
{
2
"error": "",
3
"result": {
4
"height": "26682",
5
"hash": "75CA0F856A4DA078FC4911580360E70CEFB2EBEE",
6
"deliver_tx": {
7
"log": "",
8
"data": "",
9
"code": "0"
10
},
11
"check_tx": {
12
"log": "",
13
"data": "",
14
"code": "0"
15
}
16