Skip to content

Sync payments and light-token-client skills to latest examples + add T22 extensions#1

Open
tilo-14 wants to merge 1 commit intomainfrom
sync-payments-light-token-client-extensions
Open

Sync payments and light-token-client skills to latest examples + add T22 extensions#1
tilo-14 wants to merge 1 commit intomainfrom
sync-payments-light-token-client-extensions

Conversation

@tilo-14
Copy link
Member

@tilo-14 tilo-14 commented Mar 20, 2026

Summary

  • Payments skill: Fix import paths across 5 files (/unified → base where needed), add mint field to gasless Rust TransferInterface, add verify-address.md reference, add Token 2022 extensions (4 payment-relevant: metadata, transfer-fees, pausable, confidential-transfer)
  • Light-token-client skill: Fix breaking TS API renames (approveapproveInterface, revokerevokeInterface), update wrap/unwrap TS to new API, fix load-ata return type, fix 6 Rust struct fields (max_top_up removed, fee_payer type changed, ProgramTestConfig::new_v2new), update spl-to-light.md comparison, add delegate-transfer.md, add Token 2022 extensions (all 10 supported)
  • Includes prior staged changes: payments-and-walletspayments rename, new payment reference files

Test plan

  • Verify grep -r "max_top_up" skills/light-token-client/ returns zero
  • Verify grep -r "ProgramTestConfig::new_v2" skills/ returns zero (except light-sdk)
  • Verify ls skills/light-token-client/references/extensions/ shows 11 files
  • Verify ls skills/payments/references/extensions/ shows 5 files
  • Spot-check extension code examples against examples-light-token

🤖 Generated with Claude Code


Open with Devin

- Update payments skill: fix import paths (show-balance, receive-payments,
  register-spl-mint, spl-to-light, wrap-from-spl), add mint field to
  gasless Rust TransferInterface, add verify-address reference
- Update light-token-client: fix breaking TS API renames (approve →
  approveInterface, revoke → revokeInterface), update wrap/unwrap TS
  to new API names, fix load-ata import path and return type, fix Rust
  struct fields (remove max_top_up, add fee_payer, add mint, rename
  ProgramTestConfig::new_v2 → new), update spl-to-light comparison,
  add delegate-transfer reference
- Add Token 2022 extensions to both skills: full set (10 extensions)
  for light-token-client, payment-relevant subset (4 extensions) for
  payments, with overview files and SKILL.md updates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment on lines +110 to +115
if (ixs.length === 0) return console.log("Nothing to load");

for (const ixs of instructions) {
const { blockhash } = await rpc.getLatestBlockhash();
const tx = buildAndSignTx(ixs, payer, blockhash);
const sig = await sendAndConfirmTx(rpc, tx);
console.log("Tx:", sig);
}
const blockhash = await rpc.getLatestBlockhash();
const tx = buildAndSignTx(ixs, payer, blockhash.blockhash);
const signature = await sendAndConfirmTx(rpc, tx);
console.log("Tx:", signature);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Instruction example passes TransactionInstruction[][] directly to buildAndSignTx instead of iterating

The new instruction example in load-associated-token-account.md was rewritten to remove the iteration loop over the TransactionInstruction[][] return value. createLoadAtaInstructions returns TransactionInstruction[][] (as documented in skills/payments/references/receive-payments.md:5 — "APIs return TransactionInstruction[][]" — and as shown in the iteration pattern at skills/payments/references/receive-payments.md:29). The new code at lines 110–115 passes the entire nested array directly to buildAndSignTx, which expects a flat TransactionInstruction[]. The old code correctly iterated: for (const ixs of instructions) { ... buildAndSignTx(ixs, ...) }. This reference code would cause a runtime error for any developer following the example.

Suggested change
if (ixs.length === 0) return console.log("Nothing to load");
for (const ixs of instructions) {
const { blockhash } = await rpc.getLatestBlockhash();
const tx = buildAndSignTx(ixs, payer, blockhash);
const sig = await sendAndConfirmTx(rpc, tx);
console.log("Tx:", sig);
}
const blockhash = await rpc.getLatestBlockhash();
const tx = buildAndSignTx(ixs, payer, blockhash.blockhash);
const signature = await sendAndConfirmTx(rpc, tx);
console.log("Tx:", signature);
if (ixs.length === 0) return console.log("Nothing to load");
for (const instructions of ixs) {
const blockhash = await rpc.getLatestBlockhash();
const tx = buildAndSignTx(instructions, payer, blockhash.blockhash);
const signature = await sendAndConfirmTx(rpc, tx);
console.log("Tx:", signature);
}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

---
name: payments-and-wallets
description: "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."
name: light-payments-skill

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 SKILL.md name field does not match directory name or CLAUDE.md listing

The name field in skills/payments/SKILL.md is light-payments-skill, but the directory is payments and CLAUDE.md lists the skill as payments. Every other non-orchestrator skill in the repo uses the directory name as the frontmatter name (ask-mcp, data-streaming, light-sdk, light-token-client, solana-compression, testing, token-distribution, zk-nullifier). This inconsistency could break skill resolution/discovery in systems that expect the name to match the directory.

Suggested change
name: light-payments-skill
name: payments
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant