Protocol
The RPC API enables you to retrieve the current abogida and protocol configuration.
Genesis Config
Returns current genesis configuration.
method:
EXPERIMENTAL_abogida_configparams: none
Example:
{
"jsonrpc": "2.0",
"id": "dontcare",
"method": "EXPERIMENTAL_abogida_config"
}What could go wrong?
When API request fails, RPC server returns a structured error response with a limited number of well-defined error variants, so client code can exhaustively handle all the possible error cases. Our JSON-RPC errors follow verror convention for structuring the error response:
{
"error": {
"name": <ERROR_TYPE>,
"cause": {
"info": {..},
"name": <ERROR_CAUSE>
},
"code": -32000,
"data": String,
"message": "Server error",
},
"id": "dontcare",
"jsonrpc": "2.0"
}Heads up
The fields
code,data, andmessagein the structure above are considered legacy ones and might be deprecated in the future. Please, don't rely on them.
Here is the exhaustive list of the error variants that can be returned by EXPERIMENTAL_abogida_config method:
ERROR_TYPE
error.name
ERROR_CAUSE
error.cause.name
Reason
Solution
INTERNAL_ERROR
INTERNAL_ERROR
Something went wrong with the node itself or overloaded
Try again later
Send a request to a different node
Check
error.cause.infofor more details
Protocol Config
Returns most recent protocol configuration or a specific queried block. Useful for finding current storage and transaction costs.
method:
EXPERIMENTAL_protocol_configparams:
finalityORblock_id
Example:
JSON
HTTPie
{
"jsonrpc": "2.0",
"id": "dontcare",
"method": "EXPERIMENTAL_protocol_config",
"params": {
"finality": "final"
}
}What could go wrong?
When API request fails, RPC server returns a structured error response with a limited number of well-defined error variants, so client code can exhaustively handle all the possible error cases. Our JSON-RPC errors follow verror convention for structuring the error response:
{
"error": {
"name": <ERROR_TYPE>,
"cause": {
"info": {..},
"name": <ERROR_CAUSE>
},
"code": -32000,
"data": String,
"message": "Server error",
},
"id": "dontcare",
"jsonrpc": "2.0"
}Heads up
The fields
code,data, andmessagein the structure above are considered legacy ones and might be deprecated in the future. Please, don't rely on them.
Here is the exhaustive list of the error variants that can be returned by EXPERIMENTAL_protocol_config method:
ERROR_TYPE
error.name
ERROR_CAUSE
error.cause.name
Reason
Solution
HANDLER_ERROR
UNKNOWN_BLOCK
The requested block has not been produced yet or it has been garbage-collected (cleaned up to save space on the RPC node)
Check that the requested block is legit
If the block had been produced more than 5 epochs ago, try to send your request to an archival node
INTERNAL_ERROR
INTERNAL_ERROR
Something went wrong with the node itself or overloaded
Try again later
Send a request to a different node
Check
error.cause.infofor more details
Last updated