Skip to main content
Returns an SDK-compatible definitions.json generated from the running server, containing the field, type, ledger entry type, transaction type and result code definitions needed to serialize and deserialize the XRP Ledger’s binary format. This method will use 40 Compute Units.

Reference: Here

Parameters

  • hash (string, optional) If included and the hash matches the server’s hash, the full set of definitions is not returned.

Returns

  • hash (string) A hash of the definitions. Send it back in a later request to skip the full payload when nothing has changed.
  • TYPES (object) Map of serialized type names to type codes.
  • FIELDS (array) Array of [field name, field info] pairs, where the info object has isSerialized, isSigningField, isVLEncoded, nth and type.
  • LEDGER_ENTRY_TYPES (object) Map of ledger entry type names to type codes.
  • TRANSACTION_TYPES (object) Map of transaction type names to type codes.
  • TRANSACTION_RESULTS (object) Map of transaction result code names to numeric codes.
  • TRANSACTION_FORMATS, LEDGER_ENTRY_FORMATS, TRANSACTION_FLAGS, LEDGER_ENTRY_FLAGS, ACCOUNT_SET_FLAGS (objects) The fields and flags of each transaction and ledger entry type.
Over WebSocket, send {"id":1,"command":"server_definitions"} to wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>.
The full response is around 80 KB. The example above keeps only the first entries of each section; the elided sections are marked with // ....