Last updated
Edit

MPTokenAuthorize

[Source]

(Requires the MPTokensV1 amendment )

An MPTokenAuthorize transaction controls whether an account can hold a given Multi-purpose Token (MPT). It has several uses:

  • An account indicates their willingness to hold an MPT. This creates a new MPToken entry with an initial zero balance owned by that account. This is a prerequisite to receive that type of MPT in a payment.
  • An account revokes their willingness to hold an MPT, deleting the MPToken entry. This can only be done if their balance of the given MPT is zero.
  • For an MPT that uses allow-listing, an issuer grants or revokes permission for another account to hold the given MPT.

MPTokenAuthorize Fields

In addition to the common fields, MPTokenAuthorize transactions use the following fields:

FieldJSON TypeInternal TypeRequired?Description
MPTokenIssuanceIDStringUInt192YesThe ID of the MPT to authorize.
HolderString - AddressAccountIDNoThe holder to authorize. Only used for authorization/allow-listing; must be omitted if submitted by the holder.

MPTokenAuthorize Flags

Transactions of the MPTokenAuthorize type support additional values in the Flags field, as follows:

Flag NameHex ValueDecimal ValueDescription
tfMPTUnauthorize0x000000011When the holder enables this flag, if their balance of the given MPT is zero, it revokes their willingness to hold this MPT and deletes their MPToken entry. If their balance is non-zero, the transaction fails. When an issuer enables this flag, it revokes permission for the specified holder to hold this MPT; the transaction fails if the MPT does not use allow-listing.