From 0875576802812c53de9d16a40ea3050f1540c0b7 Mon Sep 17 00:00:00 2001 From: Dennis Dawson Date: Thu, 12 Dec 2024 16:38:31 -0800 Subject: [PATCH] Updates per Shawn Xie --- .../ledger-methods/ledger_entry.md | 20 +++++++++++-------- .../mpt_holders.md | 11 ++-------- .../references/protocol/data-types/mptoken.md | 2 +- .../protocol/data-types/mptokenissuance.md | 2 +- .../protocol/transactions/metadata.md | 6 ++++++ 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md index 463186493b..4a752a2cf2 100644 --- a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md +++ b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md @@ -978,8 +978,8 @@ Return an `MPToken` object. { "id": "example_get_mpt_issuance", "command": "ledger_entry", - "mpt_issuance": "000004C463C52827307480341125DA0577DEFC38405B0E3E", - "ledger_index": "validated" + "mpt_issuance_id": "000002DFA4D893CFBC4DC6AE877EB585F90A3B47528B958D", + "account":"r33kves44ksufkHSGg3M6GPPAsoVHEN8C1" } ``` @@ -987,17 +987,21 @@ Return an `MPToken` object. ```json { - "method": "ledger_entry", - "params": [{ - "mpt_issuance": "000004C463C52827307480341125DA0577DEFC38405B0E3E", - "ledger_index": "validated" - }] + "method": "ledger_entry", + "params": [ + { + "mptoken":{ + "mpt_issuance_id": "000002DFA4D893CFBC4DC6AE877EB585F90A3B47528B958D", + "account":"r33kves44ksufkHSGg3M6GPPAsoVHEN8C1" + } + } + ] } ``` *Commandline* ```sh -rippled json ledger_entry '{ "mpt_issuance": "000004C463C52827307480341125DA0577DEFC38405B0E3E", "ledger_index": "validated" }' +rippled json ledger_entry '{ "mpt_issuance_id": "000002DFA4D893CFBC4DC6AE877EB585F90A3B47528B958D", "account":"r33kves44ksufkHSGg3M6GPPAsoVHEN8C1"}' ``` diff --git a/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/mpt_holders.md b/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/mpt_holders.md index fbaad1b7b2..0793544569 100644 --- a/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/mpt_holders.md +++ b/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/mpt_holders.md @@ -9,7 +9,7 @@ labels: {% partial file="/docs/_snippets/mpts-disclaimer.md" /%} -For a given `MPTokenIssuanceID` and ledger sequence, `mpt_holders` returns all holders of that MPT and their balance. This method likely returns very large data sets, so you should expect to implement paging via the `marker` field. +For a given `MPTokenIssuanceID` and ledger sequence, `mpt_holders` returns all holders of that MPT and their balance. This method likely returns very large data sets, so you should expect to implement paging via the `marker` field. This API is only available using Clio, not rippled. ## Request Format @@ -91,15 +91,8 @@ An `mptoken` object has the following parameters: | `account` | string | The account address of the holder who owns the `MPToken`. | | `flags` | number | The flags assigned to the`MPToken` object. | | `mpt_amount` | string | Base 10-encoded amount of the holder's balance. | -| `locked_amount` | string | Base 10-encoded amount of the locked balance. (Can be omitted if the value is 0.) | | `mptoken_index` | string | Key of the `MPToken` object. | -#### Synthetic mpt_issuance_id field -`MPTokenIssuanceID` is an identifier that allows you to specify an `MPTokenIssuance` in RPCs. The server adds a synthetically parsed `mpt_issuance_id` field to API responses to avoid the need for client-side parsing of the `MPTokenIssuanceID`. - -##### Transaction Metadata -An `mpt_issuance_id` field is provided in JSON transaction metadata (not available for binary) for all successful `MPTokenIssuanceCreate` transactions. The following APIs are impacted: `tx`, `account_tx`, `subscribe` and `ledger`. - ##### Example Example of a `tx` response: @@ -147,7 +140,7 @@ Example of an `account_objects` response: "Flags": 64, "Issuer": "rBT9cUqK6UvpvZhPFNQ2qpUTin8rDokBeL", "LedgerEntryType": "MPTokenIssuance", - "OutstandingAmount": "5a", + "OutstandingAmount": "100", "OwnerNode": "0", "PreviousTxnID": "BDC5ECA6B115C74BF4DA83E36325A2F55DF9E2C968A5CC15EB4D009D87D5C7CA", "PreviousTxnLgrSeq": 308, diff --git a/docs/references/protocol/data-types/mptoken.md b/docs/references/protocol/data-types/mptoken.md index 04273a8247..522b664755 100644 --- a/docs/references/protocol/data-types/mptoken.md +++ b/docs/references/protocol/data-types/mptoken.md @@ -41,7 +41,7 @@ The `MPTokenID` is the result of SHA512-Half of the following values, concatenat | `LedgerEntryType` | number | UInt16 | The value 0x007F, mapped to the string `MPToken`, indicates that this object describes an individual account's holding of an MPT. | | `Account` | string | AccountID | The owner of the MPT. | | `MPTokenIssuanceID` | string | UInt192 | The `MPTokenIssuance` identifier. | -| `MPTAmount` | string | UInt64 | This value specifies a positive amount of tokens currently held by the owner. Valid values for this field are between 0x0 and 0xFFFFFFFFFFFFFFFF. | +| `MPTAmount` | string | UInt64 | This value specifies a positive amount of tokens currently held by the owner. Valid values for this field are between 0x0 and 0x7FFFFFFFFFFFFFFF. | | `Flags` | number | UInt32 | (Default) See [MPToken Flags](#mptoken-flags) | | `PreviousTxnID` | string | Hash256 | Transaction ID of the transaction that most recently modified this object. | | `PreviousTxnLgrSeq` | number | UInt32 | The sequence of the ledger that contains the transaction that most recently modified this object. | diff --git a/docs/references/protocol/data-types/mptokenissuance.md b/docs/references/protocol/data-types/mptokenissuance.md index 3a9e81035f..6294f49aed 100644 --- a/docs/references/protocol/data-types/mptokenissuance.md +++ b/docs/references/protocol/data-types/mptokenissuance.md @@ -20,7 +20,7 @@ The `MPTokenIssuance` object represents a single MPT issuance and holds data ass "Issuer": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW", "AssetScale": "2", "MaximumAmount": "100000000", - "OutstandingAmount": "3e8", + "OutstandingAmount": "100", "TransferFee": 50000, "MPTokenMetadata": "", "OwnerNode": "74" diff --git a/docs/references/protocol/transactions/metadata.md b/docs/references/protocol/transactions/metadata.md index 9278f5152e..548d8b1ebf 100644 --- a/docs/references/protocol/transactions/metadata.md +++ b/docs/references/protocol/transactions/metadata.md @@ -254,7 +254,13 @@ Transactions (`tx` and `account_tx`) involving NFTs can contain the following fi | `nftoken_id` | String | Shows the `NFTokenID` for the `NFToken` that changed on the ledger as a result of the transaction. Only present if the transaction is `NFTokenMint` or `NFTokenAcceptOffer`. See [NFTokenID](../data-types/nftoken.md#nftokenid). | | `nftoken_ids` | Array | Shows all the `NFTokenIDs` for the `NFTokens` that changed on the ledger as a result of the transaction. Only present if the transaction is `NFTokenCancelOffer`. | | `offer_id` | String | Shows the `OfferID`of a new `NFTokenOffer` in a response from a `NFTokenCreateOffer` transaction. | +## MPT Fields +### Synthetic mpt_issuance_id field +`MPTokenIssuanceID` is an identifier that allows you to specify an `MPTokenIssuance` in RPCs. The server adds a synthetically parsed `mpt_issuance_id` field to API responses to avoid the need for client-side parsing of the `MPTokenIssuanceID`. + +### Transaction Metadata +An `mpt_issuance_id` field is provided in JSON transaction metadata (not available for binary) for all successful `MPTokenIssuanceCreate` transactions. The following APIs are impacted: `tx`, `account_tx`, `subscribe` and `ledger`. ## delivered_amount