XRPL Token Minting

Create and manage XRPL issued tokens and NFTs, including minting, trust lines, issuing payments, and setting NFT offers with customizable fees and flags.

Audits

Pass

Install

openclaw skills install xrpl-token-mint

XRPL Token Minting

Setup

npm install xrpl

ISSUED CURRENCY (Fungible Token)

Step 1: Create Trust Line (User)

{
  TransactionType: 'TrustSet',
  Account: 'rUserAddress',
  LimitAmount: {
    currency: 'USD',
    issuer: 'rIssuerAddress',
    value: '1000000'
  }
}

Step 2: Issue Token (Issuer)

{
  TransactionType: 'Payment',
  Account: 'rIssuerAddress',
  Destination: 'rUserAddress',
  Amount: {
    currency: 'USD',
    issuer: 'rIssuerAddress',
    value: '1000'
  }
}

NFT (Non-Fungible Token)

Mint NFT

{
  TransactionType: 'NFTokenMint',
  Account: 'rCreatorAddress',
  NFTokenTaxon: 0, // Collection ID
  Issuer: 'rCreatorAddress', // or different issuer
  TransferFee: 2500, // 2.5% royalty on secondary sales
  Flags: {
    tfBurnable: true,
    tfOnlyXRP: false,
    tfTrustLine: false
  },
  URI: 'ipfs://Qm...' // Metadata URL
}

Create Offer (Sell)

{
  TransactionType: 'NFTokenCreateOffer',
  Account: 'rSellerAddress',
  NFTokenID: '00080000...',
  Amount: '1000000', // 1 XRP
  Flags: tfSellNFToken
}

Accept Offer (Buy)

{
  TransactionType: 'NFTokenAcceptOffer',
  Account: 'rBuyerAddress',
  NFTokenOfferID: 'offerID...'
}

Flags

  • tfBurnable: Issuer can burn tokens
  • tfOnlyXRP: Token cannot be transferred for IOUs
  • tfTransferable: Token can be transferred
  • tfSellNFToken: Create offer is a sell offer

Key Points

  • Token name: 3-character code (e.g., "USD") or full 40-char hex
  • Precision: Up to 16 decimal places
  • TransferFee: 0-50000 (0-50%)
  • NFT Taxon: User-defined collection ID