Skip to content

Conversation

mDuo13
Copy link
Collaborator

@mDuo13 mDuo13 commented Aug 13, 2025

Add JavaScript and Python sample code that shows how to encode MPT metadata following the schema defined in XLS-89d. Mention the code sample in the transaction reference.

The code samples are (I hope) consistent with the new guidelines laid out in #3230 but there's not actually a tutorial to go with them (yet). I expect further work on this topic when we rewrite the MPT concept page and reorganize the tutorials.

@mDuo13 mDuo13 added content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts python Pull requests that update Python code javascript Pull requests that update Javascript code needs japanese translation PRs with English changes that need to be added/updated in the Japanese translation of the site labels Aug 13, 2025
maria-robobug
maria-robobug previously approved these changes Aug 27, 2025
Copy link
Contributor

@maria-robobug maria-robobug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just need to update the XLS URL.

| `TransferFee` | Number | UInt16 | No | The value specifies the fee to charged by the issuer for secondary sales of the Token, if such sales are allowed. Valid values for this field are between 0 and 50,000 inclusive, allowing transfer rates of between 0.000% and 50.000% in increments of 0.001. The field _must not_ be present if the tfMPTCanTransfer flag is not set. If it is, the transaction should fail and a fee should be claimed. |
| `MaximumAmount` | String - Number | UInt64 | No | The maximum asset amount of this token that can ever be issued, as a base-10 number encoded as a string. The current default maximum limit is 9,223,372,036,854,775,807 (2^63-1). _This limit may increase in the future. If an upper limit is required, you must specify this field._ |
| `MPTokenMetadata` | String - Hexadecimal | Blob | No | Arbitrary metadata about this issuance. The limit for this field is 1024 bytes. By convention, the metadata should decode to JSON data describing what the MPT represents. The [XLS-89d specification](https://github.com/XRPLF/XRPL-Standards/pull/293) defines a recommended format for metadata. |
| `MPTokenMetadata` | String - Hexadecimal | Blob | No | Arbitrary metadata about this issuance. The limit for this field is 1024 bytes. By convention, the metadata should decode to JSON data describing what the MPT represents. The [XLS-89d specification](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0089d-multi-purpose-token-metadata-schema) defines a recommended format for metadata. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this XLS url has changed slightly, the "d" has been removed from the XLS. https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0089-multi-purpose-token-metadata-schema

@mDuo13 mDuo13 merged commit 3a548a5 into master Aug 29, 2025
3 of 4 checks passed
@mDuo13 mDuo13 deleted the mpt_metadata_sample branch August 29, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts javascript Pull requests that update Javascript code needs japanese translation PRs with English changes that need to be added/updated in the Japanese translation of the site python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants