Files
xrpl-dev-portal/docs/use-cases/tokenization/send-an-mpt.md
2025-03-25 11:46:02 -07:00

16 KiB

seo, labels
seo labels
description
Issue an asset-backed token such as a US Treasury bill using multi-purpose tokens.
Tokens
MPT

Sending an MPT

As an XRPL holder, I want to send multi-purpose tokens to another account in order to complete an offline transaction.

To send an MPT to another account, the receiving account must first authorize the receipt of the MPT, based on its MPToken Issuance ID. This is to prevent malicious users from spamming accounts with unwanted tokens that could negatively impact storage and XRP reserves.

Once an account receives an MPT, it can send the MPT to another account, provided the MPT was created with the Can Transfer flag set, and the receiving account authorizes the MPT.

Send MPT Utility

The Send MPT utility lets you create an account, authorize it to receive a specific MPT issuance, then send it the authorized MPT from an issuer or holder account. (You can issue an MPT using the MPT Generator utility.)

MPT Sender Utility

You can download a standalone version of the MPT Sender as sample code.

Get Accounts

To send an MPT, you need the Seed value for the MPT issuer to retrieve its account, then you need either a new account or an account seed for the target account.

To get the accounts:

  1. Open send-mpt.html in a browser.
  2. Choose your ledger instance (Devnet or Testnet).
  3. Paste the issuer seed in the left Seed field. Issuer (left) Seed field
  4. On the right side of the form, click Get New Right Account. This will populate the Seeds field with seeds for both accounts. Get new right account
  5. Click Get Accounts From Seeds. Get accounts from seeds

Authorize MPT

To receive MPTs, the right account needs to authorize the MPT.

To authorize MPTs:

  1. On the right side of the form, enter the MPT Issuance ID.
  2. Click Authorize MPTs. Authorize MPTs

Send MPT

To send an MPT:

  1. On the left side of the form, enter the Quantity of MPTs to send.
  2. Enter the Destination (likely the Right Account field, but it can be any account on the same ledger instance).
  3. Enter the MPT Issuance ID.
  4. Click Send MPT. Send MPTs

Get MPTs

To verify receipt of the MPTs, click Get MPTs for the right account. Get MPTs