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
RPC infrastructure
Light Token requires a Photon-compatible RPC endpoint for cold account lookups and balance queries.Transaction landing
Light Token transactions follow standard Solana patterns for landing:- Priority fees: Use
ComputeBudgetProgram.setComputeUnitPrice()to increase transaction priority. See Solana priority fees. - Compute units: Set appropriate compute unit limits with
ComputeBudgetProgram.setComputeUnitLimit(). - Retry logic: Implement retries with fresh blockhashes for failed transactions.
Confirmation levels
| Level | When to use |
|---|---|
processed | Fastest. Use for UI updates. Not guaranteed to finalize. |
confirmed | Recommended for most payment flows. Confirmed by supermajority of validators. |
finalized | Highest certainty. Use for high-value transfers or irreversible actions. |
Error handling
Handle both standard Solana errors and Light Token-specific scenarios:- Cold account load failures: Retry the load if the indexer returns stale data.
- Associated token account creation: Idempotent — safe to retry.
- Rent top-up failures: Ensure the fee payer has sufficient SOL balance. See gasless transactions for cost breakdown.
- Transaction size limits: If
TransactionInstruction[][]returns multiple batches, process them sequentially.
Fee sponsorship
Set your application as the fee payer so users never interact with SOL:- Rent top-ups and transaction fees: Set
payerparameter on Light Token instructions. See gasless transactions. - Rent sponsor funding: Ensure the rent sponsor PDA is funded. See the cost breakdown for required amounts.
Pre-launch checklist
- Photon-compatible RPC endpoint configured and tested
- Fee payer wallet funded with sufficient SOL
- Error handling covers load failures, tx size limits, and retries
- Confirmation level appropriate for your use case
- Address verification implemented
- Wrap/unwrap flows tested for SPL / Token 2022 interoperability (if applicable)