@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,84 +1,23 @@
1
1
  /// <reference types="node" />
2
- import {
3
- PublicKey,
4
- TransactionInstruction,
5
- Commitment,
6
- AccountInfo,
7
- Signer,
8
- ConfirmOptions,
9
- TransactionSignature,
10
- AccountMeta,
11
- Keypair,
12
- Connection,
13
- } from '@solana/web3.js';
14
- import {
15
- ValidityProofWithContext,
16
- AddressTreeInfo,
17
- TreeInfo,
18
- MerkleContext,
19
- Rpc,
20
- ParsedTokenAccount,
21
- CompressedAccountWithMerkleContext,
22
- ValidityProof,
23
- TreeType,
24
- PackedMerkleContextLegacy,
25
- CompressedCpiContext,
26
- InputTokenDataWithContext as InputTokenDataWithContext$1,
27
- CompressedProof,
28
- } from '@lightprotocol/stateless.js';
2
+ import { PublicKey, TransactionInstruction, Commitment, AccountInfo, Signer, ConfirmOptions, TransactionSignature, Keypair, AccountMeta, Connection } from '@solana/web3.js';
3
+ import { ValidityProofWithContext, AddressTreeInfo, TreeInfo, MerkleContext, Rpc, CompressedAccountWithMerkleContext, ParsedTokenAccount, TreeType, PackedMerkleContextLegacy, CompressedCpiContext, ValidityProof, InputTokenDataWithContext as InputTokenDataWithContext$1, CompressedProof } from '@lightprotocol/stateless.js';
29
4
  export { ParsedTokenAccount as ParsedTokenAccountInterface } from '@lightprotocol/stateless.js';
30
5
  import { Mint, Account } from '@solana/spl-token';
31
6
  export { Account, AccountState } from '@solana/spl-token';
32
7
 
33
8
  declare class Buffer$1 extends Uint8Array {
34
- length: number;
35
- write(
36
- string: string,
37
- offset?: number,
38
- length?: number,
39
- encoding?: string,
40
- ): number;
9
+ length: number
10
+ write(string: string, offset?: number, length?: number, encoding?: string): number;
41
11
  toString(encoding?: string, start?: number, end?: number): string;
42
- toJSON(): { type: 'Buffer'; data: any[] };
12
+ toJSON(): { type: 'Buffer', data: any[] };
43
13
  equals(otherBuffer: Buffer$1): boolean;
44
- compare(
45
- otherBuffer: Uint8Array,
46
- targetStart?: number,
47
- targetEnd?: number,
48
- sourceStart?: number,
49
- sourceEnd?: number,
50
- ): number;
51
- copy(
52
- targetBuffer: Buffer$1,
53
- targetStart?: number,
54
- sourceStart?: number,
55
- sourceEnd?: number,
56
- ): number;
14
+ compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
15
+ copy(targetBuffer: Buffer$1, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
57
16
  slice(start?: number, end?: number): Buffer$1;
58
- writeUIntLE(
59
- value: number,
60
- offset: number,
61
- byteLength: number,
62
- noAssert?: boolean,
63
- ): number;
64
- writeUIntBE(
65
- value: number,
66
- offset: number,
67
- byteLength: number,
68
- noAssert?: boolean,
69
- ): number;
70
- writeIntLE(
71
- value: number,
72
- offset: number,
73
- byteLength: number,
74
- noAssert?: boolean,
75
- ): number;
76
- writeIntBE(
77
- value: number,
78
- offset: number,
79
- byteLength: number,
80
- noAssert?: boolean,
81
- ): number;
17
+ writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
18
+ writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
19
+ writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
20
+ writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
82
21
  readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
83
22
  readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
84
23
  readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
@@ -124,21 +63,9 @@ declare class Buffer$1 extends Uint8Array {
124
63
  writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
125
64
  writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
126
65
  fill(value: any, offset?: number, end?: number): this;
127
- indexOf(
128
- value: string | number | Buffer$1,
129
- byteOffset?: number,
130
- encoding?: string,
131
- ): number;
132
- lastIndexOf(
133
- value: string | number | Buffer$1,
134
- byteOffset?: number,
135
- encoding?: string,
136
- ): number;
137
- includes(
138
- value: string | number | Buffer$1,
139
- byteOffset?: number,
140
- encoding?: string,
141
- ): boolean;
66
+ indexOf(value: string | number | Buffer$1, byteOffset?: number, encoding?: string): number;
67
+ lastIndexOf(value: string | number | Buffer$1, byteOffset?: number, encoding?: string): number;
68
+ includes(value: string | number | Buffer$1, byteOffset?: number, encoding?: string): boolean;
142
69
 
143
70
  /**
144
71
  * Allocates a new buffer containing the given {str}.
@@ -146,19 +73,19 @@ declare class Buffer$1 extends Uint8Array {
146
73
  * @param str String to store in buffer.
147
74
  * @param encoding encoding to use, optional. Default is 'utf8'
148
75
  */
149
- constructor(str: string, encoding?: string);
76
+ constructor (str: string, encoding?: string);
150
77
  /**
151
78
  * Allocates a new buffer of {size} octets.
152
79
  *
153
80
  * @param size count of octets to allocate.
154
81
  */
155
- constructor(size: number);
82
+ constructor (size: number);
156
83
  /**
157
84
  * Allocates a new buffer containing the given {array} of octets.
158
85
  *
159
86
  * @param array The octets to store.
160
87
  */
161
- constructor(array: Uint8Array);
88
+ constructor (array: Uint8Array);
162
89
  /**
163
90
  * Produces a Buffer backed by the same allocated memory as
164
91
  * the given {ArrayBuffer}.
@@ -166,19 +93,19 @@ declare class Buffer$1 extends Uint8Array {
166
93
  *
167
94
  * @param arrayBuffer The ArrayBuffer with which to share memory.
168
95
  */
169
- constructor(arrayBuffer: ArrayBuffer);
96
+ constructor (arrayBuffer: ArrayBuffer);
170
97
  /**
171
98
  * Allocates a new buffer containing the given {array} of octets.
172
99
  *
173
100
  * @param array The octets to store.
174
101
  */
175
- constructor(array: any[]);
102
+ constructor (array: any[]);
176
103
  /**
177
104
  * Copies the passed {buffer} data onto a new {Buffer} instance.
178
105
  *
179
106
  * @param buffer The buffer to copy.
180
107
  */
181
- constructor(buffer: Buffer$1);
108
+ constructor (buffer: Buffer$1);
182
109
  prototype: Buffer$1;
183
110
  /**
184
111
  * Allocates a new Buffer using an {array} of octets.
@@ -196,11 +123,7 @@ declare class Buffer$1 extends Uint8Array {
196
123
  * @param byteOffset
197
124
  * @param length
198
125
  */
199
- static from(
200
- arrayBuffer: ArrayBuffer,
201
- byteOffset?: number,
202
- length?: number,
203
- ): Buffer$1;
126
+ static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer$1;
204
127
  /**
205
128
  * Copies the passed {buffer} data onto a new Buffer instance.
206
129
  *
@@ -260,11 +183,7 @@ declare class Buffer$1 extends Uint8Array {
260
183
  * If parameter is omitted, buffer will be filled with zeros.
261
184
  * @param encoding encoding used for call to buf.fill while initializing
262
185
  */
263
- static alloc(
264
- size: number,
265
- fill?: string | Buffer$1 | number,
266
- encoding?: string,
267
- ): Buffer$1;
186
+ static alloc(size: number, fill?: string | Buffer$1 | number, encoding?: string): Buffer$1;
268
187
  /**
269
188
  * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
270
189
  * of the newly created Buffer are unknown and may contain sensitive data.
@@ -420,7 +339,7 @@ interface AdditionalMetadata {
420
339
  }
421
340
 
422
341
  /**
423
- * Token metadata for creating a c-token mint.
342
+ * Token metadata for creating a light-token mint.
424
343
  */
425
344
  interface TokenMetadataInstructionData {
426
345
  name: string;
@@ -429,15 +348,9 @@ interface TokenMetadataInstructionData {
429
348
  updateAuthority?: PublicKey | null;
430
349
  additionalMetadata: AdditionalMetadata[] | null;
431
350
  }
432
- declare function createTokenMetadata(
433
- name: string,
434
- symbol: string,
435
- uri: string,
436
- updateAuthority?: PublicKey | null,
437
- additionalMetadata?: AdditionalMetadata[] | null,
438
- ): TokenMetadataInstructionData;
351
+ declare function createTokenMetadata(name: string, symbol: string, uri: string, updateAuthority?: PublicKey | null, additionalMetadata?: AdditionalMetadata[] | null): TokenMetadataInstructionData;
439
352
  /**
440
- * Create instruction for initializing a c-token mint.
353
+ * Create instruction for initializing a light-token mint.
441
354
  *
442
355
  * @param mintSigner Mint signer keypair public key.
443
356
  * @param decimals Number of decimals for the mint.
@@ -450,18 +363,7 @@ declare function createTokenMetadata(
450
363
  * @param metadata Optional token metadata.
451
364
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
452
365
  */
453
- declare function createMintInstruction(
454
- mintSigner: PublicKey,
455
- decimals: number,
456
- mintAuthority: PublicKey,
457
- freezeAuthority: PublicKey | null,
458
- payer: PublicKey,
459
- validityProof: ValidityProofWithContext,
460
- addressTreeInfo: AddressTreeInfo,
461
- outputStateTreeInfo: TreeInfo,
462
- metadata?: TokenMetadataInstructionData,
463
- maxTopUp?: number,
464
- ): TransactionInstruction;
366
+ 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;
465
367
 
466
368
  /**
467
369
  * SPL-compatible base mint structure
@@ -479,12 +381,12 @@ interface BaseMint {
479
381
  freezeAuthority: PublicKey | null;
480
382
  }
481
383
  /**
482
- * Compressed mint context (protocol version, SPL mint reference)
384
+ * Light mint context (protocol version, SPL mint reference)
483
385
  */
484
386
  interface MintContext {
485
387
  /** Protocol version for upgradability */
486
388
  version: number;
487
- /** Whether the compressed mint is decompressed to a CMint Solana account */
389
+ /** Whether the compressed light mint has been decompressed to a light mint account */
488
390
  cmintDecompressed: boolean;
489
391
  /** PDA of the associated SPL mint */
490
392
  splMint: PublicKey;
@@ -522,7 +424,7 @@ interface TokenMetadata {
522
424
  }[];
523
425
  }
524
426
  /**
525
- * Complete compressed mint structure (raw format)
427
+ * Complete light mint structure (raw format)
526
428
  */
527
429
  interface CompressedMint {
528
430
  base: BaseMint;
@@ -551,7 +453,7 @@ interface RentConfig {
551
453
  maxTopUp: number;
552
454
  }
553
455
  /**
554
- * Compression info embedded in CompressedMint
456
+ * Compression info embedded in light mint
555
457
  */
556
458
  interface CompressionInfo {
557
459
  /** Config account version (0 = uninitialized) */
@@ -576,18 +478,18 @@ interface CompressionInfo {
576
478
  rentConfig: RentConfig;
577
479
  }
578
480
  /**
579
- * Deserialize a compressed mint from buffer
481
+ * Deserialize a light mint from buffer
580
482
  * Uses SPL's MintLayout for BaseMint and buffer-layout struct for context
581
483
  *
582
484
  * @param data - The raw account data buffer
583
- * @returns The deserialized CompressedMint
485
+ * @returns The deserialized light mint
584
486
  */
585
487
  declare function deserializeMint(data: Buffer$1 | Uint8Array): CompressedMint;
586
488
  /**
587
- * Serialize a CompressedMint to buffer
489
+ * Serialize a light mint to buffer
588
490
  * Uses SPL's MintLayout for BaseMint, helper functions for context/metadata
589
491
  *
590
- * @param mint - The CompressedMint to serialize
492
+ * @param mint - The light mint to serialize
591
493
  * @returns The serialized buffer
592
494
  */
593
495
  declare function serializeMint(mint: CompressedMint): Buffer$1;
@@ -595,7 +497,7 @@ declare function serializeMint(mint: CompressedMint): Buffer$1;
595
497
  * Extension type constants
596
498
  */
597
499
  declare enum ExtensionType {
598
- TokenMetadata = 19,
500
+ TokenMetadata = 19
599
501
  }
600
502
  /**
601
503
  * Decode TokenMetadata from raw extension data using Borsh layout
@@ -613,9 +515,7 @@ declare function encodeTokenMetadata(metadata: TokenMetadata): Buffer$1;
613
515
  * @param extensions - Array of raw extensions
614
516
  * @returns Parsed TokenMetadata or null if not found
615
517
  */
616
- declare function extractTokenMetadata(
617
- extensions: MintExtension[] | null,
618
- ): TokenMetadata | null;
518
+ declare function extractTokenMetadata(extensions: MintExtension[] | null): TokenMetadata | null;
619
519
  /**
620
520
  * Metadata portion of MintInstructionData
621
521
  * Used for instruction encoding when metadata extension is present
@@ -652,11 +552,11 @@ interface MintInterface {
652
552
  mintContext?: MintContext;
653
553
  tokenMetadata?: TokenMetadata;
654
554
  extensions?: MintExtension[];
655
- /** Compression info for c-token mints */
555
+ /** Compression info for light-token mints */
656
556
  compression?: CompressionInfo;
657
557
  }
658
558
  /**
659
- * Get unified mint info for SPL/T22/c-token mints.
559
+ * Get unified mint info for SPL/T22/light-token mints.
660
560
  *
661
561
  * @param rpc RPC connection
662
562
  * @param address The mint address
@@ -666,27 +566,18 @@ interface MintInterface {
666
566
  * @returns Object with mint, optional merkleContext, mintContext, and
667
567
  * tokenMetadata
668
568
  */
669
- declare function getMintInterface(
670
- rpc: Rpc,
671
- address: PublicKey,
672
- commitment?: Commitment,
673
- programId?: PublicKey,
674
- ): Promise<MintInterface>;
569
+ declare function getMintInterface(rpc: Rpc, address: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<MintInterface>;
675
570
  /**
676
- * Unpack mint info from raw account data for SPL/T22/c-token.
571
+ * Unpack mint info from raw account data for SPL/T22/light-token.
677
572
  *
678
573
  * @param address The mint pubkey
679
574
  * @param data The raw account data or AccountInfo
680
- * @param programId Token program ID. Default c-token.
575
+ * @param programId Token program ID. Default light-token.
681
576
  * @returns Object with mint, optional mintContext and tokenMetadata.
682
577
  */
683
- declare function unpackMintInterface(
684
- address: PublicKey,
685
- data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>,
686
- programId?: PublicKey,
687
- ): Omit<MintInterface, 'merkleContext'>;
578
+ declare function unpackMintInterface(address: PublicKey, data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>, programId?: PublicKey): Omit<MintInterface, 'merkleContext'>;
688
579
  /**
689
- * Unpack c-token mint context and metadata from raw account data
580
+ * Unpack light-token mint context and metadata from raw account data
690
581
  *
691
582
  * @param data The raw account data
692
583
  * @returns Object with mintContext, tokenMetadata, and extensions
@@ -698,27 +589,20 @@ declare function unpackMintData(data: Buffer$1 | Uint8Array): {
698
589
  };
699
590
 
700
591
  /**
701
- * Create instruction for updating a compressed mint's mint authority.
702
- * Works for both compressed and decompressed mints.
592
+ * Create instruction for updating a light mint's mint authority.
593
+ * Works for both compressed and decompressed light mints.
703
594
  *
704
595
  * @param mintInterface MintInterface from getMintInterface() - must have merkleContext
705
596
  * @param currentMintAuthority Current mint authority public key (must sign)
706
597
  * @param newMintAuthority New mint authority (or null to revoke)
707
598
  * @param payer Fee payer public key
708
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
599
+ * @param validityProof Validity proof for the compressed light mint (null for decompressed light mints)
709
600
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
710
601
  */
711
- declare function createUpdateMintAuthorityInstruction(
712
- mintInterface: MintInterface,
713
- currentMintAuthority: PublicKey,
714
- newMintAuthority: PublicKey | null,
715
- payer: PublicKey,
716
- validityProof: ValidityProofWithContext | null,
717
- maxTopUp?: number,
718
- ): TransactionInstruction;
602
+ declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterface, currentMintAuthority: PublicKey, newMintAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext | null, maxTopUp?: number): TransactionInstruction;
719
603
  /**
720
- * Create instruction for updating a compressed mint's freeze authority.
721
- * Works for both compressed and decompressed mints.
604
+ * Create instruction for updating a light mint's freeze authority.
605
+ * Works for both compressed and decompressed light mints.
722
606
  *
723
607
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
724
608
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -727,20 +611,13 @@ declare function createUpdateMintAuthorityInstruction(
727
611
  * @param currentFreezeAuthority Current freeze authority public key (must sign)
728
612
  * @param newFreezeAuthority New freeze authority (or null to revoke)
729
613
  * @param payer Fee payer public key
730
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
614
+ * @param validityProof Validity proof for the compressed light mint (null for decompressed light mints)
731
615
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
732
616
  */
733
- declare function createUpdateFreezeAuthorityInstruction(
734
- mintInterface: MintInterface,
735
- currentFreezeAuthority: PublicKey,
736
- newFreezeAuthority: PublicKey | null,
737
- payer: PublicKey,
738
- validityProof: ValidityProofWithContext | null,
739
- maxTopUp?: number,
740
- ): TransactionInstruction;
617
+ declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInterface, currentFreezeAuthority: PublicKey, newFreezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext | null, maxTopUp?: number): TransactionInstruction;
741
618
 
742
619
  /**
743
- * Create instruction for updating a compressed mint's metadata field.
620
+ * Create instruction for updating a light mint's metadata field.
744
621
  *
745
622
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
746
623
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -748,26 +625,16 @@ declare function createUpdateFreezeAuthorityInstruction(
748
625
  * @param mintInterface MintInterface from getMintInterface() - must have merkleContext and tokenMetadata
749
626
  * @param authority Metadata update authority public key (must sign)
750
627
  * @param payer Fee payer public key
751
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
628
+ * @param validityProof Validity proof for the light mint (null for decompressed light mints)
752
629
  * @param fieldType Field to update: 'name', 'symbol', 'uri', or 'custom'
753
630
  * @param value New value for the field
754
631
  * @param customKey Custom key name (required if fieldType is 'custom')
755
632
  * @param extensionIndex Extension index (default: 0)
756
633
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
757
634
  */
758
- declare function createUpdateMetadataFieldInstruction(
759
- mintInterface: MintInterface,
760
- authority: PublicKey,
761
- payer: PublicKey,
762
- validityProof: ValidityProofWithContext | null,
763
- fieldType: 'name' | 'symbol' | 'uri' | 'custom',
764
- value: string,
765
- customKey?: string,
766
- extensionIndex?: number,
767
- maxTopUp?: number,
768
- ): TransactionInstruction;
635
+ 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;
769
636
  /**
770
- * Create instruction for updating a compressed mint's metadata authority.
637
+ * Create instruction for updating a light mint's metadata authority.
771
638
  *
772
639
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
773
640
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -776,21 +643,13 @@ declare function createUpdateMetadataFieldInstruction(
776
643
  * @param currentAuthority Current metadata update authority public key (must sign)
777
644
  * @param newAuthority New metadata update authority public key
778
645
  * @param payer Fee payer public key
779
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
646
+ * @param validityProof Validity proof for the light mint (null for decompressed light mints)
780
647
  * @param extensionIndex Extension index (default: 0)
781
648
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
782
649
  */
783
- declare function createUpdateMetadataAuthorityInstruction(
784
- mintInterface: MintInterface,
785
- currentAuthority: PublicKey,
786
- newAuthority: PublicKey,
787
- payer: PublicKey,
788
- validityProof: ValidityProofWithContext | null,
789
- extensionIndex?: number,
790
- maxTopUp?: number,
791
- ): TransactionInstruction;
650
+ declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInterface, currentAuthority: PublicKey, newAuthority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, extensionIndex?: number, maxTopUp?: number): TransactionInstruction;
792
651
  /**
793
- * Create instruction for removing a metadata key from a compressed mint.
652
+ * Create instruction for removing a metadata key from a light mint.
794
653
  *
795
654
  * Output queue is automatically derived from mintInterface.merkleContext.treeInfo
796
655
  * (preferring nextTreeInfo.queue if available for rollover support).
@@ -798,22 +657,13 @@ declare function createUpdateMetadataAuthorityInstruction(
798
657
  * @param mintInterface MintInterface from getMintInterface() - must have merkleContext and tokenMetadata
799
658
  * @param authority Metadata update authority public key (must sign)
800
659
  * @param payer Fee payer public key
801
- * @param validityProof Validity proof for the compressed mint (null for decompressed mints)
660
+ * @param validityProof Validity proof for the light mint (null for decompressed light mints)
802
661
  * @param key Metadata key to remove
803
662
  * @param idempotent If true, don't error if key doesn't exist (default: false)
804
663
  * @param extensionIndex Extension index (default: 0)
805
664
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
806
665
  */
807
- declare function createRemoveMetadataKeyInstruction(
808
- mintInterface: MintInterface,
809
- authority: PublicKey,
810
- payer: PublicKey,
811
- validityProof: ValidityProofWithContext | null,
812
- key: string,
813
- idempotent?: boolean,
814
- extensionIndex?: number,
815
- maxTopUp?: number,
816
- ): TransactionInstruction;
666
+ declare function createRemoveMetadataKeyInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, key: string, idempotent?: boolean, extensionIndex?: number, maxTopUp?: number): TransactionInstruction;
817
667
 
818
668
  interface CompressToPubkey {
819
669
  bump: number;
@@ -827,11 +677,11 @@ interface CompressibleConfig {
827
677
  writeTopUp: number;
828
678
  compressToAccountPubkey?: CompressToPubkey | null;
829
679
  }
830
- interface CreateAssociatedCTokenAccountParams {
680
+ interface CreateAssociatedLightTokenAccountParams {
831
681
  compressibleConfig?: CompressibleConfig | null;
832
682
  }
833
683
  /**
834
- * Default compressible config for c-token ATAs - matches Rust SDK defaults.
684
+ * Default compressible config for light-token ATAs - matches Rust SDK defaults.
835
685
  *
836
686
  * - tokenAccountVersion: 3 (ShaFlat) - latest hashing scheme
837
687
  * - rentPayment: 16 - prepay 16 epochs (~24 hours rent)
@@ -839,7 +689,7 @@ interface CreateAssociatedCTokenAccountParams {
839
689
  * - writeTopUp: 766 - per-write top-up (~2 epochs rent) when rent < 2 epochs
840
690
  * - compressToAccountPubkey: null - required for ATAs
841
691
  *
842
- * Cost breakdown at ATA creation:
692
+ * Cost breakdown at associated token account creation:
843
693
  * - Rent sponsor PDA (LIGHT_TOKEN_RENT_SPONSOR) pays: rent exemption (~890,880 lamports)
844
694
  * - Fee payer pays: compression_cost (11K) + 16 epochs rent (~6,400) = ~17,400 lamports + tx fees
845
695
  *
@@ -847,7 +697,7 @@ interface CreateAssociatedCTokenAccountParams {
847
697
  * - When account rent is below 2 epochs, fee payer pays 766 lamports top-up
848
698
  * - This keeps the account perpetually funded when actively used
849
699
  *
850
- * Rent calculation (272-byte compressible ctoken account):
700
+ * Rent calculation (272-byte compressible lightToken account):
851
701
  * - rent_per_epoch = base_rent (128) + bytes * rent_per_byte (272 * 1) = 400 lamports
852
702
  * - 16 epochs = 16 * 400 = 6,400 lamports (24 hours)
853
703
  * - 2 epochs = 2 * 400 = 800 lamports (~3 hours, writeTopUp = 766 is conservative)
@@ -863,7 +713,7 @@ interface CreateAssociatedCTokenAccountParams {
863
713
  */
864
714
  declare const DEFAULT_COMPRESSIBLE_CONFIG: CompressibleConfig;
865
715
  /**
866
- * Create instruction for creating an associated compressed token account.
716
+ * Create instruction for creating an associated light-token account.
867
717
  * Uses the default rent sponsor PDA by default.
868
718
  *
869
719
  * @param feePayer Fee payer public key.
@@ -873,16 +723,9 @@ declare const DEFAULT_COMPRESSIBLE_CONFIG: CompressibleConfig;
873
723
  * @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
874
724
  * @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
875
725
  */
876
- declare function createAssociatedCTokenAccountInstruction(
877
- feePayer: PublicKey,
878
- owner: PublicKey,
879
- mint: PublicKey,
880
- compressibleConfig?: CompressibleConfig | null,
881
- configAccount?: PublicKey,
882
- rentPayerPda?: PublicKey,
883
- ): TransactionInstruction;
726
+ declare function createAssociatedLightTokenAccountInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig | null, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
884
727
  /**
885
- * Create idempotent instruction for creating an associated compressed token account.
728
+ * Create idempotent instruction for creating an associated light-token account.
886
729
  * Uses the default rent sponsor PDA by default.
887
730
  *
888
731
  * @param feePayer Fee payer public key.
@@ -892,26 +735,19 @@ declare function createAssociatedCTokenAccountInstruction(
892
735
  * @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
893
736
  * @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
894
737
  */
895
- declare function createAssociatedCTokenAccountIdempotentInstruction(
896
- feePayer: PublicKey,
897
- owner: PublicKey,
898
- mint: PublicKey,
899
- compressibleConfig?: CompressibleConfig | null,
900
- configAccount?: PublicKey,
901
- rentPayerPda?: PublicKey,
902
- ): TransactionInstruction;
738
+ declare function createAssociatedLightTokenAccountIdempotentInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig | null, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
903
739
 
904
740
  /**
905
- * c-token-specific config for createAssociatedTokenAccountInterfaceInstruction
741
+ * light-token-specific config for createAssociatedTokenAccountInterfaceInstruction
906
742
  */
907
- interface CTokenConfig {
743
+ interface LightTokenConfig {
908
744
  compressibleConfig?: CompressibleConfig | null;
909
745
  configAccount?: PublicKey;
910
746
  rentPayerPda?: PublicKey;
911
747
  }
912
748
  /**
913
749
  * Create instruction for creating an associated token account (SPL, Token-2022,
914
- * or c-token). Follows SPL Token API signature with optional c-token config at the
750
+ * or light-token). Follows SPL Token API signature with optional light-token config at the
915
751
  * end.
916
752
  *
917
753
  * @param payer Fee payer public key.
@@ -920,20 +756,12 @@ interface CTokenConfig {
920
756
  * @param mint Mint address.
921
757
  * @param programId Token program ID (default: TOKEN_PROGRAM_ID).
922
758
  * @param associatedTokenProgramId Associated token program ID.
923
- * @param ctokenConfig Optional c-token-specific configuration.
924
- */
925
- declare function createAssociatedTokenAccountInterfaceInstruction(
926
- payer: PublicKey,
927
- associatedToken: PublicKey,
928
- owner: PublicKey,
929
- mint: PublicKey,
930
- programId?: PublicKey,
931
- associatedTokenProgramId?: PublicKey,
932
- ctokenConfig?: CTokenConfig,
933
- ): TransactionInstruction;
759
+ * @param lightTokenConfig Optional light-token-specific configuration.
760
+ */
761
+ declare function createAssociatedTokenAccountInterfaceInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): TransactionInstruction;
934
762
  /**
935
763
  * Create idempotent instruction for creating an associated token account (SPL,
936
- * Token-2022, or c-token). Follows SPL Token API signature with optional c-token
764
+ * Token-2022, or light-token). Follows SPL Token API signature with optional light-token
937
765
  * config at the end.
938
766
  *
939
767
  * @param payer Fee payer public key.
@@ -942,211 +770,17 @@ declare function createAssociatedTokenAccountInterfaceInstruction(
942
770
  * @param mint Mint address.
943
771
  * @param programId Token program ID (default: TOKEN_PROGRAM_ID).
944
772
  * @param associatedTokenProgramId Associated token program ID.
945
- * @param ctokenConfig Optional c-token-specific configuration.
946
- */
947
- declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(
948
- payer: PublicKey,
949
- associatedToken: PublicKey,
950
- owner: PublicKey,
951
- mint: PublicKey,
952
- programId?: PublicKey,
953
- associatedTokenProgramId?: PublicKey,
954
- ctokenConfig?: CTokenConfig,
955
- ): TransactionInstruction;
773
+ * @param lightTokenConfig Optional light-token-specific configuration.
774
+ */
775
+ declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): TransactionInstruction;
956
776
  /**
957
777
  * Short alias for createAssociatedTokenAccountInterfaceIdempotentInstruction.
958
778
  */
959
779
  declare const createAtaInterfaceIdempotentInstruction: typeof createAssociatedTokenAccountInterfaceIdempotentInstruction;
960
780
 
961
- /**
962
- * Parameters for creating a MintTo instruction.
963
- */
964
- interface CreateMintToInstructionParams {
965
- /** Mint account (CMint - decompressed compressed mint) */
966
- mint: PublicKey;
967
- /** Destination CToken account to mint to */
968
- destination: PublicKey;
969
- /** Amount of tokens to mint */
970
- amount: number | bigint;
971
- /** Mint authority (must be signer) */
972
- authority: PublicKey;
973
- /** Maximum lamports for rent and top-up combined. Transaction fails if exceeded. (u16::MAX = no limit, 0 = no top-ups allowed) */
974
- maxTopUp?: number;
975
- /** Optional fee payer for rent top-ups. If not provided, authority pays. */
976
- feePayer?: PublicKey;
977
- }
978
- /**
979
- * Create instruction for minting tokens to a CToken account.
980
- *
981
- * This is a simple 3-4 account instruction for minting to decompressed CToken accounts.
982
- * Uses discriminator 7 (CTokenMintTo).
983
- *
984
- * @param params - Mint instruction parameters
985
- * @returns TransactionInstruction for minting tokens
986
- */
987
- declare function createMintToInstruction(
988
- params: CreateMintToInstructionParams,
989
- ): TransactionInstruction;
990
-
991
- /** Default compressible config PDA (V1) */
992
- declare const LIGHT_TOKEN_CONFIG: PublicKey;
993
- /** Default rent sponsor PDA (V1) */
994
- declare const LIGHT_TOKEN_RENT_SPONSOR: PublicKey;
995
- /**
996
- * Token data version enum - mirrors Rust TokenDataVersion
997
- * Used for compressed token account hashing strategy
998
- */
999
- declare enum TokenDataVersion {
1000
- /** V1: Poseidon hash with little-endian amount, discriminator [2,0,0,0,0,0,0,0] */
1001
- V1 = 1,
1002
- /** V2: Poseidon hash with big-endian amount, discriminator [0,0,0,0,0,0,0,3] */
1003
- V2 = 2,
1004
- /** ShaFlat: SHA256 hash of borsh-serialized data, discriminator [0,0,0,0,0,0,0,4] */
1005
- ShaFlat = 3,
1006
- }
1007
- declare const POOL_SEED: Buffer$1<ArrayBuffer>;
1008
- declare const CPI_AUTHORITY_SEED: Buffer$1<ArrayBuffer>;
1009
- declare const SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE = 1461600;
1010
- declare const CREATE_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1011
- declare const MINT_TO_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1012
- declare const BATCH_COMPRESS_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1013
- declare const TRANSFER_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1014
- declare const COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1015
- declare const APPROVE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1016
- declare const REVOKE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1017
- declare const ADD_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1018
- declare const DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1019
- /**
1020
- * Maximum lamports for rent top-up in a single instruction.
1021
- * u16::MAX = no limit; 0 = no top-ups allowed.
1022
- * Matches Rust SDK (e.g. token-sdk create_mints uses u16::MAX for "no limit").
1023
- */
1024
- declare const MAX_TOP_UP = 65535;
1025
- /**
1026
- * Rent configuration constants for compressible ctoken accounts.
1027
- * These match the Rust SDK defaults in program-libs/compressible/src/rent/config.rs
1028
- */
1029
- /** Base rent per epoch (lamports) */
1030
- declare const BASE_RENT_PER_EPOCH = 128;
1031
- /** Rent per byte per epoch (lamports) */
1032
- declare const RENT_PER_BYTE_PER_EPOCH = 1;
1033
- /** Slots per rent epoch (1.5 hours) */
1034
- declare const SLOTS_PER_RENT_EPOCH = 13500;
1035
- /** Compression cost (lamports) - paid at account creation */
1036
- declare const COMPRESSION_COST = 10000;
1037
- /** Compression incentive (lamports) - paid at account creation */
1038
- declare const COMPRESSION_INCENTIVE = 1000;
1039
- /** Total compression cost (COMPRESSION_COST + COMPRESSION_INCENTIVE) */
1040
- declare const TOTAL_COMPRESSION_COST: number;
1041
- /**
1042
- * Compressible ctoken account size in bytes.
1043
- * = 165 (base SPL token) + 1 (account_type) + 1 (Option) + 4 (Vec len) + 1 (ext disc) + 4 (ext header) + 96 (CompressionInfo) = 272
1044
- * Source: program-libs/token-interface/src/state/token/top_up.rs MIN_SIZE_WITH_COMPRESSIBLE
1045
- */
1046
- declare const COMPRESSIBLE_CTOKEN_ACCOUNT_SIZE = 272;
1047
- /**
1048
- * Calculate rent per epoch for a given account size.
1049
- * Formula: base_rent + (bytes * lamports_per_byte_per_epoch)
1050
- */
1051
- declare function rentPerEpoch(bytes: number): number;
1052
- /**
1053
- * Default rent per epoch for a compressible ctoken account (272 bytes).
1054
- * = 128 + 272 = 400 lamports
1055
- */
1056
- declare const COMPRESSIBLE_CTOKEN_RENT_PER_EPOCH: number;
1057
- /** Default prepaid epochs (24 hours = 16 epochs * 1.5h) */
1058
- declare const DEFAULT_PREPAY_EPOCHS = 16;
1059
- /** Default write top-up (lamports) - ~2 epochs rent */
1060
- declare const DEFAULT_WRITE_TOP_UP = 766;
1061
- /**
1062
- * Calculate fee payer cost at ATA creation.
1063
- * = compression_cost (11K) + (prepay_epochs * rent_per_epoch)
1064
- */
1065
- declare function calculateFeePayerCostAtCreation(
1066
- prepayEpochs?: number,
1067
- accountBytes?: number,
1068
- ): number;
1069
-
1070
- /**
1071
- * Create instruction for minting tokens from a c-mint to compressed accounts.
1072
- * To mint to onchain token accounts across SPL/T22/c-mints, use
1073
- * {@link createMintToInterfaceInstruction} instead.
1074
- *
1075
- * @param authority Mint authority public key.
1076
- * @param payer Fee payer public key.
1077
- * @param validityProof Validity proof for the compressed mint.
1078
- * @param merkleContext Merkle context of the compressed mint.
1079
- * @param mintData Mint instruction data.
1080
- * @param recipients Array of recipients with amounts.
1081
- * @param outputStateTreeInfo Optional output state tree info. Uses merkle
1082
- * context queue if not provided.
1083
- * @param tokenAccountVersion Token account version (default:
1084
- * TokenDataVersion.ShaFlat).
1085
- * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1086
- */
1087
- declare function createMintToCompressedInstruction(
1088
- authority: PublicKey,
1089
- payer: PublicKey,
1090
- validityProof: ValidityProofWithContext,
1091
- merkleContext: MerkleContext,
1092
- mintData: MintInstructionData,
1093
- recipients: Array<{
1094
- recipient: PublicKey;
1095
- amount: number | bigint;
1096
- }>,
1097
- outputStateTreeInfo?: TreeInfo,
1098
- tokenAccountVersion?: TokenDataVersion,
1099
- maxTopUp?: number,
1100
- ): TransactionInstruction;
1101
-
1102
- /**
1103
- * Create mint-to instruction for SPL, Token-2022, or CToken mints.
1104
- * This instruction ONLY mints to decompressed/onchain token accounts.
1105
- *
1106
- * For CToken mints, the mint must be decompressed first (CMint account must exist on-chain).
1107
- *
1108
- * @param mintInterface Mint interface (SPL, Token-2022, or CToken).
1109
- * @param destination Destination onchain token account address.
1110
- * @param authority Mint authority public key.
1111
- * @param payer Fee payer public key.
1112
- * @param amount Amount to mint.
1113
- * @param validityProof Not used (legacy parameter, kept for compatibility).
1114
- * @param multiSigners Multi-signature signer public keys (SPL/T22 only).
1115
- */
1116
- declare function createMintToInterfaceInstruction(
1117
- mintInterface: MintInterface,
1118
- destination: PublicKey,
1119
- authority: PublicKey,
1120
- payer: PublicKey,
1121
- amount: number | bigint,
1122
- validityProof?: ValidityProofWithContext,
1123
- multiSigners?: PublicKey[],
1124
- ): TransactionInstruction;
1125
-
1126
- /**
1127
- * Create a Light token transfer instruction.
1128
- *
1129
- * For c-token accounts with compressible extension, the program needs
1130
- * system_program and fee_payer to handle rent top-ups.
1131
- *
1132
- * @param source Source c-token account
1133
- * @param destination Destination c-token account
1134
- * @param owner Owner of the source account (signer, also pays for compressible extension top-ups)
1135
- * @param amount Amount to transfer
1136
- * @param feePayer Optional fee payer for top-ups (defaults to owner)
1137
- * @returns Transaction instruction for Light token transfer
1138
- */
1139
- declare function createLightTokenTransferInstruction(
1140
- source: PublicKey,
1141
- destination: PublicKey,
1142
- owner: PublicKey,
1143
- amount: number | bigint,
1144
- feePayer?: PublicKey,
1145
- ): TransactionInstruction;
1146
-
1147
781
  declare namespace BN {
1148
- type Endianness = 'le' | 'be';
1149
- type IPrimeName = 'k256' | 'p224' | 'p192' | 'p25519';
782
+ type Endianness = "le" | "be";
783
+ type IPrimeName = "k256" | "p224" | "p192" | "p25519";
1150
784
 
1151
785
  interface MPrime {
1152
786
  name: string;
@@ -1168,7 +802,7 @@ declare class BN {
1168
802
 
1169
803
  constructor(
1170
804
  number: bigint | number | string | number[] | Uint8Array | Buffer | BN,
1171
- base?: number | 'hex',
805
+ base?: number | "hex",
1172
806
  endian?: BN.Endianness,
1173
807
  );
1174
808
  constructor(
@@ -1214,7 +848,7 @@ declare class BN {
1214
848
  /**
1215
849
  * @description convert to base-string and pad with zeroes
1216
850
  */
1217
- toString(base?: number | 'hex', length?: number): string;
851
+ toString(base?: number | "hex", length?: number): string;
1218
852
 
1219
853
  /**
1220
854
  * @description convert to Javascript Number (limited to 53 bits)
@@ -1474,11 +1108,7 @@ declare class BN {
1474
1108
  /**
1475
1109
  * @description division with remainder
1476
1110
  */
1477
- divmod(
1478
- b: BN,
1479
- mode?: 'div' | 'mod',
1480
- positive?: boolean,
1481
- ): { div: BN; mod: BN };
1111
+ divmod(b: BN, mode?: "div" | "mod", positive?: boolean): { div: BN; mod: BN };
1482
1112
 
1483
1113
  /**
1484
1114
  * @description reduct
@@ -1741,6 +1371,77 @@ declare class RedBN extends BN {
1741
1371
  redPow(b: BN): RedBN;
1742
1372
  }
1743
1373
 
1374
+ declare const TokenAccountSourceType: {
1375
+ readonly Spl: "spl";
1376
+ readonly Token2022: "token2022";
1377
+ readonly SplCold: "spl-cold";
1378
+ readonly Token2022Cold: "token2022-cold";
1379
+ readonly LightTokenHot: "light-token-hot";
1380
+ readonly LightTokenCold: "light-token-cold";
1381
+ };
1382
+ type TokenAccountSourceTypeValue = (typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
1383
+ /** @internal */
1384
+ interface TokenAccountSource {
1385
+ type: TokenAccountSourceTypeValue;
1386
+ address: PublicKey;
1387
+ amount: bigint;
1388
+ accountInfo: AccountInfo<Buffer$1>;
1389
+ loadContext?: MerkleContext;
1390
+ parsed: Account;
1391
+ }
1392
+ interface AccountInterface {
1393
+ accountInfo: AccountInfo<Buffer$1>;
1394
+ parsed: Account;
1395
+ isCold: boolean;
1396
+ loadContext?: MerkleContext;
1397
+ _sources?: TokenAccountSource[];
1398
+ _needsConsolidation?: boolean;
1399
+ _hasDelegate?: boolean;
1400
+ _anyFrozen?: boolean;
1401
+ /** True when fetched via getAtaInterface */
1402
+ _isAta?: boolean;
1403
+ /** Associated token account owner - set by getAtaInterface */
1404
+ _owner?: PublicKey;
1405
+ /** Associated token account mint - set by getAtaInterface */
1406
+ _mint?: PublicKey;
1407
+ }
1408
+ /** @internal */
1409
+ declare function convertTokenDataToAccount(address: PublicKey, tokenData: {
1410
+ mint: PublicKey;
1411
+ owner: PublicKey;
1412
+ amount: BN;
1413
+ delegate: PublicKey | null;
1414
+ state: number;
1415
+ tlv: Buffer$1 | null;
1416
+ }): Account;
1417
+ /** Convert compressed account to AccountInfo */
1418
+ declare function toAccountInfo(compressedAccount: CompressedAccountWithMerkleContext): AccountInfo<Buffer$1>;
1419
+ /** @internal */
1420
+ declare function parseLightTokenHot(address: PublicKey, accountInfo: AccountInfo<Buffer$1>): {
1421
+ accountInfo: AccountInfo<Buffer$1>;
1422
+ loadContext: undefined;
1423
+ parsed: Account;
1424
+ isCold: false;
1425
+ };
1426
+ /** @internal */
1427
+ declare function parseLightTokenCold(address: PublicKey, compressedAccount: CompressedAccountWithMerkleContext): {
1428
+ accountInfo: AccountInfo<Buffer$1>;
1429
+ loadContext: MerkleContext;
1430
+ parsed: Account;
1431
+ isCold: true;
1432
+ };
1433
+ /**
1434
+ * Retrieve information about a token account of SPL/T22/light-token.
1435
+ *
1436
+ * @param rpc RPC connection to use
1437
+ * @param address Token account address
1438
+ * @param commitment Desired level of commitment for querying the state
1439
+ * @param programId Token program ID. If not provided, tries all programs concurrently.
1440
+ *
1441
+ * @return Token account information with compression context if applicable
1442
+ */
1443
+ declare function getAccountInterface(rpc: Rpc, address: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<AccountInterface>;
1444
+
1744
1445
  /**
1745
1446
  * SPL interface PDA info.
1746
1447
  */
@@ -1846,21 +1547,14 @@ declare function toTokenPoolInfo(info: SplInterfaceInfo): TokenPoolInfo;
1846
1547
  *
1847
1548
  * @returns SplInterfaceInfo for the to-be-initialized interface
1848
1549
  */
1849
- declare function deriveSplInterfaceInfo(
1850
- mint: PublicKey,
1851
- tokenProgramId: PublicKey,
1852
- poolIndex?: number,
1853
- ): SplInterfaceInfo;
1550
+ declare function deriveSplInterfaceInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): SplInterfaceInfo;
1854
1551
  /**
1855
1552
  * Check if the SPL interface info is initialized and has a balance.
1856
1553
  * @param mint The mint of the SPL interface
1857
1554
  * @param splInterfaceInfo The SPL interface info (or TokenPoolInfo for backward compatibility)
1858
1555
  * @returns True if the SPL interface info is initialized and has a balance
1859
1556
  */
1860
- declare function checkSplInterfaceInfo(
1861
- splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo,
1862
- mint: PublicKey,
1863
- ): boolean;
1557
+ declare function checkSplInterfaceInfo(splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo, mint: PublicKey): boolean;
1864
1558
  /**
1865
1559
  * Get the SPL interface infos for a given mint.
1866
1560
  * @param rpc The RPC client
@@ -1869,11 +1563,7 @@ declare function checkSplInterfaceInfo(
1869
1563
  *
1870
1564
  * @returns The SPL interface infos
1871
1565
  */
1872
- declare function getSplInterfaceInfos(
1873
- rpc: Rpc,
1874
- mint: PublicKey,
1875
- commitment?: Commitment,
1876
- ): Promise<SplInterfaceInfo[]>;
1566
+ declare function getSplInterfaceInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<SplInterfaceInfo[]>;
1877
1567
  type SplInterfaceActivity = {
1878
1568
  signature: string;
1879
1569
  amount: BN;
@@ -1885,7 +1575,7 @@ type SplInterfaceActivity = {
1885
1575
  declare enum Action {
1886
1576
  Compress = 1,
1887
1577
  Decompress = 2,
1888
- Transfer = 3,
1578
+ Transfer = 3
1889
1579
  }
1890
1580
  /**
1891
1581
  * For `compress` and `mintTo` instructions only.
@@ -1897,9 +1587,7 @@ declare enum Action {
1897
1587
  *
1898
1588
  * @returns A random SPL interface info
1899
1589
  */
1900
- declare function selectSplInterfaceInfo(
1901
- infos: SplInterfaceInfo[],
1902
- ): SplInterfaceInfo;
1590
+ declare function selectSplInterfaceInfo(infos: SplInterfaceInfo[]): SplInterfaceInfo;
1903
1591
  /**
1904
1592
  * Select one or multiple SPL interface infos from the SPL interface infos.
1905
1593
  *
@@ -1912,10 +1600,7 @@ declare function selectSplInterfaceInfo(
1912
1600
  *
1913
1601
  * @returns Array with one or more SPL interface infos.
1914
1602
  */
1915
- declare function selectSplInterfaceInfosForDecompression(
1916
- infos: SplInterfaceInfo[],
1917
- decompressAmount: number | BN,
1918
- ): SplInterfaceInfo[];
1603
+ declare function selectSplInterfaceInfosForDecompression(infos: SplInterfaceInfo[], decompressAmount: number | BN): SplInterfaceInfo[];
1919
1604
  /**
1920
1605
  * @deprecated Use {@link SplInterfaceActivity} instead.
1921
1606
  */
@@ -1923,26 +1608,15 @@ type TokenPoolActivity = SplInterfaceActivity;
1923
1608
  /**
1924
1609
  * @deprecated Use {@link deriveSplInterfaceInfo} instead.
1925
1610
  */
1926
- declare function deriveTokenPoolInfo(
1927
- mint: PublicKey,
1928
- tokenProgramId: PublicKey,
1929
- poolIndex?: number,
1930
- ): TokenPoolInfo;
1611
+ declare function deriveTokenPoolInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): TokenPoolInfo;
1931
1612
  /**
1932
1613
  * @deprecated Use {@link checkSplInterfaceInfo} instead.
1933
1614
  */
1934
- declare function checkTokenPoolInfo(
1935
- tokenPoolInfo: TokenPoolInfo,
1936
- mint: PublicKey,
1937
- ): boolean;
1615
+ declare function checkTokenPoolInfo(tokenPoolInfo: TokenPoolInfo, mint: PublicKey): boolean;
1938
1616
  /**
1939
1617
  * @deprecated Use {@link getSplInterfaceInfos} instead.
1940
1618
  */
1941
- declare function getTokenPoolInfos(
1942
- rpc: Rpc,
1943
- mint: PublicKey,
1944
- commitment?: Commitment,
1945
- ): Promise<TokenPoolInfo[]>;
1619
+ declare function getTokenPoolInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<TokenPoolInfo[]>;
1946
1620
  /**
1947
1621
  * @deprecated Use {@link selectSplInterfaceInfo} instead.
1948
1622
  */
@@ -1950,388 +1624,196 @@ declare function selectTokenPoolInfo(infos: TokenPoolInfo[]): TokenPoolInfo;
1950
1624
  /**
1951
1625
  * @deprecated Use {@link selectSplInterfaceInfosForDecompression} instead.
1952
1626
  */
1953
- declare function selectTokenPoolInfosForDecompression(
1954
- infos: TokenPoolInfo[],
1955
- decompressAmount: number | BN,
1956
- ): TokenPoolInfo[];
1627
+ declare function selectTokenPoolInfosForDecompression(infos: TokenPoolInfo[], decompressAmount: number | BN): TokenPoolInfo[];
1957
1628
 
1958
- /**
1959
- * Create decompressInterface instruction using Transfer2.
1960
- *
1961
- * Supports decompressing to both c-token accounts and SPL token accounts:
1962
- * - For c-token destinations: No splInterfaceInfo needed
1963
- * - For SPL destinations: Provide splInterfaceInfo (token pool info) and decimals
1964
- *
1965
- * @param payer Fee payer public key
1966
- * @param inputCompressedTokenAccounts Input compressed token accounts
1967
- * @param toAddress Destination token account address (c-token or SPL ATA)
1968
- * @param amount Amount to decompress
1969
- * @param validityProof Validity proof (contains compressedProof and rootIndices)
1970
- * @param splInterfaceInfo Optional: SPL interface info for SPL destinations
1971
- * @param decimals Mint decimals (required for SPL destinations)
1972
- * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1973
- * @returns TransactionInstruction
1974
- */
1975
- declare function createDecompressInterfaceInstruction(
1976
- payer: PublicKey,
1977
- inputCompressedTokenAccounts: ParsedTokenAccount[],
1978
- toAddress: PublicKey,
1979
- amount: bigint,
1980
- validityProof: ValidityProofWithContext,
1981
- splInterfaceInfo: SplInterfaceInfo | undefined,
1982
- decimals: number,
1983
- maxTopUp?: number,
1984
- ): TransactionInstruction;
1985
-
1986
- declare const TokenAccountSourceType: {
1987
- readonly Spl: 'spl';
1988
- readonly Token2022: 'token2022';
1989
- readonly SplCold: 'spl-cold';
1990
- readonly Token2022Cold: 'token2022-cold';
1991
- readonly CTokenHot: 'ctoken-hot';
1992
- readonly CTokenCold: 'ctoken-cold';
1993
- };
1994
- type TokenAccountSourceTypeValue =
1995
- (typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
1996
- /** @internal */
1997
- interface TokenAccountSource {
1998
- type: TokenAccountSourceTypeValue;
1999
- address: PublicKey;
2000
- amount: bigint;
2001
- accountInfo: AccountInfo<Buffer$1>;
2002
- loadContext?: MerkleContext;
2003
- parsed: Account;
2004
- }
2005
- interface AccountInterface {
2006
- accountInfo: AccountInfo<Buffer$1>;
2007
- parsed: Account;
2008
- isCold: boolean;
2009
- loadContext?: MerkleContext;
2010
- _sources?: TokenAccountSource[];
2011
- _needsConsolidation?: boolean;
2012
- _hasDelegate?: boolean;
2013
- _anyFrozen?: boolean;
2014
- /** True when fetched via getAtaInterface */
2015
- _isAta?: boolean;
2016
- /** ATA owner - set by getAtaInterface */
2017
- _owner?: PublicKey;
2018
- /** ATA mint - set by getAtaInterface */
2019
- _mint?: PublicKey;
2020
- }
2021
- /** @internal */
2022
- declare function convertTokenDataToAccount(
2023
- address: PublicKey,
2024
- tokenData: {
2025
- mint: PublicKey;
2026
- owner: PublicKey;
2027
- amount: BN;
2028
- delegate: PublicKey | null;
2029
- state: number;
2030
- tlv: Buffer$1 | null;
2031
- },
2032
- ): Account;
2033
- /** Convert compressed account to AccountInfo */
2034
- declare function toAccountInfo(
2035
- compressedAccount: CompressedAccountWithMerkleContext,
2036
- ): AccountInfo<Buffer$1>;
2037
- /** @internal */
2038
- declare function parseCTokenHot(
2039
- address: PublicKey,
2040
- accountInfo: AccountInfo<Buffer$1>,
2041
- ): {
2042
- accountInfo: AccountInfo<Buffer$1>;
2043
- loadContext: undefined;
2044
- parsed: Account;
2045
- isCold: false;
2046
- };
2047
- /** @internal */
2048
- declare function parseCTokenCold(
2049
- address: PublicKey,
2050
- compressedAccount: CompressedAccountWithMerkleContext,
2051
- ): {
2052
- accountInfo: AccountInfo<Buffer$1>;
2053
- loadContext: MerkleContext;
2054
- parsed: Account;
2055
- isCold: true;
1629
+ declare function sliceLast<T>(items: T[]): {
1630
+ rest: T[];
1631
+ last: T;
2056
1632
  };
1633
+
2057
1634
  /**
2058
- * Retrieve information about a token account of SPL/T22/c-token.
1635
+ * Create a light-token transfer instruction.
2059
1636
  *
2060
- * @param rpc RPC connection to use
2061
- * @param address Token account address
2062
- * @param commitment Desired level of commitment for querying the state
2063
- * @param programId Token program ID. If not provided, tries all programs concurrently.
1637
+ * For light-token accounts with compressible extension, the program needs
1638
+ * system_program and fee_payer to handle rent top-ups.
2064
1639
  *
2065
- * @return Token account information with compression context if applicable
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
2066
1646
  */
2067
- declare function getAccountInterface(
2068
- rpc: Rpc,
2069
- address: PublicKey,
2070
- commitment?: Commitment,
2071
- programId?: PublicKey,
2072
- ): Promise<AccountInterface>;
2073
-
1647
+ declare function createLightTokenTransferInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, amount: number | bigint, feePayer?: PublicKey): TransactionInstruction;
2074
1648
  /**
2075
- * Options for interface operations (load, transfer)
1649
+ * Create a light-token transfer_checked instruction. Same semantics as SPL
1650
+ * TransferChecked.
2076
1651
  */
1652
+ declare function createLightTokenTransferCheckedInstruction(source: PublicKey, destination: PublicKey, mint: PublicKey, owner: PublicKey, amount: number | bigint, decimals: number, payer: PublicKey): TransactionInstruction;
1653
+ declare function createTransferToAccountInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, amount: number | bigint | BN, owner: PublicKey, destination: PublicKey, decimals: number, options?: InterfaceOptions, programId?: PublicKey): Promise<TransactionInstruction[][]>;
1654
+
2077
1655
  interface InterfaceOptions {
2078
- /** SPL interface infos (fetched if not provided) */
2079
1656
  splInterfaceInfos?: SplInterfaceInfo[];
2080
- }
2081
- /**
2082
- * Transfer tokens using the c-token interface.
2083
- *
2084
- * High-level action: resolves balances, builds all instructions (load +
2085
- * transfer), signs, and sends. Creates the recipient ATA if it does not exist.
2086
- *
2087
- * For instruction-level control, use `createTransferInterfaceInstructions`.
2088
- *
2089
- * @param rpc RPC connection
2090
- * @param payer Fee payer (signer)
2091
- * @param source Source c-token ATA address
2092
- * @param mint Mint address
2093
- * @param destination Recipient wallet public key
2094
- * @param owner Source owner (signer)
2095
- * @param amount Amount to transfer
2096
- * @param programId Token program ID (default: LIGHT_TOKEN_PROGRAM_ID)
2097
- * @param confirmOptions Optional confirm options
2098
- * @param options Optional interface options
2099
- * @param wrap Include SPL/T22 wrapping (default: false)
2100
- * @returns Transaction signature of the transfer transaction
2101
- */
2102
- declare function transferInterface(
2103
- rpc: Rpc,
2104
- payer: Signer,
2105
- source: PublicKey,
2106
- mint: PublicKey,
2107
- destination: PublicKey,
2108
- owner: Signer,
2109
- amount: number | bigint | BN,
2110
- programId?: PublicKey,
2111
- confirmOptions?: ConfirmOptions,
2112
- options?: InterfaceOptions,
2113
- wrap?: boolean,
2114
- ): Promise<TransactionSignature>;
2115
- /**
2116
- * Options for createTransferInterfaceInstructions.
2117
- */
2118
- interface TransferOptions extends InterfaceOptions {
2119
- /** Include SPL/T22 wrapping to c-token ATA (unified path). Default: false. */
2120
1657
  wrap?: boolean;
2121
- /** Token program ID. Default: LIGHT_TOKEN_PROGRAM_ID. */
2122
- programId?: PublicKey;
2123
1658
  /**
2124
- * Include an idempotent recipient ATA creation instruction in the
2125
- * transfer transaction. No extra RPC fetch -- uses
2126
- * createAssociatedTokenAccountInterfaceIdempotentInstruction which is
2127
- * a no-op on-chain if the ATA already exists (~200 CU overhead).
2128
- * Default: true.
1659
+ * Delegate authority pubkey. For owner-signed flows, omit this field.
2129
1660
  */
2130
- ensureRecipientAta?: boolean;
1661
+ delegatePubkey?: PublicKey;
1662
+ }
1663
+ declare function transferToAccountInterface(rpc: Rpc, payer: Signer, source: PublicKey, mint: PublicKey, destination: PublicKey, owner: PublicKey, authority: Signer, amount: number | bigint | BN, programId?: PublicKey, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, decimals?: number): Promise<TransactionSignature>;
1664
+ declare function transferInterface(rpc: Rpc, payer: Signer, source: PublicKey, mint: PublicKey, recipient: PublicKey, owner: PublicKey, authority: Signer, amount: number | bigint | BN, programId?: PublicKey, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, decimals?: number): Promise<TransactionSignature>;
1665
+
1666
+ declare function createTransferInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, amount: number | bigint | BN, owner: PublicKey, recipient: PublicKey, decimals: number, options?: InterfaceOptions, programId?: PublicKey): Promise<TransactionInstruction[][]>;
1667
+
1668
+ declare function selectInputsForAmount(accounts: ParsedTokenAccount[], neededAmount: bigint): ParsedTokenAccount[];
1669
+
1670
+ /**
1671
+ * Parameters for creating a MintTo instruction.
1672
+ */
1673
+ interface CreateMintToInstructionParams {
1674
+ /** Light mint account (decompressed from compressed light mint) */
1675
+ mint: PublicKey;
1676
+ /** Destination light-token account to mint to */
1677
+ destination: PublicKey;
1678
+ /** Amount of tokens to mint */
1679
+ amount: number | bigint;
1680
+ /** Mint authority (must be signer) */
1681
+ authority: PublicKey;
1682
+ /** Maximum lamports for rent and top-up combined. Transaction fails if exceeded. (u16::MAX = no limit, 0 = no top-ups allowed) */
1683
+ maxTopUp?: number;
1684
+ /** Optional fee payer for rent top-ups. If not provided, authority pays. */
1685
+ feePayer?: PublicKey;
2131
1686
  }
2132
1687
  /**
2133
- * Splits the last element from an array.
1688
+ * Create instruction for minting tokens to a light-token account.
2134
1689
  *
2135
- * Useful for separating load transactions (parallel) from the final transfer
2136
- * transaction (sequential) returned by `createTransferInterfaceInstructions`.
1690
+ * This is a simple 3-4 account instruction for minting to light-token associated token accounts (hot).
1691
+ * Uses discriminator 7 (LightTokenMintTo).
2137
1692
  *
2138
- * @returns `{ rest, last }` where `rest` is everything before the last
2139
- * element and `last` is the last element.
2140
- * @throws if the input array is empty.
1693
+ * @param params - Mint instruction parameters
1694
+ * @returns TransactionInstruction for minting tokens
2141
1695
  */
2142
- declare function sliceLast<T>(items: T[]): {
2143
- rest: T[];
2144
- last: T;
2145
- };
1696
+ declare function createMintToInstruction(params: CreateMintToInstructionParams): TransactionInstruction;
1697
+
1698
+ /** Default compressible config PDA (V1) */
1699
+ declare const LIGHT_TOKEN_CONFIG: PublicKey;
1700
+ /** Default rent sponsor PDA (V1) */
1701
+ declare const LIGHT_TOKEN_RENT_SPONSOR: PublicKey;
2146
1702
  /**
2147
- * Create instructions for a c-token transfer.
2148
- *
2149
- * Returns `TransactionInstruction[][]` -- an array of transaction instruction
2150
- * arrays. Each inner array is one transaction to sign and send.
2151
- *
2152
- * - All transactions except the last can be sent in parallel (load/decompress).
2153
- * - The last transaction is the transfer and must be sent after all others
2154
- * confirm.
2155
- * - For a hot sender or <=8 cold inputs, the result is a single-element array.
2156
- *
2157
- * Use `sliceLast` to separate the parallel prefix from the final transfer:
2158
- * ```
2159
- * const batches = await createTransferInterfaceInstructions(...);
2160
- * const { rest, last } = sliceLast(batches);
2161
- * ```
2162
- *
2163
- * When `ensureRecipientAta` is true (the default), an idempotent ATA creation
2164
- * instruction is included in the transfer (last) transaction. No extra RPC
2165
- * fetch -- the instruction is a no-op on-chain if the ATA already exists.
2166
- * Set `ensureRecipientAta: false` if you manage recipient ATAs yourself.
2167
- *
2168
- * All transactions require payer + sender as signers.
2169
- *
2170
- * Hash uniqueness guarantee: all compressed accounts for the sender are
2171
- * fetched once, then partitioned into non-overlapping chunks by tree version.
2172
- * Each hash appears in exactly one batch. This is enforced at runtime by
2173
- * `assertUniqueInputHashes` inside `_buildLoadBatches`.
2174
- *
2175
- * @param rpc RPC connection
2176
- * @param payer Fee payer public key
2177
- * @param mint Mint address
2178
- * @param amount Amount to transfer
2179
- * @param sender Sender public key (must sign all transactions)
2180
- * @param recipient Recipient public key
2181
- * @param options Optional configuration
2182
- * @returns TransactionInstruction[][] -- send [0..n-2] in parallel, then [n-1]
2183
- */
2184
- declare function createTransferInterfaceInstructions(
2185
- rpc: Rpc,
2186
- payer: PublicKey,
2187
- mint: PublicKey,
2188
- amount: number | bigint | BN,
2189
- sender: PublicKey,
2190
- recipient: PublicKey,
2191
- options?: TransferOptions,
2192
- ): Promise<TransactionInstruction[][]>;
2193
-
2194
- /**
2195
- * Account info interface for compressible accounts.
2196
- * Matches return structure of getAccountInterface/getAtaInterface.
2197
- *
2198
- * Integrating programs provide their own fetch/parse - this is just the data shape.
2199
- */
2200
- interface ParsedAccountInfoInterface<T = unknown> {
2201
- /** Parsed account data (program-specific) */
2202
- parsed: T;
2203
- /** Load context - present if account is compressed (cold), undefined if hot */
2204
- loadContext?: MerkleContext;
1703
+ * Token data version enum - mirrors Rust TokenDataVersion
1704
+ * Used for compressed token account hashing strategy
1705
+ */
1706
+ declare enum TokenDataVersion {
1707
+ /** V1: Poseidon hash with little-endian amount, discriminator [2,0,0,0,0,0,0,0] */
1708
+ V1 = 1,
1709
+ /** V2: Poseidon hash with big-endian amount, discriminator [0,0,0,0,0,0,0,3] */
1710
+ V2 = 2,
1711
+ /** ShaFlat: SHA256 hash of borsh-serialized data, discriminator [0,0,0,0,0,0,0,4] */
1712
+ ShaFlat = 3
2205
1713
  }
1714
+ declare const POOL_SEED: Buffer$1<ArrayBuffer>;
1715
+ declare const CPI_AUTHORITY_SEED: Buffer$1<ArrayBuffer>;
1716
+ declare const SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE = 1461600;
1717
+ declare const CREATE_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1718
+ declare const MINT_TO_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1719
+ declare const BATCH_COMPRESS_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1720
+ declare const TRANSFER_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1721
+ declare const COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1722
+ declare const APPROVE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1723
+ declare const REVOKE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
1724
+ declare const ADD_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
2206
1725
  /**
2207
- * Input for createLoadAccountsParams.
2208
- * Supports both program PDAs and c-token vaults.
2209
- *
2210
- * The integrating program is responsible for fetching and parsing their accounts.
2211
- * This helper just packs them for the decompressAccountsIdempotent instruction.
1726
+ * Maximum lamports for rent top-up in a single instruction.
1727
+ * u16::MAX = no limit; 0 = no top-ups allowed.
1728
+ * Matches Rust SDK (e.g. token-sdk create_mints uses u16::MAX for "no limit").
2212
1729
  */
2213
- interface CompressibleAccountInput<T = unknown> {
2214
- /** Account address */
2215
- address: PublicKey;
2216
- /**
2217
- * Account type key for packing:
2218
- * - For PDAs: program-specific type name (e.g., "poolState", "observationState")
2219
- * - For c-token vaults: "cTokenData"
2220
- */
2221
- accountType: string;
2222
- /**
2223
- * Token variant - required when accountType is "cTokenData".
2224
- * Examples: "lpVault", "token0Vault", "token1Vault"
2225
- */
2226
- tokenVariant?: string;
2227
- /** Parsed account info (from program-specific fetch) */
2228
- info: ParsedAccountInfoInterface<T>;
2229
- }
1730
+ declare const MAX_TOP_UP = 65535;
2230
1731
  /**
2231
- * Packed compressed account for decompressAccountsIdempotent instruction
1732
+ * Rent configuration constants for compressible light token accounts.
1733
+ * These match the Rust SDK defaults in program-libs/compressible/src/rent/config.rs
2232
1734
  */
2233
- interface PackedCompressedAccount {
2234
- [key: string]: unknown;
2235
- merkleContext: {
2236
- merkleTreePubkeyIndex: number;
2237
- queuePubkeyIndex: number;
2238
- };
2239
- }
1735
+ /** Base rent per epoch (lamports) */
1736
+ declare const BASE_RENT_PER_EPOCH = 128;
1737
+ /** Rent per byte per epoch (lamports) */
1738
+ declare const RENT_PER_BYTE_PER_EPOCH = 1;
1739
+ /** Slots per rent epoch (1.5 hours) */
1740
+ declare const SLOTS_PER_RENT_EPOCH = 13500;
1741
+ /** Compression cost (lamports) - paid at account creation */
1742
+ declare const COMPRESSION_COST = 10000;
1743
+ /** Compression incentive (lamports) - paid at account creation */
1744
+ declare const COMPRESSION_INCENTIVE = 1000;
1745
+ /** Total compression cost (COMPRESSION_COST + COMPRESSION_INCENTIVE) */
1746
+ declare const TOTAL_COMPRESSION_COST: number;
2240
1747
  /**
2241
- * Result from building load params
1748
+ * Compressible light token account size in bytes.
1749
+ * = 165 (base SPL token) + 1 (account_type) + 1 (Option) + 4 (Vec len) + 1 (ext disc) + 4 (ext header) + 96 (CompressionInfo) = 272
1750
+ * Source: program-libs/token-interface/src/state/token/top_up.rs MIN_SIZE_WITH_COMPRESSIBLE
2242
1751
  */
2243
- interface CompressibleLoadParams {
2244
- /** Validity proof wrapped in option (null if all proveByIndex) */
2245
- proofOption: {
2246
- 0: ValidityProof | null;
2247
- };
2248
- /** Packed compressed accounts data for instruction */
2249
- compressedAccounts: PackedCompressedAccount[];
2250
- /** Offset to system accounts in remainingAccounts */
2251
- systemAccountsOffset: number;
2252
- /** Account metas for remaining accounts */
2253
- remainingAccounts: AccountMeta[];
2254
- }
1752
+ declare const COMPRESSIBLE_LIGHT_TOKEN_ACCOUNT_SIZE = 272;
2255
1753
  /**
2256
- * Result from createLoadAccountsParams
1754
+ * Calculate rent per epoch for a given account size.
1755
+ * Formula: base_rent + (bytes * lamports_per_byte_per_epoch)
2257
1756
  */
2258
- interface LoadResult {
2259
- /** Params for decompressAccountsIdempotent (null if no program accounts need decompressing) */
2260
- decompressParams: CompressibleLoadParams | null;
2261
- /** Instructions to load ATAs (create ATA, wrap SPL/T22, decompressInterface) */
2262
- ataInstructions: TransactionInstruction[];
2263
- }
1757
+ declare function rentPerEpoch(bytes: number): number;
2264
1758
  /**
2265
- * Create params for loading program accounts and ATAs.
2266
- *
2267
- * Returns:
2268
- * - decompressParams: for a caller program's standardized
2269
- * decompressAccountsIdempotent instruction
2270
- * - ataInstructions: for loading user ATAs
1759
+ * Default rent per epoch for a compressible light token account (272 bytes).
1760
+ * = 128 + 272 = 400 lamports
1761
+ */
1762
+ declare const COMPRESSIBLE_LIGHT_TOKEN_RENT_PER_EPOCH: number;
1763
+ /** Default prepaid epochs (24 hours = 16 epochs * 1.5h) */
1764
+ declare const DEFAULT_PREPAY_EPOCHS = 16;
1765
+ /** Default write top-up (lamports) - ~2 epochs rent */
1766
+ declare const DEFAULT_WRITE_TOP_UP = 766;
1767
+ /**
1768
+ * Calculate fee payer cost at ATA creation.
1769
+ * = compression_cost (11K) + (prepay_epochs * rent_per_epoch)
1770
+ */
1771
+ declare function calculateFeePayerCostAtCreation(prepayEpochs?: number, accountBytes?: number): number;
1772
+
1773
+ /**
1774
+ * Create instruction for minting tokens from a light mint to compressed accounts.
1775
+ * To mint to light-token associated token accounts across SPL/T22/light mints, use
1776
+ * {@link createMintToInterfaceInstruction} instead.
2271
1777
  *
2272
- * @param rpc RPC connection
2273
- * @param payer Fee payer (needed for ATA instructions)
2274
- * @param programId Program ID for decompressAccountsIdempotent
2275
- * @param programAccounts PDAs and vaults (caller pre-fetches)
2276
- * @param atas User ATAs (fetched via getAtaInterface)
2277
- * @param options Optional load options
2278
- * @returns LoadResult with decompressParams and ataInstructions
1778
+ * @param authority Mint authority public key.
1779
+ * @param payer Fee payer public key.
1780
+ * @param validityProof Validity proof for the light mint.
1781
+ * @param merkleContext Merkle context of the light mint.
1782
+ * @param mintData Mint instruction data.
1783
+ * @param recipients Array of recipients with amounts.
1784
+ * @param outputStateTreeInfo Optional output state tree info. Uses merkle
1785
+ * context queue if not provided.
1786
+ * @param tokenAccountVersion Token account version (default:
1787
+ * TokenDataVersion.ShaFlat).
1788
+ * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
1789
+ */
1790
+ declare function createMintToCompressedInstruction(authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, merkleContext: MerkleContext, mintData: MintInstructionData, recipients: Array<{
1791
+ recipient: PublicKey;
1792
+ amount: number | bigint;
1793
+ }>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: TokenDataVersion, maxTopUp?: number): TransactionInstruction;
1794
+
1795
+ /**
1796
+ * Create mint-to instruction for SPL, Token-2022, or light-token mints.
1797
+ * This instruction ONLY mints to light-token associated token accounts (hot).
2279
1798
  *
2280
- * @example
2281
- * ```typescript
2282
- * const poolInfo = await myProgram.fetchPoolState(rpc, poolAddress);
2283
- * const vault0Ata = getAssociatedTokenAddressInterface(token0Mint, poolAddress);
2284
- * const vault0Info = await getAtaInterface(rpc, vault0Ata, poolAddress, token0Mint, undefined, LIGHT_TOKEN_PROGRAM_ID);
2285
- * const userAta = getAssociatedTokenAddressInterface(tokenMint, userWallet);
2286
- * const userAtaInfo = await getAtaInterface(rpc, userAta, userWallet, tokenMint);
2287
- *
2288
- * const result = await createLoadAccountsParams(
2289
- * rpc,
2290
- * payer.publicKey,
2291
- * programId,
2292
- * [
2293
- * { address: poolAddress, accountType: 'poolState', info: poolInfo },
2294
- * { address: vault0, accountType: 'cTokenData', tokenVariant: 'token0Vault', info: vault0Info },
2295
- * ],
2296
- * [userAta],
2297
- * );
1799
+ * For light-token mints, the light mint account must exist (mint must be decompressed first).
2298
1800
  *
2299
- * // Build transaction with both program decompress and ATA load
2300
- * const instructions = [...result.ataInstructions];
2301
- * if (result.decompressParams) {
2302
- * instructions.push(await program.methods
2303
- * .decompressAccountsIdempotent(
2304
- * result.decompressParams.proofOption,
2305
- * result.decompressParams.compressedAccounts,
2306
- * result.decompressParams.systemAccountsOffset,
2307
- * )
2308
- * .remainingAccounts(result.decompressParams.remainingAccounts)
2309
- * .instruction());
2310
- * }
2311
- * ```
2312
- */
2313
- declare function createLoadAccountsParams(
2314
- rpc: Rpc,
2315
- payer: PublicKey,
2316
- programId: PublicKey,
2317
- programAccounts?: CompressibleAccountInput[],
2318
- atas?: AccountInterface[],
2319
- options?: InterfaceOptions,
2320
- ): Promise<LoadResult>;
2321
- /**
2322
- * Calculate compute units for compressible load operation
2323
- */
2324
- declare function calculateCompressibleLoadComputeUnits(
2325
- compressedAccountCount: number,
2326
- hasValidityProof: boolean,
2327
- ): number;
1801
+ * @param mintInterface Mint interface (SPL, Token-2022, or light-token).
1802
+ * @param destination Destination onchain token account address.
1803
+ * @param authority Mint authority public key.
1804
+ * @param payer Fee payer public key.
1805
+ * @param amount Amount to mint.
1806
+ * @param validityProof Not used (legacy parameter, kept for compatibility).
1807
+ * @param multiSigners Multi-signature signer public keys (SPL/T22 only).
1808
+ */
1809
+ declare function createMintToInterfaceInstruction(mintInterface: MintInterface, destination: PublicKey, authority: PublicKey, payer: PublicKey, amount: number | bigint, validityProof?: ValidityProofWithContext, multiSigners?: PublicKey[]): TransactionInstruction;
2328
1810
 
2329
1811
  /**
2330
1812
  * Create a wrap instruction that moves tokens from an SPL/T22 account to a
2331
- * c-token account.
1813
+ * light-token account.
2332
1814
  *
2333
1815
  * @param source Source SPL/T22 token account
2334
- * @param destination Destination c-token account
1816
+ * @param destination Destination light-token account
2335
1817
  * @param owner Owner of the source account (signer)
2336
1818
  * @param mint Mint address
2337
1819
  * @param amount Amount to wrap,
@@ -2341,23 +1823,13 @@ declare function calculateCompressibleLoadComputeUnits(
2341
1823
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
2342
1824
  * @returns Instruction to wrap tokens
2343
1825
  */
2344
- declare function createWrapInstruction(
2345
- source: PublicKey,
2346
- destination: PublicKey,
2347
- owner: PublicKey,
2348
- mint: PublicKey,
2349
- amount: bigint,
2350
- splInterfaceInfo: SplInterfaceInfo,
2351
- decimals: number,
2352
- payer?: PublicKey,
2353
- maxTopUp?: number,
2354
- ): TransactionInstruction;
1826
+ declare function createWrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey, maxTopUp?: number): TransactionInstruction;
2355
1827
 
2356
1828
  /**
2357
- * Create an unwrap instruction that moves tokens from a c-token account to an
1829
+ * Create an unwrap instruction that moves tokens from a light-token account to an
2358
1830
  * SPL/T22 account.
2359
1831
  *
2360
- * @param source Source c-token account
1832
+ * @param source Source light-token account
2361
1833
  * @param destination Destination SPL/T22 token account
2362
1834
  * @param owner Owner of the source account (signer)
2363
1835
  * @param mint Mint address
@@ -2368,55 +1840,151 @@ declare function createWrapInstruction(
2368
1840
  * @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
2369
1841
  * @returns TransactionInstruction to unwrap tokens
2370
1842
  */
2371
- declare function createUnwrapInstruction(
2372
- source: PublicKey,
2373
- destination: PublicKey,
2374
- owner: PublicKey,
2375
- mint: PublicKey,
2376
- amount: bigint,
2377
- splInterfaceInfo: SplInterfaceInfo,
2378
- decimals: number,
2379
- payer?: PublicKey,
2380
- maxTopUp?: number,
2381
- ): TransactionInstruction;
1843
+ declare function createUnwrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey, maxTopUp?: number): TransactionInstruction;
1844
+ declare function createUnwrapInstructions(rpc: Rpc, destination: PublicKey, owner: PublicKey, mint: PublicKey, decimals: number, amount?: number | bigint | BN, payer?: PublicKey, splInterfaceInfo?: SplInterfaceInfo, maxTopUp?: number, interfaceOptions?: InterfaceOptions, wrap?: boolean): Promise<TransactionInstruction[][]>;
1845
+
1846
+ /**
1847
+ * Create an instruction to freeze a decompressed light-token account.
1848
+ *
1849
+ * Freezing sets the account state to AccountState::Frozen, preventing
1850
+ * transfers and other token operations. Only the mint's freeze_authority
1851
+ * can freeze accounts.
1852
+ *
1853
+ * Account order per program:
1854
+ * 0. token_account (mutable) - the light-token account to freeze
1855
+ * 1. mint (readonly) - the mint associated with the token account
1856
+ * 2. freeze_authority - must match mint.freeze_authority (signer)
1857
+ *
1858
+ * @param tokenAccount The light-token account to freeze (must be Initialized)
1859
+ * @param mint The mint of the light-token account
1860
+ * @param freezeAuthority The freeze authority of the mint (signer)
1861
+ * @returns TransactionInstruction
1862
+ */
1863
+ declare function createLightTokenFreezeAccountInstruction(tokenAccount: PublicKey, mint: PublicKey, freezeAuthority: PublicKey): TransactionInstruction;
1864
+ /**
1865
+ * Create an instruction to thaw (unfreeze) a frozen light-token account.
1866
+ *
1867
+ * Thawing restores the account state from AccountState::Frozen to
1868
+ * AccountState::Initialized, re-enabling token operations. Only the
1869
+ * mint's freeze_authority can thaw accounts.
1870
+ *
1871
+ * Account order per program:
1872
+ * 0. token_account (mutable) - the frozen light-token account to thaw
1873
+ * 1. mint (readonly) - the mint associated with the token account
1874
+ * 2. freeze_authority - must match mint.freeze_authority (signer)
1875
+ *
1876
+ * @param tokenAccount The frozen light-token account to thaw
1877
+ * @param mint The mint of the light-token account
1878
+ * @param freezeAuthority The freeze authority of the mint (signer)
1879
+ * @returns TransactionInstruction
1880
+ */
1881
+ declare function createLightTokenThawAccountInstruction(tokenAccount: PublicKey, mint: PublicKey, freezeAuthority: PublicKey): TransactionInstruction;
1882
+
1883
+ /**
1884
+ * Create an instruction to approve a delegate for a light-token account.
1885
+ *
1886
+ * Account order per program:
1887
+ * 0. token_account (mutable) - the light-token account
1888
+ * 1. delegate (readonly) - the delegate to approve
1889
+ * 2. owner (signer) - owner of the token account
1890
+ * 3. system_program (readonly) - for rent top-ups via CPI
1891
+ * 4. fee_payer (mutable, signer) - pays for rent top-ups
1892
+ *
1893
+ * @param tokenAccount The light-token account to set delegation on
1894
+ * @param delegate The delegate to approve
1895
+ * @param owner Owner of the token account (signer)
1896
+ * @param amount Amount of tokens to delegate
1897
+ * @param feePayer Optional fee payer for rent top-ups (defaults to owner)
1898
+ * @returns TransactionInstruction
1899
+ */
1900
+ declare function createLightTokenApproveInstruction(tokenAccount: PublicKey, delegate: PublicKey, owner: PublicKey, amount: number | bigint, feePayer?: PublicKey): TransactionInstruction;
1901
+ /**
1902
+ * Create an instruction to revoke delegation for a light-token account.
1903
+ *
1904
+ * Account order per program:
1905
+ * 0. token_account (mutable) - the light-token account
1906
+ * 1. owner (signer) - owner of the token account
1907
+ * 2. system_program (readonly) - for rent top-ups via CPI
1908
+ * 3. fee_payer (mutable, signer) - pays for rent top-ups
1909
+ *
1910
+ * @param tokenAccount The light-token account to revoke delegation on
1911
+ * @param owner Owner of the token account (signer)
1912
+ * @param feePayer Optional fee payer for rent top-ups (defaults to owner)
1913
+ * @returns TransactionInstruction
1914
+ */
1915
+ declare function createLightTokenRevokeInstruction(tokenAccount: PublicKey, owner: PublicKey, feePayer?: PublicKey): TransactionInstruction;
1916
+
1917
+ /**
1918
+ * Build instruction batches for approving a delegate on an ATA.
1919
+ *
1920
+ * Supports light-token, SPL, and Token-2022 mints.
1921
+ * Returns `TransactionInstruction[][]`. Send [0..n-2] in parallel, then [n-1].
1922
+ *
1923
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
1924
+ * into the hot ATA before the approve instruction. The `amount` parameter
1925
+ * only controls the delegate's spending limit, not the number of accounts
1926
+ * loaded. Users with many cold accounts may see additional load transactions.
1927
+ *
1928
+ * @param rpc RPC connection
1929
+ * @param payer Fee payer public key
1930
+ * @param mint Mint address
1931
+ * @param tokenAccount ATA address
1932
+ * @param delegate Delegate to approve
1933
+ * @param amount Amount to delegate
1934
+ * @param owner Owner public key
1935
+ * @param decimals Token decimals
1936
+ * @param programId Token program ID (default: LIGHT_TOKEN_PROGRAM_ID)
1937
+ * @param options Optional interface options (`wrap` is nested here)
1938
+ * @returns Instruction batches
1939
+ */
1940
+ declare function createApproveInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, tokenAccount: PublicKey, delegate: PublicKey, amount: number | bigint | BN, owner: PublicKey, decimals: number, programId?: PublicKey, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
1941
+ /**
1942
+ * Build instruction batches for revoking delegation on an ATA.
1943
+ *
1944
+ * Supports light-token, SPL, and Token-2022 mints.
1945
+ * Returns `TransactionInstruction[][]`. Send [0..n-2] in parallel, then [n-1].
1946
+ *
1947
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
1948
+ * into the hot ATA before the revoke instruction. Users with many cold
1949
+ * accounts may see additional load transactions.
1950
+ *
1951
+ * @param rpc RPC connection
1952
+ * @param payer Fee payer public key
1953
+ * @param mint Mint address
1954
+ * @param tokenAccount ATA address
1955
+ * @param owner Owner public key
1956
+ * @param decimals Token decimals
1957
+ * @param programId Token program ID (default: LIGHT_TOKEN_PROGRAM_ID)
1958
+ * @param options Optional interface options (`wrap` is nested here)
1959
+ * @returns Instruction batches
1960
+ */
1961
+ declare function createRevokeInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, tokenAccount: PublicKey, owner: PublicKey, decimals: number, programId?: PublicKey, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
2382
1962
 
2383
1963
  /**
2384
- * Create and initialize a new mint for SPL/T22/c-token.
1964
+ * Create and initialize a new mint for SPL/T22/light-token.
2385
1965
  *
2386
1966
  * @param rpc RPC connection to use
2387
1967
  * @param payer Fee payer
2388
- * @param mintAuthority Account that will control minting (signer for c-token mints)
1968
+ * @param mintAuthority Account that will control minting (signer for light-token mints)
2389
1969
  * @param freezeAuthority Account that will control freeze and thaw (optional)
2390
1970
  * @param decimals Location of the decimal place
2391
1971
  * @param keypair Mint keypair (defaults to a random keypair)
2392
1972
  * @param confirmOptions Confirm options
2393
1973
  * @param programId Token program ID (defaults to LIGHT_TOKEN_PROGRAM_ID)
2394
- * @param tokenMetadata Optional token metadata (c-token mints only)
2395
- * @param outputStateTreeInfo Optional output state tree info (c-token mints only)
2396
- * @param addressTreeInfo Optional address tree info (c-token mints only)
1974
+ * @param tokenMetadata Optional token metadata (light-token mints only)
1975
+ * @param outputStateTreeInfo Optional output state tree info (light-token mints only)
1976
+ * @param addressTreeInfo Optional address tree info (light-token mints only)
2397
1977
  *
2398
1978
  * @returns Object with mint address and transaction signature
2399
1979
  */
2400
- declare function createMintInterface(
2401
- rpc: Rpc,
2402
- payer: Signer,
2403
- mintAuthority: PublicKey | Signer,
2404
- freezeAuthority: PublicKey | Signer | null,
2405
- decimals: number,
2406
- keypair?: Keypair,
2407
- confirmOptions?: ConfirmOptions,
2408
- programId?: PublicKey,
2409
- tokenMetadata?: TokenMetadataInstructionData,
2410
- outputStateTreeInfo?: TreeInfo,
2411
- addressTreeInfo?: AddressTreeInfo,
2412
- ): Promise<{
1980
+ 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<{
2413
1981
  mint: PublicKey;
2414
1982
  transactionSignature: TransactionSignature;
2415
1983
  }>;
2416
1984
 
2417
1985
  /**
2418
- * Update the mint authority of a compressed token mint.
2419
- * Works for both compressed and decompressed mints.
1986
+ * Update the mint authority of a light-token mint.
1987
+ * Works for both compressed and decompressed light mints.
2420
1988
  *
2421
1989
  * @param rpc RPC connection
2422
1990
  * @param payer Fee payer (signer)
@@ -2425,17 +1993,10 @@ declare function createMintInterface(
2425
1993
  * @param newMintAuthority New mint authority (or null to revoke)
2426
1994
  * @param confirmOptions Optional confirm options
2427
1995
  */
2428
- declare function updateMintAuthority(
2429
- rpc: Rpc,
2430
- payer: Signer,
2431
- mint: PublicKey,
2432
- currentMintAuthority: Signer,
2433
- newMintAuthority: PublicKey | null,
2434
- confirmOptions?: ConfirmOptions,
2435
- ): Promise<TransactionSignature>;
1996
+ declare function updateMintAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentMintAuthority: Signer, newMintAuthority: PublicKey | null, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2436
1997
  /**
2437
- * Update the freeze authority of a compressed token mint.
2438
- * Works for both compressed and decompressed mints.
1998
+ * Update the freeze authority of a light-token mint.
1999
+ * Works for both compressed and decompressed light mints.
2439
2000
  *
2440
2001
  * @param rpc RPC connection
2441
2002
  * @param payer Fee payer (signer)
@@ -2444,18 +2005,11 @@ declare function updateMintAuthority(
2444
2005
  * @param newFreezeAuthority New freeze authority (or null to revoke)
2445
2006
  * @param confirmOptions Optional confirm options
2446
2007
  */
2447
- declare function updateFreezeAuthority(
2448
- rpc: Rpc,
2449
- payer: Signer,
2450
- mint: PublicKey,
2451
- currentFreezeAuthority: Signer,
2452
- newFreezeAuthority: PublicKey | null,
2453
- confirmOptions?: ConfirmOptions,
2454
- ): Promise<TransactionSignature>;
2008
+ declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentFreezeAuthority: Signer, newFreezeAuthority: PublicKey | null, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2455
2009
 
2456
2010
  /**
2457
- * Update a metadata field on a compressed token mint.
2458
- * Works for both compressed and decompressed mints.
2011
+ * Update a metadata field on a light-token mint.
2012
+ * Works for both compressed and decompressed light mints.
2459
2013
  *
2460
2014
  * @param rpc RPC connection
2461
2015
  * @param payer Fee payer (signer)
@@ -2467,20 +2021,10 @@ declare function updateFreezeAuthority(
2467
2021
  * @param extensionIndex Extension index (default: 0)
2468
2022
  * @param confirmOptions Optional confirm options
2469
2023
  */
2470
- declare function updateMetadataField(
2471
- rpc: Rpc,
2472
- payer: Signer,
2473
- mint: PublicKey,
2474
- authority: Signer,
2475
- fieldType: 'name' | 'symbol' | 'uri' | 'custom',
2476
- value: string,
2477
- customKey?: string,
2478
- extensionIndex?: number,
2479
- confirmOptions?: ConfirmOptions,
2480
- ): Promise<TransactionSignature>;
2481
- /**
2482
- * Update the metadata authority of a compressed token mint.
2483
- * Works for both compressed and decompressed mints.
2024
+ 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>;
2025
+ /**
2026
+ * Update the metadata authority of a light-token mint.
2027
+ * Works for both compressed and decompressed light mints.
2484
2028
  *
2485
2029
  * @param rpc RPC connection
2486
2030
  * @param payer Fee payer (signer)
@@ -2490,18 +2034,10 @@ declare function updateMetadataField(
2490
2034
  * @param extensionIndex Extension index (default: 0)
2491
2035
  * @param confirmOptions Optional confirm options
2492
2036
  */
2493
- declare function updateMetadataAuthority(
2494
- rpc: Rpc,
2495
- payer: Signer,
2496
- mint: PublicKey,
2497
- currentAuthority: Signer,
2498
- newAuthority: PublicKey,
2499
- extensionIndex?: number,
2500
- confirmOptions?: ConfirmOptions,
2501
- ): Promise<TransactionSignature>;
2037
+ declare function updateMetadataAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentAuthority: Signer, newAuthority: PublicKey, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2502
2038
  /**
2503
- * Remove a metadata key from a compressed token mint.
2504
- * Works for both compressed and decompressed mints.
2039
+ * Remove a metadata key from a light-token mint.
2040
+ * Works for both compressed and decompressed light mints.
2505
2041
  *
2506
2042
  * @param rpc RPC connection
2507
2043
  * @param payer Fee payer (signer)
@@ -2512,20 +2048,11 @@ declare function updateMetadataAuthority(
2512
2048
  * @param extensionIndex Extension index (default: 0)
2513
2049
  * @param confirmOptions Optional confirm options
2514
2050
  */
2515
- declare function removeMetadataKey(
2516
- rpc: Rpc,
2517
- payer: Signer,
2518
- mint: PublicKey,
2519
- authority: Signer,
2520
- key: string,
2521
- idempotent?: boolean,
2522
- extensionIndex?: number,
2523
- confirmOptions?: ConfirmOptions,
2524
- ): Promise<TransactionSignature>;
2051
+ declare function removeMetadataKey(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, key: string, idempotent?: boolean, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2525
2052
 
2526
2053
  /**
2527
- * Create an associated token account for SPL/T22/c-token. Defaults to c-token
2528
- * program.
2054
+ * Create an associated token account for SPL/T22/light-token. Defaults to
2055
+ * light-token program.
2529
2056
  *
2530
2057
  * @param rpc RPC connection
2531
2058
  * @param payer Fee payer and transaction signer
@@ -2535,25 +2062,15 @@ declare function removeMetadataKey(
2535
2062
  * @param confirmOptions Options for confirming the transaction
2536
2063
  * @param programId Token program ID (default:
2537
2064
  * LIGHT_TOKEN_PROGRAM_ID)
2538
- * @param associatedTokenProgramId ATA program ID (auto-derived if not
2539
- * provided)
2540
- * @param ctokenConfig Optional rent config
2065
+ * @param associatedTokenProgramId associated token account program ID
2066
+ * (auto-derived if not provided)
2067
+ * @param lightTokenConfig Optional rent config
2541
2068
  * @returns Address of the new associated token account
2542
2069
  */
2543
- declare function createAtaInterface(
2544
- rpc: Rpc,
2545
- payer: Signer,
2546
- mint: PublicKey,
2547
- owner: PublicKey,
2548
- allowOwnerOffCurve?: boolean,
2549
- confirmOptions?: ConfirmOptions,
2550
- programId?: PublicKey,
2551
- associatedTokenProgramId?: PublicKey,
2552
- ctokenConfig?: CTokenConfig,
2553
- ): Promise<PublicKey>;
2554
- /**
2555
- * Create an associated token account idempotently for SPL/T22/c-token. Defaults
2556
- * to c-token program.
2070
+ declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): Promise<PublicKey>;
2071
+ /**
2072
+ * Create an associated token account idempotently for SPL/T22/light-token.
2073
+ * Defaults to light-token program.
2557
2074
  *
2558
2075
  * If the account already exists, the instruction succeeds without error.
2559
2076
  *
@@ -2565,53 +2082,34 @@ declare function createAtaInterface(
2565
2082
  * @param confirmOptions Options for confirming the transaction
2566
2083
  * @param programId Token program ID (default:
2567
2084
  * LIGHT_TOKEN_PROGRAM_ID)
2568
- * @param associatedTokenProgramId ATA program ID (auto-derived if not
2569
- * provided)
2570
- * @param ctokenConfig Optional c-token-specific configuration
2085
+ * @param associatedTokenProgramId associated token account program ID
2086
+ * (auto-derived if not provided)
2087
+ * @param lightTokenConfig Optional light-token-specific configuration
2571
2088
  *
2572
2089
  * @returns Address of the associated token account
2573
2090
  */
2574
- declare function createAtaInterfaceIdempotent(
2575
- rpc: Rpc,
2576
- payer: Signer,
2577
- mint: PublicKey,
2578
- owner: PublicKey,
2579
- allowOwnerOffCurve?: boolean,
2580
- confirmOptions?: ConfirmOptions,
2581
- programId?: PublicKey,
2582
- associatedTokenProgramId?: PublicKey,
2583
- ctokenConfig?: CTokenConfig,
2584
- ): Promise<PublicKey>;
2091
+ declare function createAtaInterfaceIdempotent(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, lightTokenConfig?: LightTokenConfig): Promise<PublicKey>;
2585
2092
 
2586
2093
  /**
2587
- * Mint tokens to a CToken account.
2094
+ * Mint tokens to a light-token account.
2588
2095
  *
2589
- * This is a simple mint instruction for minting to decompressed CToken accounts.
2590
- * The mint must be decompressed (CMint account must exist on-chain).
2096
+ * This is a simple mint instruction for minting to light-token associated token accounts (hot).
2097
+ * The light mint account must exist (mint must be decompressed first).
2591
2098
  *
2592
2099
  * @param rpc - RPC connection
2593
2100
  * @param payer - Fee payer (signer)
2594
- * @param mint - Mint address (CMint account)
2595
- * @param destination - Destination CToken account
2101
+ * @param mint - Mint address (light mint account)
2102
+ * @param destination - Destination light-token account
2596
2103
  * @param authority - Mint authority (signer)
2597
2104
  * @param amount - Amount to mint
2598
2105
  * @param maxTopUp - Optional maximum lamports for rent top-up
2599
2106
  * @param confirmOptions - Optional confirm options
2600
2107
  * @returns Transaction signature
2601
2108
  */
2602
- declare function mintTo$1(
2603
- rpc: Rpc,
2604
- payer: Signer,
2605
- mint: PublicKey,
2606
- destination: PublicKey,
2607
- authority: Signer,
2608
- amount: number | bigint,
2609
- maxTopUp?: number,
2610
- confirmOptions?: ConfirmOptions,
2611
- ): Promise<TransactionSignature>;
2109
+ declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, destination: PublicKey, authority: Signer, amount: number | bigint, maxTopUp?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2612
2110
 
2613
2111
  /**
2614
- * Mint compressed tokens directly to compressed accounts.
2112
+ * Mint light-tokens directly to compressed accounts.
2615
2113
  *
2616
2114
  * @param rpc RPC connection
2617
2115
  * @param payer Fee payer
@@ -2623,33 +2121,23 @@ declare function mintTo$1(
2623
2121
  * @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
2624
2122
  * @param confirmOptions Optional confirm options
2625
2123
  */
2626
- declare function mintToCompressed(
2627
- rpc: Rpc,
2628
- payer: Signer,
2629
- mint: PublicKey,
2630
- authority: Signer,
2631
- recipients: Array<{
2632
- recipient: PublicKey;
2633
- amount: number | bigint;
2634
- }>,
2635
- outputStateTreeInfo?: TreeInfo,
2636
- tokenAccountVersion?: number,
2637
- maxTopUp?: number,
2638
- confirmOptions?: ConfirmOptions,
2639
- ): Promise<TransactionSignature>;
2124
+ declare function mintToCompressed(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, recipients: Array<{
2125
+ recipient: PublicKey;
2126
+ amount: number | bigint;
2127
+ }>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: number, maxTopUp?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2640
2128
 
2641
2129
  /**
2642
2130
  * Mint tokens to a decompressed/onchain token account.
2643
- * Works with SPL, Token-2022, and CToken mints.
2131
+ * Works with SPL, Token-2022, and light-token mints.
2644
2132
  *
2645
- * This function ONLY mints to decompressed onchain token accounts, never to compressed accounts.
2646
- * For CToken mints, the mint must be decompressed first (CMint account must exist on-chain).
2133
+ * This function ONLY mints to light-token associated token accounts (hot), never to compressed light-token accounts (cold).
2134
+ * For light-token mints, the light mint account must exist (mint must be decompressed first).
2647
2135
  *
2648
2136
  * The signature matches the standard SPL mintTo for simplicity and consistency.
2649
2137
  *
2650
2138
  * @param rpc - RPC connection to use
2651
2139
  * @param payer - Transaction fee payer
2652
- * @param mint - Mint address (SPL, Token-2022, or CToken mint)
2140
+ * @param mint - Mint address (SPL, Token-2022, or light-token mint)
2653
2141
  * @param destination - Destination token account address (must be an existing onchain token account)
2654
2142
  * @param authority - Mint authority (can be Signer or PublicKey if multiSigners provided)
2655
2143
  * @param amount - Amount to mint
@@ -2659,17 +2147,7 @@ declare function mintToCompressed(
2659
2147
  *
2660
2148
  * @returns Transaction signature
2661
2149
  */
2662
- declare function mintToInterface(
2663
- rpc: Rpc,
2664
- payer: Signer,
2665
- mint: PublicKey,
2666
- destination: PublicKey,
2667
- authority: Signer | PublicKey,
2668
- amount: number | bigint,
2669
- multiSigners?: Signer[],
2670
- confirmOptions?: ConfirmOptions,
2671
- programId?: PublicKey,
2672
- ): Promise<TransactionSignature>;
2150
+ 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>;
2673
2151
 
2674
2152
  /**
2675
2153
  * Retrieve the associated token account, or create it if it doesn't exist.
@@ -2680,7 +2158,7 @@ declare function mintToInterface(
2680
2158
  * @param mint Mint associated with the account to set or
2681
2159
  * verify.
2682
2160
  * @param owner Owner of the account. Pass Signer to
2683
- * auto-load cold (compressed) tokens, or
2161
+ * auto-load compressed light-tokens (cold balance), or
2684
2162
  * PublicKey for read-only.
2685
2163
  * @param allowOwnerOffCurve Allow the owner account to be a PDA (Program
2686
2164
  * Derived Address).
@@ -2694,56 +2172,18 @@ declare function mintToInterface(
2694
2172
  *
2695
2173
  * @returns AccountInterface with aggregated balance and source breakdown
2696
2174
  */
2697
- declare function getOrCreateAtaInterface(
2698
- rpc: Rpc,
2699
- payer: Signer,
2700
- mint: PublicKey,
2701
- owner: PublicKey | Signer,
2702
- allowOwnerOffCurve?: boolean,
2703
- commitment?: Commitment,
2704
- confirmOptions?: ConfirmOptions,
2705
- programId?: PublicKey,
2706
- associatedTokenProgramId?: PublicKey,
2707
- ): Promise<AccountInterface>;
2708
-
2709
- /**
2710
- * Decompress compressed (cold) tokens to an on-chain token account.
2711
- *
2712
- * For unified loading, use {@link loadAta} instead.
2713
- *
2714
- * @param rpc RPC connection
2715
- * @param payer Fee payer (signer)
2716
- * @param owner Owner of the compressed tokens (signer)
2717
- * @param mint Mint address
2718
- * @param amount Amount to decompress (defaults to all)
2719
- * @param destinationAta Destination token account address
2720
- * @param destinationOwner Owner of the destination ATA
2721
- * @param splInterfaceInfo SPL interface info for SPL/T22 destinations
2722
- * @param confirmOptions Confirm options
2723
- * @returns Transaction signature, null if nothing to load.
2724
- */
2725
- declare function decompressInterface(
2726
- rpc: Rpc,
2727
- payer: Signer,
2728
- owner: Signer,
2729
- mint: PublicKey,
2730
- amount?: number | bigint | BN,
2731
- destinationAta?: PublicKey,
2732
- destinationOwner?: PublicKey,
2733
- splInterfaceInfo?: SplInterfaceInfo,
2734
- confirmOptions?: ConfirmOptions,
2735
- ): Promise<TransactionSignature | null>;
2736
-
2737
- /**
2738
- * Wrap tokens from an SPL/T22 account to a c-token account.
2175
+ declare function getOrCreateAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey | Signer, allowOwnerOffCurve?: boolean, commitment?: Commitment, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey): Promise<AccountInterface>;
2176
+
2177
+ /**
2178
+ * Wrap tokens from an SPL/T22 account to a light-token account.
2739
2179
  *
2740
2180
  * This is an agnostic action that takes explicit account addresses (spl-token style).
2741
- * Use getAssociatedTokenAddressSync() to derive ATA addresses if needed.
2181
+ * Use getAssociatedTokenAddressSync() to derive associated token account addresses if needed.
2742
2182
  *
2743
2183
  * @param rpc RPC connection
2744
2184
  * @param payer Fee payer
2745
- * @param source Source SPL/T22 token account (any token account, not just ATA)
2746
- * @param destination Destination c-token account
2185
+ * @param source Source SPL/T22 token account (any token account, not just associated token account)
2186
+ * @param destination Destination light-token account
2747
2187
  * @param owner Owner/authority of the source account (must sign)
2748
2188
  * @param mint Mint address
2749
2189
  * @param amount Amount to wrap
@@ -2753,13 +2193,13 @@ declare function decompressInterface(
2753
2193
  *
2754
2194
  * @example
2755
2195
  * const splAta = getAssociatedTokenAddressSync(mint, owner.publicKey, false, TOKEN_PROGRAM_ID);
2756
- * const ctokenAta = getAssociatedTokenAddressInterface(mint, owner.publicKey); // defaults to c-token
2196
+ * const lightTokenAta = getAssociatedTokenAddressInterface(mint, owner.publicKey); // defaults to light-token
2757
2197
  *
2758
2198
  * await wrap(
2759
2199
  * rpc,
2760
2200
  * payer,
2761
2201
  * splAta,
2762
- * ctokenAta,
2202
+ * lightTokenAta,
2763
2203
  * owner,
2764
2204
  * mint,
2765
2205
  * 1000n,
@@ -2767,122 +2207,66 @@ declare function decompressInterface(
2767
2207
  *
2768
2208
  * @returns Transaction signature
2769
2209
  */
2770
- declare function wrap(
2771
- rpc: Rpc,
2772
- payer: Signer,
2773
- source: PublicKey,
2774
- destination: PublicKey,
2775
- owner: Signer,
2776
- mint: PublicKey,
2777
- amount: bigint,
2778
- splInterfaceInfo?: SplInterfaceInfo,
2779
- maxTopUp?: number,
2780
- confirmOptions?: ConfirmOptions,
2781
- ): Promise<TransactionSignature>;
2210
+ 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>;
2782
2211
 
2783
2212
  /**
2784
- * Build instruction batches for unwrapping c-tokens to SPL/T22 tokens.
2213
+ * Approve a delegate for an associated token account.
2785
2214
  *
2786
- * Returns `TransactionInstruction[][]` with the same shape as
2787
- * `createLoadAtaInstructions` and `createTransferInterfaceInstructions`:
2788
- * each inner array is one transaction. Load batches (if any) come first,
2789
- * followed by one final unwrap transaction.
2215
+ * Supports light-token, SPL, and Token-2022 mints. For light-token mints,
2216
+ * loads cold accounts if needed before sending the approve instruction.
2790
2217
  *
2791
- * Uses amount-aware input selection: only loads the cold inputs needed to
2792
- * cover the unwrap amount (plus padding to fill a single proof batch).
2218
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
2219
+ * into the hot ATA, not just the delegation amount. The `amount` parameter
2220
+ * only controls the delegate's spending limit.
2793
2221
  *
2794
- * @param rpc RPC connection
2795
- * @param destination Destination SPL/T22 token account (must exist)
2796
- * @param owner Owner of the c-token
2797
- * @param mint Mint address
2798
- * @param amount Amount to unwrap (defaults to full balance)
2799
- * @param payer Fee payer (defaults to owner)
2800
- * @param splInterfaceInfo Optional: SPL interface info
2801
- * @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
2802
- * @param interfaceOptions Optional: interface options for load
2803
- * @param wrap Whether to use unified (wrap) mode for loading.
2804
- * Default false.
2805
- * @returns Instruction batches - each inner array is one transaction
2222
+ * @param rpc RPC connection
2223
+ * @param payer Fee payer (signer)
2224
+ * @param tokenAccount ATA address
2225
+ * @param mint Mint address
2226
+ * @param delegate Delegate to approve
2227
+ * @param amount Amount to delegate
2228
+ * @param owner Owner of the token account (signer)
2229
+ * @param confirmOptions Optional confirm options
2230
+ * @param programId Token program ID (default: LIGHT_TOKEN_PROGRAM_ID)
2231
+ * @param options Optional interface options (`wrap` is nested here)
2232
+ * @returns Transaction signature
2806
2233
  */
2807
- declare function createUnwrapInstructions(
2808
- rpc: Rpc,
2809
- destination: PublicKey,
2810
- owner: PublicKey,
2811
- mint: PublicKey,
2812
- amount?: number | bigint | BN,
2813
- payer?: PublicKey,
2814
- splInterfaceInfo?: SplInterfaceInfo,
2815
- maxTopUp?: number,
2816
- interfaceOptions?: InterfaceOptions,
2817
- wrap?: boolean,
2818
- ): Promise<TransactionInstruction[][]>;
2819
-
2234
+ declare function approveInterface(rpc: Rpc, payer: Signer, tokenAccount: PublicKey, mint: PublicKey, delegate: PublicKey, amount: number | bigint | BN, owner: Signer, confirmOptions?: ConfirmOptions, programId?: PublicKey, options?: InterfaceOptions, decimals?: number): Promise<TransactionSignature>;
2820
2235
  /**
2821
- * Select compressed inputs for a target amount.
2236
+ * Revoke delegation for an associated token account.
2822
2237
  *
2823
- * Sorts by amount descending (largest first), accumulates until the target
2824
- * is met, then pads to {@link MAX_INPUT_ACCOUNTS} if possible within a
2825
- * single batch.
2238
+ * Supports light-token, SPL, and Token-2022 mints. For light-token mints,
2239
+ * loads cold accounts if needed before sending the revoke instruction.
2826
2240
  *
2827
- * - If the amount is covered by N <= 8 inputs, returns min(8, total) inputs.
2828
- * - If more than 8 inputs are needed, returns exactly as many as required
2829
- * (no padding beyond the amount-needed count).
2830
- * - Returns [] when `neededAmount <= 0` or `accounts` is empty.
2241
+ * @remarks For light-token mints, all cold (compressed) balances are loaded
2242
+ * into the hot ATA before the revoke instruction.
2831
2243
  *
2832
- * @param accounts Cold compressed token accounts available for loading.
2833
- * @param neededAmount Amount that must be covered by selected inputs.
2834
- * @returns Subset of `accounts`, sorted largest-first.
2244
+ * @param rpc RPC connection
2245
+ * @param payer Fee payer (signer)
2246
+ * @param tokenAccount ATA address
2247
+ * @param mint Mint address
2248
+ * @param owner Owner of the token account (signer)
2249
+ * @param confirmOptions Optional confirm options
2250
+ * @param programId Token program ID (default: LIGHT_TOKEN_PROGRAM_ID)
2251
+ * @param options Optional interface options (`wrap` is nested here)
2252
+ * @returns Transaction signature
2835
2253
  */
2836
- declare function selectInputsForAmount(
2837
- accounts: ParsedTokenAccount[],
2838
- neededAmount: bigint,
2839
- ): ParsedTokenAccount[];
2254
+ declare function revokeInterface(rpc: Rpc, payer: Signer, tokenAccount: PublicKey, mint: PublicKey, owner: Signer, confirmOptions?: ConfirmOptions, programId?: PublicKey, options?: InterfaceOptions, decimals?: number): Promise<TransactionSignature>;
2840
2255
 
2841
2256
  /**
2842
- * Create instructions to load an ATA from its AccountInterface.
2843
- *
2844
- * Behavior depends on `wrap` parameter:
2845
- * - wrap=false (standard): Decompress compressed tokens to the target ATA type
2846
- * (SPL ATA via pool, T22 ATA via pool, or c-token ATA direct)
2847
- * - wrap=true (unified): Wrap SPL/T22 + decompress all to c-token ATA
2848
- *
2849
- * @param rpc RPC connection
2850
- * @param payer Fee payer
2851
- * @param ata AccountInterface from getAtaInterface (must have _isAta, _owner, _mint)
2852
- * @param options Optional load options
2853
- * @param wrap Unified mode: wrap SPL/T22 to c-token (default: false)
2854
- * @param targetAta Target ATA address (used for type detection in standard mode)
2855
- * @returns Array of instructions (empty if nothing to load)
2856
- */
2857
- declare function createLoadAtaInstructionsFromInterface(
2858
- rpc: Rpc,
2859
- payer: PublicKey,
2860
- ata: AccountInterface,
2861
- options?: InterfaceOptions,
2862
- wrap?: boolean,
2863
- targetAta?: PublicKey,
2864
- ): Promise<TransactionInstruction[]>;
2865
-
2866
- /**
2867
- * Derive the canonical associated token address for any of SPL/T22/c-token.
2868
- * Defaults to using c-token as the canonical ATA.
2257
+ * Derive the canonical associated token address for any of SPL/T22/light-token.
2258
+ * Defaults to using light-token as the canonical associated token account.
2869
2259
  *
2870
2260
  * @param mint Mint public key
2871
2261
  * @param owner Owner public key
2872
2262
  * @param allowOwnerOffCurve Allow owner to be a PDA. Default false.
2873
- * @param programId Token program ID. Default c-token.
2263
+ * @param programId Token program ID. Default light-token.
2874
2264
  *
2875
2265
  * @param associatedTokenProgramId Associated token program ID. Default
2876
2266
  * auto-detected.
2877
2267
  * @returns Associated token address.
2878
2268
  */
2879
- declare function getAssociatedTokenAddressInterface(
2880
- mint: PublicKey,
2881
- owner: PublicKey,
2882
- allowOwnerOffCurve?: boolean,
2883
- programId?: PublicKey,
2884
- associatedTokenProgramId?: PublicKey,
2885
- ): PublicKey;
2269
+ declare function getAssociatedTokenAddressInterface(mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, programId?: PublicKey, associatedTokenProgramId?: PublicKey): PublicKey;
2886
2270
 
2887
2271
  /**
2888
2272
  * Input for creating off-chain metadata JSON.
@@ -2932,7 +2316,7 @@ interface OffChainTokenMetadataJson {
2932
2316
  * const metadataJson = toOffChainMetadataJson({
2933
2317
  * name: 'My Token',
2934
2318
  * symbol: 'MTK',
2935
- * description: 'A compressed token',
2319
+ * description: 'A light-token',
2936
2320
  * image: 'https://example.com/image.png',
2937
2321
  * });
2938
2322
  * const uri = await umi.uploader.uploadJson(metadataJson);
@@ -2940,9 +2324,7 @@ interface OffChainTokenMetadataJson {
2940
2324
  * // Then use uri with createMint
2941
2325
  * await createMint(rpc, payer, { ...params, uri });
2942
2326
  */
2943
- declare function toOffChainMetadataJson(
2944
- meta: OffChainTokenMetadata,
2945
- ): OffChainTokenMetadataJson;
2327
+ declare function toOffChainMetadataJson(meta: OffChainTokenMetadata): OffChainTokenMetadataJson;
2946
2328
 
2947
2329
  /**
2948
2330
  * Approve a delegate to spend tokens
@@ -2957,15 +2339,7 @@ declare function toOffChainMetadataJson(
2957
2339
  *
2958
2340
  * @return Signature of the confirmed transaction
2959
2341
  */
2960
- declare function approve(
2961
- rpc: Rpc,
2962
- payer: Signer,
2963
- mint: PublicKey,
2964
- amount: number | BN,
2965
- owner: Signer,
2966
- delegate: PublicKey,
2967
- confirmOptions?: ConfirmOptions,
2968
- ): Promise<TransactionSignature>;
2342
+ declare function approve(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, delegate: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2969
2343
 
2970
2344
  /**
2971
2345
  * Mint compressed tokens to a solana address from an external mint authority
@@ -2984,17 +2358,7 @@ declare function approve(
2984
2358
  *
2985
2359
  * @return Signature of the confirmed transaction
2986
2360
  */
2987
- declare function approveAndMintTo(
2988
- rpc: Rpc,
2989
- payer: Signer,
2990
- mint: PublicKey,
2991
- toPubkey: PublicKey,
2992
- authority: Signer,
2993
- amount: number | BN,
2994
- outputStateTreeInfo?: TreeInfo,
2995
- splInterfaceInfo?: SplInterfaceInfo,
2996
- confirmOptions?: ConfirmOptions,
2997
- ): Promise<TransactionSignature>;
2361
+ declare function approveAndMintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: PublicKey, authority: Signer, amount: number | BN, outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2998
2362
 
2999
2363
  /**
3000
2364
  * Compress SPL tokens
@@ -3014,18 +2378,7 @@ declare function approveAndMintTo(
3014
2378
  *
3015
2379
  * @return Signature of the confirmed transaction
3016
2380
  */
3017
- declare function compress(
3018
- rpc: Rpc,
3019
- payer: Signer,
3020
- mint: PublicKey,
3021
- amount: number | BN | number[] | BN[],
3022
- owner: Signer,
3023
- sourceTokenAccount: PublicKey,
3024
- toAddress: PublicKey | Array<PublicKey>,
3025
- outputStateTreeInfo?: TreeInfo,
3026
- splInterfaceInfo?: SplInterfaceInfo,
3027
- confirmOptions?: ConfirmOptions,
3028
- ): Promise<TransactionSignature>;
2381
+ 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>;
3029
2382
 
3030
2383
  /**
3031
2384
  * Compress SPL tokens into compressed token format
@@ -3045,17 +2398,7 @@ declare function compress(
3045
2398
  *
3046
2399
  * @return Signature of the confirmed transaction
3047
2400
  */
3048
- declare function compressSplTokenAccount(
3049
- rpc: Rpc,
3050
- payer: Signer,
3051
- mint: PublicKey,
3052
- owner: Signer,
3053
- tokenAccount: PublicKey,
3054
- remainingAmount?: BN,
3055
- outputStateTreeInfo?: TreeInfo,
3056
- splInterfaceInfo?: SplInterfaceInfo,
3057
- confirmOptions?: ConfirmOptions,
3058
- ): Promise<TransactionSignature>;
2401
+ declare function compressSplTokenAccount(rpc: Rpc, payer: Signer, mint: PublicKey, owner: Signer, tokenAccount: PublicKey, remainingAmount?: BN, outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3059
2402
 
3060
2403
  /**
3061
2404
  * Create and initialize a new SPL token mint
@@ -3075,16 +2418,7 @@ declare function compressSplTokenAccount(
3075
2418
  *
3076
2419
  * @return Object with mint address and transaction signature
3077
2420
  */
3078
- declare function createMint(
3079
- rpc: Rpc,
3080
- payer: Signer,
3081
- mintAuthority: PublicKey | Signer,
3082
- decimals: number,
3083
- keypair?: Keypair,
3084
- confirmOptions?: ConfirmOptions,
3085
- tokenProgramId?: PublicKey | boolean,
3086
- freezeAuthority?: PublicKey | Signer | null,
3087
- ): Promise<{
2421
+ declare function createMint(rpc: Rpc, payer: Signer, mintAuthority: PublicKey | Signer, decimals: number, keypair?: Keypair, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey | boolean, freezeAuthority?: PublicKey | Signer | null): Promise<{
3088
2422
  mint: PublicKey;
3089
2423
  transactionSignature: TransactionSignature;
3090
2424
  }>;
@@ -3101,13 +2435,7 @@ declare function createMint(
3101
2435
  *
3102
2436
  * @return transaction signature
3103
2437
  */
3104
- declare function createSplInterface(
3105
- rpc: Rpc,
3106
- payer: Signer,
3107
- mint: PublicKey,
3108
- confirmOptions?: ConfirmOptions,
3109
- tokenProgramId?: PublicKey,
3110
- ): Promise<TransactionSignature>;
2438
+ declare function createSplInterface(rpc: Rpc, payer: Signer, mint: PublicKey, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey): Promise<TransactionSignature>;
3111
2439
  /**
3112
2440
  * @deprecated Use {@link createSplInterface} instead.
3113
2441
  */
@@ -3126,14 +2454,7 @@ declare const createTokenPool: typeof createSplInterface;
3126
2454
  *
3127
2455
  * @return transaction signature
3128
2456
  */
3129
- declare function addSplInterfaces(
3130
- rpc: Rpc,
3131
- payer: Signer,
3132
- mint: PublicKey,
3133
- numMaxAdditionalPools: number,
3134
- confirmOptions?: ConfirmOptions,
3135
- tokenProgramId?: PublicKey,
3136
- ): Promise<string>;
2457
+ declare function addSplInterfaces(rpc: Rpc, payer: Signer, mint: PublicKey, numMaxAdditionalPools: number, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey): Promise<string>;
3137
2458
  /**
3138
2459
  * @deprecated Use {@link addSplInterfaces} instead.
3139
2460
  */
@@ -3153,13 +2474,7 @@ declare const addTokenPools: typeof addSplInterfaces;
3153
2474
  * @return Object with transaction signatures and the address of the created
3154
2475
  * lookup table
3155
2476
  */
3156
- declare function createTokenProgramLookupTable(
3157
- rpc: Rpc,
3158
- payer: Signer,
3159
- authority: Signer,
3160
- mints?: PublicKey[],
3161
- additionalAccounts?: PublicKey[],
3162
- ): Promise<{
2477
+ declare function createTokenProgramLookupTable(rpc: Rpc, payer: Signer, authority: Signer, mints?: PublicKey[], additionalAccounts?: PublicKey[]): Promise<{
3163
2478
  txIds: TransactionSignature[];
3164
2479
  address: PublicKey;
3165
2480
  }>;
@@ -3179,16 +2494,7 @@ declare function createTokenProgramLookupTable(
3179
2494
  *
3180
2495
  * @return confirmed transaction signature
3181
2496
  */
3182
- declare function decompress(
3183
- rpc: Rpc,
3184
- payer: Signer,
3185
- mint: PublicKey,
3186
- amount: number | BN,
3187
- owner: Signer,
3188
- toAddress: PublicKey,
3189
- splInterfaceInfos?: SplInterfaceInfo[],
3190
- confirmOptions?: ConfirmOptions,
3191
- ): Promise<TransactionSignature>;
2497
+ declare function decompress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, splInterfaceInfos?: SplInterfaceInfo[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3192
2498
 
3193
2499
  /**
3194
2500
  * Merge multiple compressed token accounts for a given mint into fewer
@@ -3208,13 +2514,7 @@ declare function decompress(
3208
2514
  *
3209
2515
  * @return confirmed transaction signature
3210
2516
  */
3211
- declare function mergeTokenAccounts(
3212
- rpc: Rpc,
3213
- payer: Signer,
3214
- mint: PublicKey,
3215
- owner: Signer,
3216
- confirmOptions?: ConfirmOptions,
3217
- ): Promise<TransactionSignature>;
2517
+ declare function mergeTokenAccounts(rpc: Rpc, payer: Signer, mint: PublicKey, owner: Signer, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3218
2518
 
3219
2519
  /**
3220
2520
  * Mint compressed tokens to a solana address
@@ -3236,17 +2536,7 @@ declare function mergeTokenAccounts(
3236
2536
  *
3237
2537
  * @return Signature of the confirmed transaction
3238
2538
  */
3239
- declare function mintTo(
3240
- rpc: Rpc,
3241
- payer: Signer,
3242
- mint: PublicKey,
3243
- toPubkey: PublicKey | PublicKey[],
3244
- authority: Signer,
3245
- amount: number | BN | number[] | BN[],
3246
- outputStateTreeInfo?: TreeInfo,
3247
- splInterfaceInfo?: SplInterfaceInfo,
3248
- confirmOptions?: ConfirmOptions,
3249
- ): Promise<TransactionSignature>;
2539
+ 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>;
3250
2540
 
3251
2541
  /**
3252
2542
  * Revoke one or more delegated token accounts
@@ -3260,13 +2550,7 @@ declare function mintTo(
3260
2550
  *
3261
2551
  * @return Signature of the confirmed transaction
3262
2552
  */
3263
- declare function revoke(
3264
- rpc: Rpc,
3265
- payer: Signer,
3266
- accounts: ParsedTokenAccount[],
3267
- owner: Signer,
3268
- confirmOptions?: ConfirmOptions,
3269
- ): Promise<TransactionSignature>;
2553
+ declare function revoke(rpc: Rpc, payer: Signer, accounts: ParsedTokenAccount[], owner: Signer, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3270
2554
 
3271
2555
  /**
3272
2556
  * Transfer compressed tokens from one owner to another.
@@ -3284,15 +2568,7 @@ declare function revoke(
3284
2568
  *
3285
2569
  * @return confirmed transaction signature
3286
2570
  */
3287
- declare function transfer(
3288
- rpc: Rpc,
3289
- payer: Signer,
3290
- mint: PublicKey,
3291
- amount: number | BN,
3292
- owner: Signer,
3293
- toAddress: PublicKey,
3294
- confirmOptions?: ConfirmOptions,
3295
- ): Promise<TransactionSignature>;
2571
+ declare function transfer(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3296
2572
 
3297
2573
  /**
3298
2574
  * Transfer delegated compressed tokens to another owner
@@ -3307,15 +2583,7 @@ declare function transfer(
3307
2583
  *
3308
2584
  * @return confirmed transaction signature
3309
2585
  */
3310
- declare function transferDelegated(
3311
- rpc: Rpc,
3312
- payer: Signer,
3313
- mint: PublicKey,
3314
- amount: number | BN,
3315
- owner: Signer,
3316
- toAddress: PublicKey,
3317
- confirmOptions?: ConfirmOptions,
3318
- ): Promise<TransactionSignature>;
2586
+ declare function transferDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3319
2587
 
3320
2588
  /**
3321
2589
  * Decompress delegated compressed tokens. Remaining compressed tokens are
@@ -3333,21 +2601,10 @@ declare function transferDelegated(
3333
2601
  *
3334
2602
  * @return Signature of the confirmed transaction
3335
2603
  */
3336
- declare function decompressDelegated(
3337
- rpc: Rpc,
3338
- payer: Signer,
3339
- mint: PublicKey,
3340
- amount: number | BN,
3341
- owner: Signer,
3342
- toAddress: PublicKey,
3343
- splInterfaceInfos?: SplInterfaceInfo[],
3344
- confirmOptions?: ConfirmOptions,
3345
- ): Promise<TransactionSignature>;
3346
-
3347
- declare const ERROR_NO_ACCOUNTS_FOUND =
3348
- 'Could not find accounts to select for transfer.';
3349
- declare const ERROR_MIXED_TREE_TYPES =
3350
- 'Cannot select accounts from different tree types (V1/V2) in the same batch. Filter accounts by tree type first.';
2604
+ declare function decompressDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, splInterfaceInfos?: SplInterfaceInfo[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2605
+
2606
+ declare const ERROR_NO_ACCOUNTS_FOUND = "Could not find accounts to select for transfer.";
2607
+ 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.";
3351
2608
  /**
3352
2609
  * Options for input account selection
3353
2610
  */
@@ -3362,9 +2619,7 @@ interface SelectInputAccountsOptions {
3362
2619
  /**
3363
2620
  * Groups accounts by tree type for separate processing
3364
2621
  */
3365
- declare function groupAccountsByTreeType(
3366
- accounts: ParsedTokenAccount[],
3367
- ): Map<TreeType, ParsedTokenAccount[]>;
2622
+ declare function groupAccountsByTreeType(accounts: ParsedTokenAccount[]): Map<TreeType, ParsedTokenAccount[]>;
3368
2623
  /**
3369
2624
  * Result of selectAccountsByPreferredTreeType
3370
2625
  */
@@ -3389,10 +2644,7 @@ interface SelectedAccountsResult {
3389
2644
  * @param requiredAmount Minimum amount needed (optional - if not provided, returns all from preferred type)
3390
2645
  * @returns Selected accounts from a single tree type
3391
2646
  */
3392
- declare function selectAccountsByPreferredTreeType(
3393
- accounts: ParsedTokenAccount[],
3394
- requiredAmount?: BN,
3395
- ): SelectedAccountsResult;
2647
+ declare function selectAccountsByPreferredTreeType(accounts: ParsedTokenAccount[], requiredAmount?: BN): SelectedAccountsResult;
3396
2648
  /**
3397
2649
  * Selects token accounts for approval, first trying to find an exact match, then falling back to minimum selection.
3398
2650
  *
@@ -3411,16 +2663,11 @@ declare function selectAccountsByPreferredTreeType(
3411
2663
  * - totalLamports: Total lamports from selected accounts.
3412
2664
  * - maxPossibleAmount: Max approvable amount given maxInputs.
3413
2665
  */
3414
- declare function selectTokenAccountsForApprove(
3415
- accounts: ParsedTokenAccount[],
3416
- approveAmount: BN,
3417
- maxInputs?: number,
3418
- options?: SelectInputAccountsOptions,
3419
- ): [
2666
+ declare function selectTokenAccountsForApprove(accounts: ParsedTokenAccount[], approveAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
3420
2667
  selectedAccounts: ParsedTokenAccount[],
3421
2668
  total: BN,
3422
2669
  totalLamports: BN | null,
3423
- maxPossibleAmount: BN,
2670
+ maxPossibleAmount: BN
3424
2671
  ];
3425
2672
  /**
3426
2673
  * Selects the minimum number of compressed token accounts required for a
@@ -3434,12 +2681,7 @@ declare function selectTokenAccountsForApprove(
3434
2681
  *
3435
2682
  * @returns Returns selected accounts and their totals.
3436
2683
  */
3437
- declare function selectMinCompressedTokenAccountsForDecompression(
3438
- accounts: ParsedTokenAccount[],
3439
- amount: BN,
3440
- maxInputs?: number,
3441
- options?: SelectInputAccountsOptions,
3442
- ): {
2684
+ declare function selectMinCompressedTokenAccountsForDecompression(accounts: ParsedTokenAccount[], amount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): {
3443
2685
  selectedAccounts: ParsedTokenAccount[];
3444
2686
  total: BN;
3445
2687
  totalLamports: BN | null;
@@ -3463,31 +2705,22 @@ declare function selectMinCompressedTokenAccountsForDecompression(
3463
2705
  * maxPossibleAmount: BN
3464
2706
  * ]
3465
2707
  */
3466
- declare function selectMinCompressedTokenAccountsForTransfer(
3467
- accounts: ParsedTokenAccount[],
3468
- transferAmount: BN,
3469
- maxInputs?: number,
3470
- options?: SelectInputAccountsOptions,
3471
- ): [
2708
+ declare function selectMinCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
3472
2709
  selectedAccounts: ParsedTokenAccount[],
3473
2710
  total: BN,
3474
2711
  totalLamports: BN | null,
3475
- maxPossibleAmount: BN,
2712
+ maxPossibleAmount: BN
3476
2713
  ];
3477
2714
  /**
3478
2715
  * Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
3479
2716
  * returns partial amounts if insufficient accounts are found instead of
3480
2717
  * throwing an error.
3481
2718
  */
3482
- declare function selectMinCompressedTokenAccountsForTransferOrPartial(
3483
- accounts: ParsedTokenAccount[],
3484
- transferAmount: BN,
3485
- maxInputs?: number,
3486
- ): [
2719
+ declare function selectMinCompressedTokenAccountsForTransferOrPartial(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
3487
2720
  selectedAccounts: ParsedTokenAccount[],
3488
2721
  total: BN,
3489
2722
  totalLamports: BN | null,
3490
- maxPossibleAmount: BN,
2723
+ maxPossibleAmount: BN
3491
2724
  ];
3492
2725
  /**
3493
2726
  * Selects compressed token accounts for a transfer, ensuring one extra account
@@ -3530,31 +2763,22 @@ declare function selectMinCompressedTokenAccountsForTransferOrPartial(
3530
2763
  * console.log(totalLamports!.toString()); // '15'
3531
2764
  * console.log(maxPossibleAmount.toString()); // '150'
3532
2765
  */
3533
- declare function selectSmartCompressedTokenAccountsForTransfer(
3534
- accounts: ParsedTokenAccount[],
3535
- transferAmount: BN,
3536
- maxInputs?: number,
3537
- options?: SelectInputAccountsOptions,
3538
- ): [
2766
+ declare function selectSmartCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
3539
2767
  selectedAccounts: ParsedTokenAccount[],
3540
2768
  total: BN,
3541
2769
  totalLamports: BN | null,
3542
- maxPossibleAmount: BN,
2770
+ maxPossibleAmount: BN
3543
2771
  ];
3544
2772
  /**
3545
2773
  * Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
3546
2774
  * returns partial amounts if insufficient accounts are found instead of
3547
2775
  * throwing an error.
3548
2776
  */
3549
- declare function selectSmartCompressedTokenAccountsForTransferOrPartial(
3550
- accounts: ParsedTokenAccount[],
3551
- transferAmount: BN,
3552
- maxInputs?: number,
3553
- ): [
2777
+ declare function selectSmartCompressedTokenAccountsForTransferOrPartial(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
3554
2778
  selectedAccounts: ParsedTokenAccount[],
3555
2779
  total: BN,
3556
2780
  totalLamports: BN | null,
3557
- maxPossibleAmount: BN,
2781
+ maxPossibleAmount: BN
3558
2782
  ];
3559
2783
 
3560
2784
  type TokenTransferOutputData = {
@@ -3627,9 +2851,7 @@ type CompressSplTokenAccountInstructionData = {
3627
2851
  remainingAmount: BN | null;
3628
2852
  cpiContext: CompressedCpiContext | null;
3629
2853
  };
3630
- declare function isSingleSplInterfaceInfo(
3631
- splInterfaceInfos: SplInterfaceInfo | SplInterfaceInfo[],
3632
- ): splInterfaceInfos is SplInterfaceInfo;
2854
+ declare function isSingleSplInterfaceInfo(splInterfaceInfos: SplInterfaceInfo | SplInterfaceInfo[]): splInterfaceInfos is SplInterfaceInfo;
3633
2855
  /**
3634
2856
  * @deprecated Use {@link isSingleSplInterfaceInfo} instead.
3635
2857
  */
@@ -3740,9 +2962,7 @@ type PackCompressedTokenAccountsParams = {
3740
2962
  /**
3741
2963
  * Packs Compressed Token Accounts.
3742
2964
  */
3743
- declare function packCompressedTokenAccounts(
3744
- params: PackCompressedTokenAccountsParams,
3745
- ): {
2965
+ declare function packCompressedTokenAccounts(params: PackCompressedTokenAccountsParams): {
3746
2966
  inputTokenDataWithContext: InputTokenDataWithContext$1[];
3747
2967
  remainingAccountMetas: AccountMeta[];
3748
2968
  packedOutputTokenData: PackedTokenTransferOutputData[];
@@ -3755,10 +2975,7 @@ declare function packCompressedTokenAccounts(
3755
2975
  * @param mint The mint of the token pool
3756
2976
  * @returns True if all input accounts belong to the same mint
3757
2977
  */
3758
- declare function checkMint(
3759
- compressedTokenAccounts: ParsedTokenAccount[],
3760
- mint: PublicKey,
3761
- ): boolean;
2978
+ declare function checkMint(compressedTokenAccounts: ParsedTokenAccount[], mint: PublicKey): boolean;
3762
2979
 
3763
2980
  type LightCompressedToken = {
3764
2981
  version: '1.2.0';
@@ -3770,7 +2987,7 @@ type LightCompressedToken = {
3770
2987
  'This instruction creates a token pool for a given mint. Every spl mint',
3771
2988
  'can have one token pool. When a token is compressed the tokens are',
3772
2989
  'transferrred to the token pool, and their compressed equivalent is',
3773
- 'minted into a Merkle tree.',
2990
+ 'minted into a Merkle tree.'
3774
2991
  ];
3775
2992
  accounts: [
3776
2993
  {
@@ -3803,7 +3020,7 @@ type LightCompressedToken = {
3803
3020
  name: 'cpiAuthorityPda';
3804
3021
  isMut: false;
3805
3022
  isSigner: false;
3806
- },
3023
+ }
3807
3024
  ];
3808
3025
  args: [];
3809
3026
  },
@@ -3811,7 +3028,7 @@ type LightCompressedToken = {
3811
3028
  name: 'addTokenPool';
3812
3029
  docs: [
3813
3030
  'This instruction creates an additional token pool for a given mint.',
3814
- 'The maximum number of token pools per mint is 5.',
3031
+ 'The maximum number of token pools per mint is 5.'
3815
3032
  ];
3816
3033
  accounts: [
3817
3034
  {
@@ -3849,13 +3066,13 @@ type LightCompressedToken = {
3849
3066
  name: 'cpiAuthorityPda';
3850
3067
  isMut: false;
3851
3068
  isSigner: false;
3852
- },
3069
+ }
3853
3070
  ];
3854
3071
  args: [
3855
3072
  {
3856
3073
  name: 'tokenPoolIndex';
3857
3074
  type: 'u8';
3858
- },
3075
+ }
3859
3076
  ];
3860
3077
  },
3861
3078
  {
@@ -3867,7 +3084,7 @@ type LightCompressedToken = {
3867
3084
  'every amount and pubkey input pair. A constant amount of lamports can be',
3868
3085
  'transferred to each output account to enable. A use case to add lamports',
3869
3086
  'to a compressed token account is to prevent spam. This is the only way',
3870
- 'to add lamports to a compressed token account.',
3087
+ 'to add lamports to a compressed token account.'
3871
3088
  ];
3872
3089
  accounts: [
3873
3090
  {
@@ -3947,7 +3164,7 @@ type LightCompressedToken = {
3947
3164
  isMut: true;
3948
3165
  isSigner: false;
3949
3166
  isOptional: true;
3950
- },
3167
+ }
3951
3168
  ];
3952
3169
  args: [
3953
3170
  {
@@ -3967,7 +3184,7 @@ type LightCompressedToken = {
3967
3184
  type: {
3968
3185
  option: 'u64';
3969
3186
  };
3970
- },
3187
+ }
3971
3188
  ];
3972
3189
  },
3973
3190
  {
@@ -3975,7 +3192,7 @@ type LightCompressedToken = {
3975
3192
  docs: [
3976
3193
  'Compresses the balance of an spl token account sub an optional remaining',
3977
3194
  'amount. This instruction does not close the spl token account. To close',
3978
- 'the account bundle a close spl account instruction in your transaction.',
3195
+ 'the account bundle a close spl account instruction in your transaction.'
3979
3196
  ];
3980
3197
  accounts: [
3981
3198
  {
@@ -3991,7 +3208,7 @@ type LightCompressedToken = {
3991
3208
  docs: [
3992
3209
  'Authority is verified through proof since both owner and delegate',
3993
3210
  'are included in the token data hash, which is a public input to the',
3994
- 'validity proof.',
3211
+ 'validity proof.'
3995
3212
  ];
3996
3213
  },
3997
3214
  {
@@ -4052,7 +3269,7 @@ type LightCompressedToken = {
4052
3269
  name: 'systemProgram';
4053
3270
  isMut: false;
4054
3271
  isSigner: false;
4055
- },
3272
+ }
4056
3273
  ];
4057
3274
  args: [
4058
3275
  {
@@ -4072,7 +3289,7 @@ type LightCompressedToken = {
4072
3289
  defined: 'CompressedCpiContext';
4073
3290
  };
4074
3291
  };
4075
- },
3292
+ }
4076
3293
  ];
4077
3294
  },
4078
3295
  {
@@ -4085,7 +3302,7 @@ type LightCompressedToken = {
4085
3302
  'accounts specify less lamports than inputs the remaining lamports are',
4086
3303
  'transferred to an output compressed account. Signer must be owner or',
4087
3304
  'delegate. If a delegated token account is transferred the delegate is',
4088
- 'not preserved.',
3305
+ 'not preserved.'
4089
3306
  ];
4090
3307
  accounts: [
4091
3308
  {
@@ -4101,7 +3318,7 @@ type LightCompressedToken = {
4101
3318
  docs: [
4102
3319
  'Authority is verified through proof since both owner and delegate',
4103
3320
  'are included in the token data hash, which is a public input to the',
4104
- 'validity proof.',
3321
+ 'validity proof.'
4105
3322
  ];
4106
3323
  },
4107
3324
  {
@@ -4162,13 +3379,13 @@ type LightCompressedToken = {
4162
3379
  name: 'systemProgram';
4163
3380
  isMut: false;
4164
3381
  isSigner: false;
4165
- },
3382
+ }
4166
3383
  ];
4167
3384
  args: [
4168
3385
  {
4169
3386
  name: 'inputs';
4170
3387
  type: 'bytes';
4171
- },
3388
+ }
4172
3389
  ];
4173
3390
  },
4174
3391
  {
@@ -4179,7 +3396,7 @@ type LightCompressedToken = {
4179
3396
  'be called by a delegate.',
4180
3397
  'The instruction creates two output accounts:',
4181
3398
  '1. one account with delegated amount',
4182
- '2. one account with remaining(change) amount',
3399
+ '2. one account with remaining(change) amount'
4183
3400
  ];
4184
3401
  accounts: [
4185
3402
  {
@@ -4195,7 +3412,7 @@ type LightCompressedToken = {
4195
3412
  docs: [
4196
3413
  'Authority is verified through proof since both owner and delegate',
4197
3414
  'are included in the token data hash, which is a public input to the',
4198
- 'validity proof.',
3415
+ 'validity proof.'
4199
3416
  ];
4200
3417
  },
4201
3418
  {
@@ -4238,20 +3455,20 @@ type LightCompressedToken = {
4238
3455
  name: 'systemProgram';
4239
3456
  isMut: false;
4240
3457
  isSigner: false;
4241
- },
3458
+ }
4242
3459
  ];
4243
3460
  args: [
4244
3461
  {
4245
3462
  name: 'inputs';
4246
3463
  type: 'bytes';
4247
- },
3464
+ }
4248
3465
  ];
4249
3466
  },
4250
3467
  {
4251
3468
  name: 'revoke';
4252
3469
  docs: [
4253
3470
  'Revokes a delegation. The instruction merges all inputs into one output',
4254
- 'account. Cannot be called by a delegate. Delegates are not preserved.',
3471
+ 'account. Cannot be called by a delegate. Delegates are not preserved.'
4255
3472
  ];
4256
3473
  accounts: [
4257
3474
  {
@@ -4267,7 +3484,7 @@ type LightCompressedToken = {
4267
3484
  docs: [
4268
3485
  'Authority is verified through proof since both owner and delegate',
4269
3486
  'are included in the token data hash, which is a public input to the',
4270
- 'validity proof.',
3487
+ 'validity proof.'
4271
3488
  ];
4272
3489
  },
4273
3490
  {
@@ -4310,20 +3527,20 @@ type LightCompressedToken = {
4310
3527
  name: 'systemProgram';
4311
3528
  isMut: false;
4312
3529
  isSigner: false;
4313
- },
3530
+ }
4314
3531
  ];
4315
3532
  args: [
4316
3533
  {
4317
3534
  name: 'inputs';
4318
3535
  type: 'bytes';
4319
- },
3536
+ }
4320
3537
  ];
4321
3538
  },
4322
3539
  {
4323
3540
  name: 'freeze';
4324
3541
  docs: [
4325
3542
  'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
4326
- 'many outputs as inputs. Balances and delegates are preserved.',
3543
+ 'many outputs as inputs. Balances and delegates are preserved.'
4327
3544
  ];
4328
3545
  accounts: [
4329
3546
  {
@@ -4382,20 +3599,20 @@ type LightCompressedToken = {
4382
3599
  name: 'mint';
4383
3600
  isMut: false;
4384
3601
  isSigner: false;
4385
- },
3602
+ }
4386
3603
  ];
4387
3604
  args: [
4388
3605
  {
4389
3606
  name: 'inputs';
4390
3607
  type: 'bytes';
4391
- },
3608
+ }
4392
3609
  ];
4393
3610
  },
4394
3611
  {
4395
3612
  name: 'thaw';
4396
3613
  docs: [
4397
3614
  'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
4398
- 'as many outputs as inputs. Balances and delegates are preserved.',
3615
+ 'as many outputs as inputs. Balances and delegates are preserved.'
4399
3616
  ];
4400
3617
  accounts: [
4401
3618
  {
@@ -4454,13 +3671,13 @@ type LightCompressedToken = {
4454
3671
  name: 'mint';
4455
3672
  isMut: false;
4456
3673
  isSigner: false;
4457
- },
3674
+ }
4458
3675
  ];
4459
3676
  args: [
4460
3677
  {
4461
3678
  name: 'inputs';
4462
3679
  type: 'bytes';
4463
- },
3680
+ }
4464
3681
  ];
4465
3682
  },
4466
3683
  {
@@ -4468,7 +3685,7 @@ type LightCompressedToken = {
4468
3685
  docs: [
4469
3686
  'Burns compressed tokens and spl tokens from the pool account. Delegates',
4470
3687
  'can burn tokens. The output compressed token account remains delegated.',
4471
- 'Creates one output compressed token account.',
3688
+ 'Creates one output compressed token account.'
4472
3689
  ];
4473
3690
  accounts: [
4474
3691
  {
@@ -4484,7 +3701,7 @@ type LightCompressedToken = {
4484
3701
  docs: [
4485
3702
  'Authority is verified through proof since both owner and delegate',
4486
3703
  'are included in the token data hash, which is a public input to the',
4487
- 'validity proof.',
3704
+ 'validity proof.'
4488
3705
  ];
4489
3706
  },
4490
3707
  {
@@ -4541,13 +3758,13 @@ type LightCompressedToken = {
4541
3758
  name: 'systemProgram';
4542
3759
  isMut: false;
4543
3760
  isSigner: false;
4544
- },
3761
+ }
4545
3762
  ];
4546
3763
  args: [
4547
3764
  {
4548
3765
  name: 'inputs';
4549
3766
  type: 'bytes';
4550
- },
3767
+ }
4551
3768
  ];
4552
3769
  },
4553
3770
  {
@@ -4555,7 +3772,7 @@ type LightCompressedToken = {
4555
3772
  docs: [
4556
3773
  'This function is a stub to allow Anchor to include the input types in',
4557
3774
  'the IDL. It should not be included in production builds nor be called in',
4558
- 'practice.',
3775
+ 'practice.'
4559
3776
  ];
4560
3777
  accounts: [
4561
3778
  {
@@ -4571,7 +3788,7 @@ type LightCompressedToken = {
4571
3788
  docs: [
4572
3789
  'Authority is verified through proof since both owner and delegate',
4573
3790
  'are included in the token data hash, which is a public input to the',
4574
- 'validity proof.',
3791
+ 'validity proof.'
4575
3792
  ];
4576
3793
  },
4577
3794
  {
@@ -4632,7 +3849,7 @@ type LightCompressedToken = {
4632
3849
  name: 'systemProgram';
4633
3850
  isMut: false;
4634
3851
  isSigner: false;
4635
- },
3852
+ }
4636
3853
  ];
4637
3854
  args: [
4638
3855
  {
@@ -4646,9 +3863,9 @@ type LightCompressedToken = {
4646
3863
  type: {
4647
3864
  defined: 'TokenData';
4648
3865
  };
4649
- },
3866
+ }
4650
3867
  ];
4651
- },
3868
+ }
4652
3869
  ];
4653
3870
  types: [
4654
3871
  {
@@ -4661,7 +3878,7 @@ type LightCompressedToken = {
4661
3878
  },
4662
3879
  {
4663
3880
  name: 'Frozen';
4664
- },
3881
+ }
4665
3882
  ];
4666
3883
  };
4667
3884
  },
@@ -4693,7 +3910,7 @@ type LightCompressedToken = {
4693
3910
  defined: 'CompressedAccountData';
4694
3911
  };
4695
3912
  };
4696
- },
3913
+ }
4697
3914
  ];
4698
3915
  };
4699
3916
  },
@@ -4717,7 +3934,7 @@ type LightCompressedToken = {
4717
3934
  type: {
4718
3935
  array: ['u8', 32];
4719
3936
  };
4720
- },
3937
+ }
4721
3938
  ];
4722
3939
  };
4723
3940
  },
@@ -4730,7 +3947,7 @@ type LightCompressedToken = {
4730
3947
  name: 'setContext';
4731
3948
  docs: [
4732
3949
  'Is set by the program that is invoking the CPI to signal that is should',
4733
- 'set the cpi context.',
3950
+ 'set the cpi context.'
4734
3951
  ];
4735
3952
  type: 'bool';
4736
3953
  },
@@ -4738,17 +3955,17 @@ type LightCompressedToken = {
4738
3955
  name: 'firstSetContext';
4739
3956
  docs: [
4740
3957
  'Is set to wipe the cpi context since someone could have set it before',
4741
- 'with unrelated data.',
3958
+ 'with unrelated data.'
4742
3959
  ];
4743
3960
  type: 'bool';
4744
3961
  },
4745
3962
  {
4746
3963
  name: 'cpiContextAccountIndex';
4747
3964
  docs: [
4748
- 'Index of cpi context account in remaining accounts.',
3965
+ 'Index of cpi context account in remaining accounts.'
4749
3966
  ];
4750
3967
  type: 'u8';
4751
- },
3968
+ }
4752
3969
  ];
4753
3970
  };
4754
3971
  },
@@ -4774,7 +3991,7 @@ type LightCompressedToken = {
4774
3991
  type: {
4775
3992
  array: ['u8', 32];
4776
3993
  };
4777
- },
3994
+ }
4778
3995
  ];
4779
3996
  };
4780
3997
  },
@@ -4800,7 +4017,7 @@ type LightCompressedToken = {
4800
4017
  docs: [
4801
4018
  'Is required if the signer is delegate,',
4802
4019
  '-> delegate is authority account,',
4803
- 'owner = Some(owner) is the owner of the token account.',
4020
+ 'owner = Some(owner) is the owner of the token account.'
4804
4021
  ];
4805
4022
  type: {
4806
4023
  option: {
@@ -4847,7 +4064,7 @@ type LightCompressedToken = {
4847
4064
  type: {
4848
4065
  option: 'u8';
4849
4066
  };
4850
- },
4067
+ }
4851
4068
  ];
4852
4069
  };
4853
4070
  },
@@ -4887,7 +4104,7 @@ type LightCompressedToken = {
4887
4104
  {
4888
4105
  name: 'outputAccountMerkleTreeIndex';
4889
4106
  type: 'u8';
4890
- },
4107
+ }
4891
4108
  ];
4892
4109
  };
4893
4110
  },
@@ -4945,14 +4162,14 @@ type LightCompressedToken = {
4945
4162
  type: {
4946
4163
  option: 'u64';
4947
4164
  };
4948
- },
4165
+ }
4949
4166
  ];
4950
4167
  };
4951
4168
  },
4952
4169
  {
4953
4170
  name: 'DelegatedTransfer';
4954
4171
  docs: [
4955
- 'Struct to provide the owner when the delegate is signer of the transaction.',
4172
+ 'Struct to provide the owner when the delegate is signer of the transaction.'
4956
4173
  ];
4957
4174
  type: {
4958
4175
  kind: 'struct';
@@ -4967,12 +4184,12 @@ type LightCompressedToken = {
4967
4184
  'Index of change compressed account in output compressed accounts. In',
4968
4185
  "case that the delegate didn't spend the complete delegated compressed",
4969
4186
  'account balance the change compressed account will be delegated to her',
4970
- 'as well.',
4187
+ 'as well.'
4971
4188
  ];
4972
4189
  type: {
4973
4190
  option: 'u8';
4974
4191
  };
4975
- },
4192
+ }
4976
4193
  ];
4977
4194
  };
4978
4195
  },
@@ -5010,12 +4227,12 @@ type LightCompressedToken = {
5010
4227
  {
5011
4228
  name: 'tlv';
5012
4229
  docs: [
5013
- 'Placeholder for TokenExtension tlv data (unimplemented)',
4230
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
5014
4231
  ];
5015
4232
  type: {
5016
4233
  option: 'bytes';
5017
4234
  };
5018
- },
4235
+ }
5019
4236
  ];
5020
4237
  };
5021
4238
  },
@@ -5071,7 +4288,7 @@ type LightCompressedToken = {
5071
4288
  {
5072
4289
  name: 'isCompress';
5073
4290
  type: 'bool';
5074
- },
4291
+ }
5075
4292
  ];
5076
4293
  };
5077
4294
  },
@@ -5135,7 +4352,7 @@ type LightCompressedToken = {
5135
4352
  defined: 'CompressedCpiContext';
5136
4353
  };
5137
4354
  };
5138
- },
4355
+ }
5139
4356
  ];
5140
4357
  };
5141
4358
  },
@@ -5151,7 +4368,7 @@ type LightCompressedToken = {
5151
4368
  {
5152
4369
  name: 'seq';
5153
4370
  type: 'u64';
5154
- },
4371
+ }
5155
4372
  ];
5156
4373
  };
5157
4374
  },
@@ -5177,7 +4394,7 @@ type LightCompressedToken = {
5177
4394
  {
5178
4395
  name: 'addressMerkleTreeRootIndex';
5179
4396
  type: 'u16';
5180
- },
4397
+ }
5181
4398
  ];
5182
4399
  };
5183
4400
  },
@@ -5195,7 +4412,7 @@ type LightCompressedToken = {
5195
4412
  {
5196
4413
  name: 'merkleTreeIndex';
5197
4414
  type: 'u8';
5198
- },
4415
+ }
5199
4416
  ];
5200
4417
  };
5201
4418
  },
@@ -5219,17 +4436,17 @@ type LightCompressedToken = {
5219
4436
  {
5220
4437
  name: 'rootIndex';
5221
4438
  docs: [
5222
- 'Index of root used in inclusion validity proof.',
4439
+ 'Index of root used in inclusion validity proof.'
5223
4440
  ];
5224
4441
  type: 'u16';
5225
4442
  },
5226
4443
  {
5227
4444
  name: 'readOnly';
5228
4445
  docs: [
5229
- 'Placeholder to mark accounts read-only unimplemented set to false.',
4446
+ 'Placeholder to mark accounts read-only unimplemented set to false.'
5230
4447
  ];
5231
4448
  type: 'bool';
5232
- },
4449
+ }
5233
4450
  ];
5234
4451
  };
5235
4452
  },
@@ -5253,7 +4470,7 @@ type LightCompressedToken = {
5253
4470
  {
5254
4471
  name: 'proveByIndex';
5255
4472
  type: 'bool';
5256
- },
4473
+ }
5257
4474
  ];
5258
4475
  };
5259
4476
  },
@@ -5283,12 +4500,12 @@ type LightCompressedToken = {
5283
4500
  {
5284
4501
  name: 'tlv';
5285
4502
  docs: [
5286
- 'Placeholder for TokenExtension tlv data (unimplemented)',
4503
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
5287
4504
  ];
5288
4505
  type: {
5289
4506
  option: 'bytes';
5290
4507
  };
5291
- },
4508
+ }
5292
4509
  ];
5293
4510
  };
5294
4511
  },
@@ -5362,7 +4579,7 @@ type LightCompressedToken = {
5362
4579
  type: {
5363
4580
  option: 'bytes';
5364
4581
  };
5365
- },
4582
+ }
5366
4583
  ];
5367
4584
  };
5368
4585
  },
@@ -5380,7 +4597,7 @@ type LightCompressedToken = {
5380
4597
  name: 'index';
5381
4598
  docs: ['Index of compressed account hash in queue.'];
5382
4599
  type: 'u16';
5383
- },
4600
+ }
5384
4601
  ];
5385
4602
  };
5386
4603
  },
@@ -5408,7 +4625,7 @@ type LightCompressedToken = {
5408
4625
  name: 'delegate';
5409
4626
  docs: [
5410
4627
  'If `delegate` is `Some` then `delegated_amount` represents',
5411
- 'the amount authorized by the delegate',
4628
+ 'the amount authorized by the delegate'
5412
4629
  ];
5413
4630
  type: {
5414
4631
  option: 'publicKey';
@@ -5424,15 +4641,15 @@ type LightCompressedToken = {
5424
4641
  {
5425
4642
  name: 'tlv';
5426
4643
  docs: [
5427
- 'Placeholder for TokenExtension tlv data (unimplemented)',
4644
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
5428
4645
  ];
5429
4646
  type: {
5430
4647
  option: 'bytes';
5431
4648
  };
5432
- },
4649
+ }
5433
4650
  ];
5434
4651
  };
5435
- },
4652
+ }
5436
4653
  ];
5437
4654
  errors: [
5438
4655
  {
@@ -5589,7 +4806,7 @@ type LightCompressedToken = {
5589
4806
  {
5590
4807
  code: 6032;
5591
4808
  name: 'NoMatchingBumpFound';
5592
- },
4809
+ }
5593
4810
  ];
5594
4811
  };
5595
4812
  declare const IDL: LightCompressedToken;
@@ -5600,30 +4817,14 @@ declare const CompressedTokenInstructionDataTransferLayout: Layout<unknown>;
5600
4817
  declare const mintToLayout: Layout<unknown>;
5601
4818
  declare const batchCompressLayout: Layout<unknown>;
5602
4819
  declare const compressSplTokenAccountInstructionDataLayout: Layout<unknown>;
5603
- declare function encodeMintToInstructionData(
5604
- data: MintToInstructionData,
5605
- ): Buffer$1;
5606
- declare function decodeMintToInstructionData(
5607
- buffer: Buffer$1,
5608
- ): MintToInstructionData;
5609
- declare function encodeBatchCompressInstructionData(
5610
- data: BatchCompressInstructionData,
5611
- ): Buffer$1;
5612
- declare function decodeBatchCompressInstructionData(
5613
- buffer: Buffer$1,
5614
- ): BatchCompressInstructionData;
5615
- declare function encodeCompressSplTokenAccountInstructionData(
5616
- data: CompressSplTokenAccountInstructionData,
5617
- ): Buffer$1;
5618
- declare function decodeCompressSplTokenAccountInstructionData(
5619
- buffer: Buffer$1,
5620
- ): CompressSplTokenAccountInstructionData;
5621
- declare function encodeTransferInstructionData(
5622
- data: CompressedTokenInstructionDataTransfer,
5623
- ): Buffer$1;
5624
- declare function decodeTransferInstructionData(
5625
- buffer: Buffer$1,
5626
- ): CompressedTokenInstructionDataTransfer;
4820
+ declare function encodeMintToInstructionData(data: MintToInstructionData): Buffer$1;
4821
+ declare function decodeMintToInstructionData(buffer: Buffer$1): MintToInstructionData;
4822
+ declare function encodeBatchCompressInstructionData(data: BatchCompressInstructionData): Buffer$1;
4823
+ declare function decodeBatchCompressInstructionData(buffer: Buffer$1): BatchCompressInstructionData;
4824
+ declare function encodeCompressSplTokenAccountInstructionData(data: CompressSplTokenAccountInstructionData): Buffer$1;
4825
+ declare function decodeCompressSplTokenAccountInstructionData(buffer: Buffer$1): CompressSplTokenAccountInstructionData;
4826
+ declare function encodeTransferInstructionData(data: CompressedTokenInstructionDataTransfer): Buffer$1;
4827
+ declare function decodeTransferInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataTransfer;
5627
4828
  interface BaseAccountsLayoutParams {
5628
4829
  feePayer: PublicKey;
5629
4830
  authority: PublicKey;
@@ -5665,44 +4866,20 @@ type freezeAccountsLayoutParams = BaseAccountsLayoutParams & {
5665
4866
  mint: PublicKey;
5666
4867
  };
5667
4868
  type thawAccountsLayoutParams = freezeAccountsLayoutParams;
5668
- declare const createTokenPoolAccountsLayout: (
5669
- accounts: createTokenPoolAccountsLayoutParams,
5670
- ) => AccountMeta[];
5671
- declare const addTokenPoolAccountsLayout: (
5672
- accounts: addTokenPoolAccountsLayoutParams,
5673
- ) => AccountMeta[];
5674
- declare const mintToAccountsLayout: (
5675
- accounts: mintToAccountsLayoutParams,
5676
- ) => AccountMeta[];
5677
- declare const transferAccountsLayout: (
5678
- accounts: transferAccountsLayoutParams,
5679
- ) => AccountMeta[];
5680
- declare const approveAccountsLayout: (
5681
- accounts: approveAccountsLayoutParams,
5682
- ) => AccountMeta[];
5683
- declare const revokeAccountsLayout: (
5684
- accounts: approveAccountsLayoutParams,
5685
- ) => AccountMeta[];
5686
- declare const freezeAccountsLayout: (
5687
- accounts: freezeAccountsLayoutParams,
5688
- ) => AccountMeta[];
5689
- declare const thawAccountsLayout: (
5690
- accounts: freezeAccountsLayoutParams,
5691
- ) => AccountMeta[];
4869
+ declare const createTokenPoolAccountsLayout: (accounts: createTokenPoolAccountsLayoutParams) => AccountMeta[];
4870
+ declare const addTokenPoolAccountsLayout: (accounts: addTokenPoolAccountsLayoutParams) => AccountMeta[];
4871
+ declare const mintToAccountsLayout: (accounts: mintToAccountsLayoutParams) => AccountMeta[];
4872
+ declare const transferAccountsLayout: (accounts: transferAccountsLayoutParams) => AccountMeta[];
4873
+ declare const approveAccountsLayout: (accounts: approveAccountsLayoutParams) => AccountMeta[];
4874
+ declare const revokeAccountsLayout: (accounts: approveAccountsLayoutParams) => AccountMeta[];
4875
+ declare const freezeAccountsLayout: (accounts: freezeAccountsLayoutParams) => AccountMeta[];
4876
+ declare const thawAccountsLayout: (accounts: freezeAccountsLayoutParams) => AccountMeta[];
5692
4877
  declare const CompressedTokenInstructionDataApproveLayout: Layout<unknown>;
5693
4878
  declare const CompressedTokenInstructionDataRevokeLayout: Layout<unknown>;
5694
- declare function encodeApproveInstructionData(
5695
- data: CompressedTokenInstructionDataApprove,
5696
- ): Buffer$1;
5697
- declare function decodeApproveInstructionData(
5698
- buffer: Buffer$1,
5699
- ): CompressedTokenInstructionDataApprove;
5700
- declare function encodeRevokeInstructionData(
5701
- data: CompressedTokenInstructionDataRevoke,
5702
- ): Buffer$1;
5703
- declare function decodeRevokeInstructionData(
5704
- buffer: Buffer$1,
5705
- ): CompressedTokenInstructionDataRevoke;
4879
+ declare function encodeApproveInstructionData(data: CompressedTokenInstructionDataApprove): Buffer$1;
4880
+ declare function decodeApproveInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataApprove;
4881
+ declare function encodeRevokeInstructionData(data: CompressedTokenInstructionDataRevoke): Buffer$1;
4882
+ declare function decodeRevokeInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataRevoke;
5706
4883
 
5707
4884
  type CompressParams = {
5708
4885
  /**
@@ -5796,11 +4973,7 @@ type DecompressParams = {
5796
4973
  /**
5797
4974
  * Token pool(s)
5798
4975
  */
5799
- tokenPoolInfos:
5800
- | TokenPoolInfo
5801
- | TokenPoolInfo[]
5802
- | SplInterfaceInfo
5803
- | SplInterfaceInfo[];
4976
+ tokenPoolInfos: TokenPoolInfo | TokenPoolInfo[] | SplInterfaceInfo | SplInterfaceInfo[];
5804
4977
  };
5805
4978
  type TransferParams = {
5806
4979
  /**
@@ -6085,17 +5258,12 @@ declare const validateSameTokenOwner: (accounts: ParsedTokenAccount[]) => void;
6085
5258
  /**
6086
5259
  * Parse compressed token accounts to get the mint, current owner and delegate.
6087
5260
  */
6088
- declare const parseTokenData: (
6089
- compressedTokenAccounts: ParsedTokenAccount[],
6090
- ) => {
5261
+ declare const parseTokenData: (compressedTokenAccounts: ParsedTokenAccount[]) => {
6091
5262
  mint: PublicKey;
6092
5263
  currentOwner: PublicKey;
6093
5264
  delegate: PublicKey | null;
6094
5265
  };
6095
- declare const parseMaybeDelegatedTransfer: (
6096
- inputs: ParsedTokenAccount[],
6097
- outputs: TokenTransferOutputData[],
6098
- ) => {
5266
+ declare const parseMaybeDelegatedTransfer: (inputs: ParsedTokenAccount[], outputs: TokenTransferOutputData[]) => {
6099
5267
  delegatedTransfer: DelegatedTransfer | null;
6100
5268
  authority: PublicKey;
6101
5269
  };
@@ -6107,11 +5275,7 @@ declare const parseMaybeDelegatedTransfer: (
6107
5275
  * @returns Output token data for the transfer
6108
5276
  * instruction
6109
5277
  */
6110
- declare function createTransferOutputState(
6111
- inputCompressedTokenAccounts: ParsedTokenAccount[],
6112
- toAddress: PublicKey,
6113
- amount: number | BN,
6114
- ): TokenTransferOutputData[];
5278
+ declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: number | BN): TokenTransferOutputData[];
6115
5279
  /**
6116
5280
  * Create the output state for a compress transaction.
6117
5281
  * @param inputCompressedTokenAccounts Input state
@@ -6119,10 +5283,7 @@ declare function createTransferOutputState(
6119
5283
  * @returns Output token data for the compress
6120
5284
  * instruction
6121
5285
  */
6122
- declare function createDecompressOutputState(
6123
- inputCompressedTokenAccounts: ParsedTokenAccount[],
6124
- amount: number | BN,
6125
- ): TokenTransferOutputData[];
5286
+ declare function createDecompressOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], amount: number | BN): TokenTransferOutputData[];
6126
5287
  declare class CompressedTokenProgram {
6127
5288
  /**
6128
5289
  * @internal
@@ -6160,17 +5321,11 @@ declare class CompressedTokenProgram {
6160
5321
  *
6161
5322
  * @returns The index and bump number.
6162
5323
  */
6163
- static findSplInterfaceIndexAndBump(
6164
- poolPda: PublicKey,
6165
- mint: PublicKey,
6166
- ): [number, number];
5324
+ static findSplInterfaceIndexAndBump(poolPda: PublicKey, mint: PublicKey): [number, number];
6167
5325
  /**
6168
5326
  * @deprecated Use {@link findSplInterfaceIndexAndBump} instead.
6169
5327
  */
6170
- static findTokenPoolIndexAndBump(
6171
- poolPda: PublicKey,
6172
- mint: PublicKey,
6173
- ): [number, number];
5328
+ static findTokenPoolIndexAndBump(poolPda: PublicKey, mint: PublicKey): [number, number];
6174
5329
  /**
6175
5330
  * Derive the SPL interface PDA with index.
6176
5331
  *
@@ -6180,17 +5335,11 @@ declare class CompressedTokenProgram {
6180
5335
  *
6181
5336
  * @returns The SPL interface PDA and bump.
6182
5337
  */
6183
- static deriveSplInterfacePdaWithIndex(
6184
- mint: PublicKey,
6185
- index: number,
6186
- ): [PublicKey, number];
5338
+ static deriveSplInterfacePdaWithIndex(mint: PublicKey, index: number): [PublicKey, number];
6187
5339
  /**
6188
5340
  * @deprecated Use {@link deriveSplInterfacePdaWithIndex} instead.
6189
5341
  */
6190
- static deriveTokenPoolPdaWithIndex(
6191
- mint: PublicKey,
6192
- index: number,
6193
- ): [PublicKey, number];
5342
+ static deriveTokenPoolPdaWithIndex(mint: PublicKey, index: number): [PublicKey, number];
6194
5343
  /** @internal */
6195
5344
  static get deriveCpiAuthorityPda(): PublicKey;
6196
5345
  /**
@@ -6211,16 +5360,7 @@ declare class CompressedTokenProgram {
6211
5360
  * Note that `createSplInterfaceInstruction` must be executed after
6212
5361
  * `initializeMintInstruction`.
6213
5362
  */
6214
- static createMint({
6215
- feePayer,
6216
- mint,
6217
- authority,
6218
- freezeAuthority,
6219
- decimals,
6220
- rentExemptBalance,
6221
- tokenProgramId,
6222
- mintSize,
6223
- }: CreateMintParams): Promise<TransactionInstruction[]>;
5363
+ static createMint({ feePayer, mint, authority, freezeAuthority, decimals, rentExemptBalance, tokenProgramId, mintSize, }: CreateMintParams): Promise<TransactionInstruction[]>;
6224
5364
  /**
6225
5365
  * Create SPL interface (omnibus account) for an existing SPL mint.
6226
5366
  * For new mints, use `CompressedTokenProgram.createMint`.
@@ -6232,17 +5372,11 @@ declare class CompressedTokenProgram {
6232
5372
  *
6233
5373
  * @returns The createSplInterface instruction
6234
5374
  */
6235
- static createSplInterface({
6236
- feePayer,
6237
- mint,
6238
- tokenProgramId,
6239
- }: CreateSplInterfaceParams): Promise<TransactionInstruction>;
5375
+ static createSplInterface({ feePayer, mint, tokenProgramId, }: CreateSplInterfaceParams): Promise<TransactionInstruction>;
6240
5376
  /**
6241
5377
  * @deprecated Use {@link createSplInterface} instead.
6242
5378
  */
6243
- static createTokenPool(
6244
- params: CreateSplInterfaceParams,
6245
- ): Promise<TransactionInstruction>;
5379
+ static createTokenPool(params: CreateSplInterfaceParams): Promise<TransactionInstruction>;
6246
5380
  /**
6247
5381
  * Add a token pool to an existing SPL mint. For new mints, use
6248
5382
  * {@link createSplInterface}.
@@ -6255,12 +5389,7 @@ declare class CompressedTokenProgram {
6255
5389
  *
6256
5390
  * @returns The addTokenPool instruction
6257
5391
  */
6258
- static addTokenPool({
6259
- feePayer,
6260
- mint,
6261
- poolIndex,
6262
- tokenProgramId,
6263
- }: AddSplInterfaceParams): Promise<TransactionInstruction>;
5392
+ static addTokenPool({ feePayer, mint, poolIndex, tokenProgramId, }: AddSplInterfaceParams): Promise<TransactionInstruction>;
6264
5393
  /**
6265
5394
  * Construct mintTo instruction for compressed tokens
6266
5395
  *
@@ -6274,15 +5403,7 @@ declare class CompressedTokenProgram {
6274
5403
  *
6275
5404
  * @returns The mintTo instruction
6276
5405
  */
6277
- static mintTo({
6278
- feePayer,
6279
- mint,
6280
- authority,
6281
- toPubkey,
6282
- amount,
6283
- outputStateTreeInfo,
6284
- tokenPoolInfo,
6285
- }: MintToParams): Promise<TransactionInstruction>;
5406
+ static mintTo({ feePayer, mint, authority, toPubkey, amount, outputStateTreeInfo, tokenPoolInfo, }: MintToParams): Promise<TransactionInstruction>;
6286
5407
  /**
6287
5408
  * Mint tokens from registered SPL mint account to a compressed account
6288
5409
  *
@@ -6298,16 +5419,7 @@ declare class CompressedTokenProgram {
6298
5419
  *
6299
5420
  * @returns The mintTo instruction
6300
5421
  */
6301
- static approveAndMintTo({
6302
- feePayer,
6303
- mint,
6304
- authority,
6305
- authorityTokenAccount,
6306
- toPubkey,
6307
- amount,
6308
- outputStateTreeInfo,
6309
- tokenPoolInfo,
6310
- }: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
5422
+ static approveAndMintTo({ feePayer, mint, authority, authorityTokenAccount, toPubkey, amount, outputStateTreeInfo, tokenPoolInfo, }: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
6311
5423
  /**
6312
5424
  * Construct transfer instruction for compressed tokens.
6313
5425
  *
@@ -6322,14 +5434,7 @@ declare class CompressedTokenProgram {
6322
5434
  *
6323
5435
  * @returns The transfer instruction
6324
5436
  */
6325
- static transfer({
6326
- payer,
6327
- inputCompressedTokenAccounts,
6328
- toAddress,
6329
- amount,
6330
- recentValidityProof,
6331
- recentInputStateRootIndices,
6332
- }: TransferParams): Promise<TransactionInstruction>;
5437
+ static transfer({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, }: TransferParams): Promise<TransactionInstruction>;
6333
5438
  /**
6334
5439
  * Create lookup table instructions for the token program's default
6335
5440
  * accounts.
@@ -6342,13 +5447,7 @@ declare class CompressedTokenProgram {
6342
5447
  *
6343
5448
  * @returns [createInstruction, extendInstruction, option(extendInstruction2)]
6344
5449
  */
6345
- static createTokenProgramLookupTable({
6346
- payer,
6347
- authority,
6348
- mints,
6349
- recentSlot,
6350
- remainingAccounts,
6351
- }: CreateTokenProgramLookupTableParams): Promise<{
5450
+ static createTokenProgramLookupTable({ payer, authority, mints, recentSlot, remainingAccounts, }: CreateTokenProgramLookupTableParams): Promise<{
6352
5451
  instructions: TransactionInstruction[];
6353
5452
  address: PublicKey;
6354
5453
  }>;
@@ -6366,16 +5465,7 @@ declare class CompressedTokenProgram {
6366
5465
  *
6367
5466
  * @returns The compress instruction
6368
5467
  */
6369
- static compress({
6370
- payer,
6371
- owner,
6372
- source,
6373
- toAddress,
6374
- amount,
6375
- mint,
6376
- outputStateTreeInfo,
6377
- tokenPoolInfo,
6378
- }: CompressParams): Promise<TransactionInstruction>;
5468
+ static compress({ payer, owner, source, toAddress, amount, mint, outputStateTreeInfo, tokenPoolInfo, }: CompressParams): Promise<TransactionInstruction>;
6379
5469
  /**
6380
5470
  * Construct decompress instruction
6381
5471
  *
@@ -6390,15 +5480,7 @@ declare class CompressedTokenProgram {
6390
5480
  *
6391
5481
  * @returns The decompress instruction
6392
5482
  */
6393
- static decompress({
6394
- payer,
6395
- inputCompressedTokenAccounts,
6396
- toAddress,
6397
- amount,
6398
- recentValidityProof,
6399
- recentInputStateRootIndices,
6400
- tokenPoolInfos,
6401
- }: DecompressParams): Promise<TransactionInstruction>;
5483
+ static decompress({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, tokenPoolInfos, }: DecompressParams): Promise<TransactionInstruction>;
6402
5484
  /**
6403
5485
  * Create `mergeTokenAccounts` instruction.
6404
5486
  *
@@ -6411,14 +5493,7 @@ declare class CompressedTokenProgram {
6411
5493
  * @param recentInputStateRootIndices Recent state root indices.
6412
5494
  * @returns instruction
6413
5495
  */
6414
- static mergeTokenAccounts({
6415
- payer,
6416
- owner,
6417
- inputCompressedTokenAccounts,
6418
- mint,
6419
- recentValidityProof,
6420
- recentInputStateRootIndices,
6421
- }: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
5496
+ static mergeTokenAccounts({ payer, owner, inputCompressedTokenAccounts, mint, recentValidityProof, recentInputStateRootIndices, }: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
6422
5497
  /**
6423
5498
  * Create `compressSplTokenAccount` instruction
6424
5499
  *
@@ -6432,15 +5507,7 @@ declare class CompressedTokenProgram {
6432
5507
  *
6433
5508
  * @returns instruction
6434
5509
  */
6435
- static compressSplTokenAccount({
6436
- feePayer,
6437
- authority,
6438
- tokenAccount,
6439
- mint,
6440
- remainingAmount,
6441
- outputStateTreeInfo,
6442
- tokenPoolInfo,
6443
- }: CompressSplTokenAccountParams): Promise<TransactionInstruction>;
5510
+ static compressSplTokenAccount({ feePayer, authority, tokenAccount, mint, remainingAmount, outputStateTreeInfo, tokenPoolInfo, }: CompressSplTokenAccountParams): Promise<TransactionInstruction>;
6444
5511
  /**
6445
5512
  * Get the program ID for a mint
6446
5513
  *
@@ -6449,10 +5516,7 @@ declare class CompressedTokenProgram {
6449
5516
  *
6450
5517
  * @returns program ID
6451
5518
  */
6452
- static getMintProgramId(
6453
- mint: PublicKey,
6454
- connection: Connection,
6455
- ): Promise<PublicKey | undefined>;
5519
+ static getMintProgramId(mint: PublicKey, connection: Connection): Promise<PublicKey | undefined>;
6456
5520
  /**
6457
5521
  * Create `approve` instruction to delegate compressed tokens.
6458
5522
  *
@@ -6465,14 +5529,7 @@ declare class CompressedTokenProgram {
6465
5529
  *
6466
5530
  * @returns instruction
6467
5531
  */
6468
- static approve({
6469
- payer,
6470
- inputCompressedTokenAccounts,
6471
- toAddress,
6472
- amount,
6473
- recentValidityProof,
6474
- recentInputStateRootIndices,
6475
- }: ApproveParams): Promise<TransactionInstruction>;
5532
+ static approve({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, }: ApproveParams): Promise<TransactionInstruction>;
6476
5533
  /**
6477
5534
  * Create `revoke` instruction to revoke delegation of compressed tokens.
6478
5535
  *
@@ -6483,12 +5540,7 @@ declare class CompressedTokenProgram {
6483
5540
  *
6484
5541
  * @returns instruction
6485
5542
  */
6486
- static revoke({
6487
- payer,
6488
- inputCompressedTokenAccounts,
6489
- recentValidityProof,
6490
- recentInputStateRootIndices,
6491
- }: RevokeParams): Promise<TransactionInstruction>;
5543
+ static revoke({ payer, inputCompressedTokenAccounts, recentValidityProof, recentInputStateRootIndices, }: RevokeParams): Promise<TransactionInstruction>;
6492
5544
  }
6493
5545
 
6494
5546
  /** Solana maximum transaction size in bytes. */
@@ -6519,10 +5571,7 @@ declare const MAX_LOAD_ONLY_BATCH_BYTES = 1000;
6519
5571
  * @param numSigners Number of signers (determines signature count).
6520
5572
  * @returns Estimated byte size of the serialized transaction.
6521
5573
  */
6522
- declare function estimateTransactionSize(
6523
- instructions: TransactionInstruction[],
6524
- numSigners: number,
6525
- ): number;
5574
+ declare function estimateTransactionSize(instructions: TransactionInstruction[], numSigners: number): number;
6526
5575
 
6527
5576
  /**
6528
5577
  * Retrieve associated token account for a given owner and mint.
@@ -6535,14 +5584,7 @@ declare function estimateTransactionSize(
6535
5584
  * @param programId Optional program ID
6536
5585
  * @returns AccountInterface with ATA metadata
6537
5586
  */
6538
- declare function getAtaInterface(
6539
- rpc: Rpc,
6540
- ata: PublicKey,
6541
- owner: PublicKey,
6542
- mint: PublicKey,
6543
- commitment?: Commitment,
6544
- programId?: PublicKey,
6545
- ): Promise<AccountInterface>;
5587
+ declare function getAtaInterface(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<AccountInterface>;
6546
5588
  /**
6547
5589
  * Create instruction batches for loading token balances into an ATA.
6548
5590
  * Returns batches of instructions, each batch is one transaction.
@@ -6555,16 +5597,9 @@ declare function getAtaInterface(
6555
5597
  * @param options Optional load options
6556
5598
  * @returns Instruction batches - each inner array is one transaction
6557
5599
  */
6558
- declare function createLoadAtaInstructions(
6559
- rpc: Rpc,
6560
- ata: PublicKey,
6561
- owner: PublicKey,
6562
- mint: PublicKey,
6563
- payer?: PublicKey,
6564
- options?: InterfaceOptions,
6565
- ): Promise<TransactionInstruction[][]>;
5600
+ declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, payer?: PublicKey, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
6566
5601
  /**
6567
- * Load token balances into a c-token ATA.
5602
+ * Load token balances into a light-token ATA.
6568
5603
  *
6569
5604
  * @param rpc RPC connection
6570
5605
  * @param ata Associated token address
@@ -6575,250 +5610,6 @@ declare function createLoadAtaInstructions(
6575
5610
  * @param interfaceOptions Optional interface options
6576
5611
  * @returns Transaction signature, or null if nothing to load
6577
5612
  */
6578
- declare function loadAta(
6579
- rpc: Rpc,
6580
- ata: PublicKey,
6581
- owner: Signer,
6582
- mint: PublicKey,
6583
- payer?: Signer,
6584
- confirmOptions?: ConfirmOptions,
6585
- interfaceOptions?: InterfaceOptions,
6586
- ): Promise<TransactionSignature | null>;
6587
-
6588
- export {
6589
- ADD_TOKEN_POOL_DISCRIMINATOR,
6590
- APPROVE_DISCRIMINATOR,
6591
- type AccountInterface,
6592
- Action,
6593
- type AddSplInterfaceParams,
6594
- type AddTokenPoolParams,
6595
- type ApproveAndMintToParams,
6596
- type ApproveParams,
6597
- BASE_RENT_PER_EPOCH,
6598
- BATCH_COMPRESS_DISCRIMINATOR,
6599
- type BaseMint,
6600
- type BatchCompressInstructionData,
6601
- COMPRESSIBLE_CTOKEN_ACCOUNT_SIZE,
6602
- COMPRESSIBLE_CTOKEN_RENT_PER_EPOCH,
6603
- COMPRESSION_COST,
6604
- COMPRESSION_INCENTIVE,
6605
- COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR,
6606
- CPI_AUTHORITY_SEED,
6607
- CREATE_TOKEN_POOL_DISCRIMINATOR,
6608
- type CTokenConfig,
6609
- type CompressParams,
6610
- type CompressSplTokenAccountInstructionData,
6611
- type CompressSplTokenAccountParams,
6612
- type CompressedMint,
6613
- type CompressedTokenInstructionDataApprove,
6614
- CompressedTokenInstructionDataApproveLayout,
6615
- type CompressedTokenInstructionDataRevoke,
6616
- CompressedTokenInstructionDataRevokeLayout,
6617
- type CompressedTokenInstructionDataTransfer,
6618
- CompressedTokenInstructionDataTransferLayout,
6619
- CompressedTokenProgram,
6620
- type CompressibleAccountInput,
6621
- type CompressibleConfig,
6622
- type CompressibleLoadParams,
6623
- CpiContextLayout,
6624
- type CreateAssociatedCTokenAccountParams,
6625
- type CreateMintParams,
6626
- type CreateSplInterfaceParams,
6627
- type CreateTokenPoolParams,
6628
- type CreateTokenProgramLookupTableParams,
6629
- DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR,
6630
- DEFAULT_COMPRESSIBLE_CONFIG,
6631
- DEFAULT_PREPAY_EPOCHS,
6632
- DEFAULT_WRITE_TOP_UP,
6633
- type DecompressParams,
6634
- type DelegatedTransfer,
6635
- DelegatedTransferLayout,
6636
- ERROR_MIXED_TREE_TYPES,
6637
- ERROR_NO_ACCOUNTS_FOUND,
6638
- ExtensionType,
6639
- IDL,
6640
- type InputTokenDataWithContext,
6641
- type InterfaceOptions,
6642
- LIGHT_TOKEN_CONFIG,
6643
- LIGHT_TOKEN_RENT_SPONSOR,
6644
- type LightCompressedToken,
6645
- CompressedTokenProgram as LightTokenProgram,
6646
- type LoadResult,
6647
- MAX_COMBINED_BATCH_BYTES,
6648
- MAX_LOAD_ONLY_BATCH_BYTES,
6649
- MAX_TOP_UP,
6650
- MAX_TRANSACTION_SIZE,
6651
- MINT_TO_DISCRIMINATOR,
6652
- type MergeTokenAccountsParams,
6653
- type MintContext,
6654
- type MintExtension,
6655
- type MintInterface,
6656
- type MintToInstructionData,
6657
- type MintToParams,
6658
- type OffChainTokenMetadata,
6659
- type OffChainTokenMetadataJson,
6660
- POOL_SEED,
6661
- type PackCompressedTokenAccountsParams,
6662
- type PackedCompressedAccount,
6663
- type PackedTokenTransferOutputData,
6664
- type ParsedAccountInfoInterface,
6665
- RENT_PER_BYTE_PER_EPOCH,
6666
- REVOKE_DISCRIMINATOR,
6667
- type RevokeParams,
6668
- SLOTS_PER_RENT_EPOCH,
6669
- SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE,
6670
- type SelectInputAccountsOptions,
6671
- type SelectedAccountsResult,
6672
- type SplInterfaceActivity,
6673
- type SplInterfaceInfo,
6674
- TOTAL_COMPRESSION_COST,
6675
- TRANSFER_DISCRIMINATOR,
6676
- type TokenAccountSource,
6677
- type TokenData,
6678
- TokenDataVersion,
6679
- type TokenMetadata,
6680
- type TokenMetadataInstructionData,
6681
- type TokenPoolActivity,
6682
- type TokenPoolInfo,
6683
- type TokenTransferOutputData,
6684
- type TransferParams,
6685
- addSplInterfaces,
6686
- addTokenPoolAccountsLayout,
6687
- type addTokenPoolAccountsLayoutParams,
6688
- addTokenPools,
6689
- approve,
6690
- approveAccountsLayout,
6691
- type approveAccountsLayoutParams,
6692
- approveAndMintTo,
6693
- batchCompressLayout,
6694
- calculateCompressibleLoadComputeUnits,
6695
- calculateFeePayerCostAtCreation,
6696
- checkMint,
6697
- checkSplInterfaceInfo,
6698
- checkTokenPoolInfo,
6699
- compress,
6700
- compressSplTokenAccount,
6701
- compressSplTokenAccountInstructionDataLayout,
6702
- convertTokenDataToAccount,
6703
- createAssociatedCTokenAccountIdempotentInstruction,
6704
- createAssociatedCTokenAccountInstruction,
6705
- createAssociatedTokenAccountInterfaceIdempotentInstruction,
6706
- createAssociatedTokenAccountInterfaceInstruction,
6707
- createAtaInterface,
6708
- createAtaInterfaceIdempotent,
6709
- createAtaInterfaceIdempotentInstruction,
6710
- createDecompressInterfaceInstruction,
6711
- createDecompressOutputState,
6712
- createLightTokenTransferInstruction,
6713
- createLoadAccountsParams,
6714
- createLoadAtaInstructions,
6715
- createLoadAtaInstructionsFromInterface,
6716
- createMint,
6717
- createMintInstruction,
6718
- createMintInterface,
6719
- createMintToCompressedInstruction,
6720
- createMintToInstruction,
6721
- createMintToInterfaceInstruction,
6722
- createRemoveMetadataKeyInstruction,
6723
- createSplInterface,
6724
- createTokenMetadata,
6725
- createTokenPool,
6726
- createTokenPoolAccountsLayout,
6727
- type createTokenPoolAccountsLayoutParams,
6728
- createTokenProgramLookupTable,
6729
- createTransferInterfaceInstructions,
6730
- createTransferOutputState,
6731
- createUnwrapInstruction,
6732
- createUnwrapInstructions,
6733
- createUpdateFreezeAuthorityInstruction,
6734
- createUpdateMetadataAuthorityInstruction,
6735
- createUpdateMetadataFieldInstruction,
6736
- createUpdateMintAuthorityInstruction,
6737
- createWrapInstruction,
6738
- decodeApproveInstructionData,
6739
- decodeBatchCompressInstructionData,
6740
- decodeCompressSplTokenAccountInstructionData,
6741
- decodeMintToInstructionData,
6742
- decodeRevokeInstructionData,
6743
- decodeTokenMetadata,
6744
- decodeTransferInstructionData,
6745
- decompress,
6746
- decompressDelegated,
6747
- decompressInterface,
6748
- deriveSplInterfaceInfo,
6749
- deriveTokenPoolInfo,
6750
- deserializeMint,
6751
- encodeApproveInstructionData,
6752
- encodeBatchCompressInstructionData,
6753
- encodeCompressSplTokenAccountInstructionData,
6754
- encodeMintToInstructionData,
6755
- encodeRevokeInstructionData,
6756
- encodeTokenMetadata,
6757
- encodeTransferInstructionData,
6758
- estimateTransactionSize,
6759
- extractTokenMetadata,
6760
- freezeAccountsLayout,
6761
- type freezeAccountsLayoutParams,
6762
- getAccountInterface,
6763
- getAssociatedTokenAddressInterface,
6764
- getAtaInterface,
6765
- getMintInterface,
6766
- getOrCreateAtaInterface,
6767
- getSplInterfaceInfos,
6768
- getTokenPoolInfos,
6769
- groupAccountsByTreeType,
6770
- isSingleSplInterfaceInfo,
6771
- isSingleTokenPoolInfo,
6772
- loadAta,
6773
- mergeTokenAccounts,
6774
- mintTo,
6775
- mintToAccountsLayout,
6776
- type mintToAccountsLayoutParams,
6777
- mintTo$1 as mintToCToken,
6778
- mintToCompressed,
6779
- mintToInterface,
6780
- mintToLayout,
6781
- packCompressedTokenAccounts,
6782
- parseCTokenCold,
6783
- parseCTokenHot,
6784
- parseMaybeDelegatedTransfer,
6785
- parseTokenData,
6786
- removeMetadataKey,
6787
- rentPerEpoch,
6788
- revoke,
6789
- revokeAccountsLayout,
6790
- type revokeAccountsLayoutParams,
6791
- selectAccountsByPreferredTreeType,
6792
- selectInputsForAmount,
6793
- selectMinCompressedTokenAccountsForDecompression,
6794
- selectMinCompressedTokenAccountsForTransfer,
6795
- selectMinCompressedTokenAccountsForTransferOrPartial,
6796
- selectSmartCompressedTokenAccountsForTransfer,
6797
- selectSmartCompressedTokenAccountsForTransferOrPartial,
6798
- selectSplInterfaceInfo,
6799
- selectSplInterfaceInfosForDecompression,
6800
- selectTokenAccountsForApprove,
6801
- selectTokenPoolInfo,
6802
- selectTokenPoolInfosForDecompression,
6803
- serializeMint,
6804
- sliceLast,
6805
- sumUpTokenAmount,
6806
- thawAccountsLayout,
6807
- type thawAccountsLayoutParams,
6808
- toAccountInfo,
6809
- toOffChainMetadataJson,
6810
- toTokenPoolInfo,
6811
- transfer,
6812
- transferAccountsLayout,
6813
- type transferAccountsLayoutParams,
6814
- transferDelegated,
6815
- transferInterface,
6816
- unpackMintData,
6817
- unpackMintInterface,
6818
- updateFreezeAuthority,
6819
- updateMetadataAuthority,
6820
- updateMetadataField,
6821
- updateMintAuthority,
6822
- validateSameTokenOwner,
6823
- wrap,
6824
- };
5613
+ declare function loadAta(rpc: Rpc, ata: PublicKey, owner: Signer, mint: PublicKey, payer?: Signer, confirmOptions?: ConfirmOptions, interfaceOptions?: InterfaceOptions, decimals?: number): Promise<TransactionSignature | null>;
5614
+
5615
+ 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, 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, CompressedTokenProgram as LightTokenProgram, MAX_COMBINED_BATCH_BYTES, MAX_LOAD_ONLY_BATCH_BYTES, MAX_TOP_UP, MAX_TRANSACTION_SIZE, 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, deriveSplInterfaceInfo, deriveTokenPoolInfo, deserializeMint, encodeApproveInstructionData, encodeBatchCompressInstructionData, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeRevokeInstructionData, encodeTokenMetadata, encodeTransferInstructionData, estimateTransactionSize, extractTokenMetadata, freezeAccountsLayout, type freezeAccountsLayoutParams, getAccountInterface, 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, selectInputsForAmount, 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, updateFreezeAuthority, updateMetadataAuthority, updateMetadataField, updateMintAuthority, validateSameTokenOwner, wrap };