approve() and revoke() functions grant and remove delegate spending authority for compressed tokens. Only the token owner can perform these instructions.
Get Started
1
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 a token pool for compression. This token pool can be created for new SPL mints via
createMint()or added to existing SPL mints viacreateTokenPool().
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