Skip to main content
Solana Wallet Adapter handles wallet connection and transaction signing. You build transactions with light-token and the wallet signs them:
  1. Connect wallet via useWallet()
  2. Build unsigned transaction
  3. Sign transaction using signTransaction
  4. Send signed transaction to RPC

What you will implement

SPLLight
TransfercreateTransferInstruction()createTransferInterfaceInstructions()
ReceivegetOrCreateAssociatedTokenAccount()createLoadAtaInstructions()
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

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

Sign with Wallet Adapter

Find the complete example on GitHub: React.
Use signTransaction from useWallet() to sign light-token transactions:
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.
Your app logic may require you to create a single sign request for your user. Here’s how to do this:
While almost always you will have only one transfer transaction, you can optimize sending in the rare cases where you have multiple transactions. parallelize the loads, confirm them, and then send the transfer instruction after.
All hooks in this toolkit use a shared signAndSendBatches helper that handles blockhash, signing, sending, and confirming for each instruction batch:

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:

Didn’t find what you were looking for?

Reach out! Telegram | email | Discord