Skip to main content

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
SPLLight
Approveapprove()approveInterface()
Delegated Transfertransfer() (delegate signs)transferInterface(…, ownerPubkey, delegateSigner, …)
Revokerevoke()revokeInterface()
Use the payments agent skill to add light-token payment support to your project:
For orchestration, install the general skill:

Use cases

Setup

Install packages in your working directory:
Install the CLI globally:
In the code examples, use createRpc() without arguments for localnet.

Approve a delegate

Grant a delegate permission to spend up to a capped amount:

Check delegation status

Check the delegation status of an account:

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.
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.

Basic payment

Send a single token transfer.

Gasless transactions

Separate the fee payer from the token owner.

Verify payments

Query balances and transaction history.

Didn’t find what you were looking for?

Reach out! Telegram | email | Discord