approve() and revoke() functions grant and remove delegate spending authority for compressed tokens. Only the token owner can perform these instructions.
Get Started
Approve / Revoke Delegates
Installation
Installation
- npm
- yarn
- pnpm
Install packages in your working directory:Install the CLI globally:
- Localnet
- Devnet
In the code examples, use
createRpc() without arguments for localnet.- Approve
- Revoke
Before we approve or revoke delegates, we need:
- compressed token accounts to delegate or revoke delegation from, and
- an SPL mint with an SPL interface. Create one for new mints via
createMint()or for existing mints viacreateSplInterface().
Troubleshooting
Account is not delegated
Account is not delegated
Attempting to revoke non-delegated accounts.
Advanced Configuration
Approve Multiple Delegates
Approve Multiple Delegates
Revoke Multiple Delegates
Revoke Multiple Delegates