Sei — Services
API reference for Sei. All methods ->
Services
/cosmos/base/tendermint/v1beta1/blocks/latest
Retrieves the latest block.
Parameters
None.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/base/tendermint/v1beta1/blocks/latest
Response example
{
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"block": {
"header": {
"version": {
"block": "string",
"app": "string"
},
"chain_id": "string",
"height": "string",
"time": "2023-03-02T13:02:59.747Z",
"last_block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"last_commit_hash": "string",
"data_hash": "string",
"validators_hash": "string",
"next_validators_hash": "string",
"consensus_hash": "string",
"app_hash": "string",
"last_results_hash": "string",
"evidence_hash": "string",
"proposer_address": "string"
},
"data": {
"txs": [
"string"
]
},
"evidence": {
"evidence": [
{
"duplicate_vote_evidence": {
"vote_a": {
"type": "SIGNED_MSG_TYPE_UNKNOWN",
"height": "string",
"round": 0,
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"timestamp": "2023-03-02T13:02:59.747Z",
"validator_address": "string",
"validator_index": 0,
"signature": "string"
},
"vote_b": {
"type": "SIGNED_MSG_TYPE_UNKNOWN",
"height": "string",
"round": 0,
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"timestamp": "2023-03-02T13:02:59.747Z",
"validator_address": "string",
"validator_index": 0,
"signature": "string"
},
"total_voting_power": "string",
"validator_power": "string",
"timestamp": "2023-03-02T13:02:59.747Z"
},
"light_client_attack_evidence": {
"conflicting_block": {
"signed_header": {
"header": {
"version": {
"block": "string",
"app": "string"
},
"chain_id": "string",
"height": "string",
"time": "2023-03-02T13:02:59.747Z",
"last_block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"last_commit_hash": "string",
"data_hash": "string",
"validators_hash": "string",
"next_validators_hash": "string",
"consensus_hash": "string",
"app_hash": "string",
"last_results_hash": "string",
"evidence_hash": "string",
"proposer_address": "string"
},
"commit": {
"height": "string",
"round": 0,
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"signatures": [
{
"block_id_flag": "BLOCK_ID_FLAG_UNKNOWN",
"validator_address": "string",
"timestamp": "2023-03-02T13:02:59.747Z",
"signature": "string"
}
]
}
},
"validator_set": {
"validators": [
{
"address": "string",
"pub_key": {
"ed25519": "string",
"secp256k1": "string"
},
"voting_power": "string",
"proposer_priority": "string"
}
],
"proposer": {
"address": "string",
"pub_key": {
"ed25519": "string",
"secp256k1": "string"
},
"voting_power": "string",
"proposer_priority": "string"
},
"total_voting_power": "string"
}
},
"common_height": "string",
"byzantine_validators": [
{
"address": "string",
"pub_key": {
"ed25519": "string",
"secp256k1": "string"
},
"voting_power": "string",
"proposer_priority": "string"
}
],
"total_voting_power": "string",
"timestamp": "2023-03-02T13:02:59.747Z"
}
}
]
},
"last_commit": {
"height": "string",
"round": 0,
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"signatures": [
{
"block_id_flag": "BLOCK_ID_FLAG_UNKNOWN",
"validator_address": "string",
"timestamp": "2023-03-02T13:02:59.747Z",
"signature": "string"
}
]
}
}
}
/cosmos/base/tendermint/v1beta1/blocks/{height}
Retrieves the block for a given height.
Parameters
height(string; int64; path; required): a height to query the block at.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/base/tendermint/v1beta1/blocks/{height}
Response example
{
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"block": {
"header": {
"version": {
"block": "string",
"app": "string"
},
"chain_id": "string",
"height": "string",
"time": "2023-03-02T13:04:50.862Z",
"last_block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"last_commit_hash": "string",
"data_hash": "string",
"validators_hash": "string",
"next_validators_hash": "string",
"consensus_hash": "string",
"app_hash": "string",
"last_results_hash": "string",
"evidence_hash": "string",
"proposer_address": "string"
},
"data": {
"txs": [
"string"
]
},
"evidence": {
"evidence": [
{
"duplicate_vote_evidence": {
"vote_a": {
"type": "SIGNED_MSG_TYPE_UNKNOWN",
"height": "string",
"round": 0,
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"timestamp": "2023-03-02T13:04:50.862Z",
"validator_address": "string",
"validator_index": 0,
"signature": "string"
},
"vote_b": {
"type": "SIGNED_MSG_TYPE_UNKNOWN",
"height": "string",
"round": 0,
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"timestamp": "2023-03-02T13:04:50.862Z",
"validator_address": "string",
"validator_index": 0,
"signature": "string"
},
"total_voting_power": "string",
"validator_power": "string",
"timestamp": "2023-03-02T13:04:50.862Z"
},
"light_client_attack_evidence": {
"conflicting_block": {
"signed_header": {
"header": {
"version": {
"block": "string",
"app": "string"
},
"chain_id": "string",
"height": "string",
"time": "2023-03-02T13:04:50.862Z",
"last_block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"last_commit_hash": "string",
"data_hash": "string",
"validators_hash": "string",
"next_validators_hash": "string",
"consensus_hash": "string",
"app_hash": "string",
"last_results_hash": "string",
"evidence_hash": "string",
"proposer_address": "string"
},
"commit": {
"height": "string",
"round": 0,
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"signatures": [
{
"block_id_flag": "BLOCK_ID_FLAG_UNKNOWN",
"validator_address": "string",
"timestamp": "2023-03-02T13:04:50.862Z",
"signature": "string"
}
]
}
},
"validator_set": {
"validators": [
{
"address": "string",
"pub_key": {
"ed25519": "string",
"secp256k1": "string"
},
"voting_power": "string",
"proposer_priority": "string"
}
],
"proposer": {
"address": "string",
"pub_key": {
"ed25519": "string",
"secp256k1": "string"
},
"voting_power": "string",
"proposer_priority": "string"
},
"total_voting_power": "string"
}
},
"common_height": "string",
"byzantine_validators": [
{
"address": "string",
"pub_key": {
"ed25519": "string",
"secp256k1": "string"
},
"voting_power": "string",
"proposer_priority": "string"
}
],
"total_voting_power": "string",
"timestamp": "2023-03-02T13:04:50.862Z"
}
}
]
},
"last_commit": {
"height": "string",
"round": 0,
"block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"signatures": [
{
"block_id_flag": "BLOCK_ID_FLAG_UNKNOWN",
"validator_address": "string",
"timestamp": "2023-03-02T13:04:50.862Z",
"signature": "string"
}
]
}
}
}
/cosmos/base/tendermint/v1beta1/node_info
Retrieves the current node info.
Parameters
None.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/base/tendermint/v1beta1/node_info
Response example
{
"default_node_info": {
"protocol_version": {
"p2p": "string",
"block": "string",
"app": "string"
},
"default_node_id": "string",
"listen_addr": "string",
"network": "string",
"version": "string",
"channels": "string",
"moniker": "string",
"other": {
"tx_index": "string",
"rpc_address": "string"
}
},
"application_version": {
"name": "string",
"app_name": "string",
"version": "string",
"git_commit": "string",
"build_tags": "string",
"go_version": "string",
"build_deps": [
{
"path": "string",
"version": "string",
"sum": "string"
}
],
"cosmos_sdk_version": "string"
}
}
/cosmos/base/tendermint/v1beta1/syncing
Retrieves node syncing state.
Parameters
None.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/base/tendermint/v1beta1/syncing
Response example
{
"syncing": true
}
/cosmos/base/tendermint/v1beta1/validatorsets/latest
Retrieves the latest validator-set.
Parameters
pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is the total number of results to be returned in the result page. If left empty, it will default to a value to be set by each app.pagination.count_total(boolean; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/base/tendermint/v1beta1/validatorsets/latest
Response example
{
"block_height": "string",
"validators": [
{
"address": "string",
"pub_key": {
"type_url": "string",
"value": "string"
},
"voting_power": "string",
"proposer_priority": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/base/tendermint/v1beta1/validatorsets/{height}
Retrieves the validator-set at a given height.
Parameters
height(string; int64; path; required): the height to retrieve the validator-set at.pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is the total number of results to be returned in the result page. If left empty, it will default to a value to be set by each app.pagination.count_total(boolean; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/base/tendermint/v1beta1/validatorsets/{height}
Response example
{
"block_height": "string",
"validators": [
{
"address": "string",
"pub_key": {
"type_url": "string",
"value": "string"
},
"voting_power": "string",
"proposer_priority": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/tx/v1beta1/simulate
Simulates executing a transaction to estimate gas usage.
Parameters
<body>(object; required):
{
"tx": {
"body": {
"messages": [
{
"type_url": "string",
"value": "string"
}
],
"memo": "string",
"timeout_height": "string",
"extension_options": [
{
"type_url": "string",
"value": "string"
}
],
"non_critical_extension_options": [
{
"type_url": "string",
"value": "string"
}
]
},
"auth_info": {
"signer_infos": [
{
"public_key": {
"type_url": "string",
"value": "string"
},
"mode_info": {
"single": {
"mode": "SIGN_MODE_UNSPECIFIED"
},
"multi": {
"bitarray": {
"extra_bits_stored": 0,
"elems": "string"
},
"mode_infos": [
null
]
}
},
"sequence": "string"
}
],
"fee": {
"amount": [
{
"denom": "string",
"amount": "string"
}
],
"gas_limit": "string",
"payer": "string",
"granter": "string"
}
},
"signatures": [
"string"
]
},
"tx_bytes": "string"
}
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/tx/v1beta1/simulate
Response example
{
"gas_info": {
"gas_wanted": "string",
"gas_used": "string"
},
"result": {
"data": "string",
"log": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string",
"index": true
}
]
}
]
}
}
/cosmos/tx/v1beta1/txs
Retrieves transactions by event.
Parameters
events(array[string]; query): the list of transaction event type.pagination.key(string; byte; query): key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.offset(string; uint64; query): offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of the pagination parameters should be set —pagination.keyorpagination.offset.pagination.limit(string; uint64; query): limit is the total number of results to be returned in the result page. If left empty, it will default to a value to be set by each app.pagination.count_total(boolean; query): count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.pagination.reverse(boolean; query): reverse is set to true if results are to be returned in the descending order.order_by(string; query): the following values are available:ORDER_BY_UNSPECIFIED(default): specifies an unknown sorting order. OrderBy defaults to ASC in this case.ORDER_BY_ASC: defines ascending order.ORDER_BY_DESC: defines descending order.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/tx/v1beta1/txs
Response example
{
"txs": [
{
"body": {
"messages": [
{
"type_url": "string",
"value": "string"
}
],
"memo": "string",
"timeout_height": "string",
"extension_options": [
{
"type_url": "string",
"value": "string"
}
],
"non_critical_extension_options": [
{
"type_url": "string",
"value": "string"
}
]
},
"auth_info": {
"signer_infos": [
{
"public_key": {
"type_url": "string",
"value": "string"
},
"mode_info": {
"single": {
"mode": "SIGN_MODE_UNSPECIFIED"
},
"multi": {
"bitarray": {
"extra_bits_stored": 0,
"elems": "string"
},
"mode_infos": [
null
]
}
},
"sequence": "string"
}
],
"fee": {
"amount": [
{
"denom": "string",
"amount": "string"
}
],
"gas_limit": "string",
"payer": "string",
"granter": "string"
}
},
"signatures": [
"string"
]
}
],
"tx_responses": [
{
"height": "string",
"txhash": "string",
"codespace": "string",
"code": 0,
"data": "string",
"raw_log": "string",
"logs": [
{
"msg_index": 0,
"log": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string"
}
]
}
]
}
],
"info": "string",
"gas_wanted": "string",
"gas_used": "string",
"tx": {
"type_url": "string",
"value": "string"
},
"timestamp": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
/cosmos/tx/v1beta1/txs
Broadcasts a transaction.
Parameters
<body>(object; required):
{
"tx_bytes": "string",
"mode": "BROADCAST_MODE_UNSPECIFIED"
}
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/tx/v1beta1/txs
Response example
{
"tx_response": {
"height": "string",
"txhash": "string",
"codespace": "string",
"code": 0,
"data": "string",
"raw_log": "string",
"logs": [
{
"msg_index": 0,
"log": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string"
}
]
}
]
}
],
"info": "string",
"gas_wanted": "string",
"gas_used": "string",
"tx": {
"type_url": "string",
"value": "string"
},
"timestamp": "string"
}
}
/cosmos/tx/v1beta1/txs/{hash}
Retrieves a transaction by hash.
Parameters
<hash>(string; path; required): the transaction hash to query, encoded as a hex string.
Returns
Response codes:
- 200 — success.
- default — unexpected error.
Request example
curl https://rpc.ankr.com/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/tx/v1beta1/txs/{hash}
Response example
{
"tx": {
"body": {
"messages": [
{
"type_url": "string",
"value": "string"
}
],
"memo": "string",
"timeout_height": "string",
"extension_options": [
{
"type_url": "string",
"value": "string"
}
],
"non_critical_extension_options": [
{
"type_url": "string",
"value": "string"
}
]
},
"auth_info": {
"signer_infos": [
{
"public_key": {
"type_url": "string",
"value": "string"
},
"mode_info": {
"single": {
"mode": "SIGN_MODE_UNSPECIFIED"
},
"multi": {
"bitarray": {
"extra_bits_stored": 0,
"elems": "string"
},
"mode_infos": [
null
]
}
},
"sequence": "string"
}
],
"fee": {
"amount": [
{
"denom": "string",
"amount": "string"
}
],
"gas_limit": "string",
"payer": "string",
"granter": "string"
}
},
"signatures": [
"string"
]
},
"tx_response": {
"height": "string",
"txhash": "string",
"codespace": "string",
"code": 0,
"data": "string",
"raw_log": "string",
"logs": [
{
"msg_index": 0,
"log": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string"
}
]
}
]
}
],
"info": "string",
"gas_wanted": "string",
"gas_used": "string",
"tx": {
"type_url": "string",
"value": "string"
},
"timestamp": "string"
}
}