Delegation with Light Token works similar to SPL. When you approve a delegate, you’re authorizing a specific account to transfer tokens on your behalf:
- Owner retains custody: You still own the tokens and can transfer or revoke at any time. Delegation is non-custodial.
- Capped spending: The delegate can spend tokens up to the limit, but cannot access or drain the account beyond the approved amount.
- Single delegate per account: Each token account can only have one active delegate. The owner can revoke at any time.
- New approval replaces old: Approving a new delegate automatically revokes the previous one
| SPL | Light | |
|---|---|---|
| Approve | approve() | approveInterface() |
| Delegated Transfer | transfer() (delegate signs) | transferInterface(…, ownerPubkey, delegateSigner, …) |
| Revoke | revoke() | revokeInterface() |
Agent skill
Agent skill
Use the payments agent skill to add light-token payment support to your project:For orchestration, install the general skill:
- Guide
- AI Prompt
Use cases
Setup
Installation
Installation
- npm
- yarn
- pnpm
- SDK 2.0 (token-interface)
Install packages in your working directory:Install the CLI globally:
- Localnet
- Devnet
In the code examples, use
createRpc() without arguments for localnet.Approve a delegate
Grant a delegate permission to spend up to a capped amount:Compare to SPL
Compare to SPL
Check delegation status
Check the delegation status of an account:Compare to SPL
Compare to SPL
Transfer as Delegate
Once approved, the delegate can transfer tokens on behalf of the owner. The delegate is the transaction authority. Only the delegate and fee payer sign; the owner’s signature is not required.transferInterface takes a recipient wallet address and creates the recipient’s associated token account internally. For delegated transfers, pass the source token-account owner as owner (pubkey) and the delegate as authority (signer). Do not use removed InterfaceOptions.owner — there is no { owner: ... } options bag for this flow.Compare to SPL
Compare to SPL
Instruction-level builder
Instruction-level builder
createTransferInterfaceInstructions returns TransactionInstruction[][] for manual transaction control. Pass the token-account owner pubkey as the flat owner argument; for delegate-signed transactions, set options.delegatePubkey.Revoke a delegate
Remove all spending permissions from the current delegate. If you need to reduce the limit, approve the same delegate with a lower amount.Compare to SPL
Compare to SPL
Related guides
Basic payment
Send a single token transfer.
Gasless transactions
Separate the fee payer from the token owner.
Verify payments
Query balances and transaction history.