Skip to content

feat: Add MPToken issuance creation feature#439

Open
RomThpt wants to merge 4 commits intoGemWallet:masterfrom
XRPL-Commons:pr/mptoken-issuance-create
Open

feat: Add MPToken issuance creation feature#439
RomThpt wants to merge 4 commits intoGemWallet:masterfrom
XRPL-Commons:pr/mptoken-issuance-create

Conversation

@RomThpt
Copy link

@RomThpt RomThpt commented Jan 12, 2026

Summary

  • Add createMPTokenIssuance function to LedgerContext for MPTokenIssuanceCreate transaction
  • Create CreateMPTokenIssuance page with comprehensive form including:
    • Asset scale (decimal places 0-9)
    • Maximum amount (optional supply cap)
    • Transfer fee percentage (0-50%)
    • XLS-89 metadata JSON (ticker, name, description, icon)
    • Token capability flags:
      • Can Transfer (holders can send to each other)
      • Can Trade (tradeable on DEX)
      • Can Escrow
      • Can Lock (issuer can lock holder tokens)
      • Can Clawback (issuer can reclaim tokens)
      • Require Authorization (holders need approval)
  • Add route for /create-mptoken-issuance
  • Update mock for tests

This PR enables token issuers to create new MPToken issuances directly from the wallet with full control over token properties.

Note: This PR depends on #436, #437, and #438 (MPToken base features).

Test plan

  • TypeScript compilation passes
  • Existing tests pass
  • Manual testing: Create MPToken issuance with default settings
  • Manual testing: Create MPToken with custom asset scale and transfer fee
  • Manual testing: Verify metadata is properly hex-encoded
  • Manual testing: Verify flag combinations work correctly

Add TanStack Query (React Query) to improve data fetching performance
and user experience by caching account balance data across page
navigations.

Changes:
- Add @tanstack/react-query dependency
- Create QueryContext with QueryClientProvider and sensible defaults
- Add useAccountBalances hook for cached balance fetching
- Refactor TokenListing to use the new cached hook
- Update TokenListing tests to work with QueryClient
Add support for displaying Multi-Purpose Tokens (MPT) in the wallet's
tokens page with metadata support following XLS-89 specification.

Changes:
- Add MPToken types for XLS-89 metadata structure
- Add fetchMPTokenData utility for fetching and parsing MPToken data
- Create MPTokenDisplay molecule for individual token rendering
- Create MPTokenListing organism for listing all MPTokens
- Integrate MPTokenListing into TokenListing component
- Add MPTOKEN_REMOVE_PATH constant (for future PR)

Features:
- Display ticker, name, icon from token metadata
- Format balance using AssetScale from issuance
- Show issuer name with truncation and tooltips
- Support remove button for zero-balance tokens (requires authorization PR)
Add ability to authorize (hold) and revoke MPTokens via the UI.

Changes:
- Add addMPTokenAuthorization and removeMPTokenAuthorization to LedgerContext
- Create AddMPToken page for authorizing new MPTokens by issuance ID
- Create MPTokenRemove page for revoking MPToken authorization
- Add routes for /add-mptoken and /mptoken-remove
- Update ledger context mock for tests

The MPTokenAuthorize transaction allows users to:
- Hold a new MPToken by providing the MPTokenIssuanceID
- Remove authorization when balance is 0
Add ability for users to create their own MPToken issuances (issue
new tokens on XRPL).

Changes:
- Add createMPTokenIssuance function to LedgerContext
- Create CreateMPTokenIssuance page with form for:
  - Asset scale (decimal places)
  - Maximum amount (supply cap)
  - Transfer fee percentage
  - XLS-89 metadata (JSON format)
  - Token capability flags (transfer, trade, escrow, lock, clawback, etc.)
- Add route for /create-mptoken-issuance
- Update mock for tests

This allows token issuers to create new MPToken issuances with full
control over token properties and capabilities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant