Skip to content

Add delegation examples for PR #2351 API#32

Open
tilo-14 wants to merge 5 commits intomainfrom
feat/delegation-api-pr-2351
Open

Add delegation examples for PR #2351 API#32
tilo-14 wants to merge 5 commits intomainfrom
feat/delegation-api-pr-2351

Conversation

@tilo-14
Copy link
Member

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

Summary

Updates examples to use the approve/revoke delegation API from light-protocol#2351. Do not merge until that PR lands and the SDK is published.

typescript-client/

  • Update delegate-transfer to use transferInterface + { owner } option (replaces transferDelegatedInterface)
  • Add instruction-level delegate-approve and delegate-revoke examples using createApproveInterfaceInstructions / createRevokeInterfaceInstructions
  • Remove stale create-token-pool instruction example
  • Update README and package.json scripts

toolkits/payments/

  • Add delegate-transfer example to spend-permissions
  • Update README and package.json

Test plan

  • Run on localnet after SDK with PR #2351 is published
  • npm run delegate:approve && npm run delegate:revoke && npm run delegate:transfer
  • npm run delegate-approve:instruction && npm run delegate-revoke:instruction
  • cd toolkits/payments && npm run delegate-transfer

Open with Devin

tilo-14 added 4 commits March 20, 2026 00:50
- Document delegate-transfer, create-ata-explicit-rent-sponsor,
  create-spl-mint, create-t22-mint, create-spl-interface in root README
- Add delegate-transfer, create-ata-explicit-rent-sponsor,
  create-token-pool to typescript-client README
- Add delegate-transfer action (transferDelegatedInterface)
- Update delegate-approve and delegate-revoke

Entire-Checkpoint: 4afa49be1970
…olkit

- Update delegate-transfer to use transferInterface + { owner } option
  (replaces transferDelegatedInterface)
- Add instruction-level delegate-approve and delegate-revoke examples
  using createApproveInterfaceInstructions / createRevokeInterfaceInstructions
- Add delegate-transfer example to payments spend-permissions
- Remove stale create-token-pool instruction example
- Update READMEs and package.json scripts

Entire-Checkpoint: 4afa49be1970
…ments toolkit"

This reverts commit d871e48.

Entire-Checkpoint: 4afa49be1970
…olkit

- Update delegate-transfer to use transferInterface + { owner } option
  (replaces transferDelegatedInterface)
- Add instruction-level delegate-approve and delegate-revoke examples
  using createApproveInterfaceInstructions / createRevokeInterfaceInstructions
- Add delegate-transfer example to payments spend-permissions
- Remove stale create-token-pool instruction example
- Update READMEs and package.json scripts

Entire-Checkpoint: 4afa49be1970
devin-ai-integration[bot]

This comment was marked as resolved.

Mint 1_000_000 tokens instead of 1000 so the 500_000 approve allowance
and 200_000 delegated transfer don't exceed the minted balance.

Entire-Checkpoint: 4afa49be1970
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