Skip to main content

server_definitions

POST

Returns the definitions.json data the server uses.It provides the definitions needed to serialize and deserialize transactions and ledger entries in SDK-compatible form.
param[0]
parametersobjectrequired
hashstring
The hash of a set of definitions you already hold.When it matches the server's hash, the body is omitted and only the hash is returned, reducing unnecessary transfer.
Responses
FIELDSarray
The list of field definitions. Each item consists of a field name and its serialization metadata.
TRANSACTION_FORMATSobject
The structure definition for each transaction type.
LEDGER_ENTRY_FORMATSobject
The structure definition for each ledger entry type.
TRANSACTION_FLAGSobject
The flag values for each transaction type.
LEDGER_ENTRY_FLAGSobject
The flag values for ledger entries.
ACCOUNT_SET_FLAGSobject
The flag values for the AccountSet transaction.
TRANSACTION_RESULTSobject
The mapping between transaction result codes and their numeric values.
TYPESobject
The mapping between serialization type names and their numeric values.
hashstring
The hash of this set of definitions. The body is omitted when it matches the hash in the request.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://xrpl-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"method": "server_definitions",
"params": [
{}
]
}'