@lightprotocol/compressed-token 0.23.0-beta.1 → 0.23.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  /// <reference types="node" />
2
- import * as _solana_web3_js from '@solana/web3.js';
3
- import { PublicKey, AccountInfo, Commitment, TransactionInstruction, Signer, AccountMeta, Keypair, ConfirmOptions, TransactionSignature, Connection } from '@solana/web3.js';
4
- import { MerkleContext, CompressedAccountWithMerkleContext, Rpc, ValidityProofWithContext, AddressTreeInfo, TreeInfo, ParsedTokenAccount, ValidityProof, TreeType, PackedMerkleContextLegacy, CompressedCpiContext, InputTokenDataWithContext as InputTokenDataWithContext$1, CompressedProof } from '@lightprotocol/stateless.js';
2
+ import { PublicKey, AccountInfo, Commitment, TransactionInstruction, Signer, Keypair, ConfirmOptions, TransactionSignature, AccountMeta, Connection } from '@solana/web3.js';
3
+ import { MerkleContext, CompressedAccountWithMerkleContext, Rpc, ValidityProofWithContext, AddressTreeInfo, TreeInfo, ParsedTokenAccount, TreeType, PackedMerkleContextLegacy, CompressedCpiContext, ValidityProof, InputTokenDataWithContext as InputTokenDataWithContext$1, CompressedProof } from '@lightprotocol/stateless.js';
5
4
  export { ParsedTokenAccount } from '@lightprotocol/stateless.js';
6
5
  import { Account, Mint } from '@solana/spl-token';
7
6
  export { AccountState } from '@solana/spl-token';
@@ -799,8 +798,8 @@ declare const TokenAccountSourceType: {
799
798
  readonly Token2022: "token2022";
800
799
  readonly SplCold: "spl-cold";
801
800
  readonly Token2022Cold: "token2022-cold";
802
- readonly CTokenHot: "ctoken-hot";
803
- readonly CTokenCold: "ctoken-cold";
801
+ readonly LightTokenHot: "light-token-hot";
802
+ readonly LightTokenCold: "light-token-cold";
804
803
  };
805
804
  type TokenAccountSourceTypeValue = (typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
806
805
  /** @internal */
@@ -823,9 +822,9 @@ interface AccountInterface {
823
822
  _anyFrozen?: boolean;
824
823
  /** True when fetched via getAtaInterface */
825
824
  _isAta?: boolean;
826
- /** ATA owner - set by getAtaInterface */
825
+ /** Associated token account owner - set by getAtaInterface */
827
826
  _owner?: PublicKey;
828
- /** ATA mint - set by getAtaInterface */
827
+ /** Associated token account mint - set by getAtaInterface */
829
828
  _mint?: PublicKey;
830
829
  }
831
830
  /** @internal */
@@ -840,21 +839,21 @@ declare function convertTokenDataToAccount(address: PublicKey, tokenData: {
840
839
  /** Convert compressed account to AccountInfo */
841
840
  declare function toAccountInfo(compressedAccount: CompressedAccountWithMerkleContext): AccountInfo<Buffer$1>;
842
841
  /** @internal */
843
- declare function parseCTokenHot(address: PublicKey, accountInfo: AccountInfo<Buffer$1>): {
842
+ declare function parseLightTokenHot(address: PublicKey, accountInfo: AccountInfo<Buffer$1>): {
844
843
  accountInfo: AccountInfo<Buffer$1>;
845
844
  loadContext: undefined;
846
845
  parsed: Account;
847
846
  isCold: false;
848
847
  };
849
848
  /** @internal */
850
- declare function parseCTokenCold(address: PublicKey, compressedAccount: CompressedAccountWithMerkleContext): {
849
+ declare function parseLightTokenCold(address: PublicKey, compressedAccount: CompressedAccountWithMerkleContext): {
851
850
  accountInfo: AccountInfo<Buffer$1>;
852
851
  loadContext: MerkleContext;
853
852
  parsed: Account;
854
853
  isCold: true;
855
854
  };
856
855
  /**
857
- * Retrieve information about a token account of SPL/T22/c-token.
856
+ * Retrieve information about a token account of SPL/T22/light-token.
858
857
  *
859
858
  * @param rpc RPC connection to use
860
859
  * @param address Token account address
@@ -865,6 +864,228 @@ declare function parseCTokenCold(address: PublicKey, compressedAccount: Compress
865
864
  */
866
865
  declare function getAccountInterface(rpc: Rpc, address: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<AccountInterface>;
867
866
 
867
+ /**
868
+ * SPL interface PDA info.
869
+ */
870
+ type SplInterfaceInfo = {
871
+ /**
872
+ * The mint of the SPL interface
873
+ */
874
+ mint: PublicKey;
875
+ /**
876
+ * The SPL interface address
877
+ */
878
+ splInterfacePda: PublicKey;
879
+ /**
880
+ * The token program of the SPL interface
881
+ */
882
+ tokenProgram: PublicKey;
883
+ /**
884
+ * count of txs and volume in the past 60 seconds.
885
+ */
886
+ activity?: {
887
+ txs: number;
888
+ amountAdded: BN;
889
+ amountRemoved: BN;
890
+ };
891
+ /**
892
+ * Whether the SPL interface is initialized
893
+ */
894
+ isInitialized: boolean;
895
+ /**
896
+ * The balance of the SPL interface
897
+ */
898
+ balance: BN;
899
+ /**
900
+ * The index of the SPL interface
901
+ */
902
+ poolIndex: number;
903
+ /**
904
+ * The bump used to derive the SPL interface PDA
905
+ */
906
+ bump: number;
907
+ };
908
+ /**
909
+ * @deprecated Use {@link SplInterfaceInfo} instead.
910
+ * This type maintains backward compatibility by including both tokenPoolPda and splInterfacePda.
911
+ * Both properties point to the same PublicKey value.
912
+ */
913
+ type TokenPoolInfo = {
914
+ /**
915
+ * The mint of the SPL interface
916
+ */
917
+ mint: PublicKey;
918
+ /**
919
+ * @deprecated Use splInterfacePda instead.
920
+ */
921
+ tokenPoolPda: PublicKey;
922
+ /**
923
+ * The SPL interface address (new name).
924
+ * For backward compatibility, tokenPoolPda is also available.
925
+ */
926
+ splInterfacePda: PublicKey;
927
+ /**
928
+ * The token program of the SPL interface
929
+ */
930
+ tokenProgram: PublicKey;
931
+ /**
932
+ * count of txs and volume in the past 60 seconds.
933
+ */
934
+ activity?: {
935
+ txs: number;
936
+ amountAdded: BN;
937
+ amountRemoved: BN;
938
+ };
939
+ /**
940
+ * Whether the SPL interface is initialized
941
+ */
942
+ isInitialized: boolean;
943
+ /**
944
+ * The balance of the SPL interface
945
+ */
946
+ balance: BN;
947
+ /**
948
+ * The index of the SPL interface
949
+ */
950
+ poolIndex: number;
951
+ /**
952
+ * The bump used to derive the SPL interface PDA
953
+ */
954
+ bump: number;
955
+ };
956
+ /**
957
+ * Convert SplInterfaceInfo to TokenPoolInfo for backward compatibility.
958
+ * @internal
959
+ */
960
+ declare function toTokenPoolInfo(info: SplInterfaceInfo): TokenPoolInfo;
961
+ /**
962
+ * Derive SplInterfaceInfo for an SPL interface that will be initialized in the
963
+ * same transaction. Use this when you need to create an SPL interface and
964
+ * compress in a single transaction.
965
+ *
966
+ * @param mint The mint of the SPL interface
967
+ * @param tokenProgramId The token program (TOKEN_PROGRAM_ID or TOKEN_2022_PROGRAM_ID)
968
+ * @param poolIndex The pool index. Default 0.
969
+ *
970
+ * @returns SplInterfaceInfo for the to-be-initialized interface
971
+ */
972
+ declare function deriveSplInterfaceInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): SplInterfaceInfo;
973
+ /**
974
+ * Check if the SPL interface info is initialized and has a balance.
975
+ * @param mint The mint of the SPL interface
976
+ * @param splInterfaceInfo The SPL interface info (or TokenPoolInfo for backward compatibility)
977
+ * @returns True if the SPL interface info is initialized and has a balance
978
+ */
979
+ declare function checkSplInterfaceInfo(splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo, mint: PublicKey): boolean;
980
+ /**
981
+ * Get the SPL interface infos for a given mint.
982
+ * @param rpc The RPC client
983
+ * @param mint The mint of the SPL interface
984
+ * @param commitment The commitment to use
985
+ *
986
+ * @returns The SPL interface infos
987
+ */
988
+ declare function getSplInterfaceInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<SplInterfaceInfo[]>;
989
+ type SplInterfaceActivity = {
990
+ signature: string;
991
+ amount: BN;
992
+ action: Action;
993
+ };
994
+ /**
995
+ * @internal
996
+ */
997
+ declare enum Action {
998
+ Compress = 1,
999
+ Decompress = 2,
1000
+ Transfer = 3
1001
+ }
1002
+ /**
1003
+ * For `compress` and `mintTo` instructions only.
1004
+ * Select a random SPL interface info from the SPL interface infos.
1005
+ *
1006
+ * For `decompress`, use {@link selectSplInterfaceInfosForDecompression} instead.
1007
+ *
1008
+ * @param infos The SPL interface infos
1009
+ *
1010
+ * @returns A random SPL interface info
1011
+ */
1012
+ declare function selectSplInterfaceInfo(infos: SplInterfaceInfo[]): SplInterfaceInfo;
1013
+ /**
1014
+ * Select one or multiple SPL interface infos from the SPL interface infos.
1015
+ *
1016
+ * Use this function for `decompress`.
1017
+ *
1018
+ * For `compress`, `mintTo` use {@link selectSplInterfaceInfo} instead.
1019
+ *
1020
+ * @param infos The SPL interface infos
1021
+ * @param decompressAmount The amount of tokens to withdraw
1022
+ *
1023
+ * @returns Array with one or more SPL interface infos.
1024
+ */
1025
+ declare function selectSplInterfaceInfosForDecompression(infos: SplInterfaceInfo[], decompressAmount: number | BN): SplInterfaceInfo[];
1026
+ /**
1027
+ * @deprecated Use {@link SplInterfaceActivity} instead.
1028
+ */
1029
+ type TokenPoolActivity = SplInterfaceActivity;
1030
+ /**
1031
+ * @deprecated Use {@link deriveSplInterfaceInfo} instead.
1032
+ */
1033
+ declare function deriveTokenPoolInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): TokenPoolInfo;
1034
+ /**
1035
+ * @deprecated Use {@link checkSplInterfaceInfo} instead.
1036
+ */
1037
+ declare function checkTokenPoolInfo(tokenPoolInfo: TokenPoolInfo, mint: PublicKey): boolean;
1038
+ /**
1039
+ * @deprecated Use {@link getSplInterfaceInfos} instead.
1040
+ */
1041
+ declare function getTokenPoolInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<TokenPoolInfo[]>;
1042
+ /**
1043
+ * @deprecated Use {@link selectSplInterfaceInfo} instead.
1044
+ */
1045
+ declare function selectTokenPoolInfo(infos: TokenPoolInfo[]): TokenPoolInfo;
1046
+ /**
1047
+ * @deprecated Use {@link selectSplInterfaceInfosForDecompression} instead.
1048
+ */
1049
+ declare function selectTokenPoolInfosForDecompression(infos: TokenPoolInfo[], decompressAmount: number | BN): TokenPoolInfo[];
1050
+
1051
+ declare function sliceLast<T>(items: T[]): {
1052
+ rest: T[];
1053
+ last: T;
1054
+ };
1055
+
1056
+ /**
1057
+ * Create a light-token transfer instruction.
1058
+ *
1059
+ * For light-token accounts with compressible extension, the program needs
1060
+ * system_program and fee_payer to handle rent top-ups.
1061
+ *
1062
+ * @param source Source light-token account
1063
+ * @param destination Destination light-token account
1064
+ * @param owner Owner of the source account (signer, also pays for compressible extension top-ups)
1065
+ * @param amount Amount to transfer
1066
+ * @param feePayer Optional fee payer for top-ups (defaults to owner)
1067
+ * @returns Transaction instruction for light-token transfer
1068
+ */
1069
+ declare function createLightTokenTransferInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, amount: number | bigint, feePayer?: PublicKey): TransactionInstruction;
1070
+ /**
1071
+ * Create a light-token transfer_checked instruction. Same semantics as SPL
1072
+ * TransferChecked.
1073
+ */
1074
+ declare function createLightTokenTransferCheckedInstruction(source: PublicKey, destination: PublicKey, mint: PublicKey, owner: PublicKey, amount: number | bigint, decimals: number, payer: PublicKey): TransactionInstruction;
1075
+
1076
+ interface InterfaceOptions {
1077
+ splInterfaceInfos?: SplInterfaceInfo[];
1078
+ /**
1079
+ * ATA owner (authority owner) used to derive the ATA when the signer is a
1080
+ * delegate. For owner-signed flows, omit this field.
1081
+ */
1082
+ owner?: PublicKey;
1083
+ }
1084
+ interface TransferOptions extends InterfaceOptions {
1085
+ wrap?: boolean;
1086
+ programId?: PublicKey;
1087
+ }
1088
+
868
1089
  interface LayoutObject {
869
1090
  [key: string]: any;
870
1091
  }
@@ -1004,7 +1225,7 @@ interface AdditionalMetadata {
1004
1225
  }
1005
1226
 
1006
1227
  /**
1007
- * Token metadata for creating a c-token mint.
1228
+ * Token metadata for creating a light-token mint.
1008
1229
  */
1009
1230
  interface TokenMetadataInstructionData {
1010
1231
  name: string;
@@ -1015,7 +1236,7 @@ interface TokenMetadataInstructionData {
1015
1236
  }
1016
1237
  declare function createTokenMetadata(name: string, symbol: string, uri: string, updateAuthority?: PublicKey | null, additionalMetadata?: AdditionalMetadata[] | null): TokenMetadataInstructionData;
1017
1238
  /**
1018
- * Create instruction for initializing a c-token mint.
1239
+ * Create instruction for initializing a light-token mint.
1019
1240
  *
1020
1241
  * @param mintSigner Mint signer keypair public key.
1021
1242
  * @param decimals Number of decimals for the mint.
@@ -1026,8 +1247,9 @@ declare function createTokenMetadata(name: string, symbol: string, uri: string,
1026
1247
  * @param addressTreeInfo Address tree info for the mint.
1027
1248
  * @param outputStateTreeInfo Output state tree info.
1028
1249
  * @param metadata Optional token metadata.
1250
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1029
1251
  */
1030
- declare function createMintInstruction(mintSigner: PublicKey, decimals: number, mintAuthority: PublicKey, freezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext, addressTreeInfo: AddressTreeInfo, outputStateTreeInfo: TreeInfo, metadata?: TokenMetadataInstructionData): TransactionInstruction;
1252
+ declare function createMintInstruction(mintSigner: PublicKey, decimals: number, mintAuthority: PublicKey, freezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext, addressTreeInfo: AddressTreeInfo, outputStateTreeInfo: TreeInfo, metadata?: TokenMetadataInstructionData, maxTopUp?: number): TransactionInstruction;
1031
1253
 
1032
1254
  /**
1033
1255
  * SPL-compatible base mint structure
@@ -1045,12 +1267,12 @@ interface BaseMint {
1045
1267
  freezeAuthority: PublicKey | null;
1046
1268
  }
1047
1269
  /**
1048
- * Compressed mint context (protocol version, SPL mint reference)
1270
+ * Light mint context (protocol version, SPL mint reference)
1049
1271
  */
1050
1272
  interface MintContext {
1051
1273
  /** Protocol version for upgradability */
1052
1274
  version: number;
1053
- /** Whether the compressed mint is decompressed to a CMint Solana account */
1275
+ /** Whether the compressed light mint has been decompressed to a light mint account */
1054
1276
  cmintDecompressed: boolean;
1055
1277
  /** PDA of the associated SPL mint */
1056
1278
  splMint: PublicKey;
@@ -1088,7 +1310,7 @@ interface TokenMetadata {
1088
1310
  }[];
1089
1311
  }
1090
1312
  /**
1091
- * Complete compressed mint structure (raw format)
1313
+ * Complete light mint structure (raw format)
1092
1314
  */
1093
1315
  interface CompressedMint {
1094
1316
  base: BaseMint;
@@ -1117,7 +1339,7 @@ interface RentConfig {
1117
1339
  maxTopUp: number;
1118
1340
  }
1119
1341
  /**
1120
- * Compression info embedded in CompressedMint
1342
+ * Compression info embedded in light mint
1121
1343
  */
1122
1344
  interface CompressionInfo {
1123
1345
  /** Config account version (0 = uninitialized) */
@@ -1142,18 +1364,18 @@ interface CompressionInfo {
1142
1364
  rentConfig: RentConfig;
1143
1365
  }
1144
1366
  /**
1145
- * Deserialize a compressed mint from buffer
1367
+ * Deserialize a light mint from buffer
1146
1368
  * Uses SPL's MintLayout for BaseMint and buffer-layout struct for context
1147
1369
  *
1148
1370
  * @param data - The raw account data buffer
1149
- * @returns The deserialized CompressedMint
1371
+ * @returns The deserialized light mint
1150
1372
  */
1151
1373
  declare function deserializeMint(data: Buffer$1 | Uint8Array): CompressedMint;
1152
1374
  /**
1153
- * Serialize a CompressedMint to buffer
1375
+ * Serialize a light mint to buffer
1154
1376
  * Uses SPL's MintLayout for BaseMint, helper functions for context/metadata
1155
1377
  *
1156
- * @param mint - The CompressedMint to serialize
1378
+ * @param mint - The light mint to serialize
1157
1379
  * @returns The serialized buffer
1158
1380
  */
1159
1381
  declare function serializeMint(mint: CompressedMint): Buffer$1;
@@ -1216,11 +1438,11 @@ interface MintInterface {
1216
1438
  mintContext?: MintContext;
1217
1439
  tokenMetadata?: TokenMetadata;
1218
1440
  extensions?: MintExtension[];
1219
- /** Compression info for c-token mints */
1441
+ /** Compression info for light-token mints */
1220
1442
  compression?: CompressionInfo;
1221
1443
  }
1222
1444
  /**
1223
- * Get unified mint info for SPL/T22/c-token mints.
1445
+ * Get unified mint info for SPL/T22/light-token mints.
1224
1446
  *
1225
1447
  * @param rpc RPC connection
1226
1448
  * @param address The mint address
@@ -1232,16 +1454,16 @@ interface MintInterface {
1232
1454
  */
1233
1455
  declare function getMintInterface(rpc: Rpc, address: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<MintInterface>;
1234
1456
  /**
1235
- * Unpack mint info from raw account data for SPL/T22/c-token.
1457
+ * Unpack mint info from raw account data for SPL/T22/light-token.
1236
1458
  *
1237
1459
  * @param address The mint pubkey
1238
1460
  * @param data The raw account data or AccountInfo
1239
- * @param programId Token program ID. Default c-token.
1461
+ * @param programId Token program ID. Default light-token.
1240
1462
  * @returns Object with mint, optional mintContext and tokenMetadata.
1241
1463
  */
1242
1464
  declare function unpackMintInterface(address: PublicKey, data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>, programId?: PublicKey): Omit<MintInterface, 'merkleContext'>;
1243
1465
  /**
1244
- * Unpack c-token mint context and metadata from raw account data
1466
+ * Unpack light-token mint context and metadata from raw account data
1245
1467
  *
1246
1468
  * @param data The raw account data
1247
1469
  * @returns Object with mintContext, tokenMetadata, and extensions
@@ -1253,17 +1475,20 @@ declare function unpackMintData(data: Buffer$1 | Uint8Array): {
1253
1475
  };
1254
1476
 
1255
1477
  /**
1256
- * Create instruction for updating a compressed mint's mint authority.
1478
+ * Create instruction for updating a light mint's mint authority.
1479
+ * Works for both compressed and decompressed light mints.
1257
1480
  *
1258
1481
  * @param mintInterface MintInterface from getMintInterface() - must have merkleContext
1259
1482
  * @param currentMintAuthority Current mint authority public key (must sign)
1260
1483
  * @param newMintAuthority New mint authority (or null to revoke)
1261
1484
  * @param payer Fee payer public key
1262
- * @param validityProof Validity proof for the compressed mint
1485
+ * @param validityProof Validity proof for the compressed light mint (null for decompressed light mints)
1486
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1263
1487
  */
1264
- declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterface, currentMintAuthority: PublicKey, newMintAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext): TransactionInstruction;
1488
+ declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterface, currentMintAuthority: PublicKey, newMintAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext | null, maxTopUp?: number): TransactionInstruction;
1265
1489
  /**
1266
- * Create instruction for updating a compressed mint's freeze authority.
1490
+ * Create instruction for updating a light mint's freeze authority.
1491
+ * Works for both compressed and decompressed light mints.
1267
1492
  *
1268
1493
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
1269
1494
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -1272,12 +1497,13 @@ declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterfa
1272
1497
  * @param currentFreezeAuthority Current freeze authority public key (must sign)
1273
1498
  * @param newFreezeAuthority New freeze authority (or null to revoke)
1274
1499
  * @param payer Fee payer public key
1275
- * @param validityProof Validity proof for the compressed mint
1500
+ * @param validityProof Validity proof for the compressed light mint (null for decompressed light mints)
1501
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1276
1502
  */
1277
- declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInterface, currentFreezeAuthority: PublicKey, newFreezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext): TransactionInstruction;
1503
+ declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInterface, currentFreezeAuthority: PublicKey, newFreezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext | null, maxTopUp?: number): TransactionInstruction;
1278
1504
 
1279
1505
  /**
1280
- * Create instruction for updating a compressed mint's metadata field.
1506
+ * Create instruction for updating a light mint's metadata field.
1281
1507
  *
1282
1508
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
1283
1509
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -1285,15 +1511,16 @@ declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInter
1285
1511
  * @param mintInterface MintInterface from getMintInterface() - must have merkleContext and tokenMetadata
1286
1512
  * @param authority Metadata update authority public key (must sign)
1287
1513
  * @param payer Fee payer public key
1288
- * @param validityProof Validity proof for the compressed mint
1514
+ * @param validityProof Validity proof for the light mint (null for decompressed light mints)
1289
1515
  * @param fieldType Field to update: 'name', 'symbol', 'uri', or 'custom'
1290
1516
  * @param value New value for the field
1291
1517
  * @param customKey Custom key name (required if fieldType is 'custom')
1292
1518
  * @param extensionIndex Extension index (default: 0)
1519
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1293
1520
  */
1294
- declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, fieldType: 'name' | 'symbol' | 'uri' | 'custom', value: string, customKey?: string, extensionIndex?: number): TransactionInstruction;
1521
+ declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, fieldType: 'name' | 'symbol' | 'uri' | 'custom', value: string, customKey?: string, extensionIndex?: number, maxTopUp?: number): TransactionInstruction;
1295
1522
  /**
1296
- * Create instruction for updating a compressed mint's metadata authority.
1523
+ * Create instruction for updating a light mint's metadata authority.
1297
1524
  *
1298
1525
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
1299
1526
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -1302,12 +1529,13 @@ declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterfa
1302
1529
  * @param currentAuthority Current metadata update authority public key (must sign)
1303
1530
  * @param newAuthority New metadata update authority public key
1304
1531
  * @param payer Fee payer public key
1305
- * @param validityProof Validity proof for the compressed mint
1532
+ * @param validityProof Validity proof for the light mint (null for decompressed light mints)
1306
1533
  * @param extensionIndex Extension index (default: 0)
1534
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1307
1535
  */
1308
- declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInterface, currentAuthority: PublicKey, newAuthority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, extensionIndex?: number): TransactionInstruction;
1536
+ declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInterface, currentAuthority: PublicKey, newAuthority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, extensionIndex?: number, maxTopUp?: number): TransactionInstruction;
1309
1537
  /**
1310
- * Create instruction for removing a metadata key from a compressed mint.
1538
+ * Create instruction for removing a metadata key from a light mint.
1311
1539
  *
1312
1540
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
1313
1541
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -1315,12 +1543,13 @@ declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInt
1315
1543
  * @param mintInterface MintInterface from getMintInterface() - must have merkleContext and tokenMetadata
1316
1544
  * @param authority Metadata update authority public key (must sign)
1317
1545
  * @param payer Fee payer public key
1318
- * @param validityProof Validity proof for the compressed mint
1546
+ * @param validityProof Validity proof for the light mint (null for decompressed light mints)
1319
1547
  * @param key Metadata key to remove
1320
1548
  * @param idempotent If true, don't error if key doesn't exist (default: false)
1321
1549
  * @param extensionIndex Extension index (default: 0)
1550
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1322
1551
  */
1323
- declare function createRemoveMetadataKeyInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, key: string, idempotent?: boolean, extensionIndex?: number): TransactionInstruction;
1552
+ declare function createRemoveMetadataKeyInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, key: string, idempotent?: boolean, extensionIndex?: number, maxTopUp?: number): TransactionInstruction;
1324
1553
 
1325
1554
  interface CompressToPubkey {
1326
1555
  bump: number;
@@ -1330,531 +1559,274 @@ interface CompressToPubkey {
1330
1559
  interface CompressibleConfig {
1331
1560
  tokenAccountVersion: number;
1332
1561
  rentPayment: number;
1333
- hasTopUp: number;
1334
1562
  compressionOnly: number;
1335
1563
  writeTopUp: number;
1336
- compressToAccountPubkey?: CompressToPubkey | null;
1337
- }
1338
- interface CreateAssociatedCTokenAccountParams {
1339
- bump: number;
1340
- compressibleConfig?: CompressibleConfig;
1341
- }
1342
- /**
1343
- * Create instruction for creating an associated compressed token account.
1344
- *
1345
- * @param feePayer Fee payer public key.
1346
- * @param owner Owner of the associated token account.
1347
- * @param mint Mint address.
1348
- * @param compressibleConfig Optional compressible configuration.
1349
- * @param configAccount Optional config account.
1350
- * @param rentPayerPda Optional rent payer PDA.
1351
- */
1352
- declare function createAssociatedCTokenAccountInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
1353
- /**
1354
- * Create idempotent instruction for creating an associated compressed token account.
1355
- *
1356
- * @param feePayer Fee payer public key.
1357
- * @param owner Owner of the associated token account.
1358
- * @param mint Mint address.
1359
- * @param compressibleConfig Optional compressible configuration.
1360
- * @param configAccount Optional config account.
1361
- * @param rentPayerPda Optional rent payer PDA.
1362
- */
1363
- declare function createAssociatedCTokenAccountIdempotentInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
1364
-
1365
- /**
1366
- * c-token-specific config for createAssociatedTokenAccountInterfaceInstruction
1367
- */
1368
- interface CTokenConfig {
1369
- compressibleConfig?: CompressibleConfig;
1370
- configAccount?: PublicKey;
1371
- rentPayerPda?: PublicKey;
1372
- }
1373
- /**
1374
- * Create instruction for creating an associated token account (SPL, Token-2022,
1375
- * or c-token). Follows SPL Token API signature with optional c-token config at the
1376
- * end.
1377
- *
1378
- * @param payer Fee payer public key.
1379
- * @param associatedToken Associated token account address.
1380
- * @param owner Owner of the associated token account.
1381
- * @param mint Mint address.
1382
- * @param programId Token program ID (default: TOKEN_PROGRAM_ID).
1383
- * @param associatedTokenProgramId Associated token program ID.
1384
- * @param ctokenConfig Optional c-token-specific configuration.
1385
- */
1386
- declare function createAssociatedTokenAccountInterfaceInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, ctokenConfig?: CTokenConfig): TransactionInstruction;
1387
- /**
1388
- * Create idempotent instruction for creating an associated token account (SPL,
1389
- * Token-2022, or c-token). Follows SPL Token API signature with optional c-token
1390
- * config at the end.
1391
- *
1392
- * @param payer Fee payer public key.
1393
- * @param associatedToken Associated token account address.
1394
- * @param owner Owner of the associated token account.
1395
- * @param mint Mint address.
1396
- * @param programId Token program ID (default: TOKEN_PROGRAM_ID).
1397
- * @param associatedTokenProgramId Associated token program ID.
1398
- * @param ctokenConfig Optional c-token-specific configuration.
1399
- */
1400
- declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, ctokenConfig?: CTokenConfig): TransactionInstruction;
1401
- /**
1402
- * Short alias for createAssociatedTokenAccountInterfaceIdempotentInstruction.
1403
- */
1404
- declare const createAtaInterfaceIdempotentInstruction: typeof createAssociatedTokenAccountInterfaceIdempotentInstruction;
1405
-
1406
- /**
1407
- * Create instruction for minting compressed tokens to an onchain token account.
1408
- *
1409
- * @param authority Mint authority public key.
1410
- * @param payer Fee payer public key.
1411
- * @param validityProof Validity proof for the compressed mint.
1412
- * @param merkleContext Merkle context of the compressed mint.
1413
- * @param mintData Mint instruction data.
1414
- * @param outputStateTreeInfo Output state tree info.
1415
- * @param recipientAccount Recipient onchain token account address.
1416
- * @param amount Amount to mint.
1417
- */
1418
- declare function createMintToInstruction(authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, merkleContext: MerkleContext, mintData: MintInstructionData, outputStateTreeInfo: TreeInfo, recipientAccount: PublicKey, amount: number | bigint): TransactionInstruction;
1419
-
1420
- /**
1421
- * Token data version enum - mirrors Rust TokenDataVersion
1422
- * Used for compressed token account hashing strategy
1423
- */
1424
- declare enum TokenDataVersion {
1425
- /** V1: Poseidon hash with little-endian amount, discriminator [2,0,0,0,0,0,0,0] */
1426
- V1 = 1,
1427
- /** V2: Poseidon hash with big-endian amount, discriminator [0,0,0,0,0,0,0,3] */
1428
- V2 = 2,
1429
- /** ShaFlat: SHA256 hash of borsh-serialized data, discriminator [0,0,0,0,0,0,0,4] */
1430
- ShaFlat = 3
1431
- }
1432
- declare const POOL_SEED: Buffer$1<ArrayBuffer>;
1433
- declare const CPI_AUTHORITY_SEED: Buffer$1<ArrayBuffer>;
1434
- declare const SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE = 1461600;
1435
- declare const CREATE_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1436
- declare const MINT_TO_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1437
- declare const BATCH_COMPRESS_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1438
- declare const TRANSFER_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1439
- declare const COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1440
- declare const APPROVE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1441
- declare const REVOKE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1442
- declare const ADD_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1443
- declare const DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1444
-
1445
- /**
1446
- * Create instruction for minting tokens from a c-mint to compressed accounts.
1447
- * To mint to onchain token accounts across SPL/T22/c-mints, use
1448
- * {@link createMintToInterfaceInstruction} instead.
1449
- *
1450
- * @param authority Mint authority public key.
1451
- * @param payer Fee payer public key.
1452
- * @param validityProof Validity proof for the compressed mint.
1453
- * @param merkleContext Merkle context of the compressed mint.
1454
- * @param mintData Mint instruction data.
1455
- * @param recipients Array of recipients with amounts.
1456
- * @param outputStateTreeInfo Optional output state tree info. Uses merkle
1457
- * context queue if not provided.
1458
- * @param tokenAccountVersion Token account version (default:
1459
- * TokenDataVersion.ShaFlat).
1460
- */
1461
- declare function createMintToCompressedInstruction(authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, merkleContext: MerkleContext, mintData: MintInstructionData, recipients: Array<{
1462
- recipient: PublicKey;
1463
- amount: number | bigint;
1464
- }>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: TokenDataVersion): TransactionInstruction;
1465
-
1466
- /**
1467
- * Create mint-to instruction for SPL, Token-2022, or compressed token mints.
1468
- * This instruction ONLY mints to decompressed/onchain token accounts.
1469
- *
1470
- * @param mintInterface Mint interface (SPL, Token-2022, or compressed).
1471
- * @param destination Destination onchain token account address.
1472
- * @param authority Mint authority public key.
1473
- * @param payer Fee payer public key.
1474
- * @param amount Amount to mint.
1475
- * @param validityProof Validity proof (required for compressed mints).
1476
- * @param multiSigners Multi-signature signer public keys.
1477
- */
1478
- declare function createMintToInterfaceInstruction(mintInterface: MintInterface, destination: PublicKey, authority: PublicKey, payer: PublicKey, amount: number | bigint, validityProof?: ValidityProofWithContext, multiSigners?: PublicKey[]): TransactionInstruction;
1479
-
1480
- /**
1481
- * Create a c-token transfer instruction.
1482
- *
1483
- * @param source Source c-token account
1484
- * @param destination Destination c-token account
1485
- * @param owner Owner of the source account (signer, also pays for compressible extension top-ups)
1486
- * @param amount Amount to transfer
1487
- * @returns Transaction instruction for c-token transfer
1488
- */
1489
- declare function createCTokenTransferInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, amount: number | bigint): TransactionInstruction;
1490
- /**
1491
- * Construct a transfer instruction for SPL/T22/c-token. Defaults to c-token
1492
- * program. For cross-program transfers (SPL <> c-token), use `wrap`/`unwrap`.
1493
- *
1494
- * @param source Source token account
1495
- * @param destination Destination token account
1496
- * @param owner Owner of the source account (signer)
1497
- * @param amount Amount to transfer
1498
- * @returns instruction for c-token transfer
1499
- */
1500
- declare function createTransferInterfaceInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, amount: number | bigint, multiSigners?: (Signer | PublicKey)[], programId?: PublicKey): TransactionInstruction;
1501
-
1502
- /**
1503
- * SPL interface PDA info.
1504
- */
1505
- type SplInterfaceInfo = {
1506
- /**
1507
- * The mint of the SPL interface
1508
- */
1509
- mint: PublicKey;
1510
- /**
1511
- * The SPL interface address
1512
- */
1513
- splInterfacePda: PublicKey;
1514
- /**
1515
- * The token program of the SPL interface
1516
- */
1517
- tokenProgram: PublicKey;
1518
- /**
1519
- * count of txs and volume in the past 60 seconds.
1520
- */
1521
- activity?: {
1522
- txs: number;
1523
- amountAdded: BN;
1524
- amountRemoved: BN;
1525
- };
1526
- /**
1527
- * Whether the SPL interface is initialized
1528
- */
1529
- isInitialized: boolean;
1530
- /**
1531
- * The balance of the SPL interface
1532
- */
1533
- balance: BN;
1534
- /**
1535
- * The index of the SPL interface
1536
- */
1537
- poolIndex: number;
1538
- /**
1539
- * The bump used to derive the SPL interface PDA
1540
- */
1541
- bump: number;
1542
- };
1543
- /**
1544
- * @deprecated Use {@link SplInterfaceInfo} instead.
1545
- * This type maintains backward compatibility by including both tokenPoolPda and splInterfacePda.
1546
- * Both properties point to the same PublicKey value.
1547
- */
1548
- type TokenPoolInfo = {
1549
- /**
1550
- * The mint of the SPL interface
1551
- */
1552
- mint: PublicKey;
1553
- /**
1554
- * @deprecated Use splInterfacePda instead.
1555
- */
1556
- tokenPoolPda: PublicKey;
1557
- /**
1558
- * The SPL interface address (new name).
1559
- * For backward compatibility, tokenPoolPda is also available.
1560
- */
1561
- splInterfacePda: PublicKey;
1562
- /**
1563
- * The token program of the SPL interface
1564
- */
1565
- tokenProgram: PublicKey;
1566
- /**
1567
- * count of txs and volume in the past 60 seconds.
1568
- */
1569
- activity?: {
1570
- txs: number;
1571
- amountAdded: BN;
1572
- amountRemoved: BN;
1573
- };
1574
- /**
1575
- * Whether the SPL interface is initialized
1576
- */
1577
- isInitialized: boolean;
1578
- /**
1579
- * The balance of the SPL interface
1580
- */
1581
- balance: BN;
1582
- /**
1583
- * The index of the SPL interface
1584
- */
1585
- poolIndex: number;
1586
- /**
1587
- * The bump used to derive the SPL interface PDA
1588
- */
1589
- bump: number;
1590
- };
1591
- /**
1592
- * Convert SplInterfaceInfo to TokenPoolInfo for backward compatibility.
1593
- * @internal
1594
- */
1595
- declare function toTokenPoolInfo(info: SplInterfaceInfo): TokenPoolInfo;
1596
- /**
1597
- * Derive SplInterfaceInfo for an SPL interface that will be initialized in the
1598
- * same transaction. Use this when you need to create an SPL interface and
1599
- * compress in a single transaction.
1600
- *
1601
- * @param mint The mint of the SPL interface
1602
- * @param tokenProgramId The token program (TOKEN_PROGRAM_ID or TOKEN_2022_PROGRAM_ID)
1603
- * @param poolIndex The pool index. Default 0.
1604
- *
1605
- * @returns SplInterfaceInfo for the to-be-initialized interface
1606
- */
1607
- declare function deriveSplInterfaceInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): SplInterfaceInfo;
1608
- /**
1609
- * Check if the SPL interface info is initialized and has a balance.
1610
- * @param mint The mint of the SPL interface
1611
- * @param splInterfaceInfo The SPL interface info (or TokenPoolInfo for backward compatibility)
1612
- * @returns True if the SPL interface info is initialized and has a balance
1613
- */
1614
- declare function checkSplInterfaceInfo(splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo, mint: PublicKey): boolean;
1615
- /**
1616
- * Get the SPL interface infos for a given mint.
1617
- * @param rpc The RPC client
1618
- * @param mint The mint of the SPL interface
1619
- * @param commitment The commitment to use
1620
- *
1621
- * @returns The SPL interface infos
1622
- */
1623
- declare function getSplInterfaceInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<SplInterfaceInfo[]>;
1624
- type SplInterfaceActivity = {
1625
- signature: string;
1626
- amount: BN;
1627
- action: Action;
1628
- };
1629
- /**
1630
- * @internal
1631
- */
1632
- declare enum Action {
1633
- Compress = 1,
1634
- Decompress = 2,
1635
- Transfer = 3
1636
- }
1637
- /**
1638
- * For `compress` and `mintTo` instructions only.
1639
- * Select a random SPL interface info from the SPL interface infos.
1640
- *
1641
- * For `decompress`, use {@link selectSplInterfaceInfosForDecompression} instead.
1642
- *
1643
- * @param infos The SPL interface infos
1644
- *
1645
- * @returns A random SPL interface info
1646
- */
1647
- declare function selectSplInterfaceInfo(infos: SplInterfaceInfo[]): SplInterfaceInfo;
1564
+ compressToAccountPubkey?: CompressToPubkey | null;
1565
+ }
1566
+ interface CreateAssociatedLightTokenAccountParams {
1567
+ compressibleConfig?: CompressibleConfig | null;
1568
+ }
1648
1569
  /**
1649
- * Select one or multiple SPL interface infos from the SPL interface infos.
1570
+ * Default compressible config for light-token ATAs - matches Rust SDK defaults.
1650
1571
  *
1651
- * Use this function for `decompress`.
1572
+ * - tokenAccountVersion: 3 (ShaFlat) - latest hashing scheme
1573
+ * - rentPayment: 16 - prepay 16 epochs (~24 hours rent)
1574
+ * - compressionOnly: 1 - required for ATAs
1575
+ * - writeTopUp: 766 - per-write top-up (~2 epochs rent) when rent < 2 epochs
1576
+ * - compressToAccountPubkey: null - required for ATAs
1652
1577
  *
1653
- * For `compress`, `mintTo` use {@link selectSplInterfaceInfo} instead.
1578
+ * Cost breakdown at associated token account creation:
1579
+ * - Rent sponsor PDA (LIGHT_TOKEN_RENT_SPONSOR) pays: rent exemption (~890,880 lamports)
1580
+ * - Fee payer pays: compression_cost (11K) + 16 epochs rent (~6,400) = ~17,400 lamports + tx fees
1654
1581
  *
1655
- * @param infos The SPL interface infos
1656
- * @param decompressAmount The amount of tokens to withdraw
1582
+ * Per-write top-up (transfers):
1583
+ * - When account rent is below 2 epochs, fee payer pays 766 lamports top-up
1584
+ * - This keeps the account perpetually funded when actively used
1657
1585
  *
1658
- * @returns Array with one or more SPL interface infos.
1586
+ * Rent calculation (272-byte compressible lightToken account):
1587
+ * - rent_per_epoch = base_rent (128) + bytes * rent_per_byte (272 * 1) = 400 lamports
1588
+ * - 16 epochs = 16 * 400 = 6,400 lamports (24 hours)
1589
+ * - 2 epochs = 2 * 400 = 800 lamports (~3 hours, writeTopUp = 766 is conservative)
1590
+ *
1591
+ * Account size breakdown (272 bytes):
1592
+ * - 165 bytes: SPL token base layout
1593
+ * - 1 byte: account_type discriminator
1594
+ * - 1 byte: Option discriminator for extensions
1595
+ * - 4 bytes: Vec length prefix
1596
+ * - 1 byte: extension type discriminant
1597
+ * - 4 bytes: CompressibleExtension header (decimals_option, decimals, compression_only, is_ata)
1598
+ * - 96 bytes: CompressionInfo struct
1659
1599
  */
1660
- declare function selectSplInterfaceInfosForDecompression(infos: SplInterfaceInfo[], decompressAmount: number | BN): SplInterfaceInfo[];
1600
+ declare const DEFAULT_COMPRESSIBLE_CONFIG: CompressibleConfig;
1661
1601
  /**
1662
- * @deprecated Use {@link SplInterfaceActivity} instead.
1602
+ * Create instruction for creating an associated light-token account.
1603
+ * Uses the default rent sponsor PDA by default.
1604
+ *
1605
+ * @param feePayer Fee payer public key.
1606
+ * @param owner Owner of the associated token account.
1607
+ * @param mint Mint address.
1608
+ * @param compressibleConfig Compressible configuration (defaults to rent sponsor config).
1609
+ * @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
1610
+ * @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
1663
1611
  */
1664
- type TokenPoolActivity = SplInterfaceActivity;
1612
+ declare function createAssociatedLightTokenAccountInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig | null, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
1665
1613
  /**
1666
- * @deprecated Use {@link deriveSplInterfaceInfo} instead.
1614
+ * Create idempotent instruction for creating an associated light-token account.
1615
+ * Uses the default rent sponsor PDA by default.
1616
+ *
1617
+ * @param feePayer Fee payer public key.
1618
+ * @param owner Owner of the associated token account.
1619
+ * @param mint Mint address.
1620
+ * @param compressibleConfig Compressible configuration (defaults to rent sponsor config).
1621
+ * @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
1622
+ * @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
1667
1623
  */
1668
- declare function deriveTokenPoolInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): TokenPoolInfo;
1624
+ declare function createAssociatedLightTokenAccountIdempotentInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig | null, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
1625
+
1669
1626
  /**
1670
- * @deprecated Use {@link checkSplInterfaceInfo} instead.
1627
+ * light-token-specific config for createAssociatedTokenAccountInterfaceInstruction
1671
1628
  */
1672
- declare function checkTokenPoolInfo(tokenPoolInfo: TokenPoolInfo, mint: PublicKey): boolean;
1629
+ interface LightTokenConfig {
1630
+ compressibleConfig?: CompressibleConfig | null;
1631
+ configAccount?: PublicKey;
1632
+ rentPayerPda?: PublicKey;
1633
+ }
1673
1634
  /**
1674
- * @deprecated Use {@link getSplInterfaceInfos} instead.
1635
+ * Create instruction for creating an associated token account (SPL, Token-2022,
1636
+ * or light-token). Follows SPL Token API signature with optional light-token config at the
1637
+ * end.
1638
+ *
1639
+ * @param payer Fee payer public key.
1640
+ * @param associatedToken Associated token account address.
1641
+ * @param owner Owner of the associated token account.
1642
+ * @param mint Mint address.
1643
+ * @param programId Token program ID (default: TOKEN_PROGRAM_ID).
1644
+ * @param associatedTokenProgramId Associated token program ID.
1645
+ * @param lightTokenConfig Optional light-token-specific configuration.
1675
1646
  */
1676
- declare function getTokenPoolInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<TokenPoolInfo[]>;
1647
+ declare function createAssociatedTokenAccountInterfaceInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): TransactionInstruction;
1677
1648
  /**
1678
- * @deprecated Use {@link selectSplInterfaceInfo} instead.
1649
+ * Create idempotent instruction for creating an associated token account (SPL,
1650
+ * Token-2022, or light-token). Follows SPL Token API signature with optional light-token
1651
+ * config at the end.
1652
+ *
1653
+ * @param payer Fee payer public key.
1654
+ * @param associatedToken Associated token account address.
1655
+ * @param owner Owner of the associated token account.
1656
+ * @param mint Mint address.
1657
+ * @param programId Token program ID (default: TOKEN_PROGRAM_ID).
1658
+ * @param associatedTokenProgramId Associated token program ID.
1659
+ * @param lightTokenConfig Optional light-token-specific configuration.
1679
1660
  */
1680
- declare function selectTokenPoolInfo(infos: TokenPoolInfo[]): TokenPoolInfo;
1661
+ declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): TransactionInstruction;
1681
1662
  /**
1682
- * @deprecated Use {@link selectSplInterfaceInfosForDecompression} instead.
1663
+ * Short alias for createAssociatedTokenAccountInterfaceIdempotentInstruction.
1683
1664
  */
1684
- declare function selectTokenPoolInfosForDecompression(infos: TokenPoolInfo[], decompressAmount: number | BN): TokenPoolInfo[];
1665
+ declare const createAtaInterfaceIdempotentInstruction: typeof createAssociatedTokenAccountInterfaceIdempotentInstruction;
1685
1666
 
1686
1667
  /**
1687
- * Create decompressInterface instruction using Transfer2.
1668
+ * Parameters for creating a MintTo instruction.
1669
+ */
1670
+ interface CreateMintToInstructionParams {
1671
+ /** Light mint account (decompressed from compressed light mint) */
1672
+ mint: PublicKey;
1673
+ /** Destination light-token account to mint to */
1674
+ destination: PublicKey;
1675
+ /** Amount of tokens to mint */
1676
+ amount: number | bigint;
1677
+ /** Mint authority (must be signer) */
1678
+ authority: PublicKey;
1679
+ /** Maximum lamports for rent and top-up combined. Transaction fails if exceeded. (u16::MAX = no limit, 0 = no top-ups allowed) */
1680
+ maxTopUp?: number;
1681
+ /** Optional fee payer for rent top-ups. If not provided, authority pays. */
1682
+ feePayer?: PublicKey;
1683
+ }
1684
+ /**
1685
+ * Create instruction for minting tokens to a light-token account.
1688
1686
  *
1689
- * Supports decompressing to both c-token accounts and SPL token accounts:
1690
- * - For c-token destinations: No splInterfaceInfo needed
1691
- * - For SPL destinations: Provide splInterfaceInfo (token pool info) and decimals
1687
+ * This is a simple 3-4 account instruction for minting to light-token associated token accounts (hot).
1688
+ * Uses discriminator 7 (LightTokenMintTo).
1692
1689
  *
1693
- * @param payer Fee payer public key
1694
- * @param inputCompressedTokenAccounts Input compressed token accounts
1695
- * @param toAddress Destination token account address (c-token or SPL ATA)
1696
- * @param amount Amount to decompress
1697
- * @param validityProof Validity proof (contains compressedProof and rootIndices)
1698
- * @param splInterfaceInfo Optional: SPL interface info for SPL destinations
1699
- * @param decimals Mint decimals (required for SPL destinations)
1700
- * @returns TransactionInstruction
1690
+ * @param params - Mint instruction parameters
1691
+ * @returns TransactionInstruction for minting tokens
1701
1692
  */
1702
- declare function createDecompressInterfaceInstruction(payer: PublicKey, inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: bigint, validityProof: ValidityProofWithContext, splInterfaceInfo: SplInterfaceInfo | undefined, decimals: number): TransactionInstruction;
1693
+ declare function createMintToInstruction(params: CreateMintToInstructionParams): TransactionInstruction;
1703
1694
 
1695
+ /** Default compressible config PDA (V1) */
1696
+ declare const LIGHT_TOKEN_CONFIG: PublicKey;
1697
+ /** Default rent sponsor PDA (V1) */
1698
+ declare const LIGHT_TOKEN_RENT_SPONSOR: PublicKey;
1704
1699
  /**
1705
- * Options for interface operations (load, transfer)
1700
+ * Token data version enum - mirrors Rust TokenDataVersion
1701
+ * Used for compressed token account hashing strategy
1706
1702
  */
1707
- interface InterfaceOptions {
1708
- /** SPL interface infos (fetched if not provided) */
1709
- splInterfaceInfos?: SplInterfaceInfo[];
1703
+ declare enum TokenDataVersion {
1704
+ /** V1: Poseidon hash with little-endian amount, discriminator [2,0,0,0,0,0,0,0] */
1705
+ V1 = 1,
1706
+ /** V2: Poseidon hash with big-endian amount, discriminator [0,0,0,0,0,0,0,3] */
1707
+ V2 = 2,
1708
+ /** ShaFlat: SHA256 hash of borsh-serialized data, discriminator [0,0,0,0,0,0,0,4] */
1709
+ ShaFlat = 3
1710
1710
  }
1711
-
1711
+ declare const POOL_SEED: Buffer$1<ArrayBuffer>;
1712
+ declare const CPI_AUTHORITY_SEED: Buffer$1<ArrayBuffer>;
1713
+ declare const SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE = 1461600;
1714
+ declare const CREATE_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1715
+ declare const MINT_TO_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1716
+ declare const BATCH_COMPRESS_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1717
+ declare const TRANSFER_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1718
+ declare const COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1719
+ declare const APPROVE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1720
+ declare const REVOKE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1721
+ declare const ADD_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1712
1722
  /**
1713
- * Account info interface for compressible accounts.
1714
- * Matches return structure of getAccountInterface/getAtaInterface.
1715
- *
1716
- * Integrating programs provide their own fetch/parse - this is just the data shape.
1723
+ * Maximum lamports for rent top-up in a single instruction.
1724
+ * u16::MAX = no limit; 0 = no top-ups allowed.
1725
+ * Matches Rust SDK (e.g. token-sdk create_mints uses u16::MAX for "no limit").
1717
1726
  */
1718
- interface ParsedAccountInfoInterface<T = unknown> {
1719
- /** Parsed account data (program-specific) */
1720
- parsed: T;
1721
- /** Load context - present if account is compressed (cold), undefined if hot */
1722
- loadContext?: MerkleContext;
1723
- }
1727
+ declare const MAX_TOP_UP = 65535;
1724
1728
  /**
1725
- * Input for createLoadAccountsParams.
1726
- * Supports both program PDAs and c-token vaults.
1727
- *
1728
- * The integrating program is responsible for fetching and parsing their accounts.
1729
- * This helper just packs them for the decompressAccountsIdempotent instruction.
1729
+ * Rent configuration constants for compressible light token accounts.
1730
+ * These match the Rust SDK defaults in program-libs/compressible/src/rent/config.rs
1730
1731
  */
1731
- interface CompressibleAccountInput<T = unknown> {
1732
- /** Account address */
1733
- address: PublicKey;
1734
- /**
1735
- * Account type key for packing:
1736
- * - For PDAs: program-specific type name (e.g., "poolState", "observationState")
1737
- * - For c-token vaults: "cTokenData"
1738
- */
1739
- accountType: string;
1740
- /**
1741
- * Token variant - required when accountType is "cTokenData".
1742
- * Examples: "lpVault", "token0Vault", "token1Vault"
1743
- */
1744
- tokenVariant?: string;
1745
- /** Parsed account info (from program-specific fetch) */
1746
- info: ParsedAccountInfoInterface<T>;
1747
- }
1732
+ /** Base rent per epoch (lamports) */
1733
+ declare const BASE_RENT_PER_EPOCH = 128;
1734
+ /** Rent per byte per epoch (lamports) */
1735
+ declare const RENT_PER_BYTE_PER_EPOCH = 1;
1736
+ /** Slots per rent epoch (1.5 hours) */
1737
+ declare const SLOTS_PER_RENT_EPOCH = 13500;
1738
+ /** Compression cost (lamports) - paid at account creation */
1739
+ declare const COMPRESSION_COST = 10000;
1740
+ /** Compression incentive (lamports) - paid at account creation */
1741
+ declare const COMPRESSION_INCENTIVE = 1000;
1742
+ /** Total compression cost (COMPRESSION_COST + COMPRESSION_INCENTIVE) */
1743
+ declare const TOTAL_COMPRESSION_COST: number;
1748
1744
  /**
1749
- * Packed compressed account for decompressAccountsIdempotent instruction
1745
+ * Compressible light token account size in bytes.
1746
+ * = 165 (base SPL token) + 1 (account_type) + 1 (Option) + 4 (Vec len) + 1 (ext disc) + 4 (ext header) + 96 (CompressionInfo) = 272
1747
+ * Source: program-libs/token-interface/src/state/token/top_up.rs MIN_SIZE_WITH_COMPRESSIBLE
1750
1748
  */
1751
- interface PackedCompressedAccount {
1752
- [key: string]: unknown;
1753
- merkleContext: {
1754
- merkleTreePubkeyIndex: number;
1755
- queuePubkeyIndex: number;
1756
- };
1757
- }
1749
+ declare const COMPRESSIBLE_LIGHT_TOKEN_ACCOUNT_SIZE = 272;
1758
1750
  /**
1759
- * Result from building load params
1751
+ * Calculate rent per epoch for a given account size.
1752
+ * Formula: base_rent + (bytes * lamports_per_byte_per_epoch)
1760
1753
  */
1761
- interface CompressibleLoadParams {
1762
- /** Validity proof wrapped in option (null if all proveByIndex) */
1763
- proofOption: {
1764
- 0: ValidityProof | null;
1765
- };
1766
- /** Packed compressed accounts data for instruction */
1767
- compressedAccounts: PackedCompressedAccount[];
1768
- /** Offset to system accounts in remainingAccounts */
1769
- systemAccountsOffset: number;
1770
- /** Account metas for remaining accounts */
1771
- remainingAccounts: AccountMeta[];
1772
- }
1754
+ declare function rentPerEpoch(bytes: number): number;
1773
1755
  /**
1774
- * Result from createLoadAccountsParams
1756
+ * Default rent per epoch for a compressible light token account (272 bytes).
1757
+ * = 128 + 272 = 400 lamports
1775
1758
  */
1776
- interface LoadResult {
1777
- /** Params for decompressAccountsIdempotent (null if no program accounts need decompressing) */
1778
- decompressParams: CompressibleLoadParams | null;
1779
- /** Instructions to load ATAs (create ATA, wrap SPL/T22, decompressInterface) */
1780
- ataInstructions: TransactionInstruction[];
1781
- }
1759
+ declare const COMPRESSIBLE_LIGHT_TOKEN_RENT_PER_EPOCH: number;
1760
+ /** Default prepaid epochs (24 hours = 16 epochs * 1.5h) */
1761
+ declare const DEFAULT_PREPAY_EPOCHS = 16;
1762
+ /** Default write top-up (lamports) - ~2 epochs rent */
1763
+ declare const DEFAULT_WRITE_TOP_UP = 766;
1782
1764
  /**
1783
- * Create params for loading program accounts and ATAs.
1784
- *
1785
- * Returns:
1786
- * - decompressParams: for a caller program's standardized
1787
- * decompressAccountsIdempotent instruction
1788
- * - ataInstructions: for loading user ATAs
1789
- *
1790
- * @param rpc RPC connection
1791
- * @param payer Fee payer (needed for ATA instructions)
1792
- * @param programId Program ID for decompressAccountsIdempotent
1793
- * @param programAccounts PDAs and vaults (caller pre-fetches)
1794
- * @param atas User ATAs (fetched via getAtaInterface)
1795
- * @param options Optional load options
1796
- * @returns LoadResult with decompressParams and ataInstructions
1797
- *
1798
- * @example
1799
- * ```typescript
1800
- * const poolInfo = await myProgram.fetchPoolState(rpc, poolAddress);
1801
- * const vault0Ata = getAssociatedTokenAddressInterface(token0Mint, poolAddress);
1802
- * const vault0Info = await getAtaInterface(rpc, vault0Ata, poolAddress, token0Mint, undefined, CTOKEN_PROGRAM_ID);
1803
- * const userAta = getAssociatedTokenAddressInterface(tokenMint, userWallet);
1804
- * const userAtaInfo = await getAtaInterface(rpc, userAta, userWallet, tokenMint);
1805
- *
1806
- * const result = await createLoadAccountsParams(
1807
- * rpc,
1808
- * payer.publicKey,
1809
- * programId,
1810
- * [
1811
- * { address: poolAddress, accountType: 'poolState', info: poolInfo },
1812
- * { address: vault0, accountType: 'cTokenData', tokenVariant: 'token0Vault', info: vault0Info },
1813
- * ],
1814
- * [userAta],
1815
- * );
1765
+ * Calculate fee payer cost at ATA creation.
1766
+ * = compression_cost (11K) + (prepay_epochs * rent_per_epoch)
1767
+ */
1768
+ declare function calculateFeePayerCostAtCreation(prepayEpochs?: number, accountBytes?: number): number;
1769
+
1770
+ /**
1771
+ * Create instruction for minting tokens from a light mint to compressed accounts.
1772
+ * To mint to light-token associated token accounts across SPL/T22/light mints, use
1773
+ * {@link createMintToInterfaceInstruction} instead.
1816
1774
  *
1817
- * // Build transaction with both program decompress and ATA load
1818
- * const instructions = [...result.ataInstructions];
1819
- * if (result.decompressParams) {
1820
- * instructions.push(await program.methods
1821
- * .decompressAccountsIdempotent(
1822
- * result.decompressParams.proofOption,
1823
- * result.decompressParams.compressedAccounts,
1824
- * result.decompressParams.systemAccountsOffset,
1825
- * )
1826
- * .remainingAccounts(result.decompressParams.remainingAccounts)
1827
- * .instruction());
1828
- * }
1829
- * ```
1775
+ * @param authority Mint authority public key.
1776
+ * @param payer Fee payer public key.
1777
+ * @param validityProof Validity proof for the light mint.
1778
+ * @param merkleContext Merkle context of the light mint.
1779
+ * @param mintData Mint instruction data.
1780
+ * @param recipients Array of recipients with amounts.
1781
+ * @param outputStateTreeInfo Optional output state tree info. Uses merkle
1782
+ * context queue if not provided.
1783
+ * @param tokenAccountVersion Token account version (default:
1784
+ * TokenDataVersion.ShaFlat).
1785
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1830
1786
  */
1831
- declare function createLoadAccountsParams(rpc: Rpc, payer: PublicKey, programId: PublicKey, programAccounts?: CompressibleAccountInput[], atas?: AccountInterface[], options?: InterfaceOptions): Promise<LoadResult>;
1787
+ declare function createMintToCompressedInstruction(authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, merkleContext: MerkleContext, mintData: MintInstructionData, recipients: Array<{
1788
+ recipient: PublicKey;
1789
+ amount: number | bigint;
1790
+ }>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: TokenDataVersion, maxTopUp?: number): TransactionInstruction;
1791
+
1832
1792
  /**
1833
- * Calculate compute units for compressible load operation
1793
+ * Create mint-to instruction for SPL, Token-2022, or light-token mints.
1794
+ * This instruction ONLY mints to light-token associated token accounts (hot).
1795
+ *
1796
+ * For light-token mints, the light mint account must exist (mint must be decompressed first).
1797
+ *
1798
+ * @param mintInterface Mint interface (SPL, Token-2022, or light-token).
1799
+ * @param destination Destination onchain token account address.
1800
+ * @param authority Mint authority public key.
1801
+ * @param payer Fee payer public key.
1802
+ * @param amount Amount to mint.
1803
+ * @param validityProof Not used (legacy parameter, kept for compatibility).
1804
+ * @param multiSigners Multi-signature signer public keys (SPL/T22 only).
1834
1805
  */
1835
- declare function calculateCompressibleLoadComputeUnits(compressedAccountCount: number, hasValidityProof: boolean): number;
1806
+ declare function createMintToInterfaceInstruction(mintInterface: MintInterface, destination: PublicKey, authority: PublicKey, payer: PublicKey, amount: number | bigint, validityProof?: ValidityProofWithContext, multiSigners?: PublicKey[]): TransactionInstruction;
1836
1807
 
1837
1808
  /**
1838
1809
  * Create a wrap instruction that moves tokens from an SPL/T22 account to a
1839
- * c-token account.
1810
+ * light-token account.
1840
1811
  *
1841
1812
  * @param source Source SPL/T22 token account
1842
- * @param destination Destination c-token account
1813
+ * @param destination Destination light-token account
1843
1814
  * @param owner Owner of the source account (signer)
1844
1815
  * @param mint Mint address
1845
1816
  * @param amount Amount to wrap,
1846
1817
  * @param splInterfaceInfo SPL interface info for the compression
1847
1818
  * @param decimals Mint decimals (required for transfer_checked)
1848
1819
  * @param payer Fee payer (defaults to owner)
1820
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1849
1821
  * @returns Instruction to wrap tokens
1850
1822
  */
1851
- declare function createWrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey): TransactionInstruction;
1823
+ declare function createWrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey, maxTopUp?: number): TransactionInstruction;
1852
1824
 
1853
1825
  /**
1854
- * Create an unwrap instruction that moves tokens from a c-token account to an
1826
+ * Create an unwrap instruction that moves tokens from a light-token account to an
1855
1827
  * SPL/T22 account.
1856
1828
  *
1857
- * @param source Source c-token account
1829
+ * @param source Source light-token account
1858
1830
  * @param destination Destination SPL/T22 token account
1859
1831
  * @param owner Owner of the source account (signer)
1860
1832
  * @param mint Mint address
@@ -1862,24 +1834,96 @@ declare function createWrapInstruction(source: PublicKey, destination: PublicKey
1862
1834
  * @param splInterfaceInfo SPL interface info for the decompression
1863
1835
  * @param decimals Mint decimals (required for transfer_checked)
1864
1836
  * @param payer Fee payer (defaults to owner if not provided)
1837
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1865
1838
  * @returns TransactionInstruction to unwrap tokens
1866
1839
  */
1867
- declare function createUnwrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey): TransactionInstruction;
1840
+ declare function createUnwrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey, maxTopUp?: number): TransactionInstruction;
1841
+
1842
+ /**
1843
+ * Create an instruction to freeze a decompressed light-token account.
1844
+ *
1845
+ * Freezing sets the account state to AccountState::Frozen, preventing
1846
+ * transfers and other token operations. Only the mint's freeze_authority
1847
+ * can freeze accounts.
1848
+ *
1849
+ * Account order per program:
1850
+ * 0. token_account (mutable) - the light-token account to freeze
1851
+ * 1. mint (readonly) - the mint associated with the token account
1852
+ * 2. freeze_authority - must match mint.freeze_authority (signer)
1853
+ *
1854
+ * @param tokenAccount The light-token account to freeze (must be Initialized)
1855
+ * @param mint The mint of the light-token account
1856
+ * @param freezeAuthority The freeze authority of the mint (signer)
1857
+ * @returns TransactionInstruction
1858
+ */
1859
+ declare function createLightTokenFreezeAccountInstruction(tokenAccount: PublicKey, mint: PublicKey, freezeAuthority: PublicKey): TransactionInstruction;
1860
+ /**
1861
+ * Create an instruction to thaw (unfreeze) a frozen light-token account.
1862
+ *
1863
+ * Thawing restores the account state from AccountState::Frozen to
1864
+ * AccountState::Initialized, re-enabling token operations. Only the
1865
+ * mint's freeze_authority can thaw accounts.
1866
+ *
1867
+ * Account order per program:
1868
+ * 0. token_account (mutable) - the frozen light-token account to thaw
1869
+ * 1. mint (readonly) - the mint associated with the token account
1870
+ * 2. freeze_authority - must match mint.freeze_authority (signer)
1871
+ *
1872
+ * @param tokenAccount The frozen light-token account to thaw
1873
+ * @param mint The mint of the light-token account
1874
+ * @param freezeAuthority The freeze authority of the mint (signer)
1875
+ * @returns TransactionInstruction
1876
+ */
1877
+ declare function createLightTokenThawAccountInstruction(tokenAccount: PublicKey, mint: PublicKey, freezeAuthority: PublicKey): TransactionInstruction;
1878
+
1879
+ /**
1880
+ * Create an instruction to approve a delegate for a light-token account.
1881
+ *
1882
+ * Account order per program:
1883
+ * 0. token_account (mutable) - the light-token account
1884
+ * 1. delegate (readonly) - the delegate to approve
1885
+ * 2. owner (signer) - owner of the token account
1886
+ * 3. system_program (readonly) - for rent top-ups via CPI
1887
+ * 4. fee_payer (mutable, signer) - pays for rent top-ups
1888
+ *
1889
+ * @param tokenAccount The light-token account to set delegation on
1890
+ * @param delegate The delegate to approve
1891
+ * @param owner Owner of the token account (signer)
1892
+ * @param amount Amount of tokens to delegate
1893
+ * @param feePayer Optional fee payer for rent top-ups (defaults to owner)
1894
+ * @returns TransactionInstruction
1895
+ */
1896
+ declare function createLightTokenApproveInstruction(tokenAccount: PublicKey, delegate: PublicKey, owner: PublicKey, amount: number | bigint, feePayer?: PublicKey): TransactionInstruction;
1897
+ /**
1898
+ * Create an instruction to revoke delegation for a light-token account.
1899
+ *
1900
+ * Account order per program:
1901
+ * 0. token_account (mutable) - the light-token account
1902
+ * 1. owner (signer) - owner of the token account
1903
+ * 2. system_program (readonly) - for rent top-ups via CPI
1904
+ * 3. fee_payer (mutable, signer) - pays for rent top-ups
1905
+ *
1906
+ * @param tokenAccount The light-token account to revoke delegation on
1907
+ * @param owner Owner of the token account (signer)
1908
+ * @param feePayer Optional fee payer for rent top-ups (defaults to owner)
1909
+ * @returns TransactionInstruction
1910
+ */
1911
+ declare function createLightTokenRevokeInstruction(tokenAccount: PublicKey, owner: PublicKey, feePayer?: PublicKey): TransactionInstruction;
1868
1912
 
1869
1913
  /**
1870
- * Create and initialize a new mint for SPL/T22/c-token.
1914
+ * Create and initialize a new mint for SPL/T22/light-token.
1871
1915
  *
1872
1916
  * @param rpc RPC connection to use
1873
1917
  * @param payer Fee payer
1874
- * @param mintAuthority Account that will control minting (signer for c-token mints)
1918
+ * @param mintAuthority Account that will control minting (signer for light-token mints)
1875
1919
  * @param freezeAuthority Account that will control freeze and thaw (optional)
1876
1920
  * @param decimals Location of the decimal place
1877
1921
  * @param keypair Mint keypair (defaults to a random keypair)
1878
1922
  * @param confirmOptions Confirm options
1879
- * @param programId Token program ID (defaults to CTOKEN_PROGRAM_ID)
1880
- * @param tokenMetadata Optional token metadata (c-token mints only)
1881
- * @param outputStateTreeInfo Optional output state tree info (c-token mints only)
1882
- * @param addressTreeInfo Optional address tree info (c-token mints only)
1923
+ * @param programId Token program ID (defaults to LIGHT_TOKEN_PROGRAM_ID)
1924
+ * @param tokenMetadata Optional token metadata (light-token mints only)
1925
+ * @param outputStateTreeInfo Optional output state tree info (light-token mints only)
1926
+ * @param addressTreeInfo Optional address tree info (light-token mints only)
1883
1927
  *
1884
1928
  * @returns Object with mint address and transaction signature
1885
1929
  */
@@ -1889,7 +1933,8 @@ declare function createMintInterface(rpc: Rpc, payer: Signer, mintAuthority: Pub
1889
1933
  }>;
1890
1934
 
1891
1935
  /**
1892
- * Update the mint authority of a compressed token mint.
1936
+ * Update the mint authority of a light-token mint.
1937
+ * Works for both compressed and decompressed light mints.
1893
1938
  *
1894
1939
  * @param rpc RPC connection
1895
1940
  * @param payer Fee payer (signer)
@@ -1900,7 +1945,8 @@ declare function createMintInterface(rpc: Rpc, payer: Signer, mintAuthority: Pub
1900
1945
  */
1901
1946
  declare function updateMintAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentMintAuthority: Signer, newMintAuthority: PublicKey | null, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
1902
1947
  /**
1903
- * Update the freeze authority of a compressed token mint.
1948
+ * Update the freeze authority of a light-token mint.
1949
+ * Works for both compressed and decompressed light mints.
1904
1950
  *
1905
1951
  * @param rpc RPC connection
1906
1952
  * @param payer Fee payer (signer)
@@ -1912,7 +1958,8 @@ declare function updateMintAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, c
1912
1958
  declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentFreezeAuthority: Signer, newFreezeAuthority: PublicKey | null, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
1913
1959
 
1914
1960
  /**
1915
- * Update a metadata field on a compressed token mint.
1961
+ * Update a metadata field on a light-token mint.
1962
+ * Works for both compressed and decompressed light mints.
1916
1963
  *
1917
1964
  * @param rpc RPC connection
1918
1965
  * @param payer Fee payer (signer)
@@ -1926,7 +1973,8 @@ declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey,
1926
1973
  */
1927
1974
  declare function updateMetadataField(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, fieldType: 'name' | 'symbol' | 'uri' | 'custom', value: string, customKey?: string, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
1928
1975
  /**
1929
- * Update the metadata authority of a compressed token mint.
1976
+ * Update the metadata authority of a light-token mint.
1977
+ * Works for both compressed and decompressed light mints.
1930
1978
  *
1931
1979
  * @param rpc RPC connection
1932
1980
  * @param payer Fee payer (signer)
@@ -1938,7 +1986,8 @@ declare function updateMetadataField(rpc: Rpc, payer: Signer, mint: PublicKey, a
1938
1986
  */
1939
1987
  declare function updateMetadataAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentAuthority: Signer, newAuthority: PublicKey, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
1940
1988
  /**
1941
- * Remove a metadata key from a compressed token mint.
1989
+ * Remove a metadata key from a light-token mint.
1990
+ * Works for both compressed and decompressed light mints.
1942
1991
  *
1943
1992
  * @param rpc RPC connection
1944
1993
  * @param payer Fee payer (signer)
@@ -1952,8 +2001,8 @@ declare function updateMetadataAuthority(rpc: Rpc, payer: Signer, mint: PublicKe
1952
2001
  declare function removeMetadataKey(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, key: string, idempotent?: boolean, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
1953
2002
 
1954
2003
  /**
1955
- * Create an associated token account for SPL/T22/c-token. Defaults to c-token
1956
- * program.
2004
+ * Create an associated token account for SPL/T22/light-token. Defaults to
2005
+ * light-token program.
1957
2006
  *
1958
2007
  * @param rpc RPC connection
1959
2008
  * @param payer Fee payer and transaction signer
@@ -1962,16 +2011,16 @@ declare function removeMetadataKey(rpc: Rpc, payer: Signer, mint: PublicKey, aut
1962
2011
  * @param allowOwnerOffCurve Allow owner to be a PDA (default: false)
1963
2012
  * @param confirmOptions Options for confirming the transaction
1964
2013
  * @param programId Token program ID (default:
1965
- * CTOKEN_PROGRAM_ID)
1966
- * @param associatedTokenProgramId ATA program ID (auto-derived if not
1967
- * provided)
1968
- * @param ctokenConfig Optional rent config
2014
+ * LIGHT_TOKEN_PROGRAM_ID)
2015
+ * @param associatedTokenProgramId associated token account program ID
2016
+ * (auto-derived if not provided)
2017
+ * @param lightTokenConfig Optional rent config
1969
2018
  * @returns Address of the new associated token account
1970
2019
  */
1971
- declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, ctokenConfig?: CTokenConfig): Promise<PublicKey>;
2020
+ declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): Promise<PublicKey>;
1972
2021
  /**
1973
- * Create an associated token account idempotently for SPL/T22/c-token. Defaults
1974
- * to c-token program.
2022
+ * Create an associated token account idempotently for SPL/T22/light-token.
2023
+ * Defaults to light-token program.
1975
2024
  *
1976
2025
  * If the account already exists, the instruction succeeds without error.
1977
2026
  *
@@ -1982,19 +2031,35 @@ declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, ow
1982
2031
  * @param allowOwnerOffCurve Allow owner to be a PDA (default: false)
1983
2032
  * @param confirmOptions Options for confirming the transaction
1984
2033
  * @param programId Token program ID (default:
1985
- * CTOKEN_PROGRAM_ID)
1986
- * @param associatedTokenProgramId ATA program ID (auto-derived if not
1987
- * provided)
1988
- * @param ctokenConfig Optional c-token-specific configuration
2034
+ * LIGHT_TOKEN_PROGRAM_ID)
2035
+ * @param associatedTokenProgramId associated token account program ID
2036
+ * (auto-derived if not provided)
2037
+ * @param lightTokenConfig Optional light-token-specific configuration
1989
2038
  *
1990
2039
  * @returns Address of the associated token account
1991
2040
  */
1992
- declare function createAtaInterfaceIdempotent(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, ctokenConfig?: CTokenConfig): Promise<PublicKey>;
2041
+ declare function createAtaInterfaceIdempotent(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): Promise<PublicKey>;
1993
2042
 
1994
- declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, recipientAccount: PublicKey, authority: Signer, amount: number | bigint, outputQueue?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2043
+ /**
2044
+ * Mint tokens to a light-token account.
2045
+ *
2046
+ * This is a simple mint instruction for minting to light-token associated token accounts (hot).
2047
+ * The light mint account must exist (mint must be decompressed first).
2048
+ *
2049
+ * @param rpc - RPC connection
2050
+ * @param payer - Fee payer (signer)
2051
+ * @param mint - Mint address (light mint account)
2052
+ * @param destination - Destination light-token account
2053
+ * @param authority - Mint authority (signer)
2054
+ * @param amount - Amount to mint
2055
+ * @param maxTopUp - Optional maximum lamports for rent top-up
2056
+ * @param confirmOptions - Optional confirm options
2057
+ * @returns Transaction signature
2058
+ */
2059
+ declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, destination: PublicKey, authority: Signer, amount: number | bigint, maxTopUp?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
1995
2060
 
1996
2061
  /**
1997
- * Mint compressed tokens directly to compressed accounts.
2062
+ * Mint light-tokens directly to compressed accounts.
1998
2063
  *
1999
2064
  * @param rpc RPC connection
2000
2065
  * @param payer Fee payer
@@ -2003,77 +2068,63 @@ declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, recipientAcc
2003
2068
  * @param recipients Array of recipients with amounts
2004
2069
  * @param outputStateTreeInfo Optional output state tree info (auto-fetched if not provided)
2005
2070
  * @param tokenAccountVersion Token account version (default: 3)
2071
+ * @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
2006
2072
  * @param confirmOptions Optional confirm options
2007
2073
  */
2008
2074
  declare function mintToCompressed(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, recipients: Array<{
2009
2075
  recipient: PublicKey;
2010
2076
  amount: number | bigint;
2011
- }>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2077
+ }>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: number, maxTopUp?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2012
2078
 
2013
2079
  /**
2014
2080
  * Mint tokens to a decompressed/onchain token account.
2015
- * Works with SPL, Token-2022, and compressed token (c-token) mints.
2081
+ * Works with SPL, Token-2022, and light-token mints.
2082
+ *
2083
+ * This function ONLY mints to light-token associated token accounts (hot), never to compressed light-token accounts (cold).
2084
+ * For light-token mints, the light mint account must exist (mint must be decompressed first).
2016
2085
  *
2017
- * This function ONLY mints to decompressed onchain token accounts, never to compressed accounts.
2018
2086
  * The signature matches the standard SPL mintTo for simplicity and consistency.
2019
2087
  *
2020
2088
  * @param rpc - RPC connection to use
2021
2089
  * @param payer - Transaction fee payer
2022
- * @param mint - Mint address (SPL, Token-2022, or compressed mint)
2090
+ * @param mint - Mint address (SPL, Token-2022, or light-token mint)
2023
2091
  * @param destination - Destination token account address (must be an existing onchain token account)
2024
2092
  * @param authority - Mint authority (can be Signer or PublicKey if multiSigners provided)
2025
2093
  * @param amount - Amount to mint
2026
2094
  * @param multiSigners - Optional: Multi-signature signers (default: [])
2027
2095
  * @param confirmOptions - Optional: Transaction confirmation options
2028
- * @param programId - Optional: Token program ID (TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID, or CTOKEN_PROGRAM_ID). If undefined, auto-detects.
2096
+ * @param programId - Optional: Token program ID. If undefined, auto-detects.
2029
2097
  *
2030
2098
  * @returns Transaction signature
2031
2099
  */
2032
2100
  declare function mintToInterface(rpc: Rpc, payer: Signer, mint: PublicKey, destination: PublicKey, authority: Signer | PublicKey, amount: number | bigint, multiSigners?: Signer[], confirmOptions?: ConfirmOptions, programId?: PublicKey): Promise<TransactionSignature>;
2033
2101
 
2034
2102
  /**
2035
- * Decompress compressed (cold) tokens to an on-chain token account.
2036
- *
2037
- * For unified loading, use {@link loadAta} instead.
2038
- *
2039
- * @param rpc RPC connection
2040
- * @param payer Fee payer (signer)
2041
- * @param owner Owner of the compressed tokens (signer)
2042
- * @param mint Mint address
2043
- * @param amount Amount to decompress (defaults to all)
2044
- * @param destinationAta Destination token account address
2045
- * @param destinationOwner Owner of the destination ATA
2046
- * @param splInterfaceInfo SPL interface info for SPL/T22 destinations
2047
- * @param confirmOptions Confirm options
2048
- * @returns Transaction signature, null if nothing to load.
2049
- */
2050
- declare function decompressInterface(rpc: Rpc, payer: Signer, owner: Signer, mint: PublicKey, amount?: number | bigint | BN, destinationAta?: PublicKey, destinationOwner?: PublicKey, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature | null>;
2051
-
2052
- /**
2053
- * Wrap tokens from an SPL/T22 account to a c-token account.
2103
+ * Wrap tokens from an SPL/T22 account to a light-token account.
2054
2104
  *
2055
2105
  * This is an agnostic action that takes explicit account addresses (spl-token style).
2056
- * Use getAssociatedTokenAddressSync() to derive ATA addresses if needed.
2106
+ * Use getAssociatedTokenAddressSync() to derive associated token account addresses if needed.
2057
2107
  *
2058
2108
  * @param rpc RPC connection
2059
2109
  * @param payer Fee payer
2060
- * @param source Source SPL/T22 token account (any token account, not just ATA)
2061
- * @param destination Destination c-token account
2110
+ * @param source Source SPL/T22 token account (any token account, not just associated token account)
2111
+ * @param destination Destination light-token account
2062
2112
  * @param owner Owner/authority of the source account (must sign)
2063
2113
  * @param mint Mint address
2064
2114
  * @param amount Amount to wrap
2065
2115
  * @param splInterfaceInfo Optional: SPL interface info (will be fetched if not provided)
2116
+ * @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
2066
2117
  * @param confirmOptions Optional: Confirm options
2067
2118
  *
2068
2119
  * @example
2069
2120
  * const splAta = getAssociatedTokenAddressSync(mint, owner.publicKey, false, TOKEN_PROGRAM_ID);
2070
- * const ctokenAta = getAssociatedTokenAddressInterface(mint, owner.publicKey); // defaults to c-token
2121
+ * const lightTokenAta = getAssociatedTokenAddressInterface(mint, owner.publicKey); // defaults to light-token
2071
2122
  *
2072
2123
  * await wrap(
2073
2124
  * rpc,
2074
2125
  * payer,
2075
2126
  * splAta,
2076
- * ctokenAta,
2127
+ * lightTokenAta,
2077
2128
  * owner,
2078
2129
  * mint,
2079
2130
  * 1000n,
@@ -2081,41 +2132,7 @@ declare function decompressInterface(rpc: Rpc, payer: Signer, owner: Signer, min
2081
2132
  *
2082
2133
  * @returns Transaction signature
2083
2134
  */
2084
- declare function wrap(rpc: Rpc, payer: Signer, source: PublicKey, destination: PublicKey, owner: Signer, mint: PublicKey, amount: bigint, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2085
-
2086
- /**
2087
- * Unwrap c-tokens to SPL tokens.
2088
- *
2089
- * @param rpc RPC connection
2090
- * @param payer Fee payer
2091
- * @param destination Destination SPL/T22 token account
2092
- * @param owner Owner of the c-token (signer)
2093
- * @param mint Mint address
2094
- * @param amount Amount to unwrap (defaults to all)
2095
- * @param splInterfaceInfo SPL interface info
2096
- * @param confirmOptions Confirm options
2097
- *
2098
- * @returns Transaction signature
2099
- */
2100
- declare function unwrap(rpc: Rpc, payer: Signer, destination: PublicKey, owner: Signer, mint: PublicKey, amount?: number | bigint | BN, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2101
-
2102
- /**
2103
- * Create instructions to load an ATA from its AccountInterface.
2104
- *
2105
- * Behavior depends on `wrap` parameter:
2106
- * - wrap=false (standard): Decompress compressed tokens to the target ATA type
2107
- * (SPL ATA via pool, T22 ATA via pool, or c-token ATA direct)
2108
- * - wrap=true (unified): Wrap SPL/T22 + decompress all to c-token ATA
2109
- *
2110
- * @param rpc RPC connection
2111
- * @param payer Fee payer
2112
- * @param ata AccountInterface from getAtaInterface (must have _isAta, _owner, _mint)
2113
- * @param options Optional load options
2114
- * @param wrap Unified mode: wrap SPL/T22 to c-token (default: false)
2115
- * @param targetAta Target ATA address (used for type detection in standard mode)
2116
- * @returns Array of instructions (empty if nothing to load)
2117
- */
2118
- declare function createLoadAtaInstructionsFromInterface(rpc: Rpc, payer: PublicKey, ata: AccountInterface, options?: InterfaceOptions, wrap?: boolean, targetAta?: PublicKey): Promise<TransactionInstruction[]>;
2135
+ declare function wrap(rpc: Rpc, payer: Signer, source: PublicKey, destination: PublicKey, owner: Signer, mint: PublicKey, amount: bigint, splInterfaceInfo?: SplInterfaceInfo, maxTopUp?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2119
2136
 
2120
2137
  /**
2121
2138
  * Input for creating off-chain metadata JSON.
@@ -2165,7 +2182,7 @@ interface OffChainTokenMetadataJson {
2165
2182
  * const metadataJson = toOffChainMetadataJson({
2166
2183
  * name: 'My Token',
2167
2184
  * symbol: 'MTK',
2168
- * description: 'A compressed token',
2185
+ * description: 'A light-token',
2169
2186
  * image: 'https://example.com/image.png',
2170
2187
  * });
2171
2188
  * const uri = await umi.uploader.uploadJson(metadataJson);
@@ -2176,18 +2193,30 @@ interface OffChainTokenMetadataJson {
2176
2193
  declare function toOffChainMetadataJson(meta: OffChainTokenMetadata): OffChainTokenMetadataJson;
2177
2194
 
2178
2195
  /**
2179
- * Returns the compressed mint address as bytes.
2196
+ * Returns the light mint address as bytes.
2197
+ * @internal
2180
2198
  */
2181
2199
  declare function deriveCMintAddress(mintSeed: PublicKey, addressTreeInfo: TreeInfo): number[];
2182
2200
  declare const COMPRESSED_MINT_SEED: Buffer$1;
2183
2201
  /**
2184
- * Finds the SPL mint PDA for a c-token mint.
2202
+ * Finds the SPL mint PDA for a light-token mint.
2185
2203
  * @param mintSeed The mint seed public key.
2186
2204
  * @returns [PDA, bump]
2205
+ * @internal
2187
2206
  */
2188
2207
  declare function findMintAddress(mintSigner: PublicKey): [PublicKey, number];
2189
- declare function getAssociatedCTokenAddressAndBump(owner: PublicKey, mint: PublicKey): [PublicKey, number];
2190
- declare function getAssociatedCTokenAddress(owner: PublicKey, mint: PublicKey): PublicKey;
2208
+ /**
2209
+ * Same as "getAssociatedTokenAddress" but returns the bump as well.
2210
+ * Uses light-token program ID.
2211
+ * @internal
2212
+ */
2213
+ declare function getAssociatedLightTokenAddressAndBump(owner: PublicKey, mint: PublicKey): [PublicKey, number];
2214
+ /**
2215
+ * Same as "getAssociatedTokenAddress", returning just the associated token address.
2216
+ * Uses light-token program ID.
2217
+ * @internal
2218
+ */
2219
+ declare function getAssociatedLightTokenAddress(owner: PublicKey, mint: PublicKey): PublicKey;
2191
2220
 
2192
2221
  /**
2193
2222
  * Approve a delegate to spend tokens
@@ -5218,14 +5247,14 @@ declare class CompressedTokenProgram {
5218
5247
  * @param mintSize Optional: mint size. Default: MINT_SIZE
5219
5248
  *
5220
5249
  * @returns [createMintAccountInstruction, initializeMintInstruction,
5221
- * createTokenPoolInstruction]
5250
+ * createSplInterfaceInstruction]
5222
5251
  *
5223
- * Note that `createTokenPoolInstruction` must be executed after
5252
+ * Note that `createSplInterfaceInstruction` must be executed after
5224
5253
  * `initializeMintInstruction`.
5225
5254
  */
5226
5255
  static createMint({ feePayer, mint, authority, freezeAuthority, decimals, rentExemptBalance, tokenProgramId, mintSize, }: CreateMintParams): Promise<TransactionInstruction[]>;
5227
5256
  /**
5228
- * Enable compression for an existing SPL mint, creating an omnibus account.
5257
+ * Create SPL interface (omnibus account) for an existing SPL mint.
5229
5258
  * For new mints, use `CompressedTokenProgram.createMint`.
5230
5259
  *
5231
5260
  * @param feePayer Fee payer.
@@ -5233,12 +5262,16 @@ declare class CompressedTokenProgram {
5233
5262
  * @param tokenProgramId Optional: Token program ID. Default: SPL
5234
5263
  * Token Program ID
5235
5264
  *
5236
- * @returns The createTokenPool instruction
5265
+ * @returns The createSplInterface instruction
5237
5266
  */
5238
- static createTokenPool({ feePayer, mint, tokenProgramId, }: CreateSplInterfaceParams): Promise<TransactionInstruction>;
5267
+ static createSplInterface({ feePayer, mint, tokenProgramId, }: CreateSplInterfaceParams): Promise<TransactionInstruction>;
5268
+ /**
5269
+ * @deprecated Use {@link createSplInterface} instead.
5270
+ */
5271
+ static createTokenPool(params: CreateSplInterfaceParams): Promise<TransactionInstruction>;
5239
5272
  /**
5240
5273
  * Add a token pool to an existing SPL mint. For new mints, use
5241
- * {@link createTokenPool}.
5274
+ * {@link createSplInterface}.
5242
5275
  *
5243
5276
  * @param feePayer Fee payer.
5244
5277
  * @param mint SPL Mint address.
@@ -5402,6 +5435,13 @@ declare class CompressedTokenProgram {
5402
5435
  static revoke({ payer, inputCompressedTokenAccounts, recentValidityProof, recentInputStateRootIndices, }: RevokeParams): Promise<TransactionInstruction>;
5403
5436
  }
5404
5437
 
5438
+ /**
5439
+ * Exports for @lightprotocol/compressed-token/unified
5440
+ *
5441
+ * Import from `/unified` to get a single unified associated token account for SPL/T22 and light-token
5442
+ * mints.
5443
+ */
5444
+
5405
5445
  /**
5406
5446
  * Get associated token account with unified balance
5407
5447
  *
@@ -5415,21 +5455,21 @@ declare class CompressedTokenProgram {
5415
5455
  */
5416
5456
  declare function getAtaInterface(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<AccountInterface>;
5417
5457
  /**
5418
- * Derive the canonical token ATA for SPL/T22/c-token in the unified path.
5458
+ * Derive the canonical token associated token account for SPL/T22/light-token in the unified path.
5419
5459
  *
5420
- * Enforces CTOKEN_PROGRAM_ID.
5460
+ * Enforces LIGHT_TOKEN_PROGRAM_ID.
5421
5461
  *
5422
5462
  * @param mint Mint public key
5423
5463
  * @param owner Owner public key
5424
5464
  * @param allowOwnerOffCurve Allow owner to be a PDA. Default false.
5425
- * @param programId Token program ID. Default c-token.
5465
+ * @param programId Token program ID. Default light-token.
5426
5466
  * @param associatedTokenProgramId Associated token program ID. Default
5427
5467
  * auto-detected.
5428
5468
  * @returns Associated token address.
5429
5469
  */
5430
5470
  declare function getAssociatedTokenAddressInterface(mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, programId?: PublicKey, associatedTokenProgramId?: PublicKey): PublicKey;
5431
5471
  /**
5432
- * Create instructions to load ALL token balances into a c-token ATA.
5472
+ * Create instruction batches for loading ALL token balances into a light-token associated token account.
5433
5473
  *
5434
5474
  * @param rpc RPC connection
5435
5475
  * @param ata Associated token address
@@ -5437,18 +5477,18 @@ declare function getAssociatedTokenAddressInterface(mint: PublicKey, owner: Publ
5437
5477
  * @param mint Mint public key
5438
5478
  * @param payer Fee payer (defaults to owner)
5439
5479
  * @param options Optional interface options
5440
- * @returns Array of instructions (empty if nothing to load)
5480
+ * @returns Instruction batches - each inner array is one transaction
5441
5481
  */
5442
- declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, payer?: PublicKey, options?: InterfaceOptions): Promise<_solana_web3_js.TransactionInstruction[]>;
5482
+ declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, payer?: PublicKey, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
5443
5483
  /**
5444
- * Load all token balances into the c-token ATA.
5484
+ * Load all token balances into the light-token associated token account.
5445
5485
  *
5446
- * Wraps SPL/Token-2022 balances and decompresses compressed c-tokens
5447
- * into the on-chain c-token ATA. If no balances exist and the ATA doesn't
5486
+ * Wraps SPL/Token-2022 balances and decompresses compressed light-tokens
5487
+ * into the on-chain light-token associated token account. If no balances exist and the associated token account doesn't
5448
5488
  * exist, creates an empty ATA (idempotent).
5449
5489
  *
5450
5490
  * @param rpc RPC connection
5451
- * @param ata Associated token address (c-token)
5491
+ * @param ata Associated token address (light-token)
5452
5492
  * @param owner Owner of the tokens (signer)
5453
5493
  * @param mint Mint public key
5454
5494
  * @param payer Fee payer (signer, defaults to owner)
@@ -5456,38 +5496,44 @@ declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: Publ
5456
5496
  * @param interfaceOptions Optional interface options
5457
5497
  * @returns Transaction signature, or null if ATA exists and nothing to load
5458
5498
  */
5459
- declare function loadAta(rpc: Rpc, ata: PublicKey, owner: Signer, mint: PublicKey, payer?: Signer, confirmOptions?: ConfirmOptions, interfaceOptions?: InterfaceOptions): Promise<string | null>;
5499
+ declare function loadAta(rpc: Rpc, ata: PublicKey, owner: Signer, mint: PublicKey, payer?: Signer, confirmOptions?: ConfirmOptions, interfaceOptions?: InterfaceOptions, decimals?: number): Promise<string | null>;
5460
5500
  /**
5461
5501
  * Transfer tokens using the unified ata interface.
5462
5502
  *
5463
- * Matches SPL Token's transferChecked signature order. Destination must exist.
5503
+ * Destination ATA is derived from `recipient` and created idempotently.
5504
+ * Automatically wraps SPL/T22 to light-token associated token account.
5464
5505
  *
5465
5506
  * @param rpc RPC connection
5466
5507
  * @param payer Fee payer (signer)
5467
- * @param source Source c-token ATA address
5508
+ * @param source Source light-token associated token account address
5468
5509
  * @param mint Mint address
5469
- * @param destination Destination c-token ATA address (must exist)
5510
+ * @param recipient Destination owner wallet address
5470
5511
  * @param owner Source owner (signer)
5471
5512
  * @param amount Amount to transfer
5472
- * @param programId Token program ID (default: CTOKEN_PROGRAM_ID)
5473
5513
  * @param confirmOptions Optional confirm options
5474
5514
  * @param options Optional interface options
5475
5515
  * @returns Transaction signature
5476
5516
  */
5477
- declare function transferInterface(rpc: Rpc, payer: Signer, source: PublicKey, mint: PublicKey, destination: PublicKey, owner: Signer, amount: number | bigint | BN, programId?: PublicKey, confirmOptions?: ConfirmOptions, options?: InterfaceOptions): Promise<string>;
5517
+ declare function transferInterface(rpc: Rpc, payer: Signer, source: PublicKey, mint: PublicKey, recipient: PublicKey, owner: Signer, amount: number | bigint | BN, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, decimals?: number): Promise<string>;
5518
+ /**
5519
+ * Transfer tokens to an explicit destination token account.
5520
+ *
5521
+ * Use this for advanced routing to non-ATA destinations.
5522
+ */
5523
+ declare function transferToAccountInterface(rpc: Rpc, payer: Signer, source: PublicKey, mint: PublicKey, destination: PublicKey, owner: Signer, amount: number | bigint | BN, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, decimals?: number): Promise<string>;
5478
5524
  /**
5479
- * Get or create c-token ATA with unified balance detection and auto-loading.
5525
+ * Get or create light-token ATA with unified balance detection and auto-loading.
5480
5526
  *
5481
- * Enforces CTOKEN_PROGRAM_ID. Aggregates balances from:
5482
- * - c-token hot (on-chain) account
5483
- * - c-token cold (compressed) accounts
5527
+ * Enforces LIGHT_TOKEN_PROGRAM_ID. Aggregates balances from:
5528
+ * - light-token associated token account (hot balance)
5529
+ * - compressed light-token accounts (cold balance)
5484
5530
  * - SPL token accounts (for unified wrapping)
5485
5531
  * - Token-2022 accounts (for unified wrapping)
5486
5532
  *
5487
5533
  * When owner is a Signer:
5488
5534
  * - Creates hot ATA if it doesn't exist
5489
5535
  * - Loads cold (compressed) tokens into hot ATA
5490
- * - Wraps SPL/T22 tokens into c-token ATA
5536
+ * - Wraps SPL/T22 tokens into light-token associated token account
5491
5537
  * - Returns account with all tokens ready to use
5492
5538
  *
5493
5539
  * When owner is a PublicKey:
@@ -5504,5 +5550,121 @@ declare function transferInterface(rpc: Rpc, payer: Signer, source: PublicKey, m
5504
5550
  * @returns AccountInterface with unified balance and source breakdown
5505
5551
  */
5506
5552
  declare function getOrCreateAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey | Signer, allowOwnerOffCurve?: boolean, commitment?: Commitment, confirmOptions?: ConfirmOptions): Promise<AccountInterface>;
5553
+ /**
5554
+ * Create transfer instructions for a unified token transfer.
5555
+ *
5556
+ * Unified variant: always wraps SPL/T22 to light-token associated token account.
5557
+ * Recipient must be an on-curve wallet address. For PDA/off-curve owners,
5558
+ * use createTransferToAccountInterfaceInstructions with an explicit destination ATA.
5559
+ *
5560
+ * Returns `TransactionInstruction[][]`. Send [0..n-2] in parallel, then [n-1].
5561
+ * Use `sliceLast` to separate the parallel prefix from the final transfer.
5562
+ *
5563
+ * @see createTransferInterfaceInstructions in v3/actions/transfer-interface.ts
5564
+ */
5565
+ declare function createTransferInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, amount: number | bigint | BN, sender: PublicKey, recipient: PublicKey, options?: Omit<TransferOptions, 'wrap'>): Promise<TransactionInstruction[][]>;
5566
+ /**
5567
+ * Create transfer instructions that route to an explicit destination token
5568
+ * account.
5569
+ */
5570
+ declare function createTransferToAccountInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, amount: number | bigint | BN, sender: PublicKey, destination: PublicKey, options?: Omit<TransferOptions, 'wrap'>): Promise<TransactionInstruction[][]>;
5571
+ /**
5572
+ * Build instruction batches for unwrapping light-tokens to SPL/T22.
5573
+ *
5574
+ * Load batches (cold -> hot) come first if needed; unwrap is bundled into the
5575
+ * final batch.
5576
+ * SPL/T22 balances are not consolidated; only light ATA (hot + cold) is unwrapped.
5577
+ *
5578
+ * Returns `TransactionInstruction[][]`. Load-only batches (if any) come first;
5579
+ * the last batch contains unwrap.
5580
+ *
5581
+ * @param rpc RPC connection
5582
+ * @param destination Destination SPL/T22 token account (must exist)
5583
+ * @param owner Owner of the light-token
5584
+ * @param mint Mint address
5585
+ * @param amount Amount to unwrap (defaults to full balance)
5586
+ * @param payer Fee payer (defaults to owner)
5587
+ * @param splInterfaceInfo Optional: SPL interface info
5588
+ * @param interfaceOptions Optional: interface options for load
5589
+ * @returns Instruction batches - each inner array is one transaction
5590
+ */
5591
+ declare function createUnwrapInstructions(rpc: Rpc, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount?: number | bigint | BN, payer?: PublicKey, splInterfaceInfo?: SplInterfaceInfo, interfaceOptions?: InterfaceOptions): Promise<TransactionInstruction[][]>;
5592
+ /**
5593
+ * Unwrap light-tokens to SPL tokens.
5594
+ *
5595
+ * Loads cold into hot if needed, then unwraps from light ATA to destination SPL/T22.
5596
+ * SPL/T22 balances are not consolidated; only light ATA balance is unwrapped.
5597
+ *
5598
+ * @param rpc RPC connection
5599
+ * @param payer Fee payer
5600
+ * @param destination Destination SPL/T22 token account
5601
+ * @param owner Owner of the light-token (signer)
5602
+ * @param mint Mint address
5603
+ * @param amount Amount to unwrap (defaults to all)
5604
+ * @param splInterfaceInfo SPL interface info
5605
+ * @param confirmOptions Confirm options
5606
+ * @returns Transaction signature of the unwrap transaction
5607
+ */
5608
+ declare function unwrap(rpc: Rpc, payer: Signer, destination: PublicKey, owner: Signer, mint: PublicKey, amount?: number | bigint | BN, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions, decimals?: number): Promise<string>;
5609
+
5610
+ /**
5611
+ * Approve a delegate for an associated token account.
5612
+ *
5613
+ * Auto-detects mint type (light-token, SPL, or Token-2022) and dispatches
5614
+ * to the appropriate instruction.
5615
+ *
5616
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
5617
+ * into the hot ATA, not just the delegation amount. The `amount` parameter
5618
+ * only controls the delegate's spending limit.
5619
+ *
5620
+ * @param rpc RPC connection
5621
+ * @param payer Fee payer (signer)
5622
+ * @param tokenAccount ATA address
5623
+ * @param mint Mint address
5624
+ * @param delegate Delegate to approve
5625
+ * @param amount Amount to delegate
5626
+ * @param owner Owner of the token account (signer)
5627
+ * @param confirmOptions Optional confirm options
5628
+ * @returns Transaction signature
5629
+ */
5630
+ declare function approveInterface(rpc: Rpc, payer: Signer, tokenAccount: PublicKey, mint: PublicKey, delegate: PublicKey, amount: number | bigint | BN, owner: Signer, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, decimals?: number): Promise<string>;
5631
+ /**
5632
+ * Build instruction batches for approving a delegate on an ATA.
5633
+ *
5634
+ * Auto-detects mint type (light-token, SPL, or Token-2022).
5635
+ *
5636
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
5637
+ * into the hot ATA before the approve instruction. The `amount` parameter
5638
+ * only controls the delegate's spending limit, not the number of accounts
5639
+ * loaded.
5640
+ */
5641
+ declare function createApproveInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, tokenAccount: PublicKey, delegate: PublicKey, amount: number | bigint | BN, owner: PublicKey, decimals?: number, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
5642
+ /**
5643
+ * Revoke delegation for an associated token account.
5644
+ *
5645
+ * Auto-detects mint type (light-token, SPL, or Token-2022) and dispatches
5646
+ * to the appropriate instruction.
5647
+ *
5648
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
5649
+ * into the hot ATA before the revoke instruction.
5650
+ *
5651
+ * @param rpc RPC connection
5652
+ * @param payer Fee payer (signer)
5653
+ * @param tokenAccount ATA address
5654
+ * @param mint Mint address
5655
+ * @param owner Owner of the token account (signer)
5656
+ * @param confirmOptions Optional confirm options
5657
+ * @returns Transaction signature
5658
+ */
5659
+ declare function revokeInterface(rpc: Rpc, payer: Signer, tokenAccount: PublicKey, mint: PublicKey, owner: Signer, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, decimals?: number): Promise<string>;
5660
+ /**
5661
+ * Build instruction batches for revoking delegation on an ATA.
5662
+ *
5663
+ * Auto-detects mint type (light-token, SPL, or Token-2022).
5664
+ *
5665
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
5666
+ * into the hot ATA before the revoke instruction.
5667
+ */
5668
+ declare function createRevokeInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, tokenAccount: PublicKey, owner: PublicKey, decimals?: number, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
5507
5669
 
5508
- export { ADD_TOKEN_POOL_DISCRIMINATOR, APPROVE_DISCRIMINATOR, type AccountInterface, Action, type AddSplInterfaceParams, type AddTokenPoolParams, type ApproveAndMintToParams, type ApproveParams, BATCH_COMPRESS_DISCRIMINATOR, type BaseMint, type BatchCompressInstructionData, COMPRESSED_MINT_SEED, COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR, CPI_AUTHORITY_SEED, CREATE_TOKEN_POOL_DISCRIMINATOR, type CTokenConfig, type CompressParams, type CompressSplTokenAccountInstructionData, type CompressSplTokenAccountParams, type CompressedMint, type CompressedTokenInstructionDataApprove, CompressedTokenInstructionDataApproveLayout, type CompressedTokenInstructionDataRevoke, CompressedTokenInstructionDataRevokeLayout, type CompressedTokenInstructionDataTransfer, CompressedTokenInstructionDataTransferLayout, CompressedTokenProgram, type CompressibleAccountInput, type CompressibleConfig, type CompressibleLoadParams, CpiContextLayout, type CreateAssociatedCTokenAccountParams, type CreateMintParams, type CreateSplInterfaceParams, type CreateTokenPoolParams, type CreateTokenProgramLookupTableParams, DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, ERROR_MIXED_TREE_TYPES, ERROR_NO_ACCOUNTS_FOUND, ExtensionType, IDL, type InputTokenDataWithContext, type InterfaceOptions, type LightCompressedToken, type LoadResult, MINT_TO_DISCRIMINATOR, type MergeTokenAccountsParams, type MintContext, type MintExtension, type MintInterface, type MintToInstructionData, type MintToParams, type OffChainTokenMetadata, type OffChainTokenMetadataJson, POOL_SEED, type PackCompressedTokenAccountsParams, type PackedCompressedAccount, type PackedTokenTransferOutputData, type ParsedAccountInfoInterface, REVOKE_DISCRIMINATOR, type RevokeParams, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, type SelectInputAccountsOptions, type SelectedAccountsResult, type SplInterfaceActivity, type SplInterfaceInfo, TRANSFER_DISCRIMINATOR, type TokenAccountSource, type TokenData, TokenDataVersion, type TokenMetadata, type TokenMetadataInstructionData, type TokenPoolActivity, type TokenPoolInfo, type TokenTransferOutputData, type TransferParams, addSplInterfaces, addTokenPoolAccountsLayout, type addTokenPoolAccountsLayoutParams, addTokenPools, approve, approveAccountsLayout, type approveAccountsLayoutParams, approveAndMintTo, batchCompressLayout, calculateCompressibleLoadComputeUnits, checkMint, checkSplInterfaceInfo, checkTokenPoolInfo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, convertTokenDataToAccount, createAssociatedCTokenAccountIdempotentInstruction, createAssociatedCTokenAccountInstruction, createAssociatedTokenAccountInterfaceIdempotentInstruction, createAssociatedTokenAccountInterfaceInstruction, createAtaInterface, createAtaInterfaceIdempotent, createAtaInterfaceIdempotentInstruction, createCTokenTransferInstruction, createDecompressInterfaceInstruction, createDecompressOutputState, createLoadAccountsParams, createLoadAtaInstructions, createLoadAtaInstructionsFromInterface, createMint, createMintInstruction, createMintInterface, createMintToCompressedInstruction, createMintToInstruction, createMintToInterfaceInstruction, createRemoveMetadataKeyInstruction, createSplInterface, createTokenMetadata, createTokenPool, createTokenPoolAccountsLayout, type createTokenPoolAccountsLayoutParams, createTokenProgramLookupTable, createTransferInterfaceInstruction, createTransferOutputState, createUnwrapInstruction, createUpdateFreezeAuthorityInstruction, createUpdateMetadataAuthorityInstruction, createUpdateMetadataFieldInstruction, createUpdateMintAuthorityInstruction, createWrapInstruction, decodeApproveInstructionData, decodeBatchCompressInstructionData, decodeCompressSplTokenAccountInstructionData, decodeMintToInstructionData, decodeRevokeInstructionData, decodeTokenMetadata, decodeTransferInstructionData, decompress, decompressDelegated, decompressInterface, deriveCMintAddress, deriveSplInterfaceInfo, deriveTokenPoolInfo, deserializeMint, encodeApproveInstructionData, encodeBatchCompressInstructionData, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeRevokeInstructionData, encodeTokenMetadata, encodeTransferInstructionData, extractTokenMetadata, findMintAddress, freezeAccountsLayout, type freezeAccountsLayoutParams, getAccountInterface, getAssociatedCTokenAddress, getAssociatedCTokenAddressAndBump, getAssociatedTokenAddressInterface, getAtaInterface, getMintInterface, getOrCreateAtaInterface, getSplInterfaceInfos, getTokenPoolInfos, groupAccountsByTreeType, isSingleSplInterfaceInfo, isSingleTokenPoolInfo, loadAta, mergeTokenAccounts, mintTo, mintToAccountsLayout, type mintToAccountsLayoutParams, mintTo$1 as mintToCToken, mintToCompressed, mintToInterface, mintToLayout, packCompressedTokenAccounts, parseCTokenCold, parseCTokenHot, parseMaybeDelegatedTransfer, parseTokenData, removeMetadataKey, revoke, revokeAccountsLayout, type revokeAccountsLayoutParams, selectAccountsByPreferredTreeType, selectMinCompressedTokenAccountsForDecompression, selectMinCompressedTokenAccountsForTransfer, selectMinCompressedTokenAccountsForTransferOrPartial, selectSmartCompressedTokenAccountsForTransfer, selectSmartCompressedTokenAccountsForTransferOrPartial, selectSplInterfaceInfo, selectSplInterfaceInfosForDecompression, selectTokenAccountsForApprove, selectTokenPoolInfo, selectTokenPoolInfosForDecompression, serializeMint, sumUpTokenAmount, thawAccountsLayout, type thawAccountsLayoutParams, toAccountInfo, toOffChainMetadataJson, toTokenPoolInfo, transfer, transferAccountsLayout, type transferAccountsLayoutParams, transferDelegated, transferInterface, unpackMintData, unpackMintInterface, unwrap, updateFreezeAuthority, updateMetadataAuthority, updateMetadataField, updateMintAuthority, validateSameTokenOwner, wrap };
5670
+ export { ADD_TOKEN_POOL_DISCRIMINATOR, APPROVE_DISCRIMINATOR, type AccountInterface, Action, type AddSplInterfaceParams, type AddTokenPoolParams, type ApproveAndMintToParams, type ApproveParams, BASE_RENT_PER_EPOCH, BATCH_COMPRESS_DISCRIMINATOR, type BaseMint, type BatchCompressInstructionData, COMPRESSED_MINT_SEED, COMPRESSIBLE_LIGHT_TOKEN_ACCOUNT_SIZE, COMPRESSIBLE_LIGHT_TOKEN_RENT_PER_EPOCH, COMPRESSION_COST, COMPRESSION_INCENTIVE, COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR, CPI_AUTHORITY_SEED, CREATE_TOKEN_POOL_DISCRIMINATOR, type CompressParams, type CompressSplTokenAccountInstructionData, type CompressSplTokenAccountParams, type CompressedMint, type CompressedTokenInstructionDataApprove, CompressedTokenInstructionDataApproveLayout, type CompressedTokenInstructionDataRevoke, CompressedTokenInstructionDataRevokeLayout, type CompressedTokenInstructionDataTransfer, CompressedTokenInstructionDataTransferLayout, CompressedTokenProgram, type CompressibleConfig, CpiContextLayout, type CreateAssociatedLightTokenAccountParams, type CreateMintParams, type CreateSplInterfaceParams, type CreateTokenPoolParams, type CreateTokenProgramLookupTableParams, DEFAULT_COMPRESSIBLE_CONFIG, DEFAULT_PREPAY_EPOCHS, DEFAULT_WRITE_TOP_UP, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, ERROR_MIXED_TREE_TYPES, ERROR_NO_ACCOUNTS_FOUND, ExtensionType, IDL, type InputTokenDataWithContext, type InterfaceOptions, LIGHT_TOKEN_CONFIG, LIGHT_TOKEN_RENT_SPONSOR, type LightCompressedToken, type LightTokenConfig, MAX_TOP_UP, MINT_TO_DISCRIMINATOR, type MergeTokenAccountsParams, type MintContext, type MintExtension, type MintInterface, type MintToInstructionData, type MintToParams, type OffChainTokenMetadata, type OffChainTokenMetadataJson, POOL_SEED, type PackCompressedTokenAccountsParams, type PackedTokenTransferOutputData, RENT_PER_BYTE_PER_EPOCH, REVOKE_DISCRIMINATOR, type RevokeParams, SLOTS_PER_RENT_EPOCH, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, type SelectInputAccountsOptions, type SelectedAccountsResult, type SplInterfaceActivity, type SplInterfaceInfo, TOTAL_COMPRESSION_COST, TRANSFER_DISCRIMINATOR, type TokenAccountSource, type TokenData, TokenDataVersion, type TokenMetadata, type TokenMetadataInstructionData, type TokenPoolActivity, type TokenPoolInfo, type TokenTransferOutputData, type TransferOptions, type TransferParams, type TransferOptions as TransferToAccountOptions, addSplInterfaces, addTokenPoolAccountsLayout, type addTokenPoolAccountsLayoutParams, addTokenPools, approve, approveAccountsLayout, type approveAccountsLayoutParams, approveAndMintTo, approveInterface, batchCompressLayout, calculateFeePayerCostAtCreation, checkMint, checkSplInterfaceInfo, checkTokenPoolInfo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, convertTokenDataToAccount, createApproveInterfaceInstructions, createAssociatedLightTokenAccountIdempotentInstruction, createAssociatedLightTokenAccountInstruction, createAssociatedTokenAccountInterfaceIdempotentInstruction, createAssociatedTokenAccountInterfaceInstruction, createAtaInterface, createAtaInterfaceIdempotent, createAtaInterfaceIdempotentInstruction, createDecompressOutputState, createLightTokenApproveInstruction, createLightTokenFreezeAccountInstruction, createLightTokenRevokeInstruction, createLightTokenThawAccountInstruction, createLightTokenTransferCheckedInstruction, createLightTokenTransferInstruction, createLoadAtaInstructions, createMint, createMintInstruction, createMintInterface, createMintToCompressedInstruction, createMintToInstruction, createMintToInterfaceInstruction, createRemoveMetadataKeyInstruction, createRevokeInterfaceInstructions, createSplInterface, createTokenMetadata, createTokenPool, createTokenPoolAccountsLayout, type createTokenPoolAccountsLayoutParams, createTokenProgramLookupTable, createTransferInterfaceInstructions, createTransferOutputState, createTransferToAccountInterfaceInstructions, createUnwrapInstruction, createUnwrapInstructions, createUpdateFreezeAuthorityInstruction, createUpdateMetadataAuthorityInstruction, createUpdateMetadataFieldInstruction, createUpdateMintAuthorityInstruction, createWrapInstruction, decodeApproveInstructionData, decodeBatchCompressInstructionData, decodeCompressSplTokenAccountInstructionData, decodeMintToInstructionData, decodeRevokeInstructionData, decodeTokenMetadata, decodeTransferInstructionData, decompress, decompressDelegated, deriveCMintAddress, deriveSplInterfaceInfo, deriveTokenPoolInfo, deserializeMint, encodeApproveInstructionData, encodeBatchCompressInstructionData, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeRevokeInstructionData, encodeTokenMetadata, encodeTransferInstructionData, extractTokenMetadata, findMintAddress, freezeAccountsLayout, type freezeAccountsLayoutParams, getAccountInterface, getAssociatedLightTokenAddress, getAssociatedLightTokenAddressAndBump, getAssociatedTokenAddressInterface, getAtaInterface, getMintInterface, getOrCreateAtaInterface, getSplInterfaceInfos, getTokenPoolInfos, groupAccountsByTreeType, isSingleSplInterfaceInfo, isSingleTokenPoolInfo, loadAta, mergeTokenAccounts, mintTo, mintToAccountsLayout, type mintToAccountsLayoutParams, mintToCompressed, mintToInterface, mintToLayout, mintTo$1 as mintToLightToken, packCompressedTokenAccounts, parseLightTokenCold, parseLightTokenHot, parseMaybeDelegatedTransfer, parseTokenData, removeMetadataKey, rentPerEpoch, revoke, revokeAccountsLayout, type revokeAccountsLayoutParams, revokeInterface, selectAccountsByPreferredTreeType, selectMinCompressedTokenAccountsForDecompression, selectMinCompressedTokenAccountsForTransfer, selectMinCompressedTokenAccountsForTransferOrPartial, selectSmartCompressedTokenAccountsForTransfer, selectSmartCompressedTokenAccountsForTransferOrPartial, selectSplInterfaceInfo, selectSplInterfaceInfosForDecompression, selectTokenAccountsForApprove, selectTokenPoolInfo, selectTokenPoolInfosForDecompression, serializeMint, sliceLast, sumUpTokenAmount, thawAccountsLayout, type thawAccountsLayoutParams, toAccountInfo, toOffChainMetadataJson, toTokenPoolInfo, transfer, transferAccountsLayout, type transferAccountsLayoutParams, transferDelegated, transferInterface, transferToAccountInterface, unpackMintData, unpackMintInterface, unwrap, updateFreezeAuthority, updateMetadataAuthority, updateMetadataField, updateMintAuthority, validateSameTokenOwner, wrap };