@@ -71,7 +71,7 @@ Run this `mint-spl-tokens.ts` to mint SPL tokens to your wallet.
7171``` typescript mint-spl-tokens.ts expandable
7272// Mint SPL Tokens for Airdrop - LocalNet
7373// 1. Load wallet and connect to local validator
74- // 2. Create SPL mint with token pool for compression via createMint()
74+ // 2. Create SPL mint with SPL interface via createMint()
7575// 3. Create ATA and mint SPL tokens to sender for airdrop preparation
7676// 4. Output mint address for use in simple-airdrop.ts
7777
@@ -82,7 +82,7 @@ import {
8282 getOrCreateAssociatedTokenAccount ,
8383 mintTo ,
8484} from " @solana/spl-token" ;
85- import { createTokenPool } from " @lightprotocol/compressed-token" ;
85+ import { createSplInterface } from " @lightprotocol/compressed-token" ;
8686import * as fs from ' fs' ;
8787import * as os from ' os' ;
8888
@@ -95,18 +95,18 @@ const secretKey = JSON.parse(fs.readFileSync(walletPath, 'utf8'));
9595const payer = Keypair .fromSecretKey (Buffer .from (secretKey ));
9696
9797(async () => {
98- // Step 2: Create SPL mint with token pool for compression
98+ // Step 2: Create SPL mint with SPL interface
9999 const mint = await createMint (connection , payer , payer .publicKey , null , 9 );
100- const poolTxId = await createTokenPool (connection , payer , mint );
100+ const poolTxId = await createSplInterface (connection , payer , mint );
101101 console .log (` Mint address: ${mint .toBase58 ()} ` );
102- console .log (` TokenPool created: ${poolTxId }` );
102+ console .log (` SPL interface created: ${poolTxId }` );
103103
104104 // Step 3: Create associated token account for sender
105105 // The sender will send tokens from this account to the recipients as compressed tokens.
106106 const ata = await getOrCreateAssociatedTokenAccount (
107107 connection ,
108108 payer ,
109- mint , // SPL mint with token pool for compression
109+ mint , // SPL mint with SPL interface for compression
110110 payer .publicKey
111111 );
112112 console .log (` ATA address: ${ata .address .toBase58 ()} ` );
@@ -116,7 +116,7 @@ const payer = Keypair.fromSecretKey(Buffer.from(secretKey));
116116 const mintToTxId = await mintTo (
117117 connection ,
118118 payer ,
119- mint , // SPL mint with token pool for compression
119+ mint , // SPL mint with SPL interface for compression
120120 ata .address , // distributor ATA
121121 payer .publicKey ,
122122 100_000_000_000 // amount: 100 tokens with 9 decimals
@@ -141,13 +141,13 @@ Ensure you have the latest `@lightprotocol/stateless.js` and `@lightprotocol/com
141141``` typescript simple-airdrop.ts expandable highlight={29-30,45,74,100}
142142// Simple Airdrop - LocalNet
143143// 1. Load wallet and select compression infrastructure with getStateTreeInfos() and getTokenPoolInfos()
144- // 2. Build CompressedTokenProgram .compress() instruction for multiple recipients in one transaction
144+ // 2. Build LightTokenProgram .compress() instruction for multiple recipients in one transaction
145145// 3. Execute transaction with compute budget and confirm compression operation with sendAndConfirmTx()
146146// 4. Verify distribution via getCompressedTokenAccountsByOwner
147147
148148import { Keypair , PublicKey , ComputeBudgetProgram } from " @solana/web3.js" ;
149149import {
150- CompressedTokenProgram ,
150+ LightTokenProgram ,
151151 getTokenPoolInfos ,
152152 selectTokenPoolInfo ,
153153} from " @lightprotocol/compressed-token" ;
@@ -175,7 +175,7 @@ const payer = Keypair.fromSecretKey(Buffer.from(secretKey));
175175const owner = payer ;
176176
177177(async () => {
178- // Step 2: Select state tree and token pool
178+ // Step 2: Select state tree and SPL interface
179179 const activeStateTrees = await connection .getStateTreeInfos ();
180180 const treeInfo = selectStateTreeInfo (activeStateTrees );
181181
@@ -187,7 +187,7 @@ const owner = payer;
187187 const sourceTokenAccount = await getOrCreateAssociatedTokenAccount (
188188 connection ,
189189 payer ,
190- mint , // SPL mint with token pool for compression
190+ mint , // SPL mint with SPL interface for compression
191191 payer .publicKey
192192 );
193193
@@ -221,13 +221,13 @@ const owner = payer;
221221 );
222222
223223 // Create compression instruction for multiple recipients in one transaction
224- const compressInstruction = await CompressedTokenProgram .compress ({
224+ const compressInstruction = await LightTokenProgram .compress ({
225225 payer: payer .publicKey ,
226226 owner: owner .publicKey ,
227227 source: sourceTokenAccount .address , // source ATA holding SPL tokens
228228 toAddress: airDropAddresses , // recipient addresses for compressed tokens
229229 amount: amounts , // different amounts for each recipient
230- mint , // SPL mint with token pool for compression
230+ mint , // SPL mint with SPL interface for compression
231231 tokenPoolInfo: info ,
232232 outputStateTreeInfo: treeInfo , // destination state tree
233233 });
@@ -346,7 +346,7 @@ Run the airdrop script with your configured environment:
346346
347347``` typescript expandable
348348// 1. Load environment and select compression infrastructure with getStateTreeInfos() and getTokenPoolInfos()
349- // 2. Build CompressedTokenProgram .compress() instruction for multiple recipients in one transaction
349+ // 2. Build LightTokenProgram .compress() instruction for multiple recipients in one transaction
350350// 3. Execute transaction with compute budget, address lookup table, and confirm with sendAndConfirmTx()
351351// 4. Verify distribution via getCompressedTokenAccountsByOwner
352352
@@ -356,7 +356,7 @@ import {
356356 ComputeBudgetProgram ,
357357} from ' @solana/web3.js' ;
358358import {
359- CompressedTokenProgram ,
359+ LightTokenProgram ,
360360 getTokenPoolInfos ,
361361 selectTokenPoolInfo ,
362362} from ' @lightprotocol/compressed-token' ;
@@ -387,7 +387,7 @@ import { MINT_ADDRESS, PAYER_KEYPAIR, RPC_ENDPOINT } from '../constants';
387387 const treeInfos = await connection .getStateTreeInfos (); // Fixed: removed deprecated getCachedActiveStateTreeInfos
388388 const treeInfo = selectStateTreeInfo (treeInfos );
389389
390- // 2. Select a token pool
390+ // 2. Select SPL interface
391391 const tokenPoolInfos = await getTokenPoolInfos (connection , mintAddress );
392392 const tokenPoolInfo = selectTokenPoolInfo (tokenPoolInfos );
393393
@@ -415,7 +415,7 @@ import { MINT_ADDRESS, PAYER_KEYPAIR, RPC_ENDPOINT } from '../constants';
415415 }),
416416 ];
417417
418- const compressInstruction = await CompressedTokenProgram .compress ({
418+ const compressInstruction = await LightTokenProgram .compress ({
419419 payer: payer .publicKey ,
420420 owner: owner .publicKey ,
421421 source: sourceTokenAccount .address ,
@@ -479,12 +479,12 @@ Process recipients in chunks and create batched instructions with optimized comp
479479
480480``` typescript create-instructions.ts expandable
481481
482- // 1. Process recipients in chunks with selectStateTreeInfo() and selectTokenPoolInfo() for each batch
483- // 2. Create CompressedTokenProgram .compress() instructions with ComputeBudgetProgram limits for multiple recipients
482+ // 1. Process recipients in chunks with selectStateTreeInfo() and selectTokenPoolInfo() per batch
483+ // 2. Create LightTokenProgram .compress() instructions with ComputeBudgetProgram limits for multiple recipients
484484// 3. Return batched instructions for optimized large-scale airdrop execution
485485
486486import {
487- CompressedTokenProgram ,
487+ LightTokenProgram ,
488488 TokenPoolInfo ,
489489} from " @lightprotocol/compressed-token" ;
490490import {
@@ -561,7 +561,7 @@ export async function createAirdropInstructions({
561561
562562 if (recipientBatch .length === 0 ) break ;
563563
564- const compressIx = await CompressedTokenProgram .compress ({
564+ const compressIx = await LightTokenProgram .compress ({
565565 payer ,
566566 owner: payer ,
567567 source: sourceTokenAccount ,
@@ -765,8 +765,8 @@ export async function* signAndSendAirdropBatches(
765765Put it all together in the main airdrop file.
766766
767767``` typescript airdrop.ts expandable
768- // 1. Create compressed mint with createMint(), mint supply with mintTo(), get infrastructure with getStateTreeInfos() and getTokenPoolInfos()
769- // 2. Generate batched compression instructions with createAirdropInstructions() - create CompressedTokenProgram .compress() calls
768+ // 1. Create compressed mint with createMint(), mint supply with mintTo(), get infrastructure with getStateTreeInfos() and getTokenPoolInfos() (SPL interface infos)
769+ // 2. Generate batched compression instructions with createAirdropInstructions() - create LightTokenProgram .compress() calls
770770// 3. Execute batched airdrop with signAndSendAirdropBatches() - sign transactions and confirm with sendAndConfirmTx() for large-scale distribution
771771
772772import { Keypair , LAMPORTS_PER_SOL , PublicKey } from " @solana/web3.js" ;
@@ -851,7 +851,7 @@ const recipients = [
851851 // 6a: Fetch available state trees for compressed account storage
852852 const stateTreeInfos = await connection .getStateTreeInfos ();
853853
854- // 6b: Get token pool infos for compression operations
854+ // 6b: Get SPL interface infos for compression
855855 const tokenPoolInfos = await getTokenPoolInfos (connection , mint );
856856
857857 // Step 7: Create instruction batches for large-scale airdrop
@@ -863,7 +863,7 @@ const recipients = [
863863 sourceTokenAccount: ata .address , // source ATA holding SPL tokens
864864 mint , // token mint
865865 stateTreeInfos , // state trees for compressed accounts
866- tokenPoolInfos , // token pools for compression
866+ tokenPoolInfos ,
867867 computeUnitPrice: calculateComputeUnitPrice (10_000 , 500_000 ), // dynamic priority fee
868868 });
869869
@@ -913,7 +913,7 @@ import {
913913} from " @lightprotocol/stateless.js" ;
914914import { ComputeBudgetProgram , Keypair , PublicKey } from " @solana/web3.js" ;
915915import {
916- CompressedTokenProgram ,
916+ LightTokenProgram ,
917917 getTokenPoolInfos ,
918918 selectMinCompressedTokenAccountsForTransfer ,
919919 selectTokenPoolInfosForDecompression ,
@@ -958,7 +958,7 @@ const connection: Rpc = createRpc(RPC_ENDPOINT);
958958 inputAccounts .map ((account ) => account .compressedAccount .hash )
959959 );
960960
961- // 5. Fetch token pool infos
961+ // 5. Fetch SPL interface infos
962962 const tokenPoolInfos = await getTokenPoolInfos (connection , mint );
963963
964964 // 6. Select
@@ -968,7 +968,7 @@ const connection: Rpc = createRpc(RPC_ENDPOINT);
968968 );
969969
970970 // 7. Build instruction
971- const ix = await CompressedTokenProgram .decompress ({
971+ const ix = await LightTokenProgram .decompress ({
972972 payer: payer .publicKey ,
973973 inputCompressedTokenAccounts: inputAccounts ,
974974 toAddress: ata .address ,
0 commit comments