Skip to main content

  1. Approve grants a delegate permission to transfer up to a specified amount of tokens from your account.
    • Each token account can have only one delegate at a time.
    • Any new approval overwrites the previous one.
  2. Revoke removes all delegate permissions from a Light Token account.
  3. Only the token account owner can approve or revoke delegates.
Install the agent skill:
See the AI tools guide for dedicated skills.
approve grants a delegate permission to transfer up to a specified amount of tokens.
Find the source code: delegate-approve.ts | delegate-revoke.ts
1

Approve a delegate

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

Revoke a delegate

Next Steps

Go back to the overview for the Light Token standard