Memos Format Standard #103
Replies: 2 comments 3 replies
-
I don't think this is a correct rule to follow / assumption:
I propose to remove these examples from the opening post in this discussion, it will without a doubt land us in episode 143 of the "I'll put my files on ledger in chunks" discussion. While sane people know this is a bad idea, attempts are being made every now and then. These examples might come across as endorsement.
✅ Agree Final note worth mentioning: "application/version" could be a bad idea to use as an example, as including app name and version in Memos could give away extra attack/scam surface: it could help to provide an easy to use attack vector when a user is already identified by r-address. |
Beta Was this translation helpful? Give feedback.
-
I agree that standardisation should be brought into memos, and, please, not only for that particular transaction type. Although, nothing prevents anyone to create a transaction blob with something they deem to be useful. Libraries should enforce and popularise the practice.
|
Beta Was this translation helpful? Give feedback.
-
Purpose and Scope
The purpose of this standard is to define a format for the memo field in XRP Ledger transactions. The memo field can be used for various applications, including but not limited to adding on-chain analytics information for a transaction. This standard is intended to be used by client libraries and user agents across various applications.
This document covers the general format for memos and includes a specific subsection for the
fundWallet
function in client libraries for Testnet transactions.Data Structure and Format
The memo field should be an object with the following properties:
data
: An optional string that represents the data.type
: An optional string that represents the type of data.format
: An optional string that represents the format of the data.The
type
andformat
fields should follow existing standards for user agent identification. Thetype
field should specify the type of data, and theformat
field should specify the format of the data.The
format
field should follow the format of standard MIME types. MIME types are used to specify the format of files sent over the Internet, such as images, videos, and audio files. The format of a MIME type is as follows:type/subtype
The
type
field indicates the general category of the data, such as text, image, or audio. Thesubtype
field indicates the specific format of the data within the category.Example
Validation Rules
To ensure that the memo field is consistent with the standard and can be read by compatible software, the following validation rules should be followed:
data
,type
, andformat
fields should be strings.data
field is optional.type
field is optional.format
field is optional.format
field is present, it should follow the format of standard MIME types.Best Practices
To ensure that the memo field is easy to read and consistent across different user agents, the following best practices are recommended:
type
andformat
fields.type
field.format
field, such as MIME types.data
field only when necessary.fundWallet Function (Testnet)
For the fundWallet function used in Testnet transactions across all client libraries, the memo field is used to add on-chain analytics information for a transaction. This tracking is only done for Testnet transactions and is not applicable to Mainnet usage.
In order to protect user privacy and security, client details (such as name and version number) should not be included in the memo field. Rather, client analytics can be collected during the connection process and do not need to be included in the memo field.
References
Beta Was this translation helpful? Give feedback.
All reactions