Secret Network — Information, Transactions, ABCI, Gaia REST, Staking
API reference for Secret Network. All methods ->
Information
blockchain
Retrieves block headers for
minHeight <= height <= maxHeight.
At most 20 items will return for the minHeight or maxHeight parameters specified. If maxHeight does not yet exist, the blocks up to the current height will return. If minHeight does not exist (pruning), the earliest existing height will be used.
Parameters
minHeight(integer): the minimum block height to return.maxHeight(integer): the maximum block height to return.
Returns
Block headers, in descending order (highest first).
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "blockchain",
"params": ["1", "2"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/blockchain?minHeight=1&maxHeight=2
Response example
{
"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"
}
]
}
}
block
Retrieves a block at a specified height.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the latest block is to be fetched.
Returns
Block information.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/blockchain?height=1
Response example
{
"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=="
}
]
}
}
}
}
block_by_hash
Retrieves a block by hash.
Parameters
hash(string; required): a block hash.
Returns
Block information.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_by_hash",
"params": ["0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/block_by_hash?hash=0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED
Response example
{
"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=="
}
]
}
}
}
}
block_results
Retrieves block results at a specified height.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the latest block info is to be fetched.
Returns
Block results.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_results",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/block_results?height=1
Response example
{
"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"
}
],
"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"
]
}
}
}
}
commit
Retrieves commit results at a specified height.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the latest block commit info is to be fetched.
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.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "commit",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/commit?height=1
Response example
{
"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
}
}
validators
Retrieves a validator set at a specified height.
Validators are sorted by voting power.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the validator set corresponding to the latest block is to be fetched.page(integer; default: 1): a page number (1-based).per_page(integer; default: 30; max: 100): a number of entries per page.
Returns
Commit results.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "validators",
"params": ["1","1","30"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/validators?height=1&page=2&per_page=30
Response example
{
"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"
}
}
genesis_chunked
Retrieves Genesis in multiple chunks.
Gets genesis document in multiple chunks to make it easier to iterate through larger genesis structures. Each chunk is produced by converting the genesis document to JSON and then splitting the resulting payload into 16MB blocks, and then Base64-encoding each block.
Parameters
chunk(integer; default: 0): a sequence number of the chunk to download.
Returns
A Genesis chunk response.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "genesis_chunked",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/genesis_chunked?chunk=1
Response example
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"chunk": 0,
"total": 1,
"data": "Z2VuZXNpcwo="
}
}
dump_consensus_state
Retrieves consensus state.
Not safe to call from inside the ABCI application during a block execution.
Parameters
None.
Returns
A complete consensus state. See the Vote string description.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "dump_consensus_state",
"params": [],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/dump_consensus_state
Response example
{
"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": "357f6a6c1d27414579a8185060aa8adf9815c43c@68.183.41.207: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"
}
}
}
]
}
}
consensus_state
Retrieves consensus state.
Not safe to call from inside the ABCI application during a block execution.
Parameters
None.
Returns
Consensus state results.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "consensus_state",
"params": [],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/consensus_state
Response example
{
"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
}
}
}
}
consensus_params
Retrieves consensus parameters.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the latest block commit info is to be returned.
Returns
Consensus parameters results.
Request parameters
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "consensus_params",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/consensus_params?height=1
Response example
{
"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"
]
}
}
}
}
unconfirmed_txs
Retrieves the list of unconfirmed transactions.
Parameters
limit(integer; default: 30; max: 100): the maximum number of unconfirmed transactions to return.
Returns
The list of unconfirmed transactions.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "unconfirmed_txs",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/unconfirmed_txs?limit=1
Response example
{
"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="
]
}
}
num_unconfirmed_txs
Retrieves data on unconfirmed transactions.
Parameters
None.
Returns
The status of unconfirmed transactions.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "num_unconfirmed_txs",
"params": [],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/num_unconfirmed_txs
Response example
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"n_txs": "31",
"total": "82",
"total_bytes": "19974"
}
}
tx_search
Searches for transactions with their results.
Parameters
query(string; required): 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. An operand can be a string (escaped with single quotes), number, date, or time.prove(boolean; default: false): adds proofs of the transactions inclusion in the block.page(integer; default: 1): a page number (1-based).per_page(integer; default: 30, max: 100): a number of entries per page.order_by(string; default: asc): the order in which transactions are sorted (ascordesc), by height & index. If empty, default sorting still applies.match_events(boolean; default: false): match attributes in query within events, in addition to the height and txhash.
Returns
The list of unconfirmed transactions.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "tx_search",
"params": ["4D2000", true, "1", "30", "asc"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/tx_search?query=tx.height%4D2000&prove=true&page=1&per_page=30&order_by=asc
Response example
{
"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"
}
}
block_search
Searches for blocks by
BeginBlockandEndBlockevents.
Parameters
query(string; required): 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. An operand can be a string (escaped with single quotes), number, date, or time.page(integer; default: 1): a page number (1-based).per_page(integer; default: 30, max: 100): a number of entries per page.order_by(string; default: asc): the order in which transactions are sorted (ascordesc), by height & index. If empty, default sorting still applies.match_events(boolean; default: false): match attributes in query within events, in addition to the height.
Returns
The list of paginated blocks matching the search criteria.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_search",
"params": ["4D2000", "1", "30", "asc"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/block_search?query=block.height%4D2000&page=1&per_page=30&order_by=asc
Response example
{
"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
}
}
tx
Retrieves a transaction by hash.
Parameters
hash(string; required): a hash of a transaction to retrieve.prove(boolean; default: false): adds proofs of the transaction's inclusion in the block.
Returns
Transaction info.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "tx",
"params": ["0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED", true],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/tx?hash=0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED&prove=true
Response example
{
"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="
}
}
Transactions
broadcast_tx_sync
Returns with the response from
CheckTx. Does not wait forDeliverTxresult.
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. See https://docs.tendermint.com/v0.34/app-dev/subscribing-to-events-via-websocket.html 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:
- A malicious node drops or pretends it has committed your tx.
- A malicious proposer (not necessary the one you're communicating with) drops transactions, which might become valid in the future (https://github.com/tendermint/tendermint/issues/3322).
Please refer to Tendermint docs for formatting/encoding rules.
Parameters
tx(string; required): the transaction.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_sync",
"params": ["456"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/broadcast_tx_sync?tx=456
Response example
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"code": "0",
"data": "",
"log": "",
"codespace": "ibc",
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
},
"error": ""
}
broadcast_tx_async
Returns right away, with no response. Does not wait for
CheckTxnorDeliverTxresults.
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. See https://docs.tendermint.com/v0.34/app-dev/subscribing-to-events-via-websocket.html 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:
- A malicious node drops or pretends it has committed your tx.
- A malicious proposer (not necessary the one you're communicating with) drops transactions, which might become valid in the future (https://github.com/tendermint/tendermint/issues/3322).
- A node is offline.
Please refer to Tendermint docs for formatting/encoding rules.
Parameters
tx(string; required): the transaction.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_async",
"params": ["123"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/broadcast_tx_async?tx=123
Response example
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"code": "0",
"data": "",
"log": "",
"codespace": "ibc",
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
},
"error": ""
}
broadcast_tx_commit
Returns with the responses from
CheckTxandDeliverTx.
Use only for testing and development. In production, use BroadcastTxSync or BroadcastTxAsync. You can subscribe for the transaction result using JSONRPC via a websocket (see Tendermint docs).
CONTRACT: only returns error if mempool.CheckTx() errs or if we timeout waiting for tx to commit.
If CheckTx or DeliverTx fails, no error will be returned, but the result will contain a non-OK ABCI code.
Please refer to Tendermint docs for formatting/encoding rules.
Parameters
tx(string; required): the transaction.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_commit",
"params": ["785"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/broadcast_tx_commit?tx=785
Response example
{
"error": "",
"result": {
"height": "26682",
"hash": "75CA0F856A4DA078FC4911580360E70CEFB2EBEE",
"deliver_tx": {
"log": "",
"data": "",
"code": "0"
},
"check_tx": {
"log": "",
"data": "",
"code": "0"
}
},
"id": 0,
"jsonrpc": "2.0"
}
check_tx
Checks the transaction without executing it.
The transaction won't be added to the mempool.
Please refer to Tendermint docs for formatting/encoding rules.
Parameters
tx(string; required): the transaction.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "check_tx",
"params": ["785"],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/check_tx?tx=785
Response example
{
"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"
}
ABCI
abci_info
Retrieves application info.
Parameters
None.
Returns
Application info.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "abci_info",
"params": [],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/abci_info
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"response": {
"data": "secret",
"version": "1.6.1",
"last_block_height": "7690381",
"last_block_app_hash": "J1tJC9R3q3cNzkDcI7ipyi9NuZ8XUVbMyy7B42TPWuc="
}
}
}
abci_query
Queries the application for particular information.
Parameters
path(string; required): a path to the data ("/a/b/c").data(string; required): the data.height(integer; default: 0): the height (0 means latest).prove(boolean; default: false): adds proofs of the transactions inclusion in the block.
Returns
Particular info according to the query submitted.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/scrt/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "abci_query",
"params": ["a/b/c", "the_data", "1", true],
"id": 1
}'
curl https://rpc.ankr.com/http/scrt/blockchain?path=%2Fa%2Fb%2Fc&data=the_data&height=1&prove=true
Response example
{
"error": "",
"result": {
"response": {
"log": "exists",
"height": "0",
"proof": "010114FED0DAD959F36091AD761C922ABA3CBF1D8349990101020103011406AA2262E2F448242DF2C2607C3CDC705313EE3B0001149D16177BC71E445476174622EA559715C293740C",
"value": "61626364",
"key": "61626364",
"index": "-1",
"code": "0"
}
},
"id": 0,
"jsonrpc": "2.0"
}
Gaia REST
/node_info
Retrieves the properties of the connected node.
Parameters
None.
Returns
Node status.
Request example
curl https://rpc.ankr.com/http/scrt_cosmos/node_info
Response example
{
"application_version": {
"build_tags": "string",
"client_name": "string",
"commit": "string",
"go": "string",
"name": "string",
"server_name": "string",
"version": "string"
},
"node_info": {
"id": "string",
"moniker": "validator-name",
"protocol_version": {
"p2p": 7,
"block": 10,
"app": 0
},
"network": "gaia-2",
"channels": "string",
"listen_addr": "192.168.56.1:26656",
"version": "0.15.0",
"other": {
"tx_index": "on",
"rpc_address": "tcp://0.0.0.0:26657"
}
}
}
Transactions
/txs
Broadcasts a signed transaction to a full node.
Parameters
txBroadcast(object; required): the transaction must be a signed StdTx. The supported broadcast modes includeblock(returns after tx commit),sync(returns after CheckTx) andasync(returns right away).
{
"tx": {
"msg": [
"string"
],
"fee": {
"gas": "string",
"amount": [
{
"denom": "stake",
"amount": "50"
}
]
},
"memo": "string",
"signature": {
"signature": "MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=",
"pub_key": {
"type": "tendermint/PubKeySecp256k1",
"value": "Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH"
},
"account_number": "0",
"sequence": "0"
}
},
"mode": "block"
}
Returns
Tx broadcasting result.
Request example
curl -X POST https://rpc.ankr.com/http/YOUR_ANKR_API_KEY/scrt_cosmos/txs
Response example
{
"check_tx": {
"code": 0,
"data": "data",
"log": "log",
"gas_used": 5000,
"gas_wanted": 10000,
"info": "info",
"tags": [
"",
""
]
},
"deliver_tx": {
"code": 5,
"data": "data",
"log": "log",
"gas_used": 5000,
"gas_wanted": 10000,
"info": "info",
"tags": [
"",
""
]
},
"hash": "EE5F3404034C524501629B56E0DDC38FAD651F04",
"height": 0
}
Staking
/staking/delegators/{delegatorAddr}/delegations
Submits a delegation.
Parameters
delegation(body): delegates an amount of liquid coins to a validator.
{
"base_req": {
"from": "cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc",
"memo": "Sent via Cosmos Voyager",
"chain_id": "Cosmos-Hub",
"account_number": "0",
"sequence": "1",
"gas": "200000",
"gas_adjustment": "1.2",
"fees": [
{
"denom": "stake",
"amount": "50"
}
],
"simulate": false
},
"delegator_address": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"validator_address": "cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l",
"amount": {
"denom": "stake",
"amount": "50"
}
}
delegatorAddr(string; required): a Bech32 AccAddress of a delegator.
Returns
Submission result codes:
- 200 — OK.
- 400 — Invalid delegator address or delegation request body.
- 401 — Key password is wrong.
- 500 — Internal Server Error.
Request example
curl -X POST https://rpc.ankr.com/http/YOUR_ANKR_API_KEY/scrt_cosmos/staking/delegators/{delegatorAddr}/delegations
Response example
{
"msg": [
"string"
],
"fee": {
"gas": "string",
"amount": [
{
"denom": "stake",
"amount": "50"
}
]
},
"memo": "string",
"signature": {
"signature": "MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=",
"pub_key": {
"type": "tendermint/PubKeySecp256k1",
"value": "Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH"
},
"account_number": "0",
"sequence": "0"
}
}
/staking/delegators/{delegatorAddr}/unbonding_delegations
Submits an unbonding delegation.
Parameters
delegation(body): unbonds an amount of bonded shares from a validator.
{
"base_req": {
"from": "cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc",
"memo": "Sent via Cosmos Voyager",
"chain_id": "Cosmos-Hub",
"account_number": "0",
"sequence": "1",
"gas": "200000",
"gas_adjustment": "1.2",
"fees": [
{
"denom": "stake",
"amount": "50"
}
],
"simulate": false
},
"delegator_address": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"validator_address": "cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l",
"amount": {
"denom": "stake",
"amount": "50"
}
}
delegatorAddr(string; required): a Bech32 AccAddress of a delegator.
cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv
Returns
Result codes:
- 200 — OK.
- 400 — Invalid delegator address or unbonding delegation request body.
- 401 — Key password is wrong.
- 500 — Internal Server Error.
Request example
curl -X POST https://rpc.ankr.com/http/YOUR_ANKR_API_KEY/scrt_cosmos/staking/delegators/{delegatorAddr}/unbonding_delegations
Response example
{
"msg": [
"string"
],
"fee": {
"gas": "string",
"amount": [
{
"denom": "stake",
"amount": "50"
}
]
},
"memo": "string",
"signature": {
"signature": "MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=",
"pub_key": {
"type": "tendermint/PubKeySecp256k1",
"value": "Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH"
},
"account_number": "0",
"sequence": "0"
}
}