Note: Most specifications will not need this section, as the existing types are generally sufficient. Only include this section if your specification introduces new serialized types (STypes).
[If your specification introduces new serialized types, document each SType in its own numbered subsection below. Otherwise, delete this entire section.]
Value: [Unique numeric value - see current values [here](https://github.com/XRPLF/rippled/blob/develop/include/xrpl/protocol/SField.h#L60)]
[Specify the unique numeric value for this SType]
[Describe how instances of this SType are represented in JSON. For example: "Represented as a string in base64 format" or "Represented as an object with fields X, Y, Z"]
[If applicable, describe alternative JSON input formats that may be parsed. For example: "Can accept either a string or numeric format"]
[Describe how this SType is encoded in binary format, including byte order, length prefixes, etc.]
JSON Example:
[Provide JSON example]Binary Encoding Example:
[Provide hexadecimal representation of binary encoding]
[If your specification introduces new ledger entry objects, document each entry in its own numbered section following this part of the template. Otherwise, do not include any sections with this title.]
[If your specification introduces new ledger entry common fields, you can have a section called Transaction: Common Fields before listing out any specific transactions.]
Key Space: 0x[XXXX] [Specify the 16-bit hex value for the key space]
ID Calculation Algorithm: [Describe the algorithm for calculating the unique object identifier. Include the parameters used in the tagged hashing and ensure no collisions are possible. Example: "The ID is calculated by hashing [specific parameters] with the key space prefix 0xXXXX"]
| Field Name | Constant | Required | Internal Type | Default Value | Description |
|---|---|---|---|---|---|
| LedgerEntryType | Yes | Yes | UINT16 | [EntryTypeValue] |
Identifies this as a [LedgerEntryName] object. |
| Account | No | Yes | ACCOUNT | N/A | The account that owns this object. |
[CustomField1] |
[Yes/No] |
[Yes/No/Conditional] |
[TYPE] |
[Value/N/A] |
[Description of field] |
[CustomField2] |
[Yes/No] |
[Yes/No/Conditional] |
[TYPE] |
[Value/N/A] |
[Description of field] |
| OwnerNode | No | Yes | UINT64 | N/A | Hint for which page this object appears on in the owner directory. |
| PreviousTxnID | No | Yes | HASH256 | N/A | Hash of the previous transaction that modified this object |
| PreviousTxnLgrSeq | No | Yes | UINT32 | N/A | Ledger sequence of the previous transaction that modified this object |
[Add more rows as needed for your specific fields. Remove example custom fields and replace with your actual fields.]
Field Details: [Include subsections below for any fields requiring detailed explanation]
[Detailed explanation of field behavior, validation rules, etc.]
_[Describe any ledger entry-specific flags. The values must be powers of 2. If there are none, you can omit this section.]
| Flag Name | Flag Value | Description |
|---|---|---|
[lsfFlagName1] |
0x[Value1] |
[Description1] |
[Specify which AccountRoot object owns this ledger entry and how the ownership relationship is established.]
Owner: [Account field name or "No owner" if this is a global object like FeeSettings]
Directory Registration: [Describe how this object is registered in the owner's directory, or specify if it's a special case]
Reserve Requirement: [Standard/Custom/None]
[If Standard]: This ledger entry requires the standard owner reserve increment (currently 0.2 XRP, subject to Fee Voting changes).
[If Custom]: This ledger entry requires [X] reserve units because [reason].
[If None]: This ledger entry does not require additional reserves because [reason].
Deletion Transactions: [List transaction types that can delete this object]
Deletion Conditions:
[Condition 1, e.g., "Object balance must be zero"][Condition 2, e.g., "No linked objects must exist"][Additional conditions as needed]
Account Deletion Blocker: [Yes/No]
[If Yes]: This object must be deleted before its owner account can be deleted.
[If No]: This object does not prevent its owner account from being deleted.
[Only include this section if your ledger entry uses a pseudo-account. Otherwise, delete this subsection.]
Uses Pseudo-Account: [Yes/No]
[If Yes]:
- Purpose:
[Describe why a pseudo-account is needed, e.g., "To hold assets on behalf of users"] - AccountID Derivation:
[Describe the algorithm for deriving the pseudo-account's AccountID] - Capabilities:
[List what the pseudo-account can/cannot do]
[Only include this section if your ledger entry holds assets that can be frozen/locked. Otherwise, delete this subsection.]
Freeze Support: [Yes/No]
Lock Support: [Yes/No]
[If applicable, describe how freeze/lock functionality is implemented for assets held by this object]
[List logical statements that must always be true for this ledger entry. Use <object> for before-state and <object>' for after-state.]
[Invariant 1, e.g., "<object>.Balance >= 0 AND <object>'.Balance >= 0"][Invariant 2, e.g., "IF <object>.Status == 'Active' THEN <object>.Account != NULL"][Additional invariants as needed]
RPC Type Name: [snake_case_name]
[This is the name used in account_objects and ledger_data RPC calls to filter for this object type]
{
"LedgerEntryType": "[EntryTypeName]",
"Flags": 0,
"PreviousTxnID": "[32-byte hex hash]",
"PreviousTxnLgrSeq": 12345678,
"OwnerNode": "0000000000000000",
"Account": "[r-address]",
"[CustomField1]": "[example value]",
"[CustomField2]": "[example value]"
}[If your specification introduces new transactions, document each transaction in its own numbered section following this part of the template. Otherwise, delete this entire section.]
[If your specification introduces new transaction common fields, you can have a section called Transaction: Common Fields before listing out any specific transactions.]
Naming Convention: Transaction names should follow the pattern
<LedgerEntryName><Verb>(e.g.,ExampleSet,ExampleDelete). Most specifications will need at least:
[Object]Setor[Object]Create: Creates or updates the object[Object]Delete: Deletes the object
| Field Name | Required? | JSON Type | Internal Type | Default Value | Description |
|---|---|---|---|---|---|
| TransactionType | Yes | string | UINT16 | [TransactionName] |
Identifies this as a [TransactionName] transaction |
[CustomField1] |
[Yes/No/Conditional] |
[string/number/object/array] |
[TYPE] |
[Value/N/A] |
[Description of field] |
[CustomField2] |
[Yes/No/Conditional] |
[string/number/object/array] |
[TYPE] |
[Value/N/A] |
[Description of field] |
[Add more rows as needed for your specific fields. Remove example custom fields and replace with your actual fields. Common fields like Account, Fee, Sequence, Flags, SigningPubKey, TxnSignature are assumed.]
Field Details: [Include subsections below for any fields requiring detailed explanation]
[Detailed explanation of field behavior, validation rules, etc.]
_[Describe any transaction-specific flags. The values must be powers of 2. If there are none, you can omit this section.]
| Flag Name | Flag Value | Description |
|---|---|---|
[tfFlagName1] |
0x[Value1] |
[Description1] |
Fee Structure: [Standard/Custom]
[If Standard]: This transaction uses the standard transaction fee (currently 10 drops, subject to Fee Voting changes).
[If Custom]: This transaction requires [X] drops because [reason].
[List all conditions that cause the transaction to fail, with corresponding error codes]
[Description of failure condition]([ERROR_CODE])[Description of failure condition]([ERROR_CODE])[Description of failure condition]([ERROR_CODE])
[For new error codes, provide justification for why existing codes are insufficient]
[Describe the ledger state changes when the transaction executes successfully. Omit standard changes like fee processing and sequence increment.]
On Success (tesSUCCESS):
[State change 1, e.g., "Create new [ObjectName] ledger entry"][State change 2, e.g., "Update Account's OwnerCount"][Additional changes as needed]
[Only include this section if the transaction adds or modifies metadata fields. Otherwise, delete this subsection.]
| Field Name | Validated | Always Present? | Type | Description |
|---|---|---|---|---|
[field_name] |
[Yes/No] |
[Yes/No/Conditional] |
[string/number/object/array] |
[Description] |
{
"TransactionType": "[TransactionName]",
"Account": "[r-address]",
"Fee": "10",
"Sequence": 12345,
"[CustomField1]": "[example value]",
"[CustomField2]": "[example value]"
}[If your specification introduces new permissions, document each permission in its own numbered section following this part of the template. Otherwise, do not include any sections with this title.]
[List transaction types that this permission applies to]
[Describe what the granular permission controls]
[Describe how this permission interacts with existing permissions and what it allows/restricts]
[If your specification introduces new APIs or modifies existing ones, document each API in its own numbered section following this part of the template. Otherwise, do not include any sections with this title.]
| Field Name | Required? | JSON Type | Description |
|---|---|---|---|
| command | Yes | string | Must be "[api_method_name]" |
[field_name] |
[Yes/No/Conditional] |
[string/number/object/array] |
[Description of field] |
| Field Name | Always Present? | JSON Type | Description |
|---|---|---|---|
| status | Yes | string | "success" if the request succeeded |
[ResponseField] |
[Yes/No/Conditional] |
[string/number/object/array] |
[Description of field] |
[Description of failure condition]([ERROR_CODE])[Description of failure condition]([ERROR_CODE])[Description of failure condition]([ERROR_CODE])
{
"command": "[api_method_name]",
"[field_name]": "[example value]"
}{
"status": "success",
"[ResponseField]": "[example value]"
}