payments-and-wallets

For stablecoin payment flows and wallet integrations on Solana 200x cheaper token accounts. Receive, send, balance, history, and client-side signing with Privy and Solana wallet adapters. Optional guide to add nullifiers to prevent payments from being executed more than once.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "payments-and-wallets" with this command: npx skills add Lightprotocol/skills

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 costSPLlight-token
Token Account~2,000,000 lamports~11,000 lamports

Workflow

  1. Clarify intent
    • Recommend plan mode, if it's not activated
    • Use AskUserQuestion to resolve blind spots
    • All questions must be resolved before execution
  2. Identify references and skills
  3. Write plan file (YAML task format)
    • Use AskUserQuestion for anything unclear — never guess or assume
    • Identify blockers: permissions, dependencies, unknowns
    • Plan must be complete before execution begins
  4. Execute
    • Use Task tool with subagents for parallel research
    • Subagents load skills via Skill tool
    • Track progress with TodoWrite
  5. When stuck: ask to spawn a read-only subagent with Read, Glob, Grep, and DeepWiki MCP access, loading skills/ask-mcp. Scope reads to skill references, example repos, and docs.

API overview

OperationSPLlight-token (action / instruction)
ReceivegetOrCreateAssociatedTokenAccount()loadAta() / createLoadAtaInstructions()
TransfercreateTransferInstruction()transferInterface() / createTransferInterfaceInstructions()
Get balancegetAccount()getAtaInterface()
Tx historygetSignaturesForAddress()rpc.getSignaturesForOwnerInterface()
Wrap from SPLN/Awrap() / createWrapInstruction()
Unwrap to SPLN/Aunwrap() / createUnwrapInstructions()
Register SPL mintN/AcreateSplInterface() / LightTokenProgram.createSplInterface()
Create mintcreateMint()createMintInterface()

Plural functions (createTransferInterfaceInstructions, createUnwrapInstructions) return TransactionInstruction[][] — each inner array is one transaction. They handle loading cold accounts automatically.

Domain references

TaskReference
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 Adaptersign-with-adapter.md
Sign with Privy (embedded wallet provider)sign-with-privy.md
Prevent duplicate actions (double-spend prevention)nullifiers.md
SPL to Light comparisonspl-to-light.md

Setup

npm install @lightprotocol/compressed-token@beta @lightprotocol/stateless.js@beta @solana/web3.js @solana/spl-token
import { createRpc } from "@lightprotocol/stateless.js";
import {
  createLoadAtaInstructions,
  loadAta,
  createTransferInterfaceInstructions,
  transferInterface,
  createUnwrapInstructions,
  unwrap,
  getAssociatedTokenAddressInterface,
  getAtaInterface,
  wrap,
} from "@lightprotocol/compressed-token/unified";

const rpc = createRpc(RPC_ENDPOINT);

Resources

SDK references

PackageLink
@lightprotocol/stateless.jsAPI docs
@lightprotocol/compressed-tokenAPI docs
@lightprotocol/nullifier-programnpm

Security

The Privy signing examples transmit secrets to an external API — review sign-with-privy.md before running.

  • Declared dependencies. HELIUS_RPC_URL is required for all examples. The Privy signing flow additionally requires PRIVY_APP_ID, PRIVY_APP_SECRET, TREASURY_WALLET_ID, and TREASURY_AUTHORIZATION_KEY — get these at privy.io. Load secrets from a secrets manager, not agent-global environment.
  • Privy signing flow. PRIVY_APP_SECRET and TREASURY_AUTHORIZATION_KEY are sent to Privy's signing API. Verify these only reach Privy's official endpoints. See sign-with-privy.md.
  • Subagent scope. When stuck, the skill asks to spawn a read-only subagent with Read, Glob, Grep scoped to skill references, example repos, and docs.
  • Install source. npx skills add Lightprotocol/skills from Lightprotocol/skills.
  • Audited protocol. Light Protocol smart contracts are independently audited. Reports are published at github.com/Lightprotocol/light-protocol/tree/main/audits.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

solana-compression

No summary provided by upstream source.

Repository SourceNeeds Review
General

token-distribution

No summary provided by upstream source.

Repository SourceNeeds Review
General

zk-nullifier

No summary provided by upstream source.

Repository SourceNeeds Review