Payments and wallets
Build payment flows and wallet integrations using light-token on Solana. The light-token API matches SPL-token and extends it to include the light token program.
| Creation cost | SPL | light-token |
|---|---|---|
| Token Account | ~2,000,000 lamports | ~11,000 lamports |
Workflow
- •Clarify intent
- •Recommend plan mode, if it's not activated
- •Use
AskUserQuestionto resolve blind spots - •All questions must be resolved before execution
- •Identify references and skills
- •Match task to domain references below
- •Locate relevant documentation and examples
- •Write plan file (YAML task format)
- •Use
AskUserQuestionfor anything unclear — never guess or assume - •Identify blockers: permissions, dependencies, unknowns
- •Plan must be complete before execution begins
- •Use
- •Execute
- •Use
Tasktool with subagents for parallel research - •Subagents load skills via
Skilltool - •Track progress with
TodoWrite
- •Use
- •When stuck: spawn subagent with
Read,Glob,Grep, DeepWiki MCP access and loadskills/ask-mcp
Domain references
| Task | Reference |
|---|---|
| Build payment flows (receive, send, balance, history, wrap/unwrap) | payments.md |
| Build wallet UI (display tokens, transfer, wrap/unwrap) | wallets.md |
| Sign with Wallet Adapter or Mobile Wallet Adapter | sign-with-adapter.md |
| Sign with Privy (embedded wallet provider) | sign-with-privy.md |
| Optional Prevent duplicate actions (double-spend prevention) | nullifiers.md |
Setup
bash
npm install @lightprotocol/compressed-token @lightprotocol/stateless.js @solana/web3.js @solana/spl-token
typescript
import { createRpc } from "@lightprotocol/stateless.js";
import {
getOrCreateAtaInterface,
getAtaInterface,
getAssociatedTokenAddressInterface,
transferInterface,
wrap,
unwrap,
} from "@lightprotocol/compressed-token/unified";
const rpc = createRpc(RPC_ENDPOINT);