Skip to main content
The SDK provides instruction-level APIs that return instructions without sending transactions. Combine these instructions to build custom transactions with multiple instructions. This guide demonstrates creating a token pool and compressing existing SPL tokens in a single transaction.

Full Code Example

Prerequisites

Make sure you have dependencies and developer environment set up!
Dependencies
Alternatives:
Developer EnvironmentBy default, this guide uses Localnet.
Alternative: Using DevnetFollow these steps to create an RPC Connection. Replace <your_api_key> with your API key before running.
Get your API Key here, if you don’t have one yet.

Create Token Pool + Compress

create-pool-and-compress.ts

Next Steps

Learn how to transfer compressed tokens.