Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/references/protocol/binary-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ Transactions and ledger entries may contain fields of any of the following types
| [UInt256][] | 5 | 256 | No | A 256-bit binary value. This usually represents the hash of a transaction, ledger version, or ledger entry. |
| [UInt384][] | 22 | 384 | No | **UNUSED.** A 384-bit binary value. |
| [UInt512][] | 23 | 512 | No | **UNUSED.** A 512-bit binary value. |
| [Int32][] | 10 | 32 | No | **UNUSED.** A 32-bit signed integer. |
| [Int64][] | 11 | 64 | No | **UNUSED.** A 64-bit signed integer. |
| [Vector256][] | 19 | Variable | Yes | A list of 256-bit binary values. This may be a list of ledger entries or other hash values. |
| [XChainBridge][] | 25 | Variable | No | A bridge between two blockchains, identified by the door accounts and issued assets on both chains. |

Expand Down Expand Up @@ -394,6 +396,21 @@ The types UInt96, UInt384, and UInt512 are currently defined but not used.

The `TransactionType` field is a special case. In JSON, this field is conventionally represented as a string with the name of the transaction type. In binary, this field is a UInt16. The `TRANSACTION_TYPES` object in the [definitions file](#definitions-file) maps these strings to the numeric values used in the binary format.


### Int Fields
[Int32]: #int-fields
[Int64]: #int-fields

The XRP Ledger supports signed 32-bit integers (Int32), which use standard big-endian binary signed integer representation with two's complement to handle negative values.

In JSON format, Int32 fields can be represented as:

- JSON numbers (for values within JavaScript's safe integer range).
- Strings containing decimal numbers.

Although the protocol supports the Int32 type, no fields currently use it. An Int64 type has also been defined, but is unsupported.


### Vector256 Fields
[Vector256]: #vector256-fields

Expand Down