Compressed tokens are SPL compatible and supported by leading wallets such as Phantom or Backpack.
Install Dependencies
- npm
- yarn
- pnpm
Create an RPC connection
Runtest-connection.ts to verify your setup:
Replace
<api_key> with your actual API key before running! Get one here, if you don’t have one yet.test-connection.ts
Create and Mint Compressed Tokens
Generate your keypair, if you don't have one yet.
Generate your keypair, if you don't have one yet.
1
Install Solana
2
Then run the command below to create a keypair at
.config/solana/id.json3
Fund wallet with devnet SOL
quickstart.ts with the following code:
quickstart.ts
That’s it!
You’ve created and minted compressed tokens. The output shows:- Mint address
- Create mint transaction link
- Minted token amount
- Mint transaction link
- Compressed token balance