Skip to main content
Privy handles user authentication and wallet management. You build transactions with light-token and Privy signs them:
  1. Authenticate with Privy
  2. Build unsigned transaction
  3. Sign transaction using Privy’s wallet provider
  4. Send signed transaction to RPC

What you will implement

SPLLight
TransfercreateTransferInstruction()createTransferInterfaceInstructions()
Wrap from SPLN/AcreateWrapInstruction()
Unwrap to SPLN/AcreateUnwrapInstructions()
Get BalancegetAccount()getAtaInterface()
Tx HistorygetSignaturesForAddress()getSignaturesForOwnerInterface()
Use the payments-and-wallets agent skill to add light-token payment support to your project:
Add the marketplace and install:
For orchestration, install the general skill:
1

Prerequisites

Connect to an RPC endpoint that supports ZK Compression (Helius, Triton):
2

Sign with Privy

Find complete examples on GitHub: Node.js and React.
Transfer light-tokens between wallets. Auto-loads cold (compressed) light-token, SPL or Token-2022 balance before sending.
About loading: Light Token accounts reduce account rent ~200x by auto-compressing inactive accounts. Before any action, the SDK detects cold balances and adds instructions to load them. This almost always fits in a single atomic transaction with your regular transfer. APIs return TransactionInstruction[][] so the same loop handles the rare multi-transaction case automatically.

Show Balance

Query token balances to show a unified balance of SOL, Light, SPL, and Token-2022.

Get Transaction History

Fetch light-token transaction history for an owner.

One-time: Create interface PDA to existing SPL Mint

For existing SPL mints (e.g. USDC), register the SPL interface once. This creates the omnibus PDA that holds SPL tokens when wrapped to light-token.
Find a full code example here.
Check if the interface already exists:
Register:
Use createMintInterface with TOKEN_PROGRAM_ID to create a new SPL mint and register the interface in one transaction: