Reformat XLS-65 specification#463
Conversation
|
The remaining validation error is due to a missing Security section. It's out of scope for this PR to add such a section. |
…tion - Add Example JSON sections for Vault ledger entry and all transactions (VaultCreate, VaultSet, VaultDelete, VaultDeposit, VaultWithdraw, VaultClawback, Payment) with real transaction data - Add invariants for the Vault ledger entry (universal checks) and all transaction types derived from the ValidVault invariant checker - Restructure section 10 from "API" to "RPC: vault_info" matching the amendment template format with Request Fields, Response Fields, Failure Conditions, Example Request, and Example Response subsections - Update response fields table with missing fields (Data, Asset.mpt_issuance_id, shares.DomainID, shares.MPTokenMetadata) and correct Always Present values - Update response examples to use proper JSON format with response envelope - Add section 9.1 Fields for Payment transaction - Remove Index section and all Return to Index links Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Reorganize top-level sections: Abstract (1), Introduction (2), Specification (3), Rationale (4), Security Considerations (5), Appendix - Move all ledger entry, transaction, and RPC sections under "3. Specification" as subsections (3.1-3.9) - Remove "1.1 Overview" heading, merge content into Introduction body - Renumber Introduction subsections: Terminology (2.1), Actors (2.2), Connecting to the Vault (2.3) - Demote all specification headings by one level with new numbering - Add Rationale section explaining decoupled vault design - Rename FAQ section to "Appendix A: FAQ" with A.x numbering - Fix heading levels for Key Variables and Vault State Update Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@mvadari , I completely restructured the specification to match the template. |
|
|
||
| A protocol connecting to a Vault must track its debt. Furthermore, the updates to the Vault state when funds are removed or added back must be handled in the transactors of the protocol. For an example, please refer to the [Lending Protocol](https://github.com/XRPLF/XRPL-Standards/discussions/190) specification. | ||
|
|
||
| [**Return to Index**](#index) | ||
| ## 3. Specification |
There was a problem hiding this comment.
If you remove the Specification heading and move everything out by one level, you won't run out of Markdown heading depth.
(P.S. AI handles this sort of direction well)
There was a problem hiding this comment.
Nope, can't do that. It's part of the mandated spec. format :)
There was a problem hiding this comment.
The opposite is part of the mandated spec format :)
There was a problem hiding this comment.
I don't see what to fix here. Specification is a mandated section in the XLS_TEMPLATE.md
|
Actually, @mvadari, it makes no sense to add error codes in a separate PR. I'm adding them here. |
|
|
||
| The key of the `Vault` object is the result of [`SHA512-Half`](https://xrpl.org/docs/references/protocol/data-types/basic-data-types/#hashes) of the following values concatenated in order: | ||
|
|
||
| - The `Vault` space key `0x0056` (capital V) | ||
| - The [`AccountID`](https://xrpl.org/docs/references/protocol/binary-format/#accountid-fields) of the account submitting the `VaultSet`transaction, i.e.`VaultOwner`. | ||
| - The [`ACCOUNTID`](https://xrpl.org/docs/references/protocol/binary-format/#accountid-fields) of the account submitting the `VaultSet`transaction, i.e.`VaultOwner`. |
There was a problem hiding this comment.
Case should be changed back here too
| | `Asset` | Yes | `string or object` | `ISSUE` | `N/A` | The asset (`XRP`, `IOU` or `MPT`) of the Vault. | | ||
| | `AssetsMaximum` | No | `number` | `NUMBER` | 0 | The maximum asset amount that can be held in a vault. | | ||
| | `MPTokenMetadata` | No | `string` | `BLOB` | | Arbitrary metadata about the share `MPT`, in hex format, limited to 1024 bytes. | | ||
| | `WithdrawalPolicy` | No | `number` | `UINT8` | `strFirstComeFirstServe` | Indicates the withdrawal strategy used by the Vault. | |
There was a problem hiding this comment.
Is there supposed to be a str prefix?
| @@ -287,14 +256,14 @@ Because the share amount is rounded down, the actual assets taken from the depos | |||
|
|
|||
| $$\Delta_{assets'} = \frac{\Delta_{shares} \times \Gamma_{assets}}{\Gamma_{shares}}$$ | |||
|
|
|||
| #### Vault State Update | |||
| ##### Vault State Update | |||
High Level Overview of Change
This PR restructures XLS-65 specfication, without functional changes.
Context of Change
Type of Change