| SPL | Light | |
|---|---|---|
| Transfer | createTransferInstruction() | createTransferInterfaceInstructions() |
Agent skill
Agent skill
Use the payments agent skill to add light-token payment support to your project:For orchestration, install the general skill:
- Claude Code
- Cursor
- Any Agent
Add the marketplace and install:
- Guide
- AI Prompt
Setup
Find full code examples:
single transaction |
sequential.
Send to multiple recipients in one transaction
Load all accounts first, then batch the transfers into a single atomic transaction.Send to multiple recipients sequentially
When you cannot pre-load accounts or want simpler code, process each recipient independently. Cold accounts are loaded automatically.Advanced patterns
TransactionInstruction[][] pattern
TransactionInstruction[][] pattern
Every Light Token API that modifies state returns
TransactionInstruction[][].
Each inner array is one atomic transaction. Almost always a single transaction,
but the loop pattern handles the rare multi-transaction case (cold account loading) automatically.Parallelize load transactions
Parallelize load transactions
When the SDK returns multiple transaction batches (load + transfer), parallelize
the loads and send the transfer last.
signAndSendBatches helper
signAndSendBatches helper
For wallet integrations (Privy, Wallet Adapter), use a helper that handles
blockhash, signing, sending, and confirming for each batch.See the complete implementation in the
Privy integration and
Wallet Adapter integration examples.
Related guides
Basic payment
Send a single transfer.
Gasless transactions
Separate the fee payer from the token owner.
Receive payments
Load cold accounts and share ATA address with the sender.