Last updated
Edit

MPToken

(Requires the MPToken amendment )

The MPToken object represents a number of tokens held by an account that is not the token issuer. MPTs are acquired via ordinary payment or DEX transactions, and can optionally be redeemed or exchanged using these same types of transactions. The object key of the MPToken is derived from hashing the space key, the holder's address, and the MPTokenIssuanceID.

Example MPToken JSON

{
    "LedgerEntryType": "MPToken",
    "Account": "rajgkBmMxmz161r8bWYH7CQAFZP5bA9oSG",
    "MPTokenIssuanceID": "000004C463C52827307480341125DA0577DEFC38405B0E3E",
    "Flags": 0,
    "MPTAmount": "100000000",
    "OwnerNode": "1"
}

MPTokenID

The MPTokenID is the result of SHA512-Half of the following values, concatenated in order:

  • The MPToken space key (0x0074).
  • The MPTokenIssuanceID for the issuance being held.
  • The AccountID of the token holder.

MPToken Fields

MPToken objects have the following fields.

Field NameJSON TypeInternal TypeDescription
LedgerEntryTypenumberUInt16The value 0x007F, mapped to the string MPToken, indicates that this object describes an individual account's holding of an MPT.
AccountstringAccountIDThe owner of the MPT.
MPTokenIssuanceIDstringUInt192The MPTokenIssuance identifier.
MPTAmountstringUInt64This value specifies a positive amount of tokens currently held by the owner. Valid values for this field are between 0x0 and 0x7FFFFFFFFFFFFFFF.
FlagsnumberUInt32(Default) See MPToken Flags
PreviousTxnIDstringHash256Transaction ID of the transaction that most recently modified this object.
PreviousTxnLgrSeqnumberUInt32The sequence of the ledger that contains the transaction that most recently modified this object.
OwnerNodestringUInt64(Default) The page in the owner's directory where this item is referenced.

MPToken Flags

Flags are properties or other options associated with the MPToken object.

Flag NameFlag ValueDescription
lsfMPTLocked0x00000001If enabled, indicates that the MPT owned by this account is currently locked and cannot be used in any XRP transactions other than sending value back to the issuer.
lsfMPTAuthorized0x00000002(Only applicable for allow-listing) If set, indicates that the issuer has authorized the holder for the MPT. This flag can be set using a MPTokenAuthorize transaction; it can also be "un-set" using a MPTokenAuthorize transaction specifying the tfMPTUnauthorize flag.