Show / Hide Table of Contents

Namespace Xrpl.BinaryCodec.Types

Classes

AccountId

Class defining how to encode and decode an AccountID
The unique identifier for an account.

Amount

AmountValue

Blob

The Blob type is a length-prefixed field with arbitrary data.
Two common fields that use this type are SigningPubKey and TxnSignature, which contain (respectively) the public key and signature that authorize a transaction to be executed.
Blob fields have no further structure to their contents, so they consist of exactly the amount of bytes indicated in the variable-length encoding, after the Field ID and length prefixes.

Variable length encoded type

Comparable

Currency

Class defining how to encode and decode Currencies

Hash

The XRP Ledger has several "hash" types: Hash128, Hash160, and Hash256.
These fields contain arbitrary binary data of the given number of bits, which may or may not represent the result of a hash operation.
All such fields are serialized as the specific number of bits, with no length indicator, in big-endian byte order.

Base class defining how to encode and decode hashes

Hash128

Hash with a width of 128 bits

Hash160

Hash with a width of 160 bits

Hash192

Represents a 192-bit (24-byte) hash (e.g., MPTokenIssuanceID).

Hash256

Hash with a width of 256 bits

Int32Type

Signed 32-bit integer type for XRPL serialization (type code 10).

Int64Type

Signed 64-bit integer type for XRPL serialization (type code 11). JSON representation is a string to avoid precision loss.

InvalidAmountValueException

IouValue

Issue

Represents an Issue (currency + optional issuer, or MPT issuance ID). Supports XRP, IOU (currency+issuer), and MPT (mpt_issuance_id) formats. Binary format: XRP: 20 bytes (currency, all zeros) IOU: 40 bytes (20 currency + 20 issuer) MPT: 44 bytes (20 account + 20 noAccount marker + 4 sequence) MPT binary layout matches rippled's STIssue serialization:

  • 20 bytes: AccountID extracted from MPTokenIssuanceID
  • 20 bytes: noAccount() = uint160{1} (19 zeros + 0x01)
  • 4 bytes: token sequence (raw bytes from MPTID, effectively little-endian due to rippled's memcpy+add32 pattern on LE platforms)

MptAmount

NumberType

XRPL Number type (serialized type code 9). Serialized as 12 bytes big-endian: 8 bytes — mantissa (signed int64, big-endian) 4 bytes — exponent (signed int32, big-endian) For non-zero values, mantissa is normalized to [10^18, long.MaxValue (2^63-1)]. Zero is represented as mantissa=0, exponent=Int32.MinValue (-2147483648). Exponent range: [-32768, 32768]. Used by Loan/LoanBroker fields (PrincipalRequested, DebtMaximum, etc.) per XLS-66. Encoding matches rippled Number class (include/xrpl/basics/Number.h).

Path

Class for serializing/deserializing Paths

PathHop

The object representation of a Hop, an issuer AccountID, an account AccountID, and a Currency

PathSet

Deserialize and Serialize the PathSet type

PrecisionException

SerializedType

StArray

Class for serializing and deserializing Arrays of Objects

StExtensions

extension for ISerializedType

StObject

Class for Serializing/Deserializing objects

StReader

TransactionType

TransactionType.Enumeration

Uint16

Derived UInt class for serializing/deserializing 16 bit UInt

Uint32

Derived UInt class for serializing/deserializing 32 bit UInt

Uint64

Derived UInt class for serializing/deserializing 64 bit UInt

Uint8

Derived UInt class for serializing/deserializing 8 bit UInt

Uint<T>

Base class for serializing and deserializing unsigned integers.

Vector256

Class for serializing and deserializing vectors of Hash256

XChainBridgeType

XChainBridge composite type (type code 25). Serialized as: LockingChainDoor (AccountID) + LockingChainIssue (Issue) + IssuingChainDoor (AccountID) + IssuingChainIssue (Issue)

Interfaces

ISerializedType

In this article
Back to top Generated by DocFX