pub fn decode_ledger_data(hex_string: &str) -> XRPLCoreResult<Value>Expand description
Decode a serialized ledger header from hex into JSON.
Ledger headers use a fixed-length format (not field-prefixed like STObject):
- 4 bytes: ledger_index (UInt32)
- 8 bytes: total_coins (UInt64, as base-10 string)
- 32 bytes: parent_hash (Hash256)
- 32 bytes: transaction_hash (Hash256)
- 32 bytes: account_hash (Hash256)
- 4 bytes: parent_close_time (UInt32)
- 4 bytes: close_time (UInt32)
- 1 byte: close_time_resolution (UInt8)
- 1 byte: close_flags (UInt8)