@lightprotocol/compressed-token 0.23.0-beta.9 → 0.23.0

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,38 +1,13 @@
1
1
  /// <reference types="node" />
2
- import {
3
- PublicKey,
4
- AccountInfo,
5
- Commitment,
6
- TransactionInstruction,
7
- AccountMeta,
8
- Signer,
9
- Keypair,
10
- ConfirmOptions,
11
- TransactionSignature,
12
- Connection,
13
- } from '@solana/web3.js';
14
- import {
15
- MerkleContext,
16
- CompressedAccountWithMerkleContext,
17
- Rpc,
18
- ValidityProofWithContext,
19
- AddressTreeInfo,
20
- TreeInfo,
21
- ParsedTokenAccount,
22
- ValidityProof,
23
- TreeType,
24
- PackedMerkleContextLegacy,
25
- CompressedCpiContext,
26
- InputTokenDataWithContext as InputTokenDataWithContext$1,
27
- CompressedProof,
28
- } 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';
29
4
  export { ParsedTokenAccount } from '@lightprotocol/stateless.js';
30
5
  import { Account, Mint } from '@solana/spl-token';
31
6
  export { AccountState } from '@solana/spl-token';
32
7
 
33
8
  declare namespace BN {
34
- type Endianness = 'le' | 'be';
35
- type IPrimeName = 'k256' | 'p224' | 'p192' | 'p25519';
9
+ type Endianness = "le" | "be";
10
+ type IPrimeName = "k256" | "p224" | "p192" | "p25519";
36
11
 
37
12
  interface MPrime {
38
13
  name: string;
@@ -54,7 +29,7 @@ declare class BN {
54
29
 
55
30
  constructor(
56
31
  number: bigint | number | string | number[] | Uint8Array | Buffer | BN,
57
- base?: number | 'hex',
32
+ base?: number | "hex",
58
33
  endian?: BN.Endianness,
59
34
  );
60
35
  constructor(
@@ -100,7 +75,7 @@ declare class BN {
100
75
  /**
101
76
  * @description convert to base-string and pad with zeroes
102
77
  */
103
- toString(base?: number | 'hex', length?: number): string;
78
+ toString(base?: number | "hex", length?: number): string;
104
79
 
105
80
  /**
106
81
  * @description convert to Javascript Number (limited to 53 bits)
@@ -360,11 +335,7 @@ declare class BN {
360
335
  /**
361
336
  * @description division with remainder
362
337
  */
363
- divmod(
364
- b: BN,
365
- mode?: 'div' | 'mod',
366
- positive?: boolean,
367
- ): { div: BN; mod: BN };
338
+ divmod(b: BN, mode?: "div" | "mod", positive?: boolean): { div: BN; mod: BN };
368
339
 
369
340
  /**
370
341
  * @description reduct
@@ -628,54 +599,18 @@ declare class RedBN extends BN {
628
599
  }
629
600
 
630
601
  declare class Buffer$1 extends Uint8Array {
631
- length: number;
632
- write(
633
- string: string,
634
- offset?: number,
635
- length?: number,
636
- encoding?: string,
637
- ): number;
602
+ length: number
603
+ write(string: string, offset?: number, length?: number, encoding?: string): number;
638
604
  toString(encoding?: string, start?: number, end?: number): string;
639
- toJSON(): { type: 'Buffer'; data: any[] };
605
+ toJSON(): { type: 'Buffer', data: any[] };
640
606
  equals(otherBuffer: Buffer$1): boolean;
641
- compare(
642
- otherBuffer: Uint8Array,
643
- targetStart?: number,
644
- targetEnd?: number,
645
- sourceStart?: number,
646
- sourceEnd?: number,
647
- ): number;
648
- copy(
649
- targetBuffer: Buffer$1,
650
- targetStart?: number,
651
- sourceStart?: number,
652
- sourceEnd?: number,
653
- ): number;
607
+ compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
608
+ copy(targetBuffer: Buffer$1, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
654
609
  slice(start?: number, end?: number): Buffer$1;
655
- writeUIntLE(
656
- value: number,
657
- offset: number,
658
- byteLength: number,
659
- noAssert?: boolean,
660
- ): number;
661
- writeUIntBE(
662
- value: number,
663
- offset: number,
664
- byteLength: number,
665
- noAssert?: boolean,
666
- ): number;
667
- writeIntLE(
668
- value: number,
669
- offset: number,
670
- byteLength: number,
671
- noAssert?: boolean,
672
- ): number;
673
- writeIntBE(
674
- value: number,
675
- offset: number,
676
- byteLength: number,
677
- noAssert?: boolean,
678
- ): number;
610
+ writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
611
+ writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
612
+ writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
613
+ writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
679
614
  readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
680
615
  readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
681
616
  readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
@@ -721,21 +656,9 @@ declare class Buffer$1 extends Uint8Array {
721
656
  writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
722
657
  writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
723
658
  fill(value: any, offset?: number, end?: number): this;
724
- indexOf(
725
- value: string | number | Buffer$1,
726
- byteOffset?: number,
727
- encoding?: string,
728
- ): number;
729
- lastIndexOf(
730
- value: string | number | Buffer$1,
731
- byteOffset?: number,
732
- encoding?: string,
733
- ): number;
734
- includes(
735
- value: string | number | Buffer$1,
736
- byteOffset?: number,
737
- encoding?: string,
738
- ): boolean;
659
+ indexOf(value: string | number | Buffer$1, byteOffset?: number, encoding?: string): number;
660
+ lastIndexOf(value: string | number | Buffer$1, byteOffset?: number, encoding?: string): number;
661
+ includes(value: string | number | Buffer$1, byteOffset?: number, encoding?: string): boolean;
739
662
 
740
663
  /**
741
664
  * Allocates a new buffer containing the given {str}.
@@ -743,19 +666,19 @@ declare class Buffer$1 extends Uint8Array {
743
666
  * @param str String to store in buffer.
744
667
  * @param encoding encoding to use, optional. Default is 'utf8'
745
668
  */
746
- constructor(str: string, encoding?: string);
669
+ constructor (str: string, encoding?: string);
747
670
  /**
748
671
  * Allocates a new buffer of {size} octets.
749
672
  *
750
673
  * @param size count of octets to allocate.
751
674
  */
752
- constructor(size: number);
675
+ constructor (size: number);
753
676
  /**
754
677
  * Allocates a new buffer containing the given {array} of octets.
755
678
  *
756
679
  * @param array The octets to store.
757
680
  */
758
- constructor(array: Uint8Array);
681
+ constructor (array: Uint8Array);
759
682
  /**
760
683
  * Produces a Buffer backed by the same allocated memory as
761
684
  * the given {ArrayBuffer}.
@@ -763,19 +686,19 @@ declare class Buffer$1 extends Uint8Array {
763
686
  *
764
687
  * @param arrayBuffer The ArrayBuffer with which to share memory.
765
688
  */
766
- constructor(arrayBuffer: ArrayBuffer);
689
+ constructor (arrayBuffer: ArrayBuffer);
767
690
  /**
768
691
  * Allocates a new buffer containing the given {array} of octets.
769
692
  *
770
693
  * @param array The octets to store.
771
694
  */
772
- constructor(array: any[]);
695
+ constructor (array: any[]);
773
696
  /**
774
697
  * Copies the passed {buffer} data onto a new {Buffer} instance.
775
698
  *
776
699
  * @param buffer The buffer to copy.
777
700
  */
778
- constructor(buffer: Buffer$1);
701
+ constructor (buffer: Buffer$1);
779
702
  prototype: Buffer$1;
780
703
  /**
781
704
  * Allocates a new Buffer using an {array} of octets.
@@ -793,11 +716,7 @@ declare class Buffer$1 extends Uint8Array {
793
716
  * @param byteOffset
794
717
  * @param length
795
718
  */
796
- static from(
797
- arrayBuffer: ArrayBuffer,
798
- byteOffset?: number,
799
- length?: number,
800
- ): Buffer$1;
719
+ static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer$1;
801
720
  /**
802
721
  * Copies the passed {buffer} data onto a new Buffer instance.
803
722
  *
@@ -857,11 +776,7 @@ declare class Buffer$1 extends Uint8Array {
857
776
  * If parameter is omitted, buffer will be filled with zeros.
858
777
  * @param encoding encoding used for call to buf.fill while initializing
859
778
  */
860
- static alloc(
861
- size: number,
862
- fill?: string | Buffer$1 | number,
863
- encoding?: string,
864
- ): Buffer$1;
779
+ static alloc(size: number, fill?: string | Buffer$1 | number, encoding?: string): Buffer$1;
865
780
  /**
866
781
  * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
867
782
  * of the newly created Buffer are unknown and may contain sensitive data.
@@ -879,15 +794,14 @@ declare class Buffer$1 extends Uint8Array {
879
794
  }
880
795
 
881
796
  declare const TokenAccountSourceType: {
882
- readonly Spl: 'spl';
883
- readonly Token2022: 'token2022';
884
- readonly SplCold: 'spl-cold';
885
- readonly Token2022Cold: 'token2022-cold';
886
- readonly CTokenHot: 'ctoken-hot';
887
- readonly CTokenCold: 'ctoken-cold';
797
+ readonly Spl: "spl";
798
+ readonly Token2022: "token2022";
799
+ readonly SplCold: "spl-cold";
800
+ readonly Token2022Cold: "token2022-cold";
801
+ readonly LightTokenHot: "light-token-hot";
802
+ readonly LightTokenCold: "light-token-cold";
888
803
  };
889
- type TokenAccountSourceTypeValue =
890
- (typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
804
+ type TokenAccountSourceTypeValue = (typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
891
805
  /** @internal */
892
806
  interface TokenAccountSource {
893
807
  type: TokenAccountSourceTypeValue;
@@ -908,49 +822,38 @@ interface AccountInterface {
908
822
  _anyFrozen?: boolean;
909
823
  /** True when fetched via getAtaInterface */
910
824
  _isAta?: boolean;
911
- /** ATA owner - set by getAtaInterface */
825
+ /** Associated token account owner - set by getAtaInterface */
912
826
  _owner?: PublicKey;
913
- /** ATA mint - set by getAtaInterface */
827
+ /** Associated token account mint - set by getAtaInterface */
914
828
  _mint?: PublicKey;
915
829
  }
916
830
  /** @internal */
917
- declare function convertTokenDataToAccount(
918
- address: PublicKey,
919
- tokenData: {
920
- mint: PublicKey;
921
- owner: PublicKey;
922
- amount: BN;
923
- delegate: PublicKey | null;
924
- state: number;
925
- tlv: Buffer$1 | null;
926
- },
927
- ): Account;
831
+ declare function convertTokenDataToAccount(address: PublicKey, tokenData: {
832
+ mint: PublicKey;
833
+ owner: PublicKey;
834
+ amount: BN;
835
+ delegate: PublicKey | null;
836
+ state: number;
837
+ tlv: Buffer$1 | null;
838
+ }): Account;
928
839
  /** Convert compressed account to AccountInfo */
929
- declare function toAccountInfo(
930
- compressedAccount: CompressedAccountWithMerkleContext,
931
- ): AccountInfo<Buffer$1>;
840
+ declare function toAccountInfo(compressedAccount: CompressedAccountWithMerkleContext): AccountInfo<Buffer$1>;
932
841
  /** @internal */
933
- declare function parseCTokenHot(
934
- address: PublicKey,
935
- accountInfo: AccountInfo<Buffer$1>,
936
- ): {
842
+ declare function parseLightTokenHot(address: PublicKey, accountInfo: AccountInfo<Buffer$1>): {
937
843
  accountInfo: AccountInfo<Buffer$1>;
938
844
  loadContext: undefined;
939
845
  parsed: Account;
940
846
  isCold: false;
941
847
  };
942
848
  /** @internal */
943
- declare function parseCTokenCold(
944
- address: PublicKey,
945
- compressedAccount: CompressedAccountWithMerkleContext,
946
- ): {
849
+ declare function parseLightTokenCold(address: PublicKey, compressedAccount: CompressedAccountWithMerkleContext): {
947
850
  accountInfo: AccountInfo<Buffer$1>;
948
851
  loadContext: MerkleContext;
949
852
  parsed: Account;
950
853
  isCold: true;
951
854
  };
952
855
  /**
953
- * Retrieve information about a token account of SPL/T22/c-token.
856
+ * Retrieve information about a token account of SPL/T22/light-token.
954
857
  *
955
858
  * @param rpc RPC connection to use
956
859
  * @param address Token account address
@@ -959,12 +862,7 @@ declare function parseCTokenCold(
959
862
  *
960
863
  * @return Token account information with compression context if applicable
961
864
  */
962
- declare function getAccountInterface(
963
- rpc: Rpc,
964
- address: PublicKey,
965
- commitment?: Commitment,
966
- programId?: PublicKey,
967
- ): Promise<AccountInterface>;
865
+ declare function getAccountInterface(rpc: Rpc, address: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<AccountInterface>;
968
866
 
969
867
  /**
970
868
  * SPL interface PDA info.
@@ -1071,21 +969,14 @@ declare function toTokenPoolInfo(info: SplInterfaceInfo): TokenPoolInfo;
1071
969
  *
1072
970
  * @returns SplInterfaceInfo for the to-be-initialized interface
1073
971
  */
1074
- declare function deriveSplInterfaceInfo(
1075
- mint: PublicKey,
1076
- tokenProgramId: PublicKey,
1077
- poolIndex?: number,
1078
- ): SplInterfaceInfo;
972
+ declare function deriveSplInterfaceInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): SplInterfaceInfo;
1079
973
  /**
1080
974
  * Check if the SPL interface info is initialized and has a balance.
1081
975
  * @param mint The mint of the SPL interface
1082
976
  * @param splInterfaceInfo The SPL interface info (or TokenPoolInfo for backward compatibility)
1083
977
  * @returns True if the SPL interface info is initialized and has a balance
1084
978
  */
1085
- declare function checkSplInterfaceInfo(
1086
- splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo,
1087
- mint: PublicKey,
1088
- ): boolean;
979
+ declare function checkSplInterfaceInfo(splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo, mint: PublicKey): boolean;
1089
980
  /**
1090
981
  * Get the SPL interface infos for a given mint.
1091
982
  * @param rpc The RPC client
@@ -1094,11 +985,7 @@ declare function checkSplInterfaceInfo(
1094
985
  *
1095
986
  * @returns The SPL interface infos
1096
987
  */
1097
- declare function getSplInterfaceInfos(
1098
- rpc: Rpc,
1099
- mint: PublicKey,
1100
- commitment?: Commitment,
1101
- ): Promise<SplInterfaceInfo[]>;
988
+ declare function getSplInterfaceInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<SplInterfaceInfo[]>;
1102
989
  type SplInterfaceActivity = {
1103
990
  signature: string;
1104
991
  amount: BN;
@@ -1110,7 +997,7 @@ type SplInterfaceActivity = {
1110
997
  declare enum Action {
1111
998
  Compress = 1,
1112
999
  Decompress = 2,
1113
- Transfer = 3,
1000
+ Transfer = 3
1114
1001
  }
1115
1002
  /**
1116
1003
  * For `compress` and `mintTo` instructions only.
@@ -1122,9 +1009,7 @@ declare enum Action {
1122
1009
  *
1123
1010
  * @returns A random SPL interface info
1124
1011
  */
1125
- declare function selectSplInterfaceInfo(
1126
- infos: SplInterfaceInfo[],
1127
- ): SplInterfaceInfo;
1012
+ declare function selectSplInterfaceInfo(infos: SplInterfaceInfo[]): SplInterfaceInfo;
1128
1013
  /**
1129
1014
  * Select one or multiple SPL interface infos from the SPL interface infos.
1130
1015
  *
@@ -1137,10 +1022,7 @@ declare function selectSplInterfaceInfo(
1137
1022
  *
1138
1023
  * @returns Array with one or more SPL interface infos.
1139
1024
  */
1140
- declare function selectSplInterfaceInfosForDecompression(
1141
- infos: SplInterfaceInfo[],
1142
- decompressAmount: number | BN,
1143
- ): SplInterfaceInfo[];
1025
+ declare function selectSplInterfaceInfosForDecompression(infos: SplInterfaceInfo[], decompressAmount: number | BN): SplInterfaceInfo[];
1144
1026
  /**
1145
1027
  * @deprecated Use {@link SplInterfaceActivity} instead.
1146
1028
  */
@@ -1148,26 +1030,15 @@ type TokenPoolActivity = SplInterfaceActivity;
1148
1030
  /**
1149
1031
  * @deprecated Use {@link deriveSplInterfaceInfo} instead.
1150
1032
  */
1151
- declare function deriveTokenPoolInfo(
1152
- mint: PublicKey,
1153
- tokenProgramId: PublicKey,
1154
- poolIndex?: number,
1155
- ): TokenPoolInfo;
1033
+ declare function deriveTokenPoolInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): TokenPoolInfo;
1156
1034
  /**
1157
1035
  * @deprecated Use {@link checkSplInterfaceInfo} instead.
1158
1036
  */
1159
- declare function checkTokenPoolInfo(
1160
- tokenPoolInfo: TokenPoolInfo,
1161
- mint: PublicKey,
1162
- ): boolean;
1037
+ declare function checkTokenPoolInfo(tokenPoolInfo: TokenPoolInfo, mint: PublicKey): boolean;
1163
1038
  /**
1164
1039
  * @deprecated Use {@link getSplInterfaceInfos} instead.
1165
1040
  */
1166
- declare function getTokenPoolInfos(
1167
- rpc: Rpc,
1168
- mint: PublicKey,
1169
- commitment?: Commitment,
1170
- ): Promise<TokenPoolInfo[]>;
1041
+ declare function getTokenPoolInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<TokenPoolInfo[]>;
1171
1042
  /**
1172
1043
  * @deprecated Use {@link selectSplInterfaceInfo} instead.
1173
1044
  */
@@ -1175,49 +1046,7 @@ declare function selectTokenPoolInfo(infos: TokenPoolInfo[]): TokenPoolInfo;
1175
1046
  /**
1176
1047
  * @deprecated Use {@link selectSplInterfaceInfosForDecompression} instead.
1177
1048
  */
1178
- declare function selectTokenPoolInfosForDecompression(
1179
- infos: TokenPoolInfo[],
1180
- decompressAmount: number | BN,
1181
- ): TokenPoolInfo[];
1182
-
1183
- /**
1184
- * Options for interface operations (load, transfer)
1185
- */
1186
- interface InterfaceOptions {
1187
- /** SPL interface infos (fetched if not provided) */
1188
- splInterfaceInfos?: SplInterfaceInfo[];
1189
- }
1190
- /**
1191
- * Options for createTransferInterfaceInstructions.
1192
- */
1193
- interface TransferOptions extends InterfaceOptions {
1194
- /** Include SPL/T22 wrapping to c-token ATA (unified path). Default: false. */
1195
- wrap?: boolean;
1196
- /** Token program ID. Default: LIGHT_TOKEN_PROGRAM_ID. */
1197
- programId?: PublicKey;
1198
- /**
1199
- * Include an idempotent recipient ATA creation instruction in the
1200
- * transfer transaction. No extra RPC fetch -- uses
1201
- * createAssociatedTokenAccountInterfaceIdempotentInstruction which is
1202
- * a no-op on-chain if the ATA already exists (~200 CU overhead).
1203
- * Default: true.
1204
- */
1205
- ensureRecipientAta?: boolean;
1206
- }
1207
- /**
1208
- * Splits the last element from an array.
1209
- *
1210
- * Useful for separating load transactions (parallel) from the final transfer
1211
- * transaction (sequential) returned by `createTransferInterfaceInstructions`.
1212
- *
1213
- * @returns `{ rest, last }` where `rest` is everything before the last
1214
- * element and `last` is the last element.
1215
- * @throws if the input array is empty.
1216
- */
1217
- declare function sliceLast<T>(items: T[]): {
1218
- rest: T[];
1219
- last: T;
1220
- };
1049
+ declare function selectTokenPoolInfosForDecompression(infos: TokenPoolInfo[], decompressAmount: number | BN): TokenPoolInfo[];
1221
1050
 
1222
1051
  interface LayoutObject {
1223
1052
  [key: string]: any;
@@ -1358,7 +1187,7 @@ interface AdditionalMetadata {
1358
1187
  }
1359
1188
 
1360
1189
  /**
1361
- * Token metadata for creating a c-token mint.
1190
+ * Token metadata for creating a light-token mint.
1362
1191
  */
1363
1192
  interface TokenMetadataInstructionData {
1364
1193
  name: string;
@@ -1367,15 +1196,9 @@ interface TokenMetadataInstructionData {
1367
1196
  updateAuthority?: PublicKey | null;
1368
1197
  additionalMetadata: AdditionalMetadata[] | null;
1369
1198
  }
1370
- declare function createTokenMetadata(
1371
- name: string,
1372
- symbol: string,
1373
- uri: string,
1374
- updateAuthority?: PublicKey | null,
1375
- additionalMetadata?: AdditionalMetadata[] | null,
1376
- ): TokenMetadataInstructionData;
1199
+ declare function createTokenMetadata(name: string, symbol: string, uri: string, updateAuthority?: PublicKey | null, additionalMetadata?: AdditionalMetadata[] | null): TokenMetadataInstructionData;
1377
1200
  /**
1378
- * Create instruction for initializing a c-token mint.
1201
+ * Create instruction for initializing a light-token mint.
1379
1202
  *
1380
1203
  * @param mintSigner Mint signer keypair public key.
1381
1204
  * @param decimals Number of decimals for the mint.
@@ -1388,18 +1211,7 @@ declare function createTokenMetadata(
1388
1211
  * @param metadata Optional token metadata.
1389
1212
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1390
1213
  */
1391
- declare function createMintInstruction(
1392
- mintSigner: PublicKey,
1393
- decimals: number,
1394
- mintAuthority: PublicKey,
1395
- freezeAuthority: PublicKey | null,
1396
- payer: PublicKey,
1397
- validityProof: ValidityProofWithContext,
1398
- addressTreeInfo: AddressTreeInfo,
1399
- outputStateTreeInfo: TreeInfo,
1400
- metadata?: TokenMetadataInstructionData,
1401
- maxTopUp?: number,
1402
- ): TransactionInstruction;
1214
+ 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;
1403
1215
 
1404
1216
  /**
1405
1217
  * SPL-compatible base mint structure
@@ -1417,12 +1229,12 @@ interface BaseMint {
1417
1229
  freezeAuthority: PublicKey | null;
1418
1230
  }
1419
1231
  /**
1420
- * Compressed mint context (protocol version, SPL mint reference)
1232
+ * Light mint context (protocol version, SPL mint reference)
1421
1233
  */
1422
1234
  interface MintContext {
1423
1235
  /** Protocol version for upgradability */
1424
1236
  version: number;
1425
- /** Whether the compressed mint is decompressed to a CMint Solana account */
1237
+ /** Whether the compressed light mint has been decompressed to a light mint account */
1426
1238
  cmintDecompressed: boolean;
1427
1239
  /** PDA of the associated SPL mint */
1428
1240
  splMint: PublicKey;
@@ -1460,7 +1272,7 @@ interface TokenMetadata {
1460
1272
  }[];
1461
1273
  }
1462
1274
  /**
1463
- * Complete compressed mint structure (raw format)
1275
+ * Complete light mint structure (raw format)
1464
1276
  */
1465
1277
  interface CompressedMint {
1466
1278
  base: BaseMint;
@@ -1489,7 +1301,7 @@ interface RentConfig {
1489
1301
  maxTopUp: number;
1490
1302
  }
1491
1303
  /**
1492
- * Compression info embedded in CompressedMint
1304
+ * Compression info embedded in light mint
1493
1305
  */
1494
1306
  interface CompressionInfo {
1495
1307
  /** Config account version (0 = uninitialized) */
@@ -1514,18 +1326,18 @@ interface CompressionInfo {
1514
1326
  rentConfig: RentConfig;
1515
1327
  }
1516
1328
  /**
1517
- * Deserialize a compressed mint from buffer
1329
+ * Deserialize a light mint from buffer
1518
1330
  * Uses SPL's MintLayout for BaseMint and buffer-layout struct for context
1519
1331
  *
1520
1332
  * @param data - The raw account data buffer
1521
- * @returns The deserialized CompressedMint
1333
+ * @returns The deserialized light mint
1522
1334
  */
1523
1335
  declare function deserializeMint(data: Buffer$1 | Uint8Array): CompressedMint;
1524
1336
  /**
1525
- * Serialize a CompressedMint to buffer
1337
+ * Serialize a light mint to buffer
1526
1338
  * Uses SPL's MintLayout for BaseMint, helper functions for context/metadata
1527
1339
  *
1528
- * @param mint - The CompressedMint to serialize
1340
+ * @param mint - The light mint to serialize
1529
1341
  * @returns The serialized buffer
1530
1342
  */
1531
1343
  declare function serializeMint(mint: CompressedMint): Buffer$1;
@@ -1533,7 +1345,7 @@ declare function serializeMint(mint: CompressedMint): Buffer$1;
1533
1345
  * Extension type constants
1534
1346
  */
1535
1347
  declare enum ExtensionType {
1536
- TokenMetadata = 19,
1348
+ TokenMetadata = 19
1537
1349
  }
1538
1350
  /**
1539
1351
  * Decode TokenMetadata from raw extension data using Borsh layout
@@ -1551,9 +1363,7 @@ declare function encodeTokenMetadata(metadata: TokenMetadata): Buffer$1;
1551
1363
  * @param extensions - Array of raw extensions
1552
1364
  * @returns Parsed TokenMetadata or null if not found
1553
1365
  */
1554
- declare function extractTokenMetadata(
1555
- extensions: MintExtension[] | null,
1556
- ): TokenMetadata | null;
1366
+ declare function extractTokenMetadata(extensions: MintExtension[] | null): TokenMetadata | null;
1557
1367
  /**
1558
1368
  * Metadata portion of MintInstructionData
1559
1369
  * Used for instruction encoding when metadata extension is present
@@ -1590,11 +1400,11 @@ interface MintInterface {
1590
1400
  mintContext?: MintContext;
1591
1401
  tokenMetadata?: TokenMetadata;
1592
1402
  extensions?: MintExtension[];
1593
- /** Compression info for c-token mints */
1403
+ /** Compression info for light-token mints */
1594
1404
  compression?: CompressionInfo;
1595
1405
  }
1596
1406
  /**
1597
- * Get unified mint info for SPL/T22/c-token mints.
1407
+ * Get unified mint info for SPL/T22/light-token mints.
1598
1408
  *
1599
1409
  * @param rpc RPC connection
1600
1410
  * @param address The mint address
@@ -1604,27 +1414,18 @@ interface MintInterface {
1604
1414
  * @returns Object with mint, optional merkleContext, mintContext, and
1605
1415
  * tokenMetadata
1606
1416
  */
1607
- declare function getMintInterface(
1608
- rpc: Rpc,
1609
- address: PublicKey,
1610
- commitment?: Commitment,
1611
- programId?: PublicKey,
1612
- ): Promise<MintInterface>;
1417
+ declare function getMintInterface(rpc: Rpc, address: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<MintInterface>;
1613
1418
  /**
1614
- * Unpack mint info from raw account data for SPL/T22/c-token.
1419
+ * Unpack mint info from raw account data for SPL/T22/light-token.
1615
1420
  *
1616
1421
  * @param address The mint pubkey
1617
1422
  * @param data The raw account data or AccountInfo
1618
- * @param programId Token program ID. Default c-token.
1423
+ * @param programId Token program ID. Default light-token.
1619
1424
  * @returns Object with mint, optional mintContext and tokenMetadata.
1620
1425
  */
1621
- declare function unpackMintInterface(
1622
- address: PublicKey,
1623
- data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>,
1624
- programId?: PublicKey,
1625
- ): Omit<MintInterface, 'merkleContext'>;
1426
+ declare function unpackMintInterface(address: PublicKey, data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>, programId?: PublicKey): Omit<MintInterface, 'merkleContext'>;
1626
1427
  /**
1627
- * Unpack c-token mint context and metadata from raw account data
1428
+ * Unpack light-token mint context and metadata from raw account data
1628
1429
  *
1629
1430
  * @param data The raw account data
1630
1431
  * @returns Object with mintContext, tokenMetadata, and extensions
@@ -1636,27 +1437,20 @@ declare function unpackMintData(data: Buffer$1 | Uint8Array): {
1636
1437
  };
1637
1438
 
1638
1439
  /**
1639
- * Create instruction for updating a compressed mint's mint authority.
1640
- * Works for both compressed and decompressed mints.
1440
+ * Create instruction for updating a light mint's mint authority.
1441
+ * Works for both compressed and decompressed light mints.
1641
1442
  *
1642
1443
  * @param mintInterface MintInterface from getMintInterface() - must have merkleContext
1643
1444
  * @param currentMintAuthority Current mint authority public key (must sign)
1644
1445
  * @param newMintAuthority New mint authority (or null to revoke)
1645
1446
  * @param payer Fee payer public key
1646
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
1447
+ * @param validityProof Validity proof for the compressed light mint (null for decompressed light mints)
1647
1448
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1648
1449
  */
1649
- declare function createUpdateMintAuthorityInstruction(
1650
- mintInterface: MintInterface,
1651
- currentMintAuthority: PublicKey,
1652
- newMintAuthority: PublicKey | null,
1653
- payer: PublicKey,
1654
- validityProof: ValidityProofWithContext | null,
1655
- maxTopUp?: number,
1656
- ): TransactionInstruction;
1450
+ declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterface, currentMintAuthority: PublicKey, newMintAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext | null, maxTopUp?: number): TransactionInstruction;
1657
1451
  /**
1658
- * Create instruction for updating a compressed mint's freeze authority.
1659
- * Works for both compressed and decompressed mints.
1452
+ * Create instruction for updating a light mint's freeze authority.
1453
+ * Works for both compressed and decompressed light mints.
1660
1454
  *
1661
1455
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
1662
1456
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -1665,20 +1459,13 @@ declare function createUpdateMintAuthorityInstruction(
1665
1459
  * @param currentFreezeAuthority Current freeze authority public key (must sign)
1666
1460
  * @param newFreezeAuthority New freeze authority (or null to revoke)
1667
1461
  * @param payer Fee payer public key
1668
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
1462
+ * @param validityProof Validity proof for the compressed light mint (null for decompressed light mints)
1669
1463
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1670
1464
  */
1671
- declare function createUpdateFreezeAuthorityInstruction(
1672
- mintInterface: MintInterface,
1673
- currentFreezeAuthority: PublicKey,
1674
- newFreezeAuthority: PublicKey | null,
1675
- payer: PublicKey,
1676
- validityProof: ValidityProofWithContext | null,
1677
- maxTopUp?: number,
1678
- ): TransactionInstruction;
1465
+ declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInterface, currentFreezeAuthority: PublicKey, newFreezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext | null, maxTopUp?: number): TransactionInstruction;
1679
1466
 
1680
1467
  /**
1681
- * Create instruction for updating a compressed mint's metadata field.
1468
+ * Create instruction for updating a light mint's metadata field.
1682
1469
  *
1683
1470
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
1684
1471
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -1686,26 +1473,16 @@ declare function createUpdateFreezeAuthorityInstruction(
1686
1473
  * @param mintInterface MintInterface from getMintInterface() - must have merkleContext and tokenMetadata
1687
1474
  * @param authority Metadata update authority public key (must sign)
1688
1475
  * @param payer Fee payer public key
1689
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
1476
+ * @param validityProof Validity proof for the light mint (null for decompressed light mints)
1690
1477
  * @param fieldType Field to update: 'name', 'symbol', 'uri', or 'custom'
1691
1478
  * @param value New value for the field
1692
1479
  * @param customKey Custom key name (required if fieldType is 'custom')
1693
1480
  * @param extensionIndex Extension index (default: 0)
1694
1481
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1695
1482
  */
1696
- declare function createUpdateMetadataFieldInstruction(
1697
- mintInterface: MintInterface,
1698
- authority: PublicKey,
1699
- payer: PublicKey,
1700
- validityProof: ValidityProofWithContext | null,
1701
- fieldType: 'name' | 'symbol' | 'uri' | 'custom',
1702
- value: string,
1703
- customKey?: string,
1704
- extensionIndex?: number,
1705
- maxTopUp?: number,
1706
- ): TransactionInstruction;
1483
+ 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;
1707
1484
  /**
1708
- * Create instruction for updating a compressed mint's metadata authority.
1485
+ * Create instruction for updating a light mint's metadata authority.
1709
1486
  *
1710
1487
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
1711
1488
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -1714,21 +1491,13 @@ declare function createUpdateMetadataFieldInstruction(
1714
1491
  * @param currentAuthority Current metadata update authority public key (must sign)
1715
1492
  * @param newAuthority New metadata update authority public key
1716
1493
  * @param payer Fee payer public key
1717
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
1494
+ * @param validityProof Validity proof for the light mint (null for decompressed light mints)
1718
1495
  * @param extensionIndex Extension index (default: 0)
1719
1496
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1720
1497
  */
1721
- declare function createUpdateMetadataAuthorityInstruction(
1722
- mintInterface: MintInterface,
1723
- currentAuthority: PublicKey,
1724
- newAuthority: PublicKey,
1725
- payer: PublicKey,
1726
- validityProof: ValidityProofWithContext | null,
1727
- extensionIndex?: number,
1728
- maxTopUp?: number,
1729
- ): TransactionInstruction;
1498
+ declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInterface, currentAuthority: PublicKey, newAuthority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, extensionIndex?: number, maxTopUp?: number): TransactionInstruction;
1730
1499
  /**
1731
- * Create instruction for removing a metadata key from a compressed mint.
1500
+ * Create instruction for removing a metadata key from a light mint.
1732
1501
  *
1733
1502
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
1734
1503
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -1736,22 +1505,13 @@ declare function createUpdateMetadataAuthorityInstruction(
1736
1505
  * @param mintInterface MintInterface from getMintInterface() - must have merkleContext and tokenMetadata
1737
1506
  * @param authority Metadata update authority public key (must sign)
1738
1507
  * @param payer Fee payer public key
1739
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
1508
+ * @param validityProof Validity proof for the light mint (null for decompressed light mints)
1740
1509
  * @param key Metadata key to remove
1741
1510
  * @param idempotent If true, don't error if key doesn't exist (default: false)
1742
1511
  * @param extensionIndex Extension index (default: 0)
1743
1512
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1744
1513
  */
1745
- declare function createRemoveMetadataKeyInstruction(
1746
- mintInterface: MintInterface,
1747
- authority: PublicKey,
1748
- payer: PublicKey,
1749
- validityProof: ValidityProofWithContext | null,
1750
- key: string,
1751
- idempotent?: boolean,
1752
- extensionIndex?: number,
1753
- maxTopUp?: number,
1754
- ): TransactionInstruction;
1514
+ declare function createRemoveMetadataKeyInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, key: string, idempotent?: boolean, extensionIndex?: number, maxTopUp?: number): TransactionInstruction;
1755
1515
 
1756
1516
  interface CompressToPubkey {
1757
1517
  bump: number;
@@ -1765,11 +1525,11 @@ interface CompressibleConfig {
1765
1525
  writeTopUp: number;
1766
1526
  compressToAccountPubkey?: CompressToPubkey | null;
1767
1527
  }
1768
- interface CreateAssociatedCTokenAccountParams {
1528
+ interface CreateAssociatedLightTokenAccountParams {
1769
1529
  compressibleConfig?: CompressibleConfig | null;
1770
1530
  }
1771
1531
  /**
1772
- * Default compressible config for c-token ATAs - matches Rust SDK defaults.
1532
+ * Default compressible config for light-token ATAs - matches Rust SDK defaults.
1773
1533
  *
1774
1534
  * - tokenAccountVersion: 3 (ShaFlat) - latest hashing scheme
1775
1535
  * - rentPayment: 16 - prepay 16 epochs (~24 hours rent)
@@ -1777,7 +1537,7 @@ interface CreateAssociatedCTokenAccountParams {
1777
1537
  * - writeTopUp: 766 - per-write top-up (~2 epochs rent) when rent < 2 epochs
1778
1538
  * - compressToAccountPubkey: null - required for ATAs
1779
1539
  *
1780
- * Cost breakdown at ATA creation:
1540
+ * Cost breakdown at associated token account creation:
1781
1541
  * - Rent sponsor PDA (LIGHT_TOKEN_RENT_SPONSOR) pays: rent exemption (~890,880 lamports)
1782
1542
  * - Fee payer pays: compression_cost (11K) + 16 epochs rent (~6,400) = ~17,400 lamports + tx fees
1783
1543
  *
@@ -1785,7 +1545,7 @@ interface CreateAssociatedCTokenAccountParams {
1785
1545
  * - When account rent is below 2 epochs, fee payer pays 766 lamports top-up
1786
1546
  * - This keeps the account perpetually funded when actively used
1787
1547
  *
1788
- * Rent calculation (272-byte compressible ctoken account):
1548
+ * Rent calculation (272-byte compressible lightToken account):
1789
1549
  * - rent_per_epoch = base_rent (128) + bytes * rent_per_byte (272 * 1) = 400 lamports
1790
1550
  * - 16 epochs = 16 * 400 = 6,400 lamports (24 hours)
1791
1551
  * - 2 epochs = 2 * 400 = 800 lamports (~3 hours, writeTopUp = 766 is conservative)
@@ -1801,7 +1561,7 @@ interface CreateAssociatedCTokenAccountParams {
1801
1561
  */
1802
1562
  declare const DEFAULT_COMPRESSIBLE_CONFIG: CompressibleConfig;
1803
1563
  /**
1804
- * Create instruction for creating an associated compressed token account.
1564
+ * Create instruction for creating an associated light-token account.
1805
1565
  * Uses the default rent sponsor PDA by default.
1806
1566
  *
1807
1567
  * @param feePayer Fee payer public key.
@@ -1811,16 +1571,9 @@ declare const DEFAULT_COMPRESSIBLE_CONFIG: CompressibleConfig;
1811
1571
  * @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
1812
1572
  * @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
1813
1573
  */
1814
- declare function createAssociatedCTokenAccountInstruction(
1815
- feePayer: PublicKey,
1816
- owner: PublicKey,
1817
- mint: PublicKey,
1818
- compressibleConfig?: CompressibleConfig | null,
1819
- configAccount?: PublicKey,
1820
- rentPayerPda?: PublicKey,
1821
- ): TransactionInstruction;
1574
+ declare function createAssociatedLightTokenAccountInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig | null, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
1822
1575
  /**
1823
- * Create idempotent instruction for creating an associated compressed token account.
1576
+ * Create idempotent instruction for creating an associated light-token account.
1824
1577
  * Uses the default rent sponsor PDA by default.
1825
1578
  *
1826
1579
  * @param feePayer Fee payer public key.
@@ -1830,26 +1583,19 @@ declare function createAssociatedCTokenAccountInstruction(
1830
1583
  * @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
1831
1584
  * @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
1832
1585
  */
1833
- declare function createAssociatedCTokenAccountIdempotentInstruction(
1834
- feePayer: PublicKey,
1835
- owner: PublicKey,
1836
- mint: PublicKey,
1837
- compressibleConfig?: CompressibleConfig | null,
1838
- configAccount?: PublicKey,
1839
- rentPayerPda?: PublicKey,
1840
- ): TransactionInstruction;
1586
+ declare function createAssociatedLightTokenAccountIdempotentInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig | null, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
1841
1587
 
1842
1588
  /**
1843
- * c-token-specific config for createAssociatedTokenAccountInterfaceInstruction
1589
+ * light-token-specific config for createAssociatedTokenAccountInterfaceInstruction
1844
1590
  */
1845
- interface CTokenConfig {
1591
+ interface LightTokenConfig {
1846
1592
  compressibleConfig?: CompressibleConfig | null;
1847
1593
  configAccount?: PublicKey;
1848
1594
  rentPayerPda?: PublicKey;
1849
1595
  }
1850
1596
  /**
1851
1597
  * Create instruction for creating an associated token account (SPL, Token-2022,
1852
- * or c-token). Follows SPL Token API signature with optional c-token config at the
1598
+ * or light-token). Follows SPL Token API signature with optional light-token config at the
1853
1599
  * end.
1854
1600
  *
1855
1601
  * @param payer Fee payer public key.
@@ -1858,20 +1604,12 @@ interface CTokenConfig {
1858
1604
  * @param mint Mint address.
1859
1605
  * @param programId Token program ID (default: TOKEN_PROGRAM_ID).
1860
1606
  * @param associatedTokenProgramId Associated token program ID.
1861
- * @param ctokenConfig Optional c-token-specific configuration.
1862
- */
1863
- declare function createAssociatedTokenAccountInterfaceInstruction(
1864
- payer: PublicKey,
1865
- associatedToken: PublicKey,
1866
- owner: PublicKey,
1867
- mint: PublicKey,
1868
- programId?: PublicKey,
1869
- associatedTokenProgramId?: PublicKey,
1870
- ctokenConfig?: CTokenConfig,
1871
- ): TransactionInstruction;
1607
+ * @param lightTokenConfig Optional light-token-specific configuration.
1608
+ */
1609
+ declare function createAssociatedTokenAccountInterfaceInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): TransactionInstruction;
1872
1610
  /**
1873
1611
  * Create idempotent instruction for creating an associated token account (SPL,
1874
- * Token-2022, or c-token). Follows SPL Token API signature with optional c-token
1612
+ * Token-2022, or light-token). Follows SPL Token API signature with optional light-token
1875
1613
  * config at the end.
1876
1614
  *
1877
1615
  * @param payer Fee payer public key.
@@ -1880,29 +1618,55 @@ declare function createAssociatedTokenAccountInterfaceInstruction(
1880
1618
  * @param mint Mint address.
1881
1619
  * @param programId Token program ID (default: TOKEN_PROGRAM_ID).
1882
1620
  * @param associatedTokenProgramId Associated token program ID.
1883
- * @param ctokenConfig Optional c-token-specific configuration.
1884
- */
1885
- declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(
1886
- payer: PublicKey,
1887
- associatedToken: PublicKey,
1888
- owner: PublicKey,
1889
- mint: PublicKey,
1890
- programId?: PublicKey,
1891
- associatedTokenProgramId?: PublicKey,
1892
- ctokenConfig?: CTokenConfig,
1893
- ): TransactionInstruction;
1621
+ * @param lightTokenConfig Optional light-token-specific configuration.
1622
+ */
1623
+ declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): TransactionInstruction;
1894
1624
  /**
1895
1625
  * Short alias for createAssociatedTokenAccountInterfaceIdempotentInstruction.
1896
1626
  */
1897
1627
  declare const createAtaInterfaceIdempotentInstruction: typeof createAssociatedTokenAccountInterfaceIdempotentInstruction;
1898
1628
 
1629
+ declare function sliceLast<T>(items: T[]): {
1630
+ rest: T[];
1631
+ last: T;
1632
+ };
1633
+
1634
+ /**
1635
+ * Create a light-token transfer instruction.
1636
+ *
1637
+ * For light-token accounts with compressible extension, the program needs
1638
+ * system_program and fee_payer to handle rent top-ups.
1639
+ *
1640
+ * @param source Source light-token account
1641
+ * @param destination Destination light-token account
1642
+ * @param owner Owner of the source account (signer, also pays for compressible extension top-ups)
1643
+ * @param amount Amount to transfer
1644
+ * @param feePayer Optional fee payer for top-ups (defaults to owner)
1645
+ * @returns Transaction instruction for light-token transfer
1646
+ */
1647
+ declare function createLightTokenTransferInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, amount: number | bigint, feePayer?: PublicKey): TransactionInstruction;
1648
+ /**
1649
+ * Create a light-token transfer_checked instruction. Same semantics as SPL
1650
+ * TransferChecked.
1651
+ */
1652
+ declare function createLightTokenTransferCheckedInstruction(source: PublicKey, destination: PublicKey, mint: PublicKey, owner: PublicKey, amount: number | bigint, decimals: number, payer: PublicKey): TransactionInstruction;
1653
+
1654
+ interface InterfaceOptions {
1655
+ splInterfaceInfos?: SplInterfaceInfo[];
1656
+ wrap?: boolean;
1657
+ /**
1658
+ * Delegate authority pubkey. For owner-signed flows, omit this field.
1659
+ */
1660
+ delegatePubkey?: PublicKey;
1661
+ }
1662
+
1899
1663
  /**
1900
1664
  * Parameters for creating a MintTo instruction.
1901
1665
  */
1902
1666
  interface CreateMintToInstructionParams {
1903
- /** Mint account (CMint - decompressed compressed mint) */
1667
+ /** Light mint account (decompressed from compressed light mint) */
1904
1668
  mint: PublicKey;
1905
- /** Destination CToken account to mint to */
1669
+ /** Destination light-token account to mint to */
1906
1670
  destination: PublicKey;
1907
1671
  /** Amount of tokens to mint */
1908
1672
  amount: number | bigint;
@@ -1914,17 +1678,15 @@ interface CreateMintToInstructionParams {
1914
1678
  feePayer?: PublicKey;
1915
1679
  }
1916
1680
  /**
1917
- * Create instruction for minting tokens to a CToken account.
1681
+ * Create instruction for minting tokens to a light-token account.
1918
1682
  *
1919
- * This is a simple 3-4 account instruction for minting to decompressed CToken accounts.
1920
- * Uses discriminator 7 (CTokenMintTo).
1683
+ * This is a simple 3-4 account instruction for minting to light-token associated token accounts (hot).
1684
+ * Uses discriminator 7 (LightTokenMintTo).
1921
1685
  *
1922
1686
  * @param params - Mint instruction parameters
1923
1687
  * @returns TransactionInstruction for minting tokens
1924
1688
  */
1925
- declare function createMintToInstruction(
1926
- params: CreateMintToInstructionParams,
1927
- ): TransactionInstruction;
1689
+ declare function createMintToInstruction(params: CreateMintToInstructionParams): TransactionInstruction;
1928
1690
 
1929
1691
  /** Default compressible config PDA (V1) */
1930
1692
  declare const LIGHT_TOKEN_CONFIG: PublicKey;
@@ -1940,7 +1702,7 @@ declare enum TokenDataVersion {
1940
1702
  /** V2: Poseidon hash with big-endian amount, discriminator [0,0,0,0,0,0,0,3] */
1941
1703
  V2 = 2,
1942
1704
  /** ShaFlat: SHA256 hash of borsh-serialized data, discriminator [0,0,0,0,0,0,0,4] */
1943
- ShaFlat = 3,
1705
+ ShaFlat = 3
1944
1706
  }
1945
1707
  declare const POOL_SEED: Buffer$1<ArrayBuffer>;
1946
1708
  declare const CPI_AUTHORITY_SEED: Buffer$1<ArrayBuffer>;
@@ -1953,7 +1715,6 @@ declare const COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1953
1715
  declare const APPROVE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1954
1716
  declare const REVOKE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1955
1717
  declare const ADD_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1956
- declare const DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1957
1718
  /**
1958
1719
  * Maximum lamports for rent top-up in a single instruction.
1959
1720
  * u16::MAX = no limit; 0 = no top-ups allowed.
@@ -1961,7 +1722,7 @@ declare const DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR: Buffer$1<ArrayBuffer
1961
1722
  */
1962
1723
  declare const MAX_TOP_UP = 65535;
1963
1724
  /**
1964
- * Rent configuration constants for compressible ctoken accounts.
1725
+ * Rent configuration constants for compressible light token accounts.
1965
1726
  * These match the Rust SDK defaults in program-libs/compressible/src/rent/config.rs
1966
1727
  */
1967
1728
  /** Base rent per epoch (lamports) */
@@ -1977,21 +1738,21 @@ declare const COMPRESSION_INCENTIVE = 1000;
1977
1738
  /** Total compression cost (COMPRESSION_COST + COMPRESSION_INCENTIVE) */
1978
1739
  declare const TOTAL_COMPRESSION_COST: number;
1979
1740
  /**
1980
- * Compressible ctoken account size in bytes.
1741
+ * Compressible light token account size in bytes.
1981
1742
  * = 165 (base SPL token) + 1 (account_type) + 1 (Option) + 4 (Vec len) + 1 (ext disc) + 4 (ext header) + 96 (CompressionInfo) = 272
1982
1743
  * Source: program-libs/token-interface/src/state/token/top_up.rs MIN_SIZE_WITH_COMPRESSIBLE
1983
1744
  */
1984
- declare const COMPRESSIBLE_CTOKEN_ACCOUNT_SIZE = 272;
1745
+ declare const COMPRESSIBLE_LIGHT_TOKEN_ACCOUNT_SIZE = 272;
1985
1746
  /**
1986
1747
  * Calculate rent per epoch for a given account size.
1987
1748
  * Formula: base_rent + (bytes * lamports_per_byte_per_epoch)
1988
1749
  */
1989
1750
  declare function rentPerEpoch(bytes: number): number;
1990
1751
  /**
1991
- * Default rent per epoch for a compressible ctoken account (272 bytes).
1752
+ * Default rent per epoch for a compressible light token account (272 bytes).
1992
1753
  * = 128 + 272 = 400 lamports
1993
1754
  */
1994
- declare const COMPRESSIBLE_CTOKEN_RENT_PER_EPOCH: number;
1755
+ declare const COMPRESSIBLE_LIGHT_TOKEN_RENT_PER_EPOCH: number;
1995
1756
  /** Default prepaid epochs (24 hours = 16 epochs * 1.5h) */
1996
1757
  declare const DEFAULT_PREPAY_EPOCHS = 16;
1997
1758
  /** Default write top-up (lamports) - ~2 epochs rent */
@@ -2000,20 +1761,17 @@ declare const DEFAULT_WRITE_TOP_UP = 766;
2000
1761
  * Calculate fee payer cost at ATA creation.
2001
1762
  * = compression_cost (11K) + (prepay_epochs * rent_per_epoch)
2002
1763
  */
2003
- declare function calculateFeePayerCostAtCreation(
2004
- prepayEpochs?: number,
2005
- accountBytes?: number,
2006
- ): number;
1764
+ declare function calculateFeePayerCostAtCreation(prepayEpochs?: number, accountBytes?: number): number;
2007
1765
 
2008
1766
  /**
2009
- * Create instruction for minting tokens from a c-mint to compressed accounts.
2010
- * To mint to onchain token accounts across SPL/T22/c-mints, use
1767
+ * Create instruction for minting tokens from a light mint to compressed accounts.
1768
+ * To mint to light-token associated token accounts across SPL/T22/light mints, use
2011
1769
  * {@link createMintToInterfaceInstruction} instead.
2012
1770
  *
2013
1771
  * @param authority Mint authority public key.
2014
1772
  * @param payer Fee payer public key.
2015
- * @param validityProof Validity proof for the compressed mint.
2016
- * @param merkleContext Merkle context of the compressed mint.
1773
+ * @param validityProof Validity proof for the light mint.
1774
+ * @param merkleContext Merkle context of the light mint.
2017
1775
  * @param mintData Mint instruction data.
2018
1776
  * @param recipients Array of recipients with amounts.
2019
1777
  * @param outputStateTreeInfo Optional output state tree info. Uses merkle
@@ -2022,28 +1780,18 @@ declare function calculateFeePayerCostAtCreation(
2022
1780
  * TokenDataVersion.ShaFlat).
2023
1781
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
2024
1782
  */
2025
- declare function createMintToCompressedInstruction(
2026
- authority: PublicKey,
2027
- payer: PublicKey,
2028
- validityProof: ValidityProofWithContext,
2029
- merkleContext: MerkleContext,
2030
- mintData: MintInstructionData,
2031
- recipients: Array<{
2032
- recipient: PublicKey;
2033
- amount: number | bigint;
2034
- }>,
2035
- outputStateTreeInfo?: TreeInfo,
2036
- tokenAccountVersion?: TokenDataVersion,
2037
- maxTopUp?: number,
2038
- ): TransactionInstruction;
1783
+ declare function createMintToCompressedInstruction(authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, merkleContext: MerkleContext, mintData: MintInstructionData, recipients: Array<{
1784
+ recipient: PublicKey;
1785
+ amount: number | bigint;
1786
+ }>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: TokenDataVersion, maxTopUp?: number): TransactionInstruction;
2039
1787
 
2040
1788
  /**
2041
- * Create mint-to instruction for SPL, Token-2022, or CToken mints.
2042
- * This instruction ONLY mints to decompressed/onchain token accounts.
1789
+ * Create mint-to instruction for SPL, Token-2022, or light-token mints.
1790
+ * This instruction ONLY mints to light-token associated token accounts (hot).
2043
1791
  *
2044
- * For CToken mints, the mint must be decompressed first (CMint account must exist on-chain).
1792
+ * For light-token mints, the light mint account must exist (mint must be decompressed first).
2045
1793
  *
2046
- * @param mintInterface Mint interface (SPL, Token-2022, or CToken).
1794
+ * @param mintInterface Mint interface (SPL, Token-2022, or light-token).
2047
1795
  * @param destination Destination onchain token account address.
2048
1796
  * @param authority Mint authority public key.
2049
1797
  * @param payer Fee payer public key.
@@ -2051,206 +1799,14 @@ declare function createMintToCompressedInstruction(
2051
1799
  * @param validityProof Not used (legacy parameter, kept for compatibility).
2052
1800
  * @param multiSigners Multi-signature signer public keys (SPL/T22 only).
2053
1801
  */
2054
- declare function createMintToInterfaceInstruction(
2055
- mintInterface: MintInterface,
2056
- destination: PublicKey,
2057
- authority: PublicKey,
2058
- payer: PublicKey,
2059
- amount: number | bigint,
2060
- validityProof?: ValidityProofWithContext,
2061
- multiSigners?: PublicKey[],
2062
- ): TransactionInstruction;
2063
-
2064
- /**
2065
- * Create a Light token transfer instruction.
2066
- *
2067
- * For c-token accounts with compressible extension, the program needs
2068
- * system_program and fee_payer to handle rent top-ups.
2069
- *
2070
- * @param source Source c-token account
2071
- * @param destination Destination c-token account
2072
- * @param owner Owner of the source account (signer, also pays for compressible extension top-ups)
2073
- * @param amount Amount to transfer
2074
- * @param feePayer Optional fee payer for top-ups (defaults to owner)
2075
- * @returns Transaction instruction for Light token transfer
2076
- */
2077
- declare function createLightTokenTransferInstruction(
2078
- source: PublicKey,
2079
- destination: PublicKey,
2080
- owner: PublicKey,
2081
- amount: number | bigint,
2082
- feePayer?: PublicKey,
2083
- ): TransactionInstruction;
2084
-
2085
- /**
2086
- * Create decompressInterface instruction using Transfer2.
2087
- *
2088
- * Supports decompressing to both c-token accounts and SPL token accounts:
2089
- * - For c-token destinations: No splInterfaceInfo needed
2090
- * - For SPL destinations: Provide splInterfaceInfo (token pool info) and decimals
2091
- *
2092
- * @param payer Fee payer public key
2093
- * @param inputCompressedTokenAccounts Input compressed token accounts
2094
- * @param toAddress Destination token account address (c-token or SPL ATA)
2095
- * @param amount Amount to decompress
2096
- * @param validityProof Validity proof (contains compressedProof and rootIndices)
2097
- * @param splInterfaceInfo Optional: SPL interface info for SPL destinations
2098
- * @param decimals Mint decimals (required for SPL destinations)
2099
- * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
2100
- * @returns TransactionInstruction
2101
- */
2102
- declare function createDecompressInterfaceInstruction(
2103
- payer: PublicKey,
2104
- inputCompressedTokenAccounts: ParsedTokenAccount[],
2105
- toAddress: PublicKey,
2106
- amount: bigint,
2107
- validityProof: ValidityProofWithContext,
2108
- splInterfaceInfo: SplInterfaceInfo | undefined,
2109
- decimals: number,
2110
- maxTopUp?: number,
2111
- ): TransactionInstruction;
2112
-
2113
- /**
2114
- * Account info interface for compressible accounts.
2115
- * Matches return structure of getAccountInterface/getAtaInterface.
2116
- *
2117
- * Integrating programs provide their own fetch/parse - this is just the data shape.
2118
- */
2119
- interface ParsedAccountInfoInterface<T = unknown> {
2120
- /** Parsed account data (program-specific) */
2121
- parsed: T;
2122
- /** Load context - present if account is compressed (cold), undefined if hot */
2123
- loadContext?: MerkleContext;
2124
- }
2125
- /**
2126
- * Input for createLoadAccountsParams.
2127
- * Supports both program PDAs and c-token vaults.
2128
- *
2129
- * The integrating program is responsible for fetching and parsing their accounts.
2130
- * This helper just packs them for the decompressAccountsIdempotent instruction.
2131
- */
2132
- interface CompressibleAccountInput<T = unknown> {
2133
- /** Account address */
2134
- address: PublicKey;
2135
- /**
2136
- * Account type key for packing:
2137
- * - For PDAs: program-specific type name (e.g., "poolState", "observationState")
2138
- * - For c-token vaults: "cTokenData"
2139
- */
2140
- accountType: string;
2141
- /**
2142
- * Token variant - required when accountType is "cTokenData".
2143
- * Examples: "lpVault", "token0Vault", "token1Vault"
2144
- */
2145
- tokenVariant?: string;
2146
- /** Parsed account info (from program-specific fetch) */
2147
- info: ParsedAccountInfoInterface<T>;
2148
- }
2149
- /**
2150
- * Packed compressed account for decompressAccountsIdempotent instruction
2151
- */
2152
- interface PackedCompressedAccount {
2153
- [key: string]: unknown;
2154
- merkleContext: {
2155
- merkleTreePubkeyIndex: number;
2156
- queuePubkeyIndex: number;
2157
- };
2158
- }
2159
- /**
2160
- * Result from building load params
2161
- */
2162
- interface CompressibleLoadParams {
2163
- /** Validity proof wrapped in option (null if all proveByIndex) */
2164
- proofOption: {
2165
- 0: ValidityProof | null;
2166
- };
2167
- /** Packed compressed accounts data for instruction */
2168
- compressedAccounts: PackedCompressedAccount[];
2169
- /** Offset to system accounts in remainingAccounts */
2170
- systemAccountsOffset: number;
2171
- /** Account metas for remaining accounts */
2172
- remainingAccounts: AccountMeta[];
2173
- }
2174
- /**
2175
- * Result from createLoadAccountsParams
2176
- */
2177
- interface LoadResult {
2178
- /** Params for decompressAccountsIdempotent (null if no program accounts need decompressing) */
2179
- decompressParams: CompressibleLoadParams | null;
2180
- /** Instructions to load ATAs (create ATA, wrap SPL/T22, decompressInterface) */
2181
- ataInstructions: TransactionInstruction[];
2182
- }
2183
- /**
2184
- * Create params for loading program accounts and ATAs.
2185
- *
2186
- * Returns:
2187
- * - decompressParams: for a caller program's standardized
2188
- * decompressAccountsIdempotent instruction
2189
- * - ataInstructions: for loading user ATAs
2190
- *
2191
- * @param rpc RPC connection
2192
- * @param payer Fee payer (needed for ATA instructions)
2193
- * @param programId Program ID for decompressAccountsIdempotent
2194
- * @param programAccounts PDAs and vaults (caller pre-fetches)
2195
- * @param atas User ATAs (fetched via getAtaInterface)
2196
- * @param options Optional load options
2197
- * @returns LoadResult with decompressParams and ataInstructions
2198
- *
2199
- * @example
2200
- * ```typescript
2201
- * const poolInfo = await myProgram.fetchPoolState(rpc, poolAddress);
2202
- * const vault0Ata = getAssociatedTokenAddressInterface(token0Mint, poolAddress);
2203
- * const vault0Info = await getAtaInterface(rpc, vault0Ata, poolAddress, token0Mint, undefined, LIGHT_TOKEN_PROGRAM_ID);
2204
- * const userAta = getAssociatedTokenAddressInterface(tokenMint, userWallet);
2205
- * const userAtaInfo = await getAtaInterface(rpc, userAta, userWallet, tokenMint);
2206
- *
2207
- * const result = await createLoadAccountsParams(
2208
- * rpc,
2209
- * payer.publicKey,
2210
- * programId,
2211
- * [
2212
- * { address: poolAddress, accountType: 'poolState', info: poolInfo },
2213
- * { address: vault0, accountType: 'cTokenData', tokenVariant: 'token0Vault', info: vault0Info },
2214
- * ],
2215
- * [userAta],
2216
- * );
2217
- *
2218
- * // Build transaction with both program decompress and ATA load
2219
- * const instructions = [...result.ataInstructions];
2220
- * if (result.decompressParams) {
2221
- * instructions.push(await program.methods
2222
- * .decompressAccountsIdempotent(
2223
- * result.decompressParams.proofOption,
2224
- * result.decompressParams.compressedAccounts,
2225
- * result.decompressParams.systemAccountsOffset,
2226
- * )
2227
- * .remainingAccounts(result.decompressParams.remainingAccounts)
2228
- * .instruction());
2229
- * }
2230
- * ```
2231
- */
2232
- declare function createLoadAccountsParams(
2233
- rpc: Rpc,
2234
- payer: PublicKey,
2235
- programId: PublicKey,
2236
- programAccounts?: CompressibleAccountInput[],
2237
- atas?: AccountInterface[],
2238
- options?: InterfaceOptions,
2239
- ): Promise<LoadResult>;
2240
- /**
2241
- * Calculate compute units for compressible load operation
2242
- */
2243
- declare function calculateCompressibleLoadComputeUnits(
2244
- compressedAccountCount: number,
2245
- hasValidityProof: boolean,
2246
- ): number;
1802
+ declare function createMintToInterfaceInstruction(mintInterface: MintInterface, destination: PublicKey, authority: PublicKey, payer: PublicKey, amount: number | bigint, validityProof?: ValidityProofWithContext, multiSigners?: PublicKey[]): TransactionInstruction;
2247
1803
 
2248
1804
  /**
2249
1805
  * Create a wrap instruction that moves tokens from an SPL/T22 account to a
2250
- * c-token account.
1806
+ * light-token account.
2251
1807
  *
2252
1808
  * @param source Source SPL/T22 token account
2253
- * @param destination Destination c-token account
1809
+ * @param destination Destination light-token account
2254
1810
  * @param owner Owner of the source account (signer)
2255
1811
  * @param mint Mint address
2256
1812
  * @param amount Amount to wrap,
@@ -2260,23 +1816,13 @@ declare function calculateCompressibleLoadComputeUnits(
2260
1816
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
2261
1817
  * @returns Instruction to wrap tokens
2262
1818
  */
2263
- declare function createWrapInstruction(
2264
- source: PublicKey,
2265
- destination: PublicKey,
2266
- owner: PublicKey,
2267
- mint: PublicKey,
2268
- amount: bigint,
2269
- splInterfaceInfo: SplInterfaceInfo,
2270
- decimals: number,
2271
- payer?: PublicKey,
2272
- maxTopUp?: number,
2273
- ): TransactionInstruction;
1819
+ declare function createWrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey, maxTopUp?: number): TransactionInstruction;
2274
1820
 
2275
1821
  /**
2276
- * Create an unwrap instruction that moves tokens from a c-token account to an
1822
+ * Create an unwrap instruction that moves tokens from a light-token account to an
2277
1823
  * SPL/T22 account.
2278
1824
  *
2279
- * @param source Source c-token account
1825
+ * @param source Source light-token account
2280
1826
  * @param destination Destination SPL/T22 token account
2281
1827
  * @param owner Owner of the source account (signer)
2282
1828
  * @param mint Mint address
@@ -2287,55 +1833,104 @@ declare function createWrapInstruction(
2287
1833
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
2288
1834
  * @returns TransactionInstruction to unwrap tokens
2289
1835
  */
2290
- declare function createUnwrapInstruction(
2291
- source: PublicKey,
2292
- destination: PublicKey,
2293
- owner: PublicKey,
2294
- mint: PublicKey,
2295
- amount: bigint,
2296
- splInterfaceInfo: SplInterfaceInfo,
2297
- decimals: number,
2298
- payer?: PublicKey,
2299
- maxTopUp?: number,
2300
- ): TransactionInstruction;
1836
+ declare function createUnwrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey, maxTopUp?: number): TransactionInstruction;
1837
+
1838
+ /**
1839
+ * Create an instruction to freeze a decompressed light-token account.
1840
+ *
1841
+ * Freezing sets the account state to AccountState::Frozen, preventing
1842
+ * transfers and other token operations. Only the mint's freeze_authority
1843
+ * can freeze accounts.
1844
+ *
1845
+ * Account order per program:
1846
+ * 0. token_account (mutable) - the light-token account to freeze
1847
+ * 1. mint (readonly) - the mint associated with the token account
1848
+ * 2. freeze_authority - must match mint.freeze_authority (signer)
1849
+ *
1850
+ * @param tokenAccount The light-token account to freeze (must be Initialized)
1851
+ * @param mint The mint of the light-token account
1852
+ * @param freezeAuthority The freeze authority of the mint (signer)
1853
+ * @returns TransactionInstruction
1854
+ */
1855
+ declare function createLightTokenFreezeAccountInstruction(tokenAccount: PublicKey, mint: PublicKey, freezeAuthority: PublicKey): TransactionInstruction;
1856
+ /**
1857
+ * Create an instruction to thaw (unfreeze) a frozen light-token account.
1858
+ *
1859
+ * Thawing restores the account state from AccountState::Frozen to
1860
+ * AccountState::Initialized, re-enabling token operations. Only the
1861
+ * mint's freeze_authority can thaw accounts.
1862
+ *
1863
+ * Account order per program:
1864
+ * 0. token_account (mutable) - the frozen light-token account to thaw
1865
+ * 1. mint (readonly) - the mint associated with the token account
1866
+ * 2. freeze_authority - must match mint.freeze_authority (signer)
1867
+ *
1868
+ * @param tokenAccount The frozen light-token account to thaw
1869
+ * @param mint The mint of the light-token account
1870
+ * @param freezeAuthority The freeze authority of the mint (signer)
1871
+ * @returns TransactionInstruction
1872
+ */
1873
+ declare function createLightTokenThawAccountInstruction(tokenAccount: PublicKey, mint: PublicKey, freezeAuthority: PublicKey): TransactionInstruction;
2301
1874
 
2302
1875
  /**
2303
- * Create and initialize a new mint for SPL/T22/c-token.
1876
+ * Create an instruction to approve a delegate for a light-token account.
1877
+ *
1878
+ * Account order per program:
1879
+ * 0. token_account (mutable) - the light-token account
1880
+ * 1. delegate (readonly) - the delegate to approve
1881
+ * 2. owner (signer) - owner of the token account
1882
+ * 3. system_program (readonly) - for rent top-ups via CPI
1883
+ * 4. fee_payer (mutable, signer) - pays for rent top-ups
1884
+ *
1885
+ * @param tokenAccount The light-token account to set delegation on
1886
+ * @param delegate The delegate to approve
1887
+ * @param owner Owner of the token account (signer)
1888
+ * @param amount Amount of tokens to delegate
1889
+ * @param feePayer Optional fee payer for rent top-ups (defaults to owner)
1890
+ * @returns TransactionInstruction
1891
+ */
1892
+ declare function createLightTokenApproveInstruction(tokenAccount: PublicKey, delegate: PublicKey, owner: PublicKey, amount: number | bigint, feePayer?: PublicKey): TransactionInstruction;
1893
+ /**
1894
+ * Create an instruction to revoke delegation for a light-token account.
1895
+ *
1896
+ * Account order per program:
1897
+ * 0. token_account (mutable) - the light-token account
1898
+ * 1. owner (signer) - owner of the token account
1899
+ * 2. system_program (readonly) - for rent top-ups via CPI
1900
+ * 3. fee_payer (mutable, signer) - pays for rent top-ups
1901
+ *
1902
+ * @param tokenAccount The light-token account to revoke delegation on
1903
+ * @param owner Owner of the token account (signer)
1904
+ * @param feePayer Optional fee payer for rent top-ups (defaults to owner)
1905
+ * @returns TransactionInstruction
1906
+ */
1907
+ declare function createLightTokenRevokeInstruction(tokenAccount: PublicKey, owner: PublicKey, feePayer?: PublicKey): TransactionInstruction;
1908
+
1909
+ /**
1910
+ * Create and initialize a new mint for SPL/T22/light-token.
2304
1911
  *
2305
1912
  * @param rpc RPC connection to use
2306
1913
  * @param payer Fee payer
2307
- * @param mintAuthority Account that will control minting (signer for c-token mints)
1914
+ * @param mintAuthority Account that will control minting (signer for light-token mints)
2308
1915
  * @param freezeAuthority Account that will control freeze and thaw (optional)
2309
1916
  * @param decimals Location of the decimal place
2310
1917
  * @param keypair Mint keypair (defaults to a random keypair)
2311
1918
  * @param confirmOptions Confirm options
2312
1919
  * @param programId Token program ID (defaults to LIGHT_TOKEN_PROGRAM_ID)
2313
- * @param tokenMetadata Optional token metadata (c-token mints only)
2314
- * @param outputStateTreeInfo Optional output state tree info (c-token mints only)
2315
- * @param addressTreeInfo Optional address tree info (c-token mints only)
1920
+ * @param tokenMetadata Optional token metadata (light-token mints only)
1921
+ * @param outputStateTreeInfo Optional output state tree info (light-token mints only)
1922
+ * @param addressTreeInfo Optional address tree info (light-token mints only)
2316
1923
  *
2317
1924
  * @returns Object with mint address and transaction signature
2318
1925
  */
2319
- declare function createMintInterface(
2320
- rpc: Rpc,
2321
- payer: Signer,
2322
- mintAuthority: PublicKey | Signer,
2323
- freezeAuthority: PublicKey | Signer | null,
2324
- decimals: number,
2325
- keypair?: Keypair,
2326
- confirmOptions?: ConfirmOptions,
2327
- programId?: PublicKey,
2328
- tokenMetadata?: TokenMetadataInstructionData,
2329
- outputStateTreeInfo?: TreeInfo,
2330
- addressTreeInfo?: AddressTreeInfo,
2331
- ): Promise<{
1926
+ declare function createMintInterface(rpc: Rpc, payer: Signer, mintAuthority: PublicKey | Signer, freezeAuthority: PublicKey | Signer | null, decimals: number, keypair?: Keypair, confirmOptions?: ConfirmOptions, programId?: PublicKey, tokenMetadata?: TokenMetadataInstructionData, outputStateTreeInfo?: TreeInfo, addressTreeInfo?: AddressTreeInfo): Promise<{
2332
1927
  mint: PublicKey;
2333
1928
  transactionSignature: TransactionSignature;
2334
1929
  }>;
2335
1930
 
2336
1931
  /**
2337
- * Update the mint authority of a compressed token mint.
2338
- * Works for both compressed and decompressed mints.
1932
+ * Update the mint authority of a light-token mint.
1933
+ * Works for both compressed and decompressed light mints.
2339
1934
  *
2340
1935
  * @param rpc RPC connection
2341
1936
  * @param payer Fee payer (signer)
@@ -2344,17 +1939,10 @@ declare function createMintInterface(
2344
1939
  * @param newMintAuthority New mint authority (or null to revoke)
2345
1940
  * @param confirmOptions Optional confirm options
2346
1941
  */
2347
- declare function updateMintAuthority(
2348
- rpc: Rpc,
2349
- payer: Signer,
2350
- mint: PublicKey,
2351
- currentMintAuthority: Signer,
2352
- newMintAuthority: PublicKey | null,
2353
- confirmOptions?: ConfirmOptions,
2354
- ): Promise<TransactionSignature>;
1942
+ declare function updateMintAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentMintAuthority: Signer, newMintAuthority: PublicKey | null, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2355
1943
  /**
2356
- * Update the freeze authority of a compressed token mint.
2357
- * Works for both compressed and decompressed mints.
1944
+ * Update the freeze authority of a light-token mint.
1945
+ * Works for both compressed and decompressed light mints.
2358
1946
  *
2359
1947
  * @param rpc RPC connection
2360
1948
  * @param payer Fee payer (signer)
@@ -2363,18 +1951,11 @@ declare function updateMintAuthority(
2363
1951
  * @param newFreezeAuthority New freeze authority (or null to revoke)
2364
1952
  * @param confirmOptions Optional confirm options
2365
1953
  */
2366
- declare function updateFreezeAuthority(
2367
- rpc: Rpc,
2368
- payer: Signer,
2369
- mint: PublicKey,
2370
- currentFreezeAuthority: Signer,
2371
- newFreezeAuthority: PublicKey | null,
2372
- confirmOptions?: ConfirmOptions,
2373
- ): Promise<TransactionSignature>;
1954
+ declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentFreezeAuthority: Signer, newFreezeAuthority: PublicKey | null, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2374
1955
 
2375
1956
  /**
2376
- * Update a metadata field on a compressed token mint.
2377
- * Works for both compressed and decompressed mints.
1957
+ * Update a metadata field on a light-token mint.
1958
+ * Works for both compressed and decompressed light mints.
2378
1959
  *
2379
1960
  * @param rpc RPC connection
2380
1961
  * @param payer Fee payer (signer)
@@ -2386,20 +1967,10 @@ declare function updateFreezeAuthority(
2386
1967
  * @param extensionIndex Extension index (default: 0)
2387
1968
  * @param confirmOptions Optional confirm options
2388
1969
  */
2389
- declare function updateMetadataField(
2390
- rpc: Rpc,
2391
- payer: Signer,
2392
- mint: PublicKey,
2393
- authority: Signer,
2394
- fieldType: 'name' | 'symbol' | 'uri' | 'custom',
2395
- value: string,
2396
- customKey?: string,
2397
- extensionIndex?: number,
2398
- confirmOptions?: ConfirmOptions,
2399
- ): Promise<TransactionSignature>;
2400
- /**
2401
- * Update the metadata authority of a compressed token mint.
2402
- * Works for both compressed and decompressed mints.
1970
+ 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>;
1971
+ /**
1972
+ * Update the metadata authority of a light-token mint.
1973
+ * Works for both compressed and decompressed light mints.
2403
1974
  *
2404
1975
  * @param rpc RPC connection
2405
1976
  * @param payer Fee payer (signer)
@@ -2409,18 +1980,10 @@ declare function updateMetadataField(
2409
1980
  * @param extensionIndex Extension index (default: 0)
2410
1981
  * @param confirmOptions Optional confirm options
2411
1982
  */
2412
- declare function updateMetadataAuthority(
2413
- rpc: Rpc,
2414
- payer: Signer,
2415
- mint: PublicKey,
2416
- currentAuthority: Signer,
2417
- newAuthority: PublicKey,
2418
- extensionIndex?: number,
2419
- confirmOptions?: ConfirmOptions,
2420
- ): Promise<TransactionSignature>;
1983
+ declare function updateMetadataAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentAuthority: Signer, newAuthority: PublicKey, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2421
1984
  /**
2422
- * Remove a metadata key from a compressed token mint.
2423
- * Works for both compressed and decompressed mints.
1985
+ * Remove a metadata key from a light-token mint.
1986
+ * Works for both compressed and decompressed light mints.
2424
1987
  *
2425
1988
  * @param rpc RPC connection
2426
1989
  * @param payer Fee payer (signer)
@@ -2431,20 +1994,11 @@ declare function updateMetadataAuthority(
2431
1994
  * @param extensionIndex Extension index (default: 0)
2432
1995
  * @param confirmOptions Optional confirm options
2433
1996
  */
2434
- declare function removeMetadataKey(
2435
- rpc: Rpc,
2436
- payer: Signer,
2437
- mint: PublicKey,
2438
- authority: Signer,
2439
- key: string,
2440
- idempotent?: boolean,
2441
- extensionIndex?: number,
2442
- confirmOptions?: ConfirmOptions,
2443
- ): Promise<TransactionSignature>;
1997
+ declare function removeMetadataKey(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, key: string, idempotent?: boolean, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2444
1998
 
2445
1999
  /**
2446
- * Create an associated token account for SPL/T22/c-token. Defaults to c-token
2447
- * program.
2000
+ * Create an associated token account for SPL/T22/light-token. Defaults to
2001
+ * light-token program.
2448
2002
  *
2449
2003
  * @param rpc RPC connection
2450
2004
  * @param payer Fee payer and transaction signer
@@ -2454,25 +2008,15 @@ declare function removeMetadataKey(
2454
2008
  * @param confirmOptions Options for confirming the transaction
2455
2009
  * @param programId Token program ID (default:
2456
2010
  * LIGHT_TOKEN_PROGRAM_ID)
2457
- * @param associatedTokenProgramId ATA program ID (auto-derived if not
2458
- * provided)
2459
- * @param ctokenConfig Optional rent config
2011
+ * @param associatedTokenProgramId associated token account program ID
2012
+ * (auto-derived if not provided)
2013
+ * @param lightTokenConfig Optional rent config
2460
2014
  * @returns Address of the new associated token account
2461
2015
  */
2462
- declare function createAtaInterface(
2463
- rpc: Rpc,
2464
- payer: Signer,
2465
- mint: PublicKey,
2466
- owner: PublicKey,
2467
- allowOwnerOffCurve?: boolean,
2468
- confirmOptions?: ConfirmOptions,
2469
- programId?: PublicKey,
2470
- associatedTokenProgramId?: PublicKey,
2471
- ctokenConfig?: CTokenConfig,
2472
- ): Promise<PublicKey>;
2473
- /**
2474
- * Create an associated token account idempotently for SPL/T22/c-token. Defaults
2475
- * to c-token program.
2016
+ declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): Promise<PublicKey>;
2017
+ /**
2018
+ * Create an associated token account idempotently for SPL/T22/light-token.
2019
+ * Defaults to light-token program.
2476
2020
  *
2477
2021
  * If the account already exists, the instruction succeeds without error.
2478
2022
  *
@@ -2484,53 +2028,34 @@ declare function createAtaInterface(
2484
2028
  * @param confirmOptions Options for confirming the transaction
2485
2029
  * @param programId Token program ID (default:
2486
2030
  * LIGHT_TOKEN_PROGRAM_ID)
2487
- * @param associatedTokenProgramId ATA program ID (auto-derived if not
2488
- * provided)
2489
- * @param ctokenConfig Optional c-token-specific configuration
2031
+ * @param associatedTokenProgramId associated token account program ID
2032
+ * (auto-derived if not provided)
2033
+ * @param lightTokenConfig Optional light-token-specific configuration
2490
2034
  *
2491
2035
  * @returns Address of the associated token account
2492
2036
  */
2493
- declare function createAtaInterfaceIdempotent(
2494
- rpc: Rpc,
2495
- payer: Signer,
2496
- mint: PublicKey,
2497
- owner: PublicKey,
2498
- allowOwnerOffCurve?: boolean,
2499
- confirmOptions?: ConfirmOptions,
2500
- programId?: PublicKey,
2501
- associatedTokenProgramId?: PublicKey,
2502
- ctokenConfig?: CTokenConfig,
2503
- ): Promise<PublicKey>;
2037
+ declare function createAtaInterfaceIdempotent(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): Promise<PublicKey>;
2504
2038
 
2505
2039
  /**
2506
- * Mint tokens to a CToken account.
2040
+ * Mint tokens to a light-token account.
2507
2041
  *
2508
- * This is a simple mint instruction for minting to decompressed CToken accounts.
2509
- * The mint must be decompressed (CMint account must exist on-chain).
2042
+ * This is a simple mint instruction for minting to light-token associated token accounts (hot).
2043
+ * The light mint account must exist (mint must be decompressed first).
2510
2044
  *
2511
2045
  * @param rpc - RPC connection
2512
2046
  * @param payer - Fee payer (signer)
2513
- * @param mint - Mint address (CMint account)
2514
- * @param destination - Destination CToken account
2047
+ * @param mint - Mint address (light mint account)
2048
+ * @param destination - Destination light-token account
2515
2049
  * @param authority - Mint authority (signer)
2516
2050
  * @param amount - Amount to mint
2517
2051
  * @param maxTopUp - Optional maximum lamports for rent top-up
2518
2052
  * @param confirmOptions - Optional confirm options
2519
2053
  * @returns Transaction signature
2520
2054
  */
2521
- declare function mintTo$1(
2522
- rpc: Rpc,
2523
- payer: Signer,
2524
- mint: PublicKey,
2525
- destination: PublicKey,
2526
- authority: Signer,
2527
- amount: number | bigint,
2528
- maxTopUp?: number,
2529
- confirmOptions?: ConfirmOptions,
2530
- ): Promise<TransactionSignature>;
2055
+ declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, destination: PublicKey, authority: Signer, amount: number | bigint, maxTopUp?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2531
2056
 
2532
2057
  /**
2533
- * Mint compressed tokens directly to compressed accounts.
2058
+ * Mint light-tokens directly to compressed accounts.
2534
2059
  *
2535
2060
  * @param rpc RPC connection
2536
2061
  * @param payer Fee payer
@@ -2542,33 +2067,23 @@ declare function mintTo$1(
2542
2067
  * @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
2543
2068
  * @param confirmOptions Optional confirm options
2544
2069
  */
2545
- declare function mintToCompressed(
2546
- rpc: Rpc,
2547
- payer: Signer,
2548
- mint: PublicKey,
2549
- authority: Signer,
2550
- recipients: Array<{
2551
- recipient: PublicKey;
2552
- amount: number | bigint;
2553
- }>,
2554
- outputStateTreeInfo?: TreeInfo,
2555
- tokenAccountVersion?: number,
2556
- maxTopUp?: number,
2557
- confirmOptions?: ConfirmOptions,
2558
- ): Promise<TransactionSignature>;
2070
+ declare function mintToCompressed(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, recipients: Array<{
2071
+ recipient: PublicKey;
2072
+ amount: number | bigint;
2073
+ }>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: number, maxTopUp?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2559
2074
 
2560
2075
  /**
2561
2076
  * Mint tokens to a decompressed/onchain token account.
2562
- * Works with SPL, Token-2022, and CToken mints.
2077
+ * Works with SPL, Token-2022, and light-token mints.
2563
2078
  *
2564
- * This function ONLY mints to decompressed onchain token accounts, never to compressed accounts.
2565
- * For CToken mints, the mint must be decompressed first (CMint account must exist on-chain).
2079
+ * This function ONLY mints to light-token associated token accounts (hot), never to compressed light-token accounts (cold).
2080
+ * For light-token mints, the light mint account must exist (mint must be decompressed first).
2566
2081
  *
2567
2082
  * The signature matches the standard SPL mintTo for simplicity and consistency.
2568
2083
  *
2569
2084
  * @param rpc - RPC connection to use
2570
2085
  * @param payer - Transaction fee payer
2571
- * @param mint - Mint address (SPL, Token-2022, or CToken mint)
2086
+ * @param mint - Mint address (SPL, Token-2022, or light-token mint)
2572
2087
  * @param destination - Destination token account address (must be an existing onchain token account)
2573
2088
  * @param authority - Mint authority (can be Signer or PublicKey if multiSigners provided)
2574
2089
  * @param amount - Amount to mint
@@ -2578,56 +2093,18 @@ declare function mintToCompressed(
2578
2093
  *
2579
2094
  * @returns Transaction signature
2580
2095
  */
2581
- declare function mintToInterface(
2582
- rpc: Rpc,
2583
- payer: Signer,
2584
- mint: PublicKey,
2585
- destination: PublicKey,
2586
- authority: Signer | PublicKey,
2587
- amount: number | bigint,
2588
- multiSigners?: Signer[],
2589
- confirmOptions?: ConfirmOptions,
2590
- programId?: PublicKey,
2591
- ): Promise<TransactionSignature>;
2592
-
2593
- /**
2594
- * Decompress compressed (cold) tokens to an on-chain token account.
2595
- *
2596
- * For unified loading, use {@link loadAta} instead.
2597
- *
2598
- * @param rpc RPC connection
2599
- * @param payer Fee payer (signer)
2600
- * @param owner Owner of the compressed tokens (signer)
2601
- * @param mint Mint address
2602
- * @param amount Amount to decompress (defaults to all)
2603
- * @param destinationAta Destination token account address
2604
- * @param destinationOwner Owner of the destination ATA
2605
- * @param splInterfaceInfo SPL interface info for SPL/T22 destinations
2606
- * @param confirmOptions Confirm options
2607
- * @returns Transaction signature, null if nothing to load.
2608
- */
2609
- declare function decompressInterface(
2610
- rpc: Rpc,
2611
- payer: Signer,
2612
- owner: Signer,
2613
- mint: PublicKey,
2614
- amount?: number | bigint | BN,
2615
- destinationAta?: PublicKey,
2616
- destinationOwner?: PublicKey,
2617
- splInterfaceInfo?: SplInterfaceInfo,
2618
- confirmOptions?: ConfirmOptions,
2619
- ): Promise<TransactionSignature | null>;
2620
-
2621
- /**
2622
- * Wrap tokens from an SPL/T22 account to a c-token account.
2096
+ 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>;
2097
+
2098
+ /**
2099
+ * Wrap tokens from an SPL/T22 account to a light-token account.
2623
2100
  *
2624
2101
  * This is an agnostic action that takes explicit account addresses (spl-token style).
2625
- * Use getAssociatedTokenAddressSync() to derive ATA addresses if needed.
2102
+ * Use getAssociatedTokenAddressSync() to derive associated token account addresses if needed.
2626
2103
  *
2627
2104
  * @param rpc RPC connection
2628
2105
  * @param payer Fee payer
2629
- * @param source Source SPL/T22 token account (any token account, not just ATA)
2630
- * @param destination Destination c-token account
2106
+ * @param source Source SPL/T22 token account (any token account, not just associated token account)
2107
+ * @param destination Destination light-token account
2631
2108
  * @param owner Owner/authority of the source account (must sign)
2632
2109
  * @param mint Mint address
2633
2110
  * @param amount Amount to wrap
@@ -2637,13 +2114,13 @@ declare function decompressInterface(
2637
2114
  *
2638
2115
  * @example
2639
2116
  * const splAta = getAssociatedTokenAddressSync(mint, owner.publicKey, false, TOKEN_PROGRAM_ID);
2640
- * const ctokenAta = getAssociatedTokenAddressInterface(mint, owner.publicKey); // defaults to c-token
2117
+ * const lightTokenAta = getAssociatedTokenAddressInterface(mint, owner.publicKey); // defaults to light-token
2641
2118
  *
2642
2119
  * await wrap(
2643
2120
  * rpc,
2644
2121
  * payer,
2645
2122
  * splAta,
2646
- * ctokenAta,
2123
+ * lightTokenAta,
2647
2124
  * owner,
2648
2125
  * mint,
2649
2126
  * 1000n,
@@ -2651,43 +2128,7 @@ declare function decompressInterface(
2651
2128
  *
2652
2129
  * @returns Transaction signature
2653
2130
  */
2654
- declare function wrap(
2655
- rpc: Rpc,
2656
- payer: Signer,
2657
- source: PublicKey,
2658
- destination: PublicKey,
2659
- owner: Signer,
2660
- mint: PublicKey,
2661
- amount: bigint,
2662
- splInterfaceInfo?: SplInterfaceInfo,
2663
- maxTopUp?: number,
2664
- confirmOptions?: ConfirmOptions,
2665
- ): Promise<TransactionSignature>;
2666
-
2667
- /**
2668
- * Create instructions to load an ATA from its AccountInterface.
2669
- *
2670
- * Behavior depends on `wrap` parameter:
2671
- * - wrap=false (standard): Decompress compressed tokens to the target ATA type
2672
- * (SPL ATA via pool, T22 ATA via pool, or c-token ATA direct)
2673
- * - wrap=true (unified): Wrap SPL/T22 + decompress all to c-token ATA
2674
- *
2675
- * @param rpc RPC connection
2676
- * @param payer Fee payer
2677
- * @param ata AccountInterface from getAtaInterface (must have _isAta, _owner, _mint)
2678
- * @param options Optional load options
2679
- * @param wrap Unified mode: wrap SPL/T22 to c-token (default: false)
2680
- * @param targetAta Target ATA address (used for type detection in standard mode)
2681
- * @returns Array of instructions (empty if nothing to load)
2682
- */
2683
- declare function createLoadAtaInstructionsFromInterface(
2684
- rpc: Rpc,
2685
- payer: PublicKey,
2686
- ata: AccountInterface,
2687
- options?: InterfaceOptions,
2688
- wrap?: boolean,
2689
- targetAta?: PublicKey,
2690
- ): Promise<TransactionInstruction[]>;
2131
+ 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>;
2691
2132
 
2692
2133
  /**
2693
2134
  * Input for creating off-chain metadata JSON.
@@ -2737,7 +2178,7 @@ interface OffChainTokenMetadataJson {
2737
2178
  * const metadataJson = toOffChainMetadataJson({
2738
2179
  * name: 'My Token',
2739
2180
  * symbol: 'MTK',
2740
- * description: 'A compressed token',
2181
+ * description: 'A light-token',
2741
2182
  * image: 'https://example.com/image.png',
2742
2183
  * });
2743
2184
  * const uri = await umi.uploader.uploadJson(metadataJson);
@@ -2745,32 +2186,33 @@ interface OffChainTokenMetadataJson {
2745
2186
  * // Then use uri with createMint
2746
2187
  * await createMint(rpc, payer, { ...params, uri });
2747
2188
  */
2748
- declare function toOffChainMetadataJson(
2749
- meta: OffChainTokenMetadata,
2750
- ): OffChainTokenMetadataJson;
2189
+ declare function toOffChainMetadataJson(meta: OffChainTokenMetadata): OffChainTokenMetadataJson;
2751
2190
 
2752
2191
  /**
2753
- * Returns the compressed mint address as bytes.
2192
+ * Returns the light mint address as bytes.
2193
+ * @internal
2754
2194
  */
2755
- declare function deriveCMintAddress(
2756
- mintSeed: PublicKey,
2757
- addressTreeInfo: TreeInfo,
2758
- ): number[];
2195
+ declare function deriveCMintAddress(mintSeed: PublicKey, addressTreeInfo: TreeInfo): number[];
2759
2196
  declare const COMPRESSED_MINT_SEED: Buffer$1;
2760
2197
  /**
2761
- * Finds the SPL mint PDA for a c-token mint.
2198
+ * Finds the SPL mint PDA for a light-token mint.
2762
2199
  * @param mintSeed The mint seed public key.
2763
2200
  * @returns [PDA, bump]
2201
+ * @internal
2764
2202
  */
2765
2203
  declare function findMintAddress(mintSigner: PublicKey): [PublicKey, number];
2766
- declare function getAssociatedCTokenAddressAndBump(
2767
- owner: PublicKey,
2768
- mint: PublicKey,
2769
- ): [PublicKey, number];
2770
- declare function getAssociatedCTokenAddress(
2771
- owner: PublicKey,
2772
- mint: PublicKey,
2773
- ): PublicKey;
2204
+ /**
2205
+ * Same as "getAssociatedTokenAddress" but returns the bump as well.
2206
+ * Uses light-token program ID.
2207
+ * @internal
2208
+ */
2209
+ declare function getAssociatedLightTokenAddressAndBump(owner: PublicKey, mint: PublicKey): [PublicKey, number];
2210
+ /**
2211
+ * Same as "getAssociatedTokenAddress", returning just the associated token address.
2212
+ * Uses light-token program ID.
2213
+ * @internal
2214
+ */
2215
+ declare function getAssociatedLightTokenAddress(owner: PublicKey, mint: PublicKey): PublicKey;
2774
2216
 
2775
2217
  /**
2776
2218
  * Approve a delegate to spend tokens
@@ -2785,15 +2227,7 @@ declare function getAssociatedCTokenAddress(
2785
2227
  *
2786
2228
  * @return Signature of the confirmed transaction
2787
2229
  */
2788
- declare function approve(
2789
- rpc: Rpc,
2790
- payer: Signer,
2791
- mint: PublicKey,
2792
- amount: number | BN,
2793
- owner: Signer,
2794
- delegate: PublicKey,
2795
- confirmOptions?: ConfirmOptions,
2796
- ): Promise<TransactionSignature>;
2230
+ declare function approve(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, delegate: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2797
2231
 
2798
2232
  /**
2799
2233
  * Mint compressed tokens to a solana address from an external mint authority
@@ -2812,17 +2246,7 @@ declare function approve(
2812
2246
  *
2813
2247
  * @return Signature of the confirmed transaction
2814
2248
  */
2815
- declare function approveAndMintTo(
2816
- rpc: Rpc,
2817
- payer: Signer,
2818
- mint: PublicKey,
2819
- toPubkey: PublicKey,
2820
- authority: Signer,
2821
- amount: number | BN,
2822
- outputStateTreeInfo?: TreeInfo,
2823
- splInterfaceInfo?: SplInterfaceInfo,
2824
- confirmOptions?: ConfirmOptions,
2825
- ): Promise<TransactionSignature>;
2249
+ declare function approveAndMintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: PublicKey, authority: Signer, amount: number | BN, outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2826
2250
 
2827
2251
  /**
2828
2252
  * Compress SPL tokens
@@ -2842,18 +2266,7 @@ declare function approveAndMintTo(
2842
2266
  *
2843
2267
  * @return Signature of the confirmed transaction
2844
2268
  */
2845
- declare function compress(
2846
- rpc: Rpc,
2847
- payer: Signer,
2848
- mint: PublicKey,
2849
- amount: number | BN | number[] | BN[],
2850
- owner: Signer,
2851
- sourceTokenAccount: PublicKey,
2852
- toAddress: PublicKey | Array<PublicKey>,
2853
- outputStateTreeInfo?: TreeInfo,
2854
- splInterfaceInfo?: SplInterfaceInfo,
2855
- confirmOptions?: ConfirmOptions,
2856
- ): Promise<TransactionSignature>;
2269
+ declare function compress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN | number[] | BN[], owner: Signer, sourceTokenAccount: PublicKey, toAddress: PublicKey | Array<PublicKey>, outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2857
2270
 
2858
2271
  /**
2859
2272
  * Compress SPL tokens into compressed token format
@@ -2873,17 +2286,7 @@ declare function compress(
2873
2286
  *
2874
2287
  * @return Signature of the confirmed transaction
2875
2288
  */
2876
- declare function compressSplTokenAccount(
2877
- rpc: Rpc,
2878
- payer: Signer,
2879
- mint: PublicKey,
2880
- owner: Signer,
2881
- tokenAccount: PublicKey,
2882
- remainingAmount?: BN,
2883
- outputStateTreeInfo?: TreeInfo,
2884
- splInterfaceInfo?: SplInterfaceInfo,
2885
- confirmOptions?: ConfirmOptions,
2886
- ): Promise<TransactionSignature>;
2289
+ declare function compressSplTokenAccount(rpc: Rpc, payer: Signer, mint: PublicKey, owner: Signer, tokenAccount: PublicKey, remainingAmount?: BN, outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2887
2290
 
2888
2291
  /**
2889
2292
  * Create and initialize a new SPL token mint
@@ -2903,16 +2306,7 @@ declare function compressSplTokenAccount(
2903
2306
  *
2904
2307
  * @return Object with mint address and transaction signature
2905
2308
  */
2906
- declare function createMint(
2907
- rpc: Rpc,
2908
- payer: Signer,
2909
- mintAuthority: PublicKey | Signer,
2910
- decimals: number,
2911
- keypair?: Keypair,
2912
- confirmOptions?: ConfirmOptions,
2913
- tokenProgramId?: PublicKey | boolean,
2914
- freezeAuthority?: PublicKey | Signer | null,
2915
- ): Promise<{
2309
+ declare function createMint(rpc: Rpc, payer: Signer, mintAuthority: PublicKey | Signer, decimals: number, keypair?: Keypair, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey | boolean, freezeAuthority?: PublicKey | Signer | null): Promise<{
2916
2310
  mint: PublicKey;
2917
2311
  transactionSignature: TransactionSignature;
2918
2312
  }>;
@@ -2929,13 +2323,7 @@ declare function createMint(
2929
2323
  *
2930
2324
  * @return transaction signature
2931
2325
  */
2932
- declare function createSplInterface(
2933
- rpc: Rpc,
2934
- payer: Signer,
2935
- mint: PublicKey,
2936
- confirmOptions?: ConfirmOptions,
2937
- tokenProgramId?: PublicKey,
2938
- ): Promise<TransactionSignature>;
2326
+ declare function createSplInterface(rpc: Rpc, payer: Signer, mint: PublicKey, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey): Promise<TransactionSignature>;
2939
2327
  /**
2940
2328
  * @deprecated Use {@link createSplInterface} instead.
2941
2329
  */
@@ -2954,14 +2342,7 @@ declare const createTokenPool: typeof createSplInterface;
2954
2342
  *
2955
2343
  * @return transaction signature
2956
2344
  */
2957
- declare function addSplInterfaces(
2958
- rpc: Rpc,
2959
- payer: Signer,
2960
- mint: PublicKey,
2961
- numMaxAdditionalPools: number,
2962
- confirmOptions?: ConfirmOptions,
2963
- tokenProgramId?: PublicKey,
2964
- ): Promise<string>;
2345
+ declare function addSplInterfaces(rpc: Rpc, payer: Signer, mint: PublicKey, numMaxAdditionalPools: number, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey): Promise<string>;
2965
2346
  /**
2966
2347
  * @deprecated Use {@link addSplInterfaces} instead.
2967
2348
  */
@@ -2981,13 +2362,7 @@ declare const addTokenPools: typeof addSplInterfaces;
2981
2362
  * @return Object with transaction signatures and the address of the created
2982
2363
  * lookup table
2983
2364
  */
2984
- declare function createTokenProgramLookupTable(
2985
- rpc: Rpc,
2986
- payer: Signer,
2987
- authority: Signer,
2988
- mints?: PublicKey[],
2989
- additionalAccounts?: PublicKey[],
2990
- ): Promise<{
2365
+ declare function createTokenProgramLookupTable(rpc: Rpc, payer: Signer, authority: Signer, mints?: PublicKey[], additionalAccounts?: PublicKey[]): Promise<{
2991
2366
  txIds: TransactionSignature[];
2992
2367
  address: PublicKey;
2993
2368
  }>;
@@ -3007,16 +2382,7 @@ declare function createTokenProgramLookupTable(
3007
2382
  *
3008
2383
  * @return confirmed transaction signature
3009
2384
  */
3010
- declare function decompress(
3011
- rpc: Rpc,
3012
- payer: Signer,
3013
- mint: PublicKey,
3014
- amount: number | BN,
3015
- owner: Signer,
3016
- toAddress: PublicKey,
3017
- splInterfaceInfos?: SplInterfaceInfo[],
3018
- confirmOptions?: ConfirmOptions,
3019
- ): Promise<TransactionSignature>;
2385
+ declare function decompress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, splInterfaceInfos?: SplInterfaceInfo[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3020
2386
 
3021
2387
  /**
3022
2388
  * Merge multiple compressed token accounts for a given mint into fewer
@@ -3036,13 +2402,7 @@ declare function decompress(
3036
2402
  *
3037
2403
  * @return confirmed transaction signature
3038
2404
  */
3039
- declare function mergeTokenAccounts(
3040
- rpc: Rpc,
3041
- payer: Signer,
3042
- mint: PublicKey,
3043
- owner: Signer,
3044
- confirmOptions?: ConfirmOptions,
3045
- ): Promise<TransactionSignature>;
2405
+ declare function mergeTokenAccounts(rpc: Rpc, payer: Signer, mint: PublicKey, owner: Signer, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3046
2406
 
3047
2407
  /**
3048
2408
  * Mint compressed tokens to a solana address
@@ -3064,17 +2424,7 @@ declare function mergeTokenAccounts(
3064
2424
  *
3065
2425
  * @return Signature of the confirmed transaction
3066
2426
  */
3067
- declare function mintTo(
3068
- rpc: Rpc,
3069
- payer: Signer,
3070
- mint: PublicKey,
3071
- toPubkey: PublicKey | PublicKey[],
3072
- authority: Signer,
3073
- amount: number | BN | number[] | BN[],
3074
- outputStateTreeInfo?: TreeInfo,
3075
- splInterfaceInfo?: SplInterfaceInfo,
3076
- confirmOptions?: ConfirmOptions,
3077
- ): Promise<TransactionSignature>;
2427
+ declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: PublicKey | PublicKey[], authority: Signer, amount: number | BN | number[] | BN[], outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3078
2428
 
3079
2429
  /**
3080
2430
  * Revoke one or more delegated token accounts
@@ -3088,13 +2438,7 @@ declare function mintTo(
3088
2438
  *
3089
2439
  * @return Signature of the confirmed transaction
3090
2440
  */
3091
- declare function revoke(
3092
- rpc: Rpc,
3093
- payer: Signer,
3094
- accounts: ParsedTokenAccount[],
3095
- owner: Signer,
3096
- confirmOptions?: ConfirmOptions,
3097
- ): Promise<TransactionSignature>;
2441
+ declare function revoke(rpc: Rpc, payer: Signer, accounts: ParsedTokenAccount[], owner: Signer, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3098
2442
 
3099
2443
  /**
3100
2444
  * Transfer compressed tokens from one owner to another.
@@ -3112,15 +2456,7 @@ declare function revoke(
3112
2456
  *
3113
2457
  * @return confirmed transaction signature
3114
2458
  */
3115
- declare function transfer(
3116
- rpc: Rpc,
3117
- payer: Signer,
3118
- mint: PublicKey,
3119
- amount: number | BN,
3120
- owner: Signer,
3121
- toAddress: PublicKey,
3122
- confirmOptions?: ConfirmOptions,
3123
- ): Promise<TransactionSignature>;
2459
+ declare function transfer(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3124
2460
 
3125
2461
  /**
3126
2462
  * Transfer delegated compressed tokens to another owner
@@ -3135,15 +2471,7 @@ declare function transfer(
3135
2471
  *
3136
2472
  * @return confirmed transaction signature
3137
2473
  */
3138
- declare function transferDelegated(
3139
- rpc: Rpc,
3140
- payer: Signer,
3141
- mint: PublicKey,
3142
- amount: number | BN,
3143
- owner: Signer,
3144
- toAddress: PublicKey,
3145
- confirmOptions?: ConfirmOptions,
3146
- ): Promise<TransactionSignature>;
2474
+ declare function transferDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3147
2475
 
3148
2476
  /**
3149
2477
  * Decompress delegated compressed tokens. Remaining compressed tokens are
@@ -3161,21 +2489,10 @@ declare function transferDelegated(
3161
2489
  *
3162
2490
  * @return Signature of the confirmed transaction
3163
2491
  */
3164
- declare function decompressDelegated(
3165
- rpc: Rpc,
3166
- payer: Signer,
3167
- mint: PublicKey,
3168
- amount: number | BN,
3169
- owner: Signer,
3170
- toAddress: PublicKey,
3171
- splInterfaceInfos?: SplInterfaceInfo[],
3172
- confirmOptions?: ConfirmOptions,
3173
- ): Promise<TransactionSignature>;
3174
-
3175
- declare const ERROR_NO_ACCOUNTS_FOUND =
3176
- 'Could not find accounts to select for transfer.';
3177
- declare const ERROR_MIXED_TREE_TYPES =
3178
- 'Cannot select accounts from different tree types (V1/V2) in the same batch. Filter accounts by tree type first.';
2492
+ declare function decompressDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, splInterfaceInfos?: SplInterfaceInfo[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2493
+
2494
+ declare const ERROR_NO_ACCOUNTS_FOUND = "Could not find accounts to select for transfer.";
2495
+ declare const ERROR_MIXED_TREE_TYPES = "Cannot select accounts from different tree types (V1/V2) in the same batch. Filter accounts by tree type first.";
3179
2496
  /**
3180
2497
  * Options for input account selection
3181
2498
  */
@@ -3190,9 +2507,7 @@ interface SelectInputAccountsOptions {
3190
2507
  /**
3191
2508
  * Groups accounts by tree type for separate processing
3192
2509
  */
3193
- declare function groupAccountsByTreeType(
3194
- accounts: ParsedTokenAccount[],
3195
- ): Map<TreeType, ParsedTokenAccount[]>;
2510
+ declare function groupAccountsByTreeType(accounts: ParsedTokenAccount[]): Map<TreeType, ParsedTokenAccount[]>;
3196
2511
  /**
3197
2512
  * Result of selectAccountsByPreferredTreeType
3198
2513
  */
@@ -3217,10 +2532,7 @@ interface SelectedAccountsResult {
3217
2532
  * @param requiredAmount Minimum amount needed (optional - if not provided, returns all from preferred type)
3218
2533
  * @returns Selected accounts from a single tree type
3219
2534
  */
3220
- declare function selectAccountsByPreferredTreeType(
3221
- accounts: ParsedTokenAccount[],
3222
- requiredAmount?: BN,
3223
- ): SelectedAccountsResult;
2535
+ declare function selectAccountsByPreferredTreeType(accounts: ParsedTokenAccount[], requiredAmount?: BN): SelectedAccountsResult;
3224
2536
  /**
3225
2537
  * Selects token accounts for approval, first trying to find an exact match, then falling back to minimum selection.
3226
2538
  *
@@ -3239,16 +2551,11 @@ declare function selectAccountsByPreferredTreeType(
3239
2551
  * - totalLamports: Total lamports from selected accounts.
3240
2552
  * - maxPossibleAmount: Max approvable amount given maxInputs.
3241
2553
  */
3242
- declare function selectTokenAccountsForApprove(
3243
- accounts: ParsedTokenAccount[],
3244
- approveAmount: BN,
3245
- maxInputs?: number,
3246
- options?: SelectInputAccountsOptions,
3247
- ): [
2554
+ declare function selectTokenAccountsForApprove(accounts: ParsedTokenAccount[], approveAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
3248
2555
  selectedAccounts: ParsedTokenAccount[],
3249
2556
  total: BN,
3250
2557
  totalLamports: BN | null,
3251
- maxPossibleAmount: BN,
2558
+ maxPossibleAmount: BN
3252
2559
  ];
3253
2560
  /**
3254
2561
  * Selects the minimum number of compressed token accounts required for a
@@ -3262,12 +2569,7 @@ declare function selectTokenAccountsForApprove(
3262
2569
  *
3263
2570
  * @returns Returns selected accounts and their totals.
3264
2571
  */
3265
- declare function selectMinCompressedTokenAccountsForDecompression(
3266
- accounts: ParsedTokenAccount[],
3267
- amount: BN,
3268
- maxInputs?: number,
3269
- options?: SelectInputAccountsOptions,
3270
- ): {
2572
+ declare function selectMinCompressedTokenAccountsForDecompression(accounts: ParsedTokenAccount[], amount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): {
3271
2573
  selectedAccounts: ParsedTokenAccount[];
3272
2574
  total: BN;
3273
2575
  totalLamports: BN | null;
@@ -3291,31 +2593,22 @@ declare function selectMinCompressedTokenAccountsForDecompression(
3291
2593
  * maxPossibleAmount: BN
3292
2594
  * ]
3293
2595
  */
3294
- declare function selectMinCompressedTokenAccountsForTransfer(
3295
- accounts: ParsedTokenAccount[],
3296
- transferAmount: BN,
3297
- maxInputs?: number,
3298
- options?: SelectInputAccountsOptions,
3299
- ): [
2596
+ declare function selectMinCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
3300
2597
  selectedAccounts: ParsedTokenAccount[],
3301
2598
  total: BN,
3302
2599
  totalLamports: BN | null,
3303
- maxPossibleAmount: BN,
2600
+ maxPossibleAmount: BN
3304
2601
  ];
3305
2602
  /**
3306
2603
  * Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
3307
2604
  * returns partial amounts if insufficient accounts are found instead of
3308
2605
  * throwing an error.
3309
2606
  */
3310
- declare function selectMinCompressedTokenAccountsForTransferOrPartial(
3311
- accounts: ParsedTokenAccount[],
3312
- transferAmount: BN,
3313
- maxInputs?: number,
3314
- ): [
2607
+ declare function selectMinCompressedTokenAccountsForTransferOrPartial(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
3315
2608
  selectedAccounts: ParsedTokenAccount[],
3316
2609
  total: BN,
3317
2610
  totalLamports: BN | null,
3318
- maxPossibleAmount: BN,
2611
+ maxPossibleAmount: BN
3319
2612
  ];
3320
2613
  /**
3321
2614
  * Selects compressed token accounts for a transfer, ensuring one extra account
@@ -3358,31 +2651,22 @@ declare function selectMinCompressedTokenAccountsForTransferOrPartial(
3358
2651
  * console.log(totalLamports!.toString()); // '15'
3359
2652
  * console.log(maxPossibleAmount.toString()); // '150'
3360
2653
  */
3361
- declare function selectSmartCompressedTokenAccountsForTransfer(
3362
- accounts: ParsedTokenAccount[],
3363
- transferAmount: BN,
3364
- maxInputs?: number,
3365
- options?: SelectInputAccountsOptions,
3366
- ): [
2654
+ declare function selectSmartCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
3367
2655
  selectedAccounts: ParsedTokenAccount[],
3368
2656
  total: BN,
3369
2657
  totalLamports: BN | null,
3370
- maxPossibleAmount: BN,
2658
+ maxPossibleAmount: BN
3371
2659
  ];
3372
2660
  /**
3373
2661
  * Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
3374
2662
  * returns partial amounts if insufficient accounts are found instead of
3375
2663
  * throwing an error.
3376
2664
  */
3377
- declare function selectSmartCompressedTokenAccountsForTransferOrPartial(
3378
- accounts: ParsedTokenAccount[],
3379
- transferAmount: BN,
3380
- maxInputs?: number,
3381
- ): [
2665
+ declare function selectSmartCompressedTokenAccountsForTransferOrPartial(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
3382
2666
  selectedAccounts: ParsedTokenAccount[],
3383
2667
  total: BN,
3384
2668
  totalLamports: BN | null,
3385
- maxPossibleAmount: BN,
2669
+ maxPossibleAmount: BN
3386
2670
  ];
3387
2671
 
3388
2672
  type TokenTransferOutputData = {
@@ -3455,9 +2739,7 @@ type CompressSplTokenAccountInstructionData = {
3455
2739
  remainingAmount: BN | null;
3456
2740
  cpiContext: CompressedCpiContext | null;
3457
2741
  };
3458
- declare function isSingleSplInterfaceInfo(
3459
- splInterfaceInfos: SplInterfaceInfo | SplInterfaceInfo[],
3460
- ): splInterfaceInfos is SplInterfaceInfo;
2742
+ declare function isSingleSplInterfaceInfo(splInterfaceInfos: SplInterfaceInfo | SplInterfaceInfo[]): splInterfaceInfos is SplInterfaceInfo;
3461
2743
  /**
3462
2744
  * @deprecated Use {@link isSingleSplInterfaceInfo} instead.
3463
2745
  */
@@ -3568,9 +2850,7 @@ type PackCompressedTokenAccountsParams = {
3568
2850
  /**
3569
2851
  * Packs Compressed Token Accounts.
3570
2852
  */
3571
- declare function packCompressedTokenAccounts(
3572
- params: PackCompressedTokenAccountsParams,
3573
- ): {
2853
+ declare function packCompressedTokenAccounts(params: PackCompressedTokenAccountsParams): {
3574
2854
  inputTokenDataWithContext: InputTokenDataWithContext$1[];
3575
2855
  remainingAccountMetas: AccountMeta[];
3576
2856
  packedOutputTokenData: PackedTokenTransferOutputData[];
@@ -3583,10 +2863,7 @@ declare function packCompressedTokenAccounts(
3583
2863
  * @param mint The mint of the token pool
3584
2864
  * @returns True if all input accounts belong to the same mint
3585
2865
  */
3586
- declare function checkMint(
3587
- compressedTokenAccounts: ParsedTokenAccount[],
3588
- mint: PublicKey,
3589
- ): boolean;
2866
+ declare function checkMint(compressedTokenAccounts: ParsedTokenAccount[], mint: PublicKey): boolean;
3590
2867
 
3591
2868
  type LightCompressedToken = {
3592
2869
  version: '1.2.0';
@@ -3598,7 +2875,7 @@ type LightCompressedToken = {
3598
2875
  'This instruction creates a token pool for a given mint. Every spl mint',
3599
2876
  'can have one token pool. When a token is compressed the tokens are',
3600
2877
  'transferrred to the token pool, and their compressed equivalent is',
3601
- 'minted into a Merkle tree.',
2878
+ 'minted into a Merkle tree.'
3602
2879
  ];
3603
2880
  accounts: [
3604
2881
  {
@@ -3631,7 +2908,7 @@ type LightCompressedToken = {
3631
2908
  name: 'cpiAuthorityPda';
3632
2909
  isMut: false;
3633
2910
  isSigner: false;
3634
- },
2911
+ }
3635
2912
  ];
3636
2913
  args: [];
3637
2914
  },
@@ -3639,7 +2916,7 @@ type LightCompressedToken = {
3639
2916
  name: 'addTokenPool';
3640
2917
  docs: [
3641
2918
  'This instruction creates an additional token pool for a given mint.',
3642
- 'The maximum number of token pools per mint is 5.',
2919
+ 'The maximum number of token pools per mint is 5.'
3643
2920
  ];
3644
2921
  accounts: [
3645
2922
  {
@@ -3677,13 +2954,13 @@ type LightCompressedToken = {
3677
2954
  name: 'cpiAuthorityPda';
3678
2955
  isMut: false;
3679
2956
  isSigner: false;
3680
- },
2957
+ }
3681
2958
  ];
3682
2959
  args: [
3683
2960
  {
3684
2961
  name: 'tokenPoolIndex';
3685
2962
  type: 'u8';
3686
- },
2963
+ }
3687
2964
  ];
3688
2965
  },
3689
2966
  {
@@ -3695,7 +2972,7 @@ type LightCompressedToken = {
3695
2972
  'every amount and pubkey input pair. A constant amount of lamports can be',
3696
2973
  'transferred to each output account to enable. A use case to add lamports',
3697
2974
  'to a compressed token account is to prevent spam. This is the only way',
3698
- 'to add lamports to a compressed token account.',
2975
+ 'to add lamports to a compressed token account.'
3699
2976
  ];
3700
2977
  accounts: [
3701
2978
  {
@@ -3775,7 +3052,7 @@ type LightCompressedToken = {
3775
3052
  isMut: true;
3776
3053
  isSigner: false;
3777
3054
  isOptional: true;
3778
- },
3055
+ }
3779
3056
  ];
3780
3057
  args: [
3781
3058
  {
@@ -3795,7 +3072,7 @@ type LightCompressedToken = {
3795
3072
  type: {
3796
3073
  option: 'u64';
3797
3074
  };
3798
- },
3075
+ }
3799
3076
  ];
3800
3077
  },
3801
3078
  {
@@ -3803,7 +3080,7 @@ type LightCompressedToken = {
3803
3080
  docs: [
3804
3081
  'Compresses the balance of an spl token account sub an optional remaining',
3805
3082
  'amount. This instruction does not close the spl token account. To close',
3806
- 'the account bundle a close spl account instruction in your transaction.',
3083
+ 'the account bundle a close spl account instruction in your transaction.'
3807
3084
  ];
3808
3085
  accounts: [
3809
3086
  {
@@ -3819,7 +3096,7 @@ type LightCompressedToken = {
3819
3096
  docs: [
3820
3097
  'Authority is verified through proof since both owner and delegate',
3821
3098
  'are included in the token data hash, which is a public input to the',
3822
- 'validity proof.',
3099
+ 'validity proof.'
3823
3100
  ];
3824
3101
  },
3825
3102
  {
@@ -3880,7 +3157,7 @@ type LightCompressedToken = {
3880
3157
  name: 'systemProgram';
3881
3158
  isMut: false;
3882
3159
  isSigner: false;
3883
- },
3160
+ }
3884
3161
  ];
3885
3162
  args: [
3886
3163
  {
@@ -3900,7 +3177,7 @@ type LightCompressedToken = {
3900
3177
  defined: 'CompressedCpiContext';
3901
3178
  };
3902
3179
  };
3903
- },
3180
+ }
3904
3181
  ];
3905
3182
  },
3906
3183
  {
@@ -3913,7 +3190,7 @@ type LightCompressedToken = {
3913
3190
  'accounts specify less lamports than inputs the remaining lamports are',
3914
3191
  'transferred to an output compressed account. Signer must be owner or',
3915
3192
  'delegate. If a delegated token account is transferred the delegate is',
3916
- 'not preserved.',
3193
+ 'not preserved.'
3917
3194
  ];
3918
3195
  accounts: [
3919
3196
  {
@@ -3929,7 +3206,7 @@ type LightCompressedToken = {
3929
3206
  docs: [
3930
3207
  'Authority is verified through proof since both owner and delegate',
3931
3208
  'are included in the token data hash, which is a public input to the',
3932
- 'validity proof.',
3209
+ 'validity proof.'
3933
3210
  ];
3934
3211
  },
3935
3212
  {
@@ -3990,13 +3267,13 @@ type LightCompressedToken = {
3990
3267
  name: 'systemProgram';
3991
3268
  isMut: false;
3992
3269
  isSigner: false;
3993
- },
3270
+ }
3994
3271
  ];
3995
3272
  args: [
3996
3273
  {
3997
3274
  name: 'inputs';
3998
3275
  type: 'bytes';
3999
- },
3276
+ }
4000
3277
  ];
4001
3278
  },
4002
3279
  {
@@ -4007,7 +3284,7 @@ type LightCompressedToken = {
4007
3284
  'be called by a delegate.',
4008
3285
  'The instruction creates two output accounts:',
4009
3286
  '1. one account with delegated amount',
4010
- '2. one account with remaining(change) amount',
3287
+ '2. one account with remaining(change) amount'
4011
3288
  ];
4012
3289
  accounts: [
4013
3290
  {
@@ -4023,7 +3300,7 @@ type LightCompressedToken = {
4023
3300
  docs: [
4024
3301
  'Authority is verified through proof since both owner and delegate',
4025
3302
  'are included in the token data hash, which is a public input to the',
4026
- 'validity proof.',
3303
+ 'validity proof.'
4027
3304
  ];
4028
3305
  },
4029
3306
  {
@@ -4066,20 +3343,20 @@ type LightCompressedToken = {
4066
3343
  name: 'systemProgram';
4067
3344
  isMut: false;
4068
3345
  isSigner: false;
4069
- },
3346
+ }
4070
3347
  ];
4071
3348
  args: [
4072
3349
  {
4073
3350
  name: 'inputs';
4074
3351
  type: 'bytes';
4075
- },
3352
+ }
4076
3353
  ];
4077
3354
  },
4078
3355
  {
4079
3356
  name: 'revoke';
4080
3357
  docs: [
4081
3358
  'Revokes a delegation. The instruction merges all inputs into one output',
4082
- 'account. Cannot be called by a delegate. Delegates are not preserved.',
3359
+ 'account. Cannot be called by a delegate. Delegates are not preserved.'
4083
3360
  ];
4084
3361
  accounts: [
4085
3362
  {
@@ -4095,7 +3372,7 @@ type LightCompressedToken = {
4095
3372
  docs: [
4096
3373
  'Authority is verified through proof since both owner and delegate',
4097
3374
  'are included in the token data hash, which is a public input to the',
4098
- 'validity proof.',
3375
+ 'validity proof.'
4099
3376
  ];
4100
3377
  },
4101
3378
  {
@@ -4138,20 +3415,20 @@ type LightCompressedToken = {
4138
3415
  name: 'systemProgram';
4139
3416
  isMut: false;
4140
3417
  isSigner: false;
4141
- },
3418
+ }
4142
3419
  ];
4143
3420
  args: [
4144
3421
  {
4145
3422
  name: 'inputs';
4146
3423
  type: 'bytes';
4147
- },
3424
+ }
4148
3425
  ];
4149
3426
  },
4150
3427
  {
4151
3428
  name: 'freeze';
4152
3429
  docs: [
4153
3430
  'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
4154
- 'many outputs as inputs. Balances and delegates are preserved.',
3431
+ 'many outputs as inputs. Balances and delegates are preserved.'
4155
3432
  ];
4156
3433
  accounts: [
4157
3434
  {
@@ -4210,20 +3487,20 @@ type LightCompressedToken = {
4210
3487
  name: 'mint';
4211
3488
  isMut: false;
4212
3489
  isSigner: false;
4213
- },
3490
+ }
4214
3491
  ];
4215
3492
  args: [
4216
3493
  {
4217
3494
  name: 'inputs';
4218
3495
  type: 'bytes';
4219
- },
3496
+ }
4220
3497
  ];
4221
3498
  },
4222
3499
  {
4223
3500
  name: 'thaw';
4224
3501
  docs: [
4225
3502
  'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
4226
- 'as many outputs as inputs. Balances and delegates are preserved.',
3503
+ 'as many outputs as inputs. Balances and delegates are preserved.'
4227
3504
  ];
4228
3505
  accounts: [
4229
3506
  {
@@ -4282,13 +3559,13 @@ type LightCompressedToken = {
4282
3559
  name: 'mint';
4283
3560
  isMut: false;
4284
3561
  isSigner: false;
4285
- },
3562
+ }
4286
3563
  ];
4287
3564
  args: [
4288
3565
  {
4289
3566
  name: 'inputs';
4290
3567
  type: 'bytes';
4291
- },
3568
+ }
4292
3569
  ];
4293
3570
  },
4294
3571
  {
@@ -4296,7 +3573,7 @@ type LightCompressedToken = {
4296
3573
  docs: [
4297
3574
  'Burns compressed tokens and spl tokens from the pool account. Delegates',
4298
3575
  'can burn tokens. The output compressed token account remains delegated.',
4299
- 'Creates one output compressed token account.',
3576
+ 'Creates one output compressed token account.'
4300
3577
  ];
4301
3578
  accounts: [
4302
3579
  {
@@ -4312,7 +3589,7 @@ type LightCompressedToken = {
4312
3589
  docs: [
4313
3590
  'Authority is verified through proof since both owner and delegate',
4314
3591
  'are included in the token data hash, which is a public input to the',
4315
- 'validity proof.',
3592
+ 'validity proof.'
4316
3593
  ];
4317
3594
  },
4318
3595
  {
@@ -4369,13 +3646,13 @@ type LightCompressedToken = {
4369
3646
  name: 'systemProgram';
4370
3647
  isMut: false;
4371
3648
  isSigner: false;
4372
- },
3649
+ }
4373
3650
  ];
4374
3651
  args: [
4375
3652
  {
4376
3653
  name: 'inputs';
4377
3654
  type: 'bytes';
4378
- },
3655
+ }
4379
3656
  ];
4380
3657
  },
4381
3658
  {
@@ -4383,7 +3660,7 @@ type LightCompressedToken = {
4383
3660
  docs: [
4384
3661
  'This function is a stub to allow Anchor to include the input types in',
4385
3662
  'the IDL. It should not be included in production builds nor be called in',
4386
- 'practice.',
3663
+ 'practice.'
4387
3664
  ];
4388
3665
  accounts: [
4389
3666
  {
@@ -4399,7 +3676,7 @@ type LightCompressedToken = {
4399
3676
  docs: [
4400
3677
  'Authority is verified through proof since both owner and delegate',
4401
3678
  'are included in the token data hash, which is a public input to the',
4402
- 'validity proof.',
3679
+ 'validity proof.'
4403
3680
  ];
4404
3681
  },
4405
3682
  {
@@ -4460,7 +3737,7 @@ type LightCompressedToken = {
4460
3737
  name: 'systemProgram';
4461
3738
  isMut: false;
4462
3739
  isSigner: false;
4463
- },
3740
+ }
4464
3741
  ];
4465
3742
  args: [
4466
3743
  {
@@ -4474,9 +3751,9 @@ type LightCompressedToken = {
4474
3751
  type: {
4475
3752
  defined: 'TokenData';
4476
3753
  };
4477
- },
3754
+ }
4478
3755
  ];
4479
- },
3756
+ }
4480
3757
  ];
4481
3758
  types: [
4482
3759
  {
@@ -4489,7 +3766,7 @@ type LightCompressedToken = {
4489
3766
  },
4490
3767
  {
4491
3768
  name: 'Frozen';
4492
- },
3769
+ }
4493
3770
  ];
4494
3771
  };
4495
3772
  },
@@ -4521,7 +3798,7 @@ type LightCompressedToken = {
4521
3798
  defined: 'CompressedAccountData';
4522
3799
  };
4523
3800
  };
4524
- },
3801
+ }
4525
3802
  ];
4526
3803
  };
4527
3804
  },
@@ -4545,7 +3822,7 @@ type LightCompressedToken = {
4545
3822
  type: {
4546
3823
  array: ['u8', 32];
4547
3824
  };
4548
- },
3825
+ }
4549
3826
  ];
4550
3827
  };
4551
3828
  },
@@ -4558,7 +3835,7 @@ type LightCompressedToken = {
4558
3835
  name: 'setContext';
4559
3836
  docs: [
4560
3837
  'Is set by the program that is invoking the CPI to signal that is should',
4561
- 'set the cpi context.',
3838
+ 'set the cpi context.'
4562
3839
  ];
4563
3840
  type: 'bool';
4564
3841
  },
@@ -4566,17 +3843,17 @@ type LightCompressedToken = {
4566
3843
  name: 'firstSetContext';
4567
3844
  docs: [
4568
3845
  'Is set to wipe the cpi context since someone could have set it before',
4569
- 'with unrelated data.',
3846
+ 'with unrelated data.'
4570
3847
  ];
4571
3848
  type: 'bool';
4572
3849
  },
4573
3850
  {
4574
3851
  name: 'cpiContextAccountIndex';
4575
3852
  docs: [
4576
- 'Index of cpi context account in remaining accounts.',
3853
+ 'Index of cpi context account in remaining accounts.'
4577
3854
  ];
4578
3855
  type: 'u8';
4579
- },
3856
+ }
4580
3857
  ];
4581
3858
  };
4582
3859
  },
@@ -4602,7 +3879,7 @@ type LightCompressedToken = {
4602
3879
  type: {
4603
3880
  array: ['u8', 32];
4604
3881
  };
4605
- },
3882
+ }
4606
3883
  ];
4607
3884
  };
4608
3885
  },
@@ -4628,7 +3905,7 @@ type LightCompressedToken = {
4628
3905
  docs: [
4629
3906
  'Is required if the signer is delegate,',
4630
3907
  '-> delegate is authority account,',
4631
- 'owner = Some(owner) is the owner of the token account.',
3908
+ 'owner = Some(owner) is the owner of the token account.'
4632
3909
  ];
4633
3910
  type: {
4634
3911
  option: {
@@ -4675,7 +3952,7 @@ type LightCompressedToken = {
4675
3952
  type: {
4676
3953
  option: 'u8';
4677
3954
  };
4678
- },
3955
+ }
4679
3956
  ];
4680
3957
  };
4681
3958
  },
@@ -4715,7 +3992,7 @@ type LightCompressedToken = {
4715
3992
  {
4716
3993
  name: 'outputAccountMerkleTreeIndex';
4717
3994
  type: 'u8';
4718
- },
3995
+ }
4719
3996
  ];
4720
3997
  };
4721
3998
  },
@@ -4773,14 +4050,14 @@ type LightCompressedToken = {
4773
4050
  type: {
4774
4051
  option: 'u64';
4775
4052
  };
4776
- },
4053
+ }
4777
4054
  ];
4778
4055
  };
4779
4056
  },
4780
4057
  {
4781
4058
  name: 'DelegatedTransfer';
4782
4059
  docs: [
4783
- 'Struct to provide the owner when the delegate is signer of the transaction.',
4060
+ 'Struct to provide the owner when the delegate is signer of the transaction.'
4784
4061
  ];
4785
4062
  type: {
4786
4063
  kind: 'struct';
@@ -4795,12 +4072,12 @@ type LightCompressedToken = {
4795
4072
  'Index of change compressed account in output compressed accounts. In',
4796
4073
  "case that the delegate didn't spend the complete delegated compressed",
4797
4074
  'account balance the change compressed account will be delegated to her',
4798
- 'as well.',
4075
+ 'as well.'
4799
4076
  ];
4800
4077
  type: {
4801
4078
  option: 'u8';
4802
4079
  };
4803
- },
4080
+ }
4804
4081
  ];
4805
4082
  };
4806
4083
  },
@@ -4838,12 +4115,12 @@ type LightCompressedToken = {
4838
4115
  {
4839
4116
  name: 'tlv';
4840
4117
  docs: [
4841
- 'Placeholder for TokenExtension tlv data (unimplemented)',
4118
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
4842
4119
  ];
4843
4120
  type: {
4844
4121
  option: 'bytes';
4845
4122
  };
4846
- },
4123
+ }
4847
4124
  ];
4848
4125
  };
4849
4126
  },
@@ -4899,7 +4176,7 @@ type LightCompressedToken = {
4899
4176
  {
4900
4177
  name: 'isCompress';
4901
4178
  type: 'bool';
4902
- },
4179
+ }
4903
4180
  ];
4904
4181
  };
4905
4182
  },
@@ -4963,7 +4240,7 @@ type LightCompressedToken = {
4963
4240
  defined: 'CompressedCpiContext';
4964
4241
  };
4965
4242
  };
4966
- },
4243
+ }
4967
4244
  ];
4968
4245
  };
4969
4246
  },
@@ -4979,7 +4256,7 @@ type LightCompressedToken = {
4979
4256
  {
4980
4257
  name: 'seq';
4981
4258
  type: 'u64';
4982
- },
4259
+ }
4983
4260
  ];
4984
4261
  };
4985
4262
  },
@@ -5005,7 +4282,7 @@ type LightCompressedToken = {
5005
4282
  {
5006
4283
  name: 'addressMerkleTreeRootIndex';
5007
4284
  type: 'u16';
5008
- },
4285
+ }
5009
4286
  ];
5010
4287
  };
5011
4288
  },
@@ -5023,7 +4300,7 @@ type LightCompressedToken = {
5023
4300
  {
5024
4301
  name: 'merkleTreeIndex';
5025
4302
  type: 'u8';
5026
- },
4303
+ }
5027
4304
  ];
5028
4305
  };
5029
4306
  },
@@ -5047,17 +4324,17 @@ type LightCompressedToken = {
5047
4324
  {
5048
4325
  name: 'rootIndex';
5049
4326
  docs: [
5050
- 'Index of root used in inclusion validity proof.',
4327
+ 'Index of root used in inclusion validity proof.'
5051
4328
  ];
5052
4329
  type: 'u16';
5053
4330
  },
5054
4331
  {
5055
4332
  name: 'readOnly';
5056
4333
  docs: [
5057
- 'Placeholder to mark accounts read-only unimplemented set to false.',
4334
+ 'Placeholder to mark accounts read-only unimplemented set to false.'
5058
4335
  ];
5059
4336
  type: 'bool';
5060
- },
4337
+ }
5061
4338
  ];
5062
4339
  };
5063
4340
  },
@@ -5081,7 +4358,7 @@ type LightCompressedToken = {
5081
4358
  {
5082
4359
  name: 'proveByIndex';
5083
4360
  type: 'bool';
5084
- },
4361
+ }
5085
4362
  ];
5086
4363
  };
5087
4364
  },
@@ -5111,12 +4388,12 @@ type LightCompressedToken = {
5111
4388
  {
5112
4389
  name: 'tlv';
5113
4390
  docs: [
5114
- 'Placeholder for TokenExtension tlv data (unimplemented)',
4391
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
5115
4392
  ];
5116
4393
  type: {
5117
4394
  option: 'bytes';
5118
4395
  };
5119
- },
4396
+ }
5120
4397
  ];
5121
4398
  };
5122
4399
  },
@@ -5190,7 +4467,7 @@ type LightCompressedToken = {
5190
4467
  type: {
5191
4468
  option: 'bytes';
5192
4469
  };
5193
- },
4470
+ }
5194
4471
  ];
5195
4472
  };
5196
4473
  },
@@ -5208,7 +4485,7 @@ type LightCompressedToken = {
5208
4485
  name: 'index';
5209
4486
  docs: ['Index of compressed account hash in queue.'];
5210
4487
  type: 'u16';
5211
- },
4488
+ }
5212
4489
  ];
5213
4490
  };
5214
4491
  },
@@ -5236,7 +4513,7 @@ type LightCompressedToken = {
5236
4513
  name: 'delegate';
5237
4514
  docs: [
5238
4515
  'If `delegate` is `Some` then `delegated_amount` represents',
5239
- 'the amount authorized by the delegate',
4516
+ 'the amount authorized by the delegate'
5240
4517
  ];
5241
4518
  type: {
5242
4519
  option: 'publicKey';
@@ -5252,15 +4529,15 @@ type LightCompressedToken = {
5252
4529
  {
5253
4530
  name: 'tlv';
5254
4531
  docs: [
5255
- 'Placeholder for TokenExtension tlv data (unimplemented)',
4532
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
5256
4533
  ];
5257
4534
  type: {
5258
4535
  option: 'bytes';
5259
4536
  };
5260
- },
4537
+ }
5261
4538
  ];
5262
4539
  };
5263
- },
4540
+ }
5264
4541
  ];
5265
4542
  errors: [
5266
4543
  {
@@ -5417,7 +4694,7 @@ type LightCompressedToken = {
5417
4694
  {
5418
4695
  code: 6032;
5419
4696
  name: 'NoMatchingBumpFound';
5420
- },
4697
+ }
5421
4698
  ];
5422
4699
  };
5423
4700
  declare const IDL: LightCompressedToken;
@@ -5428,30 +4705,14 @@ declare const CompressedTokenInstructionDataTransferLayout: Layout<unknown>;
5428
4705
  declare const mintToLayout: Layout<unknown>;
5429
4706
  declare const batchCompressLayout: Layout<unknown>;
5430
4707
  declare const compressSplTokenAccountInstructionDataLayout: Layout<unknown>;
5431
- declare function encodeMintToInstructionData(
5432
- data: MintToInstructionData,
5433
- ): Buffer$1;
5434
- declare function decodeMintToInstructionData(
5435
- buffer: Buffer$1,
5436
- ): MintToInstructionData;
5437
- declare function encodeBatchCompressInstructionData(
5438
- data: BatchCompressInstructionData,
5439
- ): Buffer$1;
5440
- declare function decodeBatchCompressInstructionData(
5441
- buffer: Buffer$1,
5442
- ): BatchCompressInstructionData;
5443
- declare function encodeCompressSplTokenAccountInstructionData(
5444
- data: CompressSplTokenAccountInstructionData,
5445
- ): Buffer$1;
5446
- declare function decodeCompressSplTokenAccountInstructionData(
5447
- buffer: Buffer$1,
5448
- ): CompressSplTokenAccountInstructionData;
5449
- declare function encodeTransferInstructionData(
5450
- data: CompressedTokenInstructionDataTransfer,
5451
- ): Buffer$1;
5452
- declare function decodeTransferInstructionData(
5453
- buffer: Buffer$1,
5454
- ): CompressedTokenInstructionDataTransfer;
4708
+ declare function encodeMintToInstructionData(data: MintToInstructionData): Buffer$1;
4709
+ declare function decodeMintToInstructionData(buffer: Buffer$1): MintToInstructionData;
4710
+ declare function encodeBatchCompressInstructionData(data: BatchCompressInstructionData): Buffer$1;
4711
+ declare function decodeBatchCompressInstructionData(buffer: Buffer$1): BatchCompressInstructionData;
4712
+ declare function encodeCompressSplTokenAccountInstructionData(data: CompressSplTokenAccountInstructionData): Buffer$1;
4713
+ declare function decodeCompressSplTokenAccountInstructionData(buffer: Buffer$1): CompressSplTokenAccountInstructionData;
4714
+ declare function encodeTransferInstructionData(data: CompressedTokenInstructionDataTransfer): Buffer$1;
4715
+ declare function decodeTransferInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataTransfer;
5455
4716
  interface BaseAccountsLayoutParams {
5456
4717
  feePayer: PublicKey;
5457
4718
  authority: PublicKey;
@@ -5493,44 +4754,20 @@ type freezeAccountsLayoutParams = BaseAccountsLayoutParams & {
5493
4754
  mint: PublicKey;
5494
4755
  };
5495
4756
  type thawAccountsLayoutParams = freezeAccountsLayoutParams;
5496
- declare const createTokenPoolAccountsLayout: (
5497
- accounts: createTokenPoolAccountsLayoutParams,
5498
- ) => AccountMeta[];
5499
- declare const addTokenPoolAccountsLayout: (
5500
- accounts: addTokenPoolAccountsLayoutParams,
5501
- ) => AccountMeta[];
5502
- declare const mintToAccountsLayout: (
5503
- accounts: mintToAccountsLayoutParams,
5504
- ) => AccountMeta[];
5505
- declare const transferAccountsLayout: (
5506
- accounts: transferAccountsLayoutParams,
5507
- ) => AccountMeta[];
5508
- declare const approveAccountsLayout: (
5509
- accounts: approveAccountsLayoutParams,
5510
- ) => AccountMeta[];
5511
- declare const revokeAccountsLayout: (
5512
- accounts: approveAccountsLayoutParams,
5513
- ) => AccountMeta[];
5514
- declare const freezeAccountsLayout: (
5515
- accounts: freezeAccountsLayoutParams,
5516
- ) => AccountMeta[];
5517
- declare const thawAccountsLayout: (
5518
- accounts: freezeAccountsLayoutParams,
5519
- ) => AccountMeta[];
4757
+ declare const createTokenPoolAccountsLayout: (accounts: createTokenPoolAccountsLayoutParams) => AccountMeta[];
4758
+ declare const addTokenPoolAccountsLayout: (accounts: addTokenPoolAccountsLayoutParams) => AccountMeta[];
4759
+ declare const mintToAccountsLayout: (accounts: mintToAccountsLayoutParams) => AccountMeta[];
4760
+ declare const transferAccountsLayout: (accounts: transferAccountsLayoutParams) => AccountMeta[];
4761
+ declare const approveAccountsLayout: (accounts: approveAccountsLayoutParams) => AccountMeta[];
4762
+ declare const revokeAccountsLayout: (accounts: approveAccountsLayoutParams) => AccountMeta[];
4763
+ declare const freezeAccountsLayout: (accounts: freezeAccountsLayoutParams) => AccountMeta[];
4764
+ declare const thawAccountsLayout: (accounts: freezeAccountsLayoutParams) => AccountMeta[];
5520
4765
  declare const CompressedTokenInstructionDataApproveLayout: Layout<unknown>;
5521
4766
  declare const CompressedTokenInstructionDataRevokeLayout: Layout<unknown>;
5522
- declare function encodeApproveInstructionData(
5523
- data: CompressedTokenInstructionDataApprove,
5524
- ): Buffer$1;
5525
- declare function decodeApproveInstructionData(
5526
- buffer: Buffer$1,
5527
- ): CompressedTokenInstructionDataApprove;
5528
- declare function encodeRevokeInstructionData(
5529
- data: CompressedTokenInstructionDataRevoke,
5530
- ): Buffer$1;
5531
- declare function decodeRevokeInstructionData(
5532
- buffer: Buffer$1,
5533
- ): CompressedTokenInstructionDataRevoke;
4767
+ declare function encodeApproveInstructionData(data: CompressedTokenInstructionDataApprove): Buffer$1;
4768
+ declare function decodeApproveInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataApprove;
4769
+ declare function encodeRevokeInstructionData(data: CompressedTokenInstructionDataRevoke): Buffer$1;
4770
+ declare function decodeRevokeInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataRevoke;
5534
4771
 
5535
4772
  type CompressParams = {
5536
4773
  /**
@@ -5624,11 +4861,7 @@ type DecompressParams = {
5624
4861
  /**
5625
4862
  * Token pool(s)
5626
4863
  */
5627
- tokenPoolInfos:
5628
- | TokenPoolInfo
5629
- | TokenPoolInfo[]
5630
- | SplInterfaceInfo
5631
- | SplInterfaceInfo[];
4864
+ tokenPoolInfos: TokenPoolInfo | TokenPoolInfo[] | SplInterfaceInfo | SplInterfaceInfo[];
5632
4865
  };
5633
4866
  type TransferParams = {
5634
4867
  /**
@@ -5913,17 +5146,12 @@ declare const validateSameTokenOwner: (accounts: ParsedTokenAccount[]) => void;
5913
5146
  /**
5914
5147
  * Parse compressed token accounts to get the mint, current owner and delegate.
5915
5148
  */
5916
- declare const parseTokenData: (
5917
- compressedTokenAccounts: ParsedTokenAccount[],
5918
- ) => {
5149
+ declare const parseTokenData: (compressedTokenAccounts: ParsedTokenAccount[]) => {
5919
5150
  mint: PublicKey;
5920
5151
  currentOwner: PublicKey;
5921
5152
  delegate: PublicKey | null;
5922
5153
  };
5923
- declare const parseMaybeDelegatedTransfer: (
5924
- inputs: ParsedTokenAccount[],
5925
- outputs: TokenTransferOutputData[],
5926
- ) => {
5154
+ declare const parseMaybeDelegatedTransfer: (inputs: ParsedTokenAccount[], outputs: TokenTransferOutputData[]) => {
5927
5155
  delegatedTransfer: DelegatedTransfer | null;
5928
5156
  authority: PublicKey;
5929
5157
  };
@@ -5935,11 +5163,7 @@ declare const parseMaybeDelegatedTransfer: (
5935
5163
  * @returns Output token data for the transfer
5936
5164
  * instruction
5937
5165
  */
5938
- declare function createTransferOutputState(
5939
- inputCompressedTokenAccounts: ParsedTokenAccount[],
5940
- toAddress: PublicKey,
5941
- amount: number | BN,
5942
- ): TokenTransferOutputData[];
5166
+ declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: number | BN): TokenTransferOutputData[];
5943
5167
  /**
5944
5168
  * Create the output state for a compress transaction.
5945
5169
  * @param inputCompressedTokenAccounts Input state
@@ -5947,10 +5171,7 @@ declare function createTransferOutputState(
5947
5171
  * @returns Output token data for the compress
5948
5172
  * instruction
5949
5173
  */
5950
- declare function createDecompressOutputState(
5951
- inputCompressedTokenAccounts: ParsedTokenAccount[],
5952
- amount: number | BN,
5953
- ): TokenTransferOutputData[];
5174
+ declare function createDecompressOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], amount: number | BN): TokenTransferOutputData[];
5954
5175
  declare class CompressedTokenProgram {
5955
5176
  /**
5956
5177
  * @internal
@@ -5988,17 +5209,11 @@ declare class CompressedTokenProgram {
5988
5209
  *
5989
5210
  * @returns The index and bump number.
5990
5211
  */
5991
- static findSplInterfaceIndexAndBump(
5992
- poolPda: PublicKey,
5993
- mint: PublicKey,
5994
- ): [number, number];
5212
+ static findSplInterfaceIndexAndBump(poolPda: PublicKey, mint: PublicKey): [number, number];
5995
5213
  /**
5996
5214
  * @deprecated Use {@link findSplInterfaceIndexAndBump} instead.
5997
5215
  */
5998
- static findTokenPoolIndexAndBump(
5999
- poolPda: PublicKey,
6000
- mint: PublicKey,
6001
- ): [number, number];
5216
+ static findTokenPoolIndexAndBump(poolPda: PublicKey, mint: PublicKey): [number, number];
6002
5217
  /**
6003
5218
  * Derive the SPL interface PDA with index.
6004
5219
  *
@@ -6008,17 +5223,11 @@ declare class CompressedTokenProgram {
6008
5223
  *
6009
5224
  * @returns The SPL interface PDA and bump.
6010
5225
  */
6011
- static deriveSplInterfacePdaWithIndex(
6012
- mint: PublicKey,
6013
- index: number,
6014
- ): [PublicKey, number];
5226
+ static deriveSplInterfacePdaWithIndex(mint: PublicKey, index: number): [PublicKey, number];
6015
5227
  /**
6016
5228
  * @deprecated Use {@link deriveSplInterfacePdaWithIndex} instead.
6017
5229
  */
6018
- static deriveTokenPoolPdaWithIndex(
6019
- mint: PublicKey,
6020
- index: number,
6021
- ): [PublicKey, number];
5230
+ static deriveTokenPoolPdaWithIndex(mint: PublicKey, index: number): [PublicKey, number];
6022
5231
  /** @internal */
6023
5232
  static get deriveCpiAuthorityPda(): PublicKey;
6024
5233
  /**
@@ -6039,16 +5248,7 @@ declare class CompressedTokenProgram {
6039
5248
  * Note that `createSplInterfaceInstruction` must be executed after
6040
5249
  * `initializeMintInstruction`.
6041
5250
  */
6042
- static createMint({
6043
- feePayer,
6044
- mint,
6045
- authority,
6046
- freezeAuthority,
6047
- decimals,
6048
- rentExemptBalance,
6049
- tokenProgramId,
6050
- mintSize,
6051
- }: CreateMintParams): Promise<TransactionInstruction[]>;
5251
+ static createMint({ feePayer, mint, authority, freezeAuthority, decimals, rentExemptBalance, tokenProgramId, mintSize, }: CreateMintParams): Promise<TransactionInstruction[]>;
6052
5252
  /**
6053
5253
  * Create SPL interface (omnibus account) for an existing SPL mint.
6054
5254
  * For new mints, use `CompressedTokenProgram.createMint`.
@@ -6060,17 +5260,11 @@ declare class CompressedTokenProgram {
6060
5260
  *
6061
5261
  * @returns The createSplInterface instruction
6062
5262
  */
6063
- static createSplInterface({
6064
- feePayer,
6065
- mint,
6066
- tokenProgramId,
6067
- }: CreateSplInterfaceParams): Promise<TransactionInstruction>;
5263
+ static createSplInterface({ feePayer, mint, tokenProgramId, }: CreateSplInterfaceParams): Promise<TransactionInstruction>;
6068
5264
  /**
6069
5265
  * @deprecated Use {@link createSplInterface} instead.
6070
5266
  */
6071
- static createTokenPool(
6072
- params: CreateSplInterfaceParams,
6073
- ): Promise<TransactionInstruction>;
5267
+ static createTokenPool(params: CreateSplInterfaceParams): Promise<TransactionInstruction>;
6074
5268
  /**
6075
5269
  * Add a token pool to an existing SPL mint. For new mints, use
6076
5270
  * {@link createSplInterface}.
@@ -6083,12 +5277,7 @@ declare class CompressedTokenProgram {
6083
5277
  *
6084
5278
  * @returns The addTokenPool instruction
6085
5279
  */
6086
- static addTokenPool({
6087
- feePayer,
6088
- mint,
6089
- poolIndex,
6090
- tokenProgramId,
6091
- }: AddSplInterfaceParams): Promise<TransactionInstruction>;
5280
+ static addTokenPool({ feePayer, mint, poolIndex, tokenProgramId, }: AddSplInterfaceParams): Promise<TransactionInstruction>;
6092
5281
  /**
6093
5282
  * Construct mintTo instruction for compressed tokens
6094
5283
  *
@@ -6102,15 +5291,7 @@ declare class CompressedTokenProgram {
6102
5291
  *
6103
5292
  * @returns The mintTo instruction
6104
5293
  */
6105
- static mintTo({
6106
- feePayer,
6107
- mint,
6108
- authority,
6109
- toPubkey,
6110
- amount,
6111
- outputStateTreeInfo,
6112
- tokenPoolInfo,
6113
- }: MintToParams): Promise<TransactionInstruction>;
5294
+ static mintTo({ feePayer, mint, authority, toPubkey, amount, outputStateTreeInfo, tokenPoolInfo, }: MintToParams): Promise<TransactionInstruction>;
6114
5295
  /**
6115
5296
  * Mint tokens from registered SPL mint account to a compressed account
6116
5297
  *
@@ -6126,16 +5307,7 @@ declare class CompressedTokenProgram {
6126
5307
  *
6127
5308
  * @returns The mintTo instruction
6128
5309
  */
6129
- static approveAndMintTo({
6130
- feePayer,
6131
- mint,
6132
- authority,
6133
- authorityTokenAccount,
6134
- toPubkey,
6135
- amount,
6136
- outputStateTreeInfo,
6137
- tokenPoolInfo,
6138
- }: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
5310
+ static approveAndMintTo({ feePayer, mint, authority, authorityTokenAccount, toPubkey, amount, outputStateTreeInfo, tokenPoolInfo, }: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
6139
5311
  /**
6140
5312
  * Construct transfer instruction for compressed tokens.
6141
5313
  *
@@ -6150,14 +5322,7 @@ declare class CompressedTokenProgram {
6150
5322
  *
6151
5323
  * @returns The transfer instruction
6152
5324
  */
6153
- static transfer({
6154
- payer,
6155
- inputCompressedTokenAccounts,
6156
- toAddress,
6157
- amount,
6158
- recentValidityProof,
6159
- recentInputStateRootIndices,
6160
- }: TransferParams): Promise<TransactionInstruction>;
5325
+ static transfer({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, }: TransferParams): Promise<TransactionInstruction>;
6161
5326
  /**
6162
5327
  * Create lookup table instructions for the token program's default
6163
5328
  * accounts.
@@ -6170,13 +5335,7 @@ declare class CompressedTokenProgram {
6170
5335
  *
6171
5336
  * @returns [createInstruction, extendInstruction, option(extendInstruction2)]
6172
5337
  */
6173
- static createTokenProgramLookupTable({
6174
- payer,
6175
- authority,
6176
- mints,
6177
- recentSlot,
6178
- remainingAccounts,
6179
- }: CreateTokenProgramLookupTableParams): Promise<{
5338
+ static createTokenProgramLookupTable({ payer, authority, mints, recentSlot, remainingAccounts, }: CreateTokenProgramLookupTableParams): Promise<{
6180
5339
  instructions: TransactionInstruction[];
6181
5340
  address: PublicKey;
6182
5341
  }>;
@@ -6194,16 +5353,7 @@ declare class CompressedTokenProgram {
6194
5353
  *
6195
5354
  * @returns The compress instruction
6196
5355
  */
6197
- static compress({
6198
- payer,
6199
- owner,
6200
- source,
6201
- toAddress,
6202
- amount,
6203
- mint,
6204
- outputStateTreeInfo,
6205
- tokenPoolInfo,
6206
- }: CompressParams): Promise<TransactionInstruction>;
5356
+ static compress({ payer, owner, source, toAddress, amount, mint, outputStateTreeInfo, tokenPoolInfo, }: CompressParams): Promise<TransactionInstruction>;
6207
5357
  /**
6208
5358
  * Construct decompress instruction
6209
5359
  *
@@ -6218,15 +5368,7 @@ declare class CompressedTokenProgram {
6218
5368
  *
6219
5369
  * @returns The decompress instruction
6220
5370
  */
6221
- static decompress({
6222
- payer,
6223
- inputCompressedTokenAccounts,
6224
- toAddress,
6225
- amount,
6226
- recentValidityProof,
6227
- recentInputStateRootIndices,
6228
- tokenPoolInfos,
6229
- }: DecompressParams): Promise<TransactionInstruction>;
5371
+ static decompress({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, tokenPoolInfos, }: DecompressParams): Promise<TransactionInstruction>;
6230
5372
  /**
6231
5373
  * Create `mergeTokenAccounts` instruction.
6232
5374
  *
@@ -6239,14 +5381,7 @@ declare class CompressedTokenProgram {
6239
5381
  * @param recentInputStateRootIndices Recent state root indices.
6240
5382
  * @returns instruction
6241
5383
  */
6242
- static mergeTokenAccounts({
6243
- payer,
6244
- owner,
6245
- inputCompressedTokenAccounts,
6246
- mint,
6247
- recentValidityProof,
6248
- recentInputStateRootIndices,
6249
- }: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
5384
+ static mergeTokenAccounts({ payer, owner, inputCompressedTokenAccounts, mint, recentValidityProof, recentInputStateRootIndices, }: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
6250
5385
  /**
6251
5386
  * Create `compressSplTokenAccount` instruction
6252
5387
  *
@@ -6260,15 +5395,7 @@ declare class CompressedTokenProgram {
6260
5395
  *
6261
5396
  * @returns instruction
6262
5397
  */
6263
- static compressSplTokenAccount({
6264
- feePayer,
6265
- authority,
6266
- tokenAccount,
6267
- mint,
6268
- remainingAmount,
6269
- outputStateTreeInfo,
6270
- tokenPoolInfo,
6271
- }: CompressSplTokenAccountParams): Promise<TransactionInstruction>;
5398
+ static compressSplTokenAccount({ feePayer, authority, tokenAccount, mint, remainingAmount, outputStateTreeInfo, tokenPoolInfo, }: CompressSplTokenAccountParams): Promise<TransactionInstruction>;
6272
5399
  /**
6273
5400
  * Get the program ID for a mint
6274
5401
  *
@@ -6277,10 +5404,7 @@ declare class CompressedTokenProgram {
6277
5404
  *
6278
5405
  * @returns program ID
6279
5406
  */
6280
- static getMintProgramId(
6281
- mint: PublicKey,
6282
- connection: Connection,
6283
- ): Promise<PublicKey | undefined>;
5407
+ static getMintProgramId(mint: PublicKey, connection: Connection): Promise<PublicKey | undefined>;
6284
5408
  /**
6285
5409
  * Create `approve` instruction to delegate compressed tokens.
6286
5410
  *
@@ -6293,14 +5417,7 @@ declare class CompressedTokenProgram {
6293
5417
  *
6294
5418
  * @returns instruction
6295
5419
  */
6296
- static approve({
6297
- payer,
6298
- inputCompressedTokenAccounts,
6299
- toAddress,
6300
- amount,
6301
- recentValidityProof,
6302
- recentInputStateRootIndices,
6303
- }: ApproveParams): Promise<TransactionInstruction>;
5420
+ static approve({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, }: ApproveParams): Promise<TransactionInstruction>;
6304
5421
  /**
6305
5422
  * Create `revoke` instruction to revoke delegation of compressed tokens.
6306
5423
  *
@@ -6311,18 +5428,13 @@ declare class CompressedTokenProgram {
6311
5428
  *
6312
5429
  * @returns instruction
6313
5430
  */
6314
- static revoke({
6315
- payer,
6316
- inputCompressedTokenAccounts,
6317
- recentValidityProof,
6318
- recentInputStateRootIndices,
6319
- }: RevokeParams): Promise<TransactionInstruction>;
5431
+ static revoke({ payer, inputCompressedTokenAccounts, recentValidityProof, recentInputStateRootIndices, }: RevokeParams): Promise<TransactionInstruction>;
6320
5432
  }
6321
5433
 
6322
5434
  /**
6323
5435
  * Exports for @lightprotocol/compressed-token/unified
6324
5436
  *
6325
- * Import from `/unified` to get a single unified ATA for SPL/T22 and c-token
5437
+ * Import from `/unified` to get a single unified associated token account for SPL/T22 and light-token
6326
5438
  * mints.
6327
5439
  */
6328
5440
 
@@ -6337,36 +5449,23 @@ declare class CompressedTokenProgram {
6337
5449
  * @param programId Optional program ID (omit for unified behavior)
6338
5450
  * @returns AccountInterface with aggregated balance from all sources
6339
5451
  */
6340
- declare function getAtaInterface(
6341
- rpc: Rpc,
6342
- ata: PublicKey,
6343
- owner: PublicKey,
6344
- mint: PublicKey,
6345
- commitment?: Commitment,
6346
- programId?: PublicKey,
6347
- ): Promise<AccountInterface>;
5452
+ declare function getAtaInterface(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<AccountInterface>;
6348
5453
  /**
6349
- * Derive the canonical token ATA for SPL/T22/c-token in the unified path.
5454
+ * Derive the canonical token associated token account for SPL/T22/light-token in the unified path.
6350
5455
  *
6351
5456
  * Enforces LIGHT_TOKEN_PROGRAM_ID.
6352
5457
  *
6353
5458
  * @param mint Mint public key
6354
5459
  * @param owner Owner public key
6355
5460
  * @param allowOwnerOffCurve Allow owner to be a PDA. Default false.
6356
- * @param programId Token program ID. Default c-token.
5461
+ * @param programId Token program ID. Default light-token.
6357
5462
  * @param associatedTokenProgramId Associated token program ID. Default
6358
5463
  * auto-detected.
6359
5464
  * @returns Associated token address.
6360
5465
  */
6361
- declare function getAssociatedTokenAddressInterface(
6362
- mint: PublicKey,
6363
- owner: PublicKey,
6364
- allowOwnerOffCurve?: boolean,
6365
- programId?: PublicKey,
6366
- associatedTokenProgramId?: PublicKey,
6367
- ): PublicKey;
5466
+ declare function getAssociatedTokenAddressInterface(mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, programId?: PublicKey, associatedTokenProgramId?: PublicKey): PublicKey;
6368
5467
  /**
6369
- * Create instruction batches for loading ALL token balances into a c-token ATA.
5468
+ * Create instruction batches for loading ALL token balances into a light-token associated token account.
6370
5469
  *
6371
5470
  * @param rpc RPC connection
6372
5471
  * @param ata Associated token address
@@ -6376,23 +5475,16 @@ declare function getAssociatedTokenAddressInterface(
6376
5475
  * @param options Optional interface options
6377
5476
  * @returns Instruction batches - each inner array is one transaction
6378
5477
  */
6379
- declare function createLoadAtaInstructions(
6380
- rpc: Rpc,
6381
- ata: PublicKey,
6382
- owner: PublicKey,
6383
- mint: PublicKey,
6384
- payer?: PublicKey,
6385
- options?: InterfaceOptions,
6386
- ): Promise<TransactionInstruction[][]>;
5478
+ declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, payer?: PublicKey, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
6387
5479
  /**
6388
- * Load all token balances into the c-token ATA.
5480
+ * Load all token balances into the light-token associated token account.
6389
5481
  *
6390
- * Wraps SPL/Token-2022 balances and decompresses compressed c-tokens
6391
- * into the on-chain c-token ATA. If no balances exist and the ATA doesn't
5482
+ * Wraps SPL/Token-2022 balances and decompresses compressed light-tokens
5483
+ * into the on-chain light-token associated token account. If no balances exist and the associated token account doesn't
6392
5484
  * exist, creates an empty ATA (idempotent).
6393
5485
  *
6394
5486
  * @param rpc RPC connection
6395
- * @param ata Associated token address (c-token)
5487
+ * @param ata Associated token address (light-token)
6396
5488
  * @param owner Owner of the tokens (signer)
6397
5489
  * @param mint Mint public key
6398
5490
  * @param payer Fee payer (signer, defaults to owner)
@@ -6400,55 +5492,45 @@ declare function createLoadAtaInstructions(
6400
5492
  * @param interfaceOptions Optional interface options
6401
5493
  * @returns Transaction signature, or null if ATA exists and nothing to load
6402
5494
  */
6403
- declare function loadAta(
6404
- rpc: Rpc,
6405
- ata: PublicKey,
6406
- owner: Signer,
6407
- mint: PublicKey,
6408
- payer?: Signer,
6409
- confirmOptions?: ConfirmOptions,
6410
- interfaceOptions?: InterfaceOptions,
6411
- ): Promise<string | null>;
5495
+ declare function loadAta(rpc: Rpc, ata: PublicKey, owner: Signer, mint: PublicKey, payer?: Signer, confirmOptions?: ConfirmOptions, interfaceOptions?: InterfaceOptions, decimals?: number): Promise<string | null>;
6412
5496
  /**
6413
5497
  * Transfer tokens using the unified ata interface.
6414
5498
  *
6415
- * Destination ATA must exist. Automatically wraps SPL/T22 to c-token ATA.
5499
+ * Destination ATA is derived from `recipient` and created idempotently.
5500
+ * Automatically wraps SPL/T22 to light-token associated token account.
6416
5501
  *
6417
5502
  * @param rpc RPC connection
6418
5503
  * @param payer Fee payer (signer)
6419
- * @param source Source c-token ATA address
5504
+ * @param source Source light-token associated token account address
6420
5505
  * @param mint Mint address
6421
- * @param destination Destination c-token ATA address (must exist)
6422
- * @param owner Source owner (signer)
5506
+ * @param recipient Destination owner wallet address
5507
+ * @param owner Source account owner pubkey
5508
+ * @param authority Signing authority (owner or approved delegate)
6423
5509
  * @param amount Amount to transfer
6424
5510
  * @param confirmOptions Optional confirm options
6425
5511
  * @param options Optional interface options
6426
5512
  * @returns Transaction signature
6427
5513
  */
6428
- declare function transferInterface(
6429
- rpc: Rpc,
6430
- payer: Signer,
6431
- source: PublicKey,
6432
- mint: PublicKey,
6433
- destination: PublicKey,
6434
- owner: Signer,
6435
- amount: number | bigint | BN,
6436
- confirmOptions?: ConfirmOptions,
6437
- options?: InterfaceOptions,
6438
- ): Promise<string>;
5514
+ declare function transferInterface(rpc: Rpc, payer: Signer, source: PublicKey, mint: PublicKey, recipient: PublicKey, owner: PublicKey, authority: Signer, amount: number | bigint | BN, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, decimals?: number): Promise<string>;
5515
+ /**
5516
+ * Transfer tokens to an explicit destination token account.
5517
+ *
5518
+ * Use this for advanced routing to non-ATA destinations.
5519
+ */
5520
+ declare function transferToAccountInterface(rpc: Rpc, payer: Signer, source: PublicKey, mint: PublicKey, destination: PublicKey, owner: PublicKey, authority: Signer, amount: number | bigint | BN, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, decimals?: number): Promise<string>;
6439
5521
  /**
6440
- * Get or create c-token ATA with unified balance detection and auto-loading.
5522
+ * Get or create light-token ATA with unified balance detection and auto-loading.
6441
5523
  *
6442
5524
  * Enforces LIGHT_TOKEN_PROGRAM_ID. Aggregates balances from:
6443
- * - c-token hot (on-chain) account
6444
- * - c-token cold (compressed) accounts
5525
+ * - light-token associated token account (hot balance)
5526
+ * - compressed light-token accounts (cold balance)
6445
5527
  * - SPL token accounts (for unified wrapping)
6446
5528
  * - Token-2022 accounts (for unified wrapping)
6447
5529
  *
6448
5530
  * When owner is a Signer:
6449
5531
  * - Creates hot ATA if it doesn't exist
6450
5532
  * - Loads cold (compressed) tokens into hot ATA
6451
- * - Wraps SPL/T22 tokens into c-token ATA
5533
+ * - Wraps SPL/T22 tokens into light-token associated token account
6452
5534
  * - Returns account with all tokens ready to use
6453
5535
  *
6454
5536
  * When owner is a PublicKey:
@@ -6464,46 +5546,38 @@ declare function transferInterface(
6464
5546
  * @param confirmOptions Optional confirm options
6465
5547
  * @returns AccountInterface with unified balance and source breakdown
6466
5548
  */
6467
- declare function getOrCreateAtaInterface(
6468
- rpc: Rpc,
6469
- payer: Signer,
6470
- mint: PublicKey,
6471
- owner: PublicKey | Signer,
6472
- allowOwnerOffCurve?: boolean,
6473
- commitment?: Commitment,
6474
- confirmOptions?: ConfirmOptions,
6475
- ): Promise<AccountInterface>;
5549
+ declare function getOrCreateAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey | Signer, allowOwnerOffCurve?: boolean, commitment?: Commitment, confirmOptions?: ConfirmOptions): Promise<AccountInterface>;
6476
5550
  /**
6477
5551
  * Create transfer instructions for a unified token transfer.
6478
5552
  *
6479
- * Unified variant: always wraps SPL/T22 to c-token ATA.
5553
+ * Unified variant: always wraps SPL/T22 to light-token associated token account.
5554
+ * Recipient must be an on-curve wallet address. For PDA/off-curve owners,
5555
+ * use createTransferToAccountInterfaceInstructions with an explicit destination ATA.
6480
5556
  *
6481
5557
  * Returns `TransactionInstruction[][]`. Send [0..n-2] in parallel, then [n-1].
6482
5558
  * Use `sliceLast` to separate the parallel prefix from the final transfer.
6483
5559
  *
6484
5560
  * @see createTransferInterfaceInstructions in v3/actions/transfer-interface.ts
6485
5561
  */
6486
- declare function createTransferInterfaceInstructions(
6487
- rpc: Rpc,
6488
- payer: PublicKey,
6489
- mint: PublicKey,
6490
- amount: number | bigint | BN,
6491
- sender: PublicKey,
6492
- recipient: PublicKey,
6493
- options?: Omit<TransferOptions, 'wrap'>,
6494
- ): Promise<TransactionInstruction[][]>;
5562
+ declare function createTransferInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, amount: number | bigint | BN, owner: PublicKey, recipient: PublicKey, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
5563
+ /**
5564
+ * Create transfer instructions that route to an explicit destination token
5565
+ * account.
5566
+ */
5567
+ declare function createTransferToAccountInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, amount: number | bigint | BN, owner: PublicKey, destination: PublicKey, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
6495
5568
  /**
6496
- * Build instruction batches for unwrapping c-tokens to SPL/T22.
5569
+ * Build instruction batches for unwrapping light-tokens to SPL/T22.
6497
5570
  *
6498
- * Unified variant: uses wrap=true for loading, so SPL/T22 balances are
6499
- * consolidated before unwrapping.
5571
+ * Load batches (cold -> hot) come first if needed; unwrap is bundled into the
5572
+ * final batch.
5573
+ * SPL/T22 balances are not consolidated; only light ATA (hot + cold) is unwrapped.
6500
5574
  *
6501
- * Returns `TransactionInstruction[][]`. Load batches (if any) come first,
6502
- * followed by one final unwrap transaction.
5575
+ * Returns `TransactionInstruction[][]`. Load-only batches (if any) come first;
5576
+ * the last batch contains unwrap.
6503
5577
  *
6504
5578
  * @param rpc RPC connection
6505
5579
  * @param destination Destination SPL/T22 token account (must exist)
6506
- * @param owner Owner of the c-token
5580
+ * @param owner Owner of the light-token
6507
5581
  * @param mint Mint address
6508
5582
  * @param amount Amount to unwrap (defaults to full balance)
6509
5583
  * @param payer Fee payer (defaults to owner)
@@ -6511,278 +5585,82 @@ declare function createTransferInterfaceInstructions(
6511
5585
  * @param interfaceOptions Optional: interface options for load
6512
5586
  * @returns Instruction batches - each inner array is one transaction
6513
5587
  */
6514
- declare function createUnwrapInstructions(
6515
- rpc: Rpc,
6516
- destination: PublicKey,
6517
- owner: PublicKey,
6518
- mint: PublicKey,
6519
- amount?: number | bigint | BN,
6520
- payer?: PublicKey,
6521
- splInterfaceInfo?: SplInterfaceInfo,
6522
- interfaceOptions?: InterfaceOptions,
6523
- ): Promise<TransactionInstruction[][]>;
5588
+ declare function createUnwrapInstructions(rpc: Rpc, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount?: number | bigint | BN, payer?: PublicKey, splInterfaceInfo?: SplInterfaceInfo, interfaceOptions?: InterfaceOptions): Promise<TransactionInstruction[][]>;
6524
5589
  /**
6525
- * Unwrap c-tokens to SPL tokens.
5590
+ * Unwrap light-tokens to SPL tokens.
6526
5591
  *
6527
- * Unified variant: loads all cold + SPL/T22 balances to c-token ATA first,
6528
- * then unwraps to the destination SPL/T22 account.
5592
+ * Loads cold into hot if needed, then unwraps from light ATA to destination SPL/T22.
5593
+ * SPL/T22 balances are not consolidated; only light ATA balance is unwrapped.
6529
5594
  *
6530
5595
  * @param rpc RPC connection
6531
5596
  * @param payer Fee payer
6532
5597
  * @param destination Destination SPL/T22 token account
6533
- * @param owner Owner of the c-token (signer)
5598
+ * @param owner Owner of the light-token (signer)
6534
5599
  * @param mint Mint address
6535
5600
  * @param amount Amount to unwrap (defaults to all)
6536
5601
  * @param splInterfaceInfo SPL interface info
6537
5602
  * @param confirmOptions Confirm options
6538
5603
  * @returns Transaction signature of the unwrap transaction
6539
5604
  */
6540
- declare function unwrap(
6541
- rpc: Rpc,
6542
- payer: Signer,
6543
- destination: PublicKey,
6544
- owner: Signer,
6545
- mint: PublicKey,
6546
- amount?: number | bigint | BN,
6547
- splInterfaceInfo?: SplInterfaceInfo,
6548
- confirmOptions?: ConfirmOptions,
6549
- ): Promise<string>;
6550
-
6551
- export {
6552
- ADD_TOKEN_POOL_DISCRIMINATOR,
6553
- APPROVE_DISCRIMINATOR,
6554
- type AccountInterface,
6555
- Action,
6556
- type AddSplInterfaceParams,
6557
- type AddTokenPoolParams,
6558
- type ApproveAndMintToParams,
6559
- type ApproveParams,
6560
- BASE_RENT_PER_EPOCH,
6561
- BATCH_COMPRESS_DISCRIMINATOR,
6562
- type BaseMint,
6563
- type BatchCompressInstructionData,
6564
- COMPRESSED_MINT_SEED,
6565
- COMPRESSIBLE_CTOKEN_ACCOUNT_SIZE,
6566
- COMPRESSIBLE_CTOKEN_RENT_PER_EPOCH,
6567
- COMPRESSION_COST,
6568
- COMPRESSION_INCENTIVE,
6569
- COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR,
6570
- CPI_AUTHORITY_SEED,
6571
- CREATE_TOKEN_POOL_DISCRIMINATOR,
6572
- type CTokenConfig,
6573
- type CompressParams,
6574
- type CompressSplTokenAccountInstructionData,
6575
- type CompressSplTokenAccountParams,
6576
- type CompressedMint,
6577
- type CompressedTokenInstructionDataApprove,
6578
- CompressedTokenInstructionDataApproveLayout,
6579
- type CompressedTokenInstructionDataRevoke,
6580
- CompressedTokenInstructionDataRevokeLayout,
6581
- type CompressedTokenInstructionDataTransfer,
6582
- CompressedTokenInstructionDataTransferLayout,
6583
- CompressedTokenProgram,
6584
- type CompressibleAccountInput,
6585
- type CompressibleConfig,
6586
- type CompressibleLoadParams,
6587
- CpiContextLayout,
6588
- type CreateAssociatedCTokenAccountParams,
6589
- type CreateMintParams,
6590
- type CreateSplInterfaceParams,
6591
- type CreateTokenPoolParams,
6592
- type CreateTokenProgramLookupTableParams,
6593
- DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR,
6594
- DEFAULT_COMPRESSIBLE_CONFIG,
6595
- DEFAULT_PREPAY_EPOCHS,
6596
- DEFAULT_WRITE_TOP_UP,
6597
- type DecompressParams,
6598
- type DelegatedTransfer,
6599
- DelegatedTransferLayout,
6600
- ERROR_MIXED_TREE_TYPES,
6601
- ERROR_NO_ACCOUNTS_FOUND,
6602
- ExtensionType,
6603
- IDL,
6604
- type InputTokenDataWithContext,
6605
- type InterfaceOptions,
6606
- LIGHT_TOKEN_CONFIG,
6607
- LIGHT_TOKEN_RENT_SPONSOR,
6608
- type LightCompressedToken,
6609
- type LoadResult,
6610
- MAX_TOP_UP,
6611
- MINT_TO_DISCRIMINATOR,
6612
- type MergeTokenAccountsParams,
6613
- type MintContext,
6614
- type MintExtension,
6615
- type MintInterface,
6616
- type MintToInstructionData,
6617
- type MintToParams,
6618
- type OffChainTokenMetadata,
6619
- type OffChainTokenMetadataJson,
6620
- POOL_SEED,
6621
- type PackCompressedTokenAccountsParams,
6622
- type PackedCompressedAccount,
6623
- type PackedTokenTransferOutputData,
6624
- type ParsedAccountInfoInterface,
6625
- RENT_PER_BYTE_PER_EPOCH,
6626
- REVOKE_DISCRIMINATOR,
6627
- type RevokeParams,
6628
- SLOTS_PER_RENT_EPOCH,
6629
- SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE,
6630
- type SelectInputAccountsOptions,
6631
- type SelectedAccountsResult,
6632
- type SplInterfaceActivity,
6633
- type SplInterfaceInfo,
6634
- TOTAL_COMPRESSION_COST,
6635
- TRANSFER_DISCRIMINATOR,
6636
- type TokenAccountSource,
6637
- type TokenData,
6638
- TokenDataVersion,
6639
- type TokenMetadata,
6640
- type TokenMetadataInstructionData,
6641
- type TokenPoolActivity,
6642
- type TokenPoolInfo,
6643
- type TokenTransferOutputData,
6644
- type TransferOptions,
6645
- type TransferParams,
6646
- addSplInterfaces,
6647
- addTokenPoolAccountsLayout,
6648
- type addTokenPoolAccountsLayoutParams,
6649
- addTokenPools,
6650
- approve,
6651
- approveAccountsLayout,
6652
- type approveAccountsLayoutParams,
6653
- approveAndMintTo,
6654
- batchCompressLayout,
6655
- calculateCompressibleLoadComputeUnits,
6656
- calculateFeePayerCostAtCreation,
6657
- checkMint,
6658
- checkSplInterfaceInfo,
6659
- checkTokenPoolInfo,
6660
- compress,
6661
- compressSplTokenAccount,
6662
- compressSplTokenAccountInstructionDataLayout,
6663
- convertTokenDataToAccount,
6664
- createAssociatedCTokenAccountIdempotentInstruction,
6665
- createAssociatedCTokenAccountInstruction,
6666
- createAssociatedTokenAccountInterfaceIdempotentInstruction,
6667
- createAssociatedTokenAccountInterfaceInstruction,
6668
- createAtaInterface,
6669
- createAtaInterfaceIdempotent,
6670
- createAtaInterfaceIdempotentInstruction,
6671
- createDecompressInterfaceInstruction,
6672
- createDecompressOutputState,
6673
- createLightTokenTransferInstruction,
6674
- createLoadAccountsParams,
6675
- createLoadAtaInstructions,
6676
- createLoadAtaInstructionsFromInterface,
6677
- createMint,
6678
- createMintInstruction,
6679
- createMintInterface,
6680
- createMintToCompressedInstruction,
6681
- createMintToInstruction,
6682
- createMintToInterfaceInstruction,
6683
- createRemoveMetadataKeyInstruction,
6684
- createSplInterface,
6685
- createTokenMetadata,
6686
- createTokenPool,
6687
- createTokenPoolAccountsLayout,
6688
- type createTokenPoolAccountsLayoutParams,
6689
- createTokenProgramLookupTable,
6690
- createTransferInterfaceInstructions,
6691
- createTransferOutputState,
6692
- createUnwrapInstruction,
6693
- createUnwrapInstructions,
6694
- createUpdateFreezeAuthorityInstruction,
6695
- createUpdateMetadataAuthorityInstruction,
6696
- createUpdateMetadataFieldInstruction,
6697
- createUpdateMintAuthorityInstruction,
6698
- createWrapInstruction,
6699
- decodeApproveInstructionData,
6700
- decodeBatchCompressInstructionData,
6701
- decodeCompressSplTokenAccountInstructionData,
6702
- decodeMintToInstructionData,
6703
- decodeRevokeInstructionData,
6704
- decodeTokenMetadata,
6705
- decodeTransferInstructionData,
6706
- decompress,
6707
- decompressDelegated,
6708
- decompressInterface,
6709
- deriveCMintAddress,
6710
- deriveSplInterfaceInfo,
6711
- deriveTokenPoolInfo,
6712
- deserializeMint,
6713
- encodeApproveInstructionData,
6714
- encodeBatchCompressInstructionData,
6715
- encodeCompressSplTokenAccountInstructionData,
6716
- encodeMintToInstructionData,
6717
- encodeRevokeInstructionData,
6718
- encodeTokenMetadata,
6719
- encodeTransferInstructionData,
6720
- extractTokenMetadata,
6721
- findMintAddress,
6722
- freezeAccountsLayout,
6723
- type freezeAccountsLayoutParams,
6724
- getAccountInterface,
6725
- getAssociatedCTokenAddress,
6726
- getAssociatedCTokenAddressAndBump,
6727
- getAssociatedTokenAddressInterface,
6728
- getAtaInterface,
6729
- getMintInterface,
6730
- getOrCreateAtaInterface,
6731
- getSplInterfaceInfos,
6732
- getTokenPoolInfos,
6733
- groupAccountsByTreeType,
6734
- isSingleSplInterfaceInfo,
6735
- isSingleTokenPoolInfo,
6736
- loadAta,
6737
- mergeTokenAccounts,
6738
- mintTo,
6739
- mintToAccountsLayout,
6740
- type mintToAccountsLayoutParams,
6741
- mintTo$1 as mintToCToken,
6742
- mintToCompressed,
6743
- mintToInterface,
6744
- mintToLayout,
6745
- packCompressedTokenAccounts,
6746
- parseCTokenCold,
6747
- parseCTokenHot,
6748
- parseMaybeDelegatedTransfer,
6749
- parseTokenData,
6750
- removeMetadataKey,
6751
- rentPerEpoch,
6752
- revoke,
6753
- revokeAccountsLayout,
6754
- type revokeAccountsLayoutParams,
6755
- selectAccountsByPreferredTreeType,
6756
- selectMinCompressedTokenAccountsForDecompression,
6757
- selectMinCompressedTokenAccountsForTransfer,
6758
- selectMinCompressedTokenAccountsForTransferOrPartial,
6759
- selectSmartCompressedTokenAccountsForTransfer,
6760
- selectSmartCompressedTokenAccountsForTransferOrPartial,
6761
- selectSplInterfaceInfo,
6762
- selectSplInterfaceInfosForDecompression,
6763
- selectTokenAccountsForApprove,
6764
- selectTokenPoolInfo,
6765
- selectTokenPoolInfosForDecompression,
6766
- serializeMint,
6767
- sliceLast,
6768
- sumUpTokenAmount,
6769
- thawAccountsLayout,
6770
- type thawAccountsLayoutParams,
6771
- toAccountInfo,
6772
- toOffChainMetadataJson,
6773
- toTokenPoolInfo,
6774
- transfer,
6775
- transferAccountsLayout,
6776
- type transferAccountsLayoutParams,
6777
- transferDelegated,
6778
- transferInterface,
6779
- unpackMintData,
6780
- unpackMintInterface,
6781
- unwrap,
6782
- updateFreezeAuthority,
6783
- updateMetadataAuthority,
6784
- updateMetadataField,
6785
- updateMintAuthority,
6786
- validateSameTokenOwner,
6787
- wrap,
6788
- };
5605
+ 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>;
5606
+ /**
5607
+ * Approve a delegate for an associated token account.
5608
+ *
5609
+ * Auto-detects mint type (light-token, SPL, or Token-2022) and dispatches
5610
+ * to the appropriate instruction.
5611
+ *
5612
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
5613
+ * into the hot ATA, not just the delegation amount. The `amount` parameter
5614
+ * only controls the delegate's spending limit.
5615
+ *
5616
+ * @param rpc RPC connection
5617
+ * @param payer Fee payer (signer)
5618
+ * @param tokenAccount ATA address
5619
+ * @param mint Mint address
5620
+ * @param delegate Delegate to approve
5621
+ * @param amount Amount to delegate
5622
+ * @param owner Owner of the token account (signer)
5623
+ * @param confirmOptions Optional confirm options
5624
+ * @returns Transaction signature
5625
+ */
5626
+ 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>;
5627
+ /**
5628
+ * Build instruction batches for approving a delegate on an ATA.
5629
+ *
5630
+ * Auto-detects mint type (light-token, SPL, or Token-2022).
5631
+ *
5632
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
5633
+ * into the hot ATA before the approve instruction. The `amount` parameter
5634
+ * only controls the delegate's spending limit, not the number of accounts
5635
+ * loaded.
5636
+ */
5637
+ 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[][]>;
5638
+ /**
5639
+ * Revoke delegation for an associated token account.
5640
+ *
5641
+ * Auto-detects mint type (light-token, SPL, or Token-2022) and dispatches
5642
+ * to the appropriate instruction.
5643
+ *
5644
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
5645
+ * into the hot ATA before the revoke instruction.
5646
+ *
5647
+ * @param rpc RPC connection
5648
+ * @param payer Fee payer (signer)
5649
+ * @param tokenAccount ATA address
5650
+ * @param mint Mint address
5651
+ * @param owner Owner of the token account (signer)
5652
+ * @param confirmOptions Optional confirm options
5653
+ * @returns Transaction signature
5654
+ */
5655
+ declare function revokeInterface(rpc: Rpc, payer: Signer, tokenAccount: PublicKey, mint: PublicKey, owner: Signer, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, decimals?: number): Promise<string>;
5656
+ /**
5657
+ * Build instruction batches for revoking delegation on an ATA.
5658
+ *
5659
+ * Auto-detects mint type (light-token, SPL, or Token-2022).
5660
+ *
5661
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
5662
+ * into the hot ATA before the revoke instruction.
5663
+ */
5664
+ declare function createRevokeInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, tokenAccount: PublicKey, owner: PublicKey, decimals?: number, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
5665
+
5666
+ 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 TransferParams, 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 };