@lightprotocol/compressed-token 0.23.0-beta.7 → 0.23.0-beta.9
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.
- package/dist/cjs/browser/index.cjs +246 -1
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/browser/types-pEpHwEnq.cjs +11988 -0
- package/dist/cjs/browser/types-pEpHwEnq.cjs.map +1 -0
- package/dist/cjs/browser/unified/index.cjs +337 -1
- package/dist/cjs/browser/unified/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +248 -1
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/node/types-EuCij2TU.cjs +10752 -0
- package/dist/cjs/node/types-EuCij2TU.cjs.map +1 -0
- package/dist/cjs/node/unified/index.cjs +338 -1
- package/dist/cjs/node/unified/index.cjs.map +1 -1
- package/dist/es/browser/index.js +191 -1
- package/dist/es/browser/index.js.map +1 -1
- package/dist/es/browser/types-BSM3Bq3L.js +10887 -0
- package/dist/es/browser/types-BSM3Bq3L.js.map +1 -0
- package/dist/es/browser/unified/index.js +242 -1
- package/dist/es/browser/unified/index.js.map +1 -1
- package/dist/types/index.d.ts +1365 -273
- package/dist/types/unified/index.d.ts +1372 -275
- package/package.json +2 -2
- package/dist/cjs/browser/types-D7Vfriyx.cjs +0 -2
- package/dist/cjs/browser/types-D7Vfriyx.cjs.map +0 -1
- package/dist/cjs/node/types-DM7_3vD2.cjs +0 -2
- package/dist/cjs/node/types-DM7_3vD2.cjs.map +0 -1
- package/dist/es/browser/types-MLa8Txs3.js +0 -2
- package/dist/es/browser/types-MLa8Txs3.js.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,23 +1,84 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
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';
|
|
4
29
|
export { ParsedTokenAccount as ParsedTokenAccountInterface } from '@lightprotocol/stateless.js';
|
|
5
30
|
import { Mint, Account } from '@solana/spl-token';
|
|
6
31
|
export { Account, AccountState } from '@solana/spl-token';
|
|
7
32
|
|
|
8
33
|
declare class Buffer$1 extends Uint8Array {
|
|
9
|
-
length: number
|
|
10
|
-
write(
|
|
34
|
+
length: number;
|
|
35
|
+
write(
|
|
36
|
+
string: string,
|
|
37
|
+
offset?: number,
|
|
38
|
+
length?: number,
|
|
39
|
+
encoding?: string,
|
|
40
|
+
): number;
|
|
11
41
|
toString(encoding?: string, start?: number, end?: number): string;
|
|
12
|
-
toJSON(): { type: 'Buffer'
|
|
42
|
+
toJSON(): { type: 'Buffer'; data: any[] };
|
|
13
43
|
equals(otherBuffer: Buffer$1): boolean;
|
|
14
|
-
compare(
|
|
15
|
-
|
|
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;
|
|
16
57
|
slice(start?: number, end?: number): Buffer$1;
|
|
17
|
-
writeUIntLE(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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;
|
|
21
82
|
readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
22
83
|
readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
23
84
|
readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
@@ -63,9 +124,21 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
63
124
|
writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
|
|
64
125
|
writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
|
|
65
126
|
fill(value: any, offset?: number, end?: number): this;
|
|
66
|
-
indexOf(
|
|
67
|
-
|
|
68
|
-
|
|
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;
|
|
69
142
|
|
|
70
143
|
/**
|
|
71
144
|
* Allocates a new buffer containing the given {str}.
|
|
@@ -73,19 +146,19 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
73
146
|
* @param str String to store in buffer.
|
|
74
147
|
* @param encoding encoding to use, optional. Default is 'utf8'
|
|
75
148
|
*/
|
|
76
|
-
constructor
|
|
149
|
+
constructor(str: string, encoding?: string);
|
|
77
150
|
/**
|
|
78
151
|
* Allocates a new buffer of {size} octets.
|
|
79
152
|
*
|
|
80
153
|
* @param size count of octets to allocate.
|
|
81
154
|
*/
|
|
82
|
-
constructor
|
|
155
|
+
constructor(size: number);
|
|
83
156
|
/**
|
|
84
157
|
* Allocates a new buffer containing the given {array} of octets.
|
|
85
158
|
*
|
|
86
159
|
* @param array The octets to store.
|
|
87
160
|
*/
|
|
88
|
-
constructor
|
|
161
|
+
constructor(array: Uint8Array);
|
|
89
162
|
/**
|
|
90
163
|
* Produces a Buffer backed by the same allocated memory as
|
|
91
164
|
* the given {ArrayBuffer}.
|
|
@@ -93,19 +166,19 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
93
166
|
*
|
|
94
167
|
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
95
168
|
*/
|
|
96
|
-
constructor
|
|
169
|
+
constructor(arrayBuffer: ArrayBuffer);
|
|
97
170
|
/**
|
|
98
171
|
* Allocates a new buffer containing the given {array} of octets.
|
|
99
172
|
*
|
|
100
173
|
* @param array The octets to store.
|
|
101
174
|
*/
|
|
102
|
-
constructor
|
|
175
|
+
constructor(array: any[]);
|
|
103
176
|
/**
|
|
104
177
|
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
105
178
|
*
|
|
106
179
|
* @param buffer The buffer to copy.
|
|
107
180
|
*/
|
|
108
|
-
constructor
|
|
181
|
+
constructor(buffer: Buffer$1);
|
|
109
182
|
prototype: Buffer$1;
|
|
110
183
|
/**
|
|
111
184
|
* Allocates a new Buffer using an {array} of octets.
|
|
@@ -123,7 +196,11 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
123
196
|
* @param byteOffset
|
|
124
197
|
* @param length
|
|
125
198
|
*/
|
|
126
|
-
static from(
|
|
199
|
+
static from(
|
|
200
|
+
arrayBuffer: ArrayBuffer,
|
|
201
|
+
byteOffset?: number,
|
|
202
|
+
length?: number,
|
|
203
|
+
): Buffer$1;
|
|
127
204
|
/**
|
|
128
205
|
* Copies the passed {buffer} data onto a new Buffer instance.
|
|
129
206
|
*
|
|
@@ -183,7 +260,11 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
183
260
|
* If parameter is omitted, buffer will be filled with zeros.
|
|
184
261
|
* @param encoding encoding used for call to buf.fill while initializing
|
|
185
262
|
*/
|
|
186
|
-
static alloc(
|
|
263
|
+
static alloc(
|
|
264
|
+
size: number,
|
|
265
|
+
fill?: string | Buffer$1 | number,
|
|
266
|
+
encoding?: string,
|
|
267
|
+
): Buffer$1;
|
|
187
268
|
/**
|
|
188
269
|
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
|
|
189
270
|
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
@@ -348,7 +429,13 @@ interface TokenMetadataInstructionData {
|
|
|
348
429
|
updateAuthority?: PublicKey | null;
|
|
349
430
|
additionalMetadata: AdditionalMetadata[] | null;
|
|
350
431
|
}
|
|
351
|
-
declare function createTokenMetadata(
|
|
432
|
+
declare function createTokenMetadata(
|
|
433
|
+
name: string,
|
|
434
|
+
symbol: string,
|
|
435
|
+
uri: string,
|
|
436
|
+
updateAuthority?: PublicKey | null,
|
|
437
|
+
additionalMetadata?: AdditionalMetadata[] | null,
|
|
438
|
+
): TokenMetadataInstructionData;
|
|
352
439
|
/**
|
|
353
440
|
* Create instruction for initializing a c-token mint.
|
|
354
441
|
*
|
|
@@ -361,8 +448,20 @@ declare function createTokenMetadata(name: string, symbol: string, uri: string,
|
|
|
361
448
|
* @param addressTreeInfo Address tree info for the mint.
|
|
362
449
|
* @param outputStateTreeInfo Output state tree info.
|
|
363
450
|
* @param metadata Optional token metadata.
|
|
364
|
-
|
|
365
|
-
|
|
451
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
452
|
+
*/
|
|
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
465
|
|
|
367
466
|
/**
|
|
368
467
|
* SPL-compatible base mint structure
|
|
@@ -496,7 +595,7 @@ declare function serializeMint(mint: CompressedMint): Buffer$1;
|
|
|
496
595
|
* Extension type constants
|
|
497
596
|
*/
|
|
498
597
|
declare enum ExtensionType {
|
|
499
|
-
TokenMetadata = 19
|
|
598
|
+
TokenMetadata = 19,
|
|
500
599
|
}
|
|
501
600
|
/**
|
|
502
601
|
* Decode TokenMetadata from raw extension data using Borsh layout
|
|
@@ -514,7 +613,9 @@ declare function encodeTokenMetadata(metadata: TokenMetadata): Buffer$1;
|
|
|
514
613
|
* @param extensions - Array of raw extensions
|
|
515
614
|
* @returns Parsed TokenMetadata or null if not found
|
|
516
615
|
*/
|
|
517
|
-
declare function extractTokenMetadata(
|
|
616
|
+
declare function extractTokenMetadata(
|
|
617
|
+
extensions: MintExtension[] | null,
|
|
618
|
+
): TokenMetadata | null;
|
|
518
619
|
/**
|
|
519
620
|
* Metadata portion of MintInstructionData
|
|
520
621
|
* Used for instruction encoding when metadata extension is present
|
|
@@ -565,7 +666,12 @@ interface MintInterface {
|
|
|
565
666
|
* @returns Object with mint, optional merkleContext, mintContext, and
|
|
566
667
|
* tokenMetadata
|
|
567
668
|
*/
|
|
568
|
-
declare function getMintInterface(
|
|
669
|
+
declare function getMintInterface(
|
|
670
|
+
rpc: Rpc,
|
|
671
|
+
address: PublicKey,
|
|
672
|
+
commitment?: Commitment,
|
|
673
|
+
programId?: PublicKey,
|
|
674
|
+
): Promise<MintInterface>;
|
|
569
675
|
/**
|
|
570
676
|
* Unpack mint info from raw account data for SPL/T22/c-token.
|
|
571
677
|
*
|
|
@@ -574,7 +680,11 @@ declare function getMintInterface(rpc: Rpc, address: PublicKey, commitment?: Com
|
|
|
574
680
|
* @param programId Token program ID. Default c-token.
|
|
575
681
|
* @returns Object with mint, optional mintContext and tokenMetadata.
|
|
576
682
|
*/
|
|
577
|
-
declare function unpackMintInterface(
|
|
683
|
+
declare function unpackMintInterface(
|
|
684
|
+
address: PublicKey,
|
|
685
|
+
data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>,
|
|
686
|
+
programId?: PublicKey,
|
|
687
|
+
): Omit<MintInterface, 'merkleContext'>;
|
|
578
688
|
/**
|
|
579
689
|
* Unpack c-token mint context and metadata from raw account data
|
|
580
690
|
*
|
|
@@ -596,8 +706,16 @@ declare function unpackMintData(data: Buffer$1 | Uint8Array): {
|
|
|
596
706
|
* @param newMintAuthority New mint authority (or null to revoke)
|
|
597
707
|
* @param payer Fee payer public key
|
|
598
708
|
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
709
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
599
710
|
*/
|
|
600
|
-
declare function createUpdateMintAuthorityInstruction(
|
|
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;
|
|
601
719
|
/**
|
|
602
720
|
* Create instruction for updating a compressed mint's freeze authority.
|
|
603
721
|
* Works for both compressed and decompressed mints.
|
|
@@ -610,8 +728,16 @@ declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterfa
|
|
|
610
728
|
* @param newFreezeAuthority New freeze authority (or null to revoke)
|
|
611
729
|
* @param payer Fee payer public key
|
|
612
730
|
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
731
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
613
732
|
*/
|
|
614
|
-
declare function createUpdateFreezeAuthorityInstruction(
|
|
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;
|
|
615
741
|
|
|
616
742
|
/**
|
|
617
743
|
* Create instruction for updating a compressed mint's metadata field.
|
|
@@ -627,8 +753,19 @@ declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInter
|
|
|
627
753
|
* @param value New value for the field
|
|
628
754
|
* @param customKey Custom key name (required if fieldType is 'custom')
|
|
629
755
|
* @param extensionIndex Extension index (default: 0)
|
|
630
|
-
|
|
631
|
-
|
|
756
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
757
|
+
*/
|
|
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;
|
|
632
769
|
/**
|
|
633
770
|
* Create instruction for updating a compressed mint's metadata authority.
|
|
634
771
|
*
|
|
@@ -641,8 +778,17 @@ declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterfa
|
|
|
641
778
|
* @param payer Fee payer public key
|
|
642
779
|
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
643
780
|
* @param extensionIndex Extension index (default: 0)
|
|
644
|
-
|
|
645
|
-
|
|
781
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
782
|
+
*/
|
|
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;
|
|
646
792
|
/**
|
|
647
793
|
* Create instruction for removing a metadata key from a compressed mint.
|
|
648
794
|
*
|
|
@@ -656,8 +802,18 @@ declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInt
|
|
|
656
802
|
* @param key Metadata key to remove
|
|
657
803
|
* @param idempotent If true, don't error if key doesn't exist (default: false)
|
|
658
804
|
* @param extensionIndex Extension index (default: 0)
|
|
659
|
-
|
|
660
|
-
|
|
805
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
806
|
+
*/
|
|
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;
|
|
661
817
|
|
|
662
818
|
interface CompressToPubkey {
|
|
663
819
|
bump: number;
|
|
@@ -717,7 +873,14 @@ declare const DEFAULT_COMPRESSIBLE_CONFIG: CompressibleConfig;
|
|
|
717
873
|
* @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
|
|
718
874
|
* @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
|
|
719
875
|
*/
|
|
720
|
-
declare function createAssociatedCTokenAccountInstruction(
|
|
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;
|
|
721
884
|
/**
|
|
722
885
|
* Create idempotent instruction for creating an associated compressed token account.
|
|
723
886
|
* Uses the default rent sponsor PDA by default.
|
|
@@ -729,7 +892,14 @@ declare function createAssociatedCTokenAccountInstruction(feePayer: PublicKey, o
|
|
|
729
892
|
* @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
|
|
730
893
|
* @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
|
|
731
894
|
*/
|
|
732
|
-
declare function createAssociatedCTokenAccountIdempotentInstruction(
|
|
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;
|
|
733
903
|
|
|
734
904
|
/**
|
|
735
905
|
* c-token-specific config for createAssociatedTokenAccountInterfaceInstruction
|
|
@@ -752,7 +922,15 @@ interface CTokenConfig {
|
|
|
752
922
|
* @param associatedTokenProgramId Associated token program ID.
|
|
753
923
|
* @param ctokenConfig Optional c-token-specific configuration.
|
|
754
924
|
*/
|
|
755
|
-
declare function createAssociatedTokenAccountInterfaceInstruction(
|
|
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;
|
|
756
934
|
/**
|
|
757
935
|
* Create idempotent instruction for creating an associated token account (SPL,
|
|
758
936
|
* Token-2022, or c-token). Follows SPL Token API signature with optional c-token
|
|
@@ -766,7 +944,15 @@ declare function createAssociatedTokenAccountInterfaceInstruction(payer: PublicK
|
|
|
766
944
|
* @param associatedTokenProgramId Associated token program ID.
|
|
767
945
|
* @param ctokenConfig Optional c-token-specific configuration.
|
|
768
946
|
*/
|
|
769
|
-
declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(
|
|
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;
|
|
770
956
|
/**
|
|
771
957
|
* Short alias for createAssociatedTokenAccountInterfaceIdempotentInstruction.
|
|
772
958
|
*/
|
|
@@ -784,7 +970,7 @@ interface CreateMintToInstructionParams {
|
|
|
784
970
|
amount: number | bigint;
|
|
785
971
|
/** Mint authority (must be signer) */
|
|
786
972
|
authority: PublicKey;
|
|
787
|
-
/** Maximum lamports for rent and top-up combined. Transaction fails if exceeded. (0 = no
|
|
973
|
+
/** Maximum lamports for rent and top-up combined. Transaction fails if exceeded. (u16::MAX = no limit, 0 = no top-ups allowed) */
|
|
788
974
|
maxTopUp?: number;
|
|
789
975
|
/** Optional fee payer for rent top-ups. If not provided, authority pays. */
|
|
790
976
|
feePayer?: PublicKey;
|
|
@@ -798,7 +984,9 @@ interface CreateMintToInstructionParams {
|
|
|
798
984
|
* @param params - Mint instruction parameters
|
|
799
985
|
* @returns TransactionInstruction for minting tokens
|
|
800
986
|
*/
|
|
801
|
-
declare function createMintToInstruction(
|
|
987
|
+
declare function createMintToInstruction(
|
|
988
|
+
params: CreateMintToInstructionParams,
|
|
989
|
+
): TransactionInstruction;
|
|
802
990
|
|
|
803
991
|
/** Default compressible config PDA (V1) */
|
|
804
992
|
declare const LIGHT_TOKEN_CONFIG: PublicKey;
|
|
@@ -814,7 +1002,7 @@ declare enum TokenDataVersion {
|
|
|
814
1002
|
/** V2: Poseidon hash with big-endian amount, discriminator [0,0,0,0,0,0,0,3] */
|
|
815
1003
|
V2 = 2,
|
|
816
1004
|
/** ShaFlat: SHA256 hash of borsh-serialized data, discriminator [0,0,0,0,0,0,0,4] */
|
|
817
|
-
ShaFlat = 3
|
|
1005
|
+
ShaFlat = 3,
|
|
818
1006
|
}
|
|
819
1007
|
declare const POOL_SEED: Buffer$1<ArrayBuffer>;
|
|
820
1008
|
declare const CPI_AUTHORITY_SEED: Buffer$1<ArrayBuffer>;
|
|
@@ -828,6 +1016,12 @@ declare const APPROVE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
|
828
1016
|
declare const REVOKE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
829
1017
|
declare const ADD_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
830
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;
|
|
831
1025
|
/**
|
|
832
1026
|
* Rent configuration constants for compressible ctoken accounts.
|
|
833
1027
|
* These match the Rust SDK defaults in program-libs/compressible/src/rent/config.rs
|
|
@@ -868,7 +1062,10 @@ declare const DEFAULT_WRITE_TOP_UP = 766;
|
|
|
868
1062
|
* Calculate fee payer cost at ATA creation.
|
|
869
1063
|
* = compression_cost (11K) + (prepay_epochs * rent_per_epoch)
|
|
870
1064
|
*/
|
|
871
|
-
declare function calculateFeePayerCostAtCreation(
|
|
1065
|
+
declare function calculateFeePayerCostAtCreation(
|
|
1066
|
+
prepayEpochs?: number,
|
|
1067
|
+
accountBytes?: number,
|
|
1068
|
+
): number;
|
|
872
1069
|
|
|
873
1070
|
/**
|
|
874
1071
|
* Create instruction for minting tokens from a c-mint to compressed accounts.
|
|
@@ -885,11 +1082,22 @@ declare function calculateFeePayerCostAtCreation(prepayEpochs?: number, accountB
|
|
|
885
1082
|
* context queue if not provided.
|
|
886
1083
|
* @param tokenAccountVersion Token account version (default:
|
|
887
1084
|
* TokenDataVersion.ShaFlat).
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
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;
|
|
893
1101
|
|
|
894
1102
|
/**
|
|
895
1103
|
* Create mint-to instruction for SPL, Token-2022, or CToken mints.
|
|
@@ -905,7 +1113,15 @@ declare function createMintToCompressedInstruction(authority: PublicKey, payer:
|
|
|
905
1113
|
* @param validityProof Not used (legacy parameter, kept for compatibility).
|
|
906
1114
|
* @param multiSigners Multi-signature signer public keys (SPL/T22 only).
|
|
907
1115
|
*/
|
|
908
|
-
declare function createMintToInterfaceInstruction(
|
|
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;
|
|
909
1125
|
|
|
910
1126
|
/**
|
|
911
1127
|
* Create a Light token transfer instruction.
|
|
@@ -920,11 +1136,17 @@ declare function createMintToInterfaceInstruction(mintInterface: MintInterface,
|
|
|
920
1136
|
* @param feePayer Optional fee payer for top-ups (defaults to owner)
|
|
921
1137
|
* @returns Transaction instruction for Light token transfer
|
|
922
1138
|
*/
|
|
923
|
-
declare function createLightTokenTransferInstruction(
|
|
1139
|
+
declare function createLightTokenTransferInstruction(
|
|
1140
|
+
source: PublicKey,
|
|
1141
|
+
destination: PublicKey,
|
|
1142
|
+
owner: PublicKey,
|
|
1143
|
+
amount: number | bigint,
|
|
1144
|
+
feePayer?: PublicKey,
|
|
1145
|
+
): TransactionInstruction;
|
|
924
1146
|
|
|
925
1147
|
declare namespace BN {
|
|
926
|
-
type Endianness =
|
|
927
|
-
type IPrimeName =
|
|
1148
|
+
type Endianness = 'le' | 'be';
|
|
1149
|
+
type IPrimeName = 'k256' | 'p224' | 'p192' | 'p25519';
|
|
928
1150
|
|
|
929
1151
|
interface MPrime {
|
|
930
1152
|
name: string;
|
|
@@ -946,7 +1168,7 @@ declare class BN {
|
|
|
946
1168
|
|
|
947
1169
|
constructor(
|
|
948
1170
|
number: bigint | number | string | number[] | Uint8Array | Buffer | BN,
|
|
949
|
-
base?: number |
|
|
1171
|
+
base?: number | 'hex',
|
|
950
1172
|
endian?: BN.Endianness,
|
|
951
1173
|
);
|
|
952
1174
|
constructor(
|
|
@@ -992,7 +1214,7 @@ declare class BN {
|
|
|
992
1214
|
/**
|
|
993
1215
|
* @description convert to base-string and pad with zeroes
|
|
994
1216
|
*/
|
|
995
|
-
toString(base?: number |
|
|
1217
|
+
toString(base?: number | 'hex', length?: number): string;
|
|
996
1218
|
|
|
997
1219
|
/**
|
|
998
1220
|
* @description convert to Javascript Number (limited to 53 bits)
|
|
@@ -1252,7 +1474,11 @@ declare class BN {
|
|
|
1252
1474
|
/**
|
|
1253
1475
|
* @description division with remainder
|
|
1254
1476
|
*/
|
|
1255
|
-
divmod(
|
|
1477
|
+
divmod(
|
|
1478
|
+
b: BN,
|
|
1479
|
+
mode?: 'div' | 'mod',
|
|
1480
|
+
positive?: boolean,
|
|
1481
|
+
): { div: BN; mod: BN };
|
|
1256
1482
|
|
|
1257
1483
|
/**
|
|
1258
1484
|
* @description reduct
|
|
@@ -1620,14 +1846,21 @@ declare function toTokenPoolInfo(info: SplInterfaceInfo): TokenPoolInfo;
|
|
|
1620
1846
|
*
|
|
1621
1847
|
* @returns SplInterfaceInfo for the to-be-initialized interface
|
|
1622
1848
|
*/
|
|
1623
|
-
declare function deriveSplInterfaceInfo(
|
|
1849
|
+
declare function deriveSplInterfaceInfo(
|
|
1850
|
+
mint: PublicKey,
|
|
1851
|
+
tokenProgramId: PublicKey,
|
|
1852
|
+
poolIndex?: number,
|
|
1853
|
+
): SplInterfaceInfo;
|
|
1624
1854
|
/**
|
|
1625
1855
|
* Check if the SPL interface info is initialized and has a balance.
|
|
1626
1856
|
* @param mint The mint of the SPL interface
|
|
1627
1857
|
* @param splInterfaceInfo The SPL interface info (or TokenPoolInfo for backward compatibility)
|
|
1628
1858
|
* @returns True if the SPL interface info is initialized and has a balance
|
|
1629
1859
|
*/
|
|
1630
|
-
declare function checkSplInterfaceInfo(
|
|
1860
|
+
declare function checkSplInterfaceInfo(
|
|
1861
|
+
splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo,
|
|
1862
|
+
mint: PublicKey,
|
|
1863
|
+
): boolean;
|
|
1631
1864
|
/**
|
|
1632
1865
|
* Get the SPL interface infos for a given mint.
|
|
1633
1866
|
* @param rpc The RPC client
|
|
@@ -1636,7 +1869,11 @@ declare function checkSplInterfaceInfo(splInterfaceInfo: SplInterfaceInfo | Toke
|
|
|
1636
1869
|
*
|
|
1637
1870
|
* @returns The SPL interface infos
|
|
1638
1871
|
*/
|
|
1639
|
-
declare function getSplInterfaceInfos(
|
|
1872
|
+
declare function getSplInterfaceInfos(
|
|
1873
|
+
rpc: Rpc,
|
|
1874
|
+
mint: PublicKey,
|
|
1875
|
+
commitment?: Commitment,
|
|
1876
|
+
): Promise<SplInterfaceInfo[]>;
|
|
1640
1877
|
type SplInterfaceActivity = {
|
|
1641
1878
|
signature: string;
|
|
1642
1879
|
amount: BN;
|
|
@@ -1648,7 +1885,7 @@ type SplInterfaceActivity = {
|
|
|
1648
1885
|
declare enum Action {
|
|
1649
1886
|
Compress = 1,
|
|
1650
1887
|
Decompress = 2,
|
|
1651
|
-
Transfer = 3
|
|
1888
|
+
Transfer = 3,
|
|
1652
1889
|
}
|
|
1653
1890
|
/**
|
|
1654
1891
|
* For `compress` and `mintTo` instructions only.
|
|
@@ -1660,7 +1897,9 @@ declare enum Action {
|
|
|
1660
1897
|
*
|
|
1661
1898
|
* @returns A random SPL interface info
|
|
1662
1899
|
*/
|
|
1663
|
-
declare function selectSplInterfaceInfo(
|
|
1900
|
+
declare function selectSplInterfaceInfo(
|
|
1901
|
+
infos: SplInterfaceInfo[],
|
|
1902
|
+
): SplInterfaceInfo;
|
|
1664
1903
|
/**
|
|
1665
1904
|
* Select one or multiple SPL interface infos from the SPL interface infos.
|
|
1666
1905
|
*
|
|
@@ -1673,7 +1912,10 @@ declare function selectSplInterfaceInfo(infos: SplInterfaceInfo[]): SplInterface
|
|
|
1673
1912
|
*
|
|
1674
1913
|
* @returns Array with one or more SPL interface infos.
|
|
1675
1914
|
*/
|
|
1676
|
-
declare function selectSplInterfaceInfosForDecompression(
|
|
1915
|
+
declare function selectSplInterfaceInfosForDecompression(
|
|
1916
|
+
infos: SplInterfaceInfo[],
|
|
1917
|
+
decompressAmount: number | BN,
|
|
1918
|
+
): SplInterfaceInfo[];
|
|
1677
1919
|
/**
|
|
1678
1920
|
* @deprecated Use {@link SplInterfaceActivity} instead.
|
|
1679
1921
|
*/
|
|
@@ -1681,15 +1923,26 @@ type TokenPoolActivity = SplInterfaceActivity;
|
|
|
1681
1923
|
/**
|
|
1682
1924
|
* @deprecated Use {@link deriveSplInterfaceInfo} instead.
|
|
1683
1925
|
*/
|
|
1684
|
-
declare function deriveTokenPoolInfo(
|
|
1926
|
+
declare function deriveTokenPoolInfo(
|
|
1927
|
+
mint: PublicKey,
|
|
1928
|
+
tokenProgramId: PublicKey,
|
|
1929
|
+
poolIndex?: number,
|
|
1930
|
+
): TokenPoolInfo;
|
|
1685
1931
|
/**
|
|
1686
1932
|
* @deprecated Use {@link checkSplInterfaceInfo} instead.
|
|
1687
1933
|
*/
|
|
1688
|
-
declare function checkTokenPoolInfo(
|
|
1934
|
+
declare function checkTokenPoolInfo(
|
|
1935
|
+
tokenPoolInfo: TokenPoolInfo,
|
|
1936
|
+
mint: PublicKey,
|
|
1937
|
+
): boolean;
|
|
1689
1938
|
/**
|
|
1690
1939
|
* @deprecated Use {@link getSplInterfaceInfos} instead.
|
|
1691
1940
|
*/
|
|
1692
|
-
declare function getTokenPoolInfos(
|
|
1941
|
+
declare function getTokenPoolInfos(
|
|
1942
|
+
rpc: Rpc,
|
|
1943
|
+
mint: PublicKey,
|
|
1944
|
+
commitment?: Commitment,
|
|
1945
|
+
): Promise<TokenPoolInfo[]>;
|
|
1693
1946
|
/**
|
|
1694
1947
|
* @deprecated Use {@link selectSplInterfaceInfo} instead.
|
|
1695
1948
|
*/
|
|
@@ -1697,7 +1950,10 @@ declare function selectTokenPoolInfo(infos: TokenPoolInfo[]): TokenPoolInfo;
|
|
|
1697
1950
|
/**
|
|
1698
1951
|
* @deprecated Use {@link selectSplInterfaceInfosForDecompression} instead.
|
|
1699
1952
|
*/
|
|
1700
|
-
declare function selectTokenPoolInfosForDecompression(
|
|
1953
|
+
declare function selectTokenPoolInfosForDecompression(
|
|
1954
|
+
infos: TokenPoolInfo[],
|
|
1955
|
+
decompressAmount: number | BN,
|
|
1956
|
+
): TokenPoolInfo[];
|
|
1701
1957
|
|
|
1702
1958
|
/**
|
|
1703
1959
|
* Create decompressInterface instruction using Transfer2.
|
|
@@ -1713,19 +1969,30 @@ declare function selectTokenPoolInfosForDecompression(infos: TokenPoolInfo[], de
|
|
|
1713
1969
|
* @param validityProof Validity proof (contains compressedProof and rootIndices)
|
|
1714
1970
|
* @param splInterfaceInfo Optional: SPL interface info for SPL destinations
|
|
1715
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)
|
|
1716
1973
|
* @returns TransactionInstruction
|
|
1717
1974
|
*/
|
|
1718
|
-
declare function createDecompressInterfaceInstruction(
|
|
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;
|
|
1719
1985
|
|
|
1720
1986
|
declare const TokenAccountSourceType: {
|
|
1721
|
-
readonly Spl:
|
|
1722
|
-
readonly Token2022:
|
|
1723
|
-
readonly SplCold:
|
|
1724
|
-
readonly Token2022Cold:
|
|
1725
|
-
readonly CTokenHot:
|
|
1726
|
-
readonly CTokenCold:
|
|
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';
|
|
1727
1993
|
};
|
|
1728
|
-
type TokenAccountSourceTypeValue =
|
|
1994
|
+
type TokenAccountSourceTypeValue =
|
|
1995
|
+
(typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
|
|
1729
1996
|
/** @internal */
|
|
1730
1997
|
interface TokenAccountSource {
|
|
1731
1998
|
type: TokenAccountSourceTypeValue;
|
|
@@ -1752,25 +2019,36 @@ interface AccountInterface {
|
|
|
1752
2019
|
_mint?: PublicKey;
|
|
1753
2020
|
}
|
|
1754
2021
|
/** @internal */
|
|
1755
|
-
declare function convertTokenDataToAccount(
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
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;
|
|
1763
2033
|
/** Convert compressed account to AccountInfo */
|
|
1764
|
-
declare function toAccountInfo(
|
|
2034
|
+
declare function toAccountInfo(
|
|
2035
|
+
compressedAccount: CompressedAccountWithMerkleContext,
|
|
2036
|
+
): AccountInfo<Buffer$1>;
|
|
1765
2037
|
/** @internal */
|
|
1766
|
-
declare function parseCTokenHot(
|
|
2038
|
+
declare function parseCTokenHot(
|
|
2039
|
+
address: PublicKey,
|
|
2040
|
+
accountInfo: AccountInfo<Buffer$1>,
|
|
2041
|
+
): {
|
|
1767
2042
|
accountInfo: AccountInfo<Buffer$1>;
|
|
1768
2043
|
loadContext: undefined;
|
|
1769
2044
|
parsed: Account;
|
|
1770
2045
|
isCold: false;
|
|
1771
2046
|
};
|
|
1772
2047
|
/** @internal */
|
|
1773
|
-
declare function parseCTokenCold(
|
|
2048
|
+
declare function parseCTokenCold(
|
|
2049
|
+
address: PublicKey,
|
|
2050
|
+
compressedAccount: CompressedAccountWithMerkleContext,
|
|
2051
|
+
): {
|
|
1774
2052
|
accountInfo: AccountInfo<Buffer$1>;
|
|
1775
2053
|
loadContext: MerkleContext;
|
|
1776
2054
|
parsed: Account;
|
|
@@ -1786,7 +2064,12 @@ declare function parseCTokenCold(address: PublicKey, compressedAccount: Compress
|
|
|
1786
2064
|
*
|
|
1787
2065
|
* @return Token account information with compression context if applicable
|
|
1788
2066
|
*/
|
|
1789
|
-
declare function getAccountInterface(
|
|
2067
|
+
declare function getAccountInterface(
|
|
2068
|
+
rpc: Rpc,
|
|
2069
|
+
address: PublicKey,
|
|
2070
|
+
commitment?: Commitment,
|
|
2071
|
+
programId?: PublicKey,
|
|
2072
|
+
): Promise<AccountInterface>;
|
|
1790
2073
|
|
|
1791
2074
|
/**
|
|
1792
2075
|
* Options for interface operations (load, transfer)
|
|
@@ -1816,7 +2099,19 @@ interface InterfaceOptions {
|
|
|
1816
2099
|
* @param wrap Include SPL/T22 wrapping (default: false)
|
|
1817
2100
|
* @returns Transaction signature of the transfer transaction
|
|
1818
2101
|
*/
|
|
1819
|
-
declare function transferInterface(
|
|
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>;
|
|
1820
2115
|
/**
|
|
1821
2116
|
* Options for createTransferInterfaceInstructions.
|
|
1822
2117
|
*/
|
|
@@ -1886,7 +2181,15 @@ declare function sliceLast<T>(items: T[]): {
|
|
|
1886
2181
|
* @param options Optional configuration
|
|
1887
2182
|
* @returns TransactionInstruction[][] -- send [0..n-2] in parallel, then [n-1]
|
|
1888
2183
|
*/
|
|
1889
|
-
declare function createTransferInterfaceInstructions(
|
|
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[][]>;
|
|
1890
2193
|
|
|
1891
2194
|
/**
|
|
1892
2195
|
* Account info interface for compressible accounts.
|
|
@@ -2007,11 +2310,21 @@ interface LoadResult {
|
|
|
2007
2310
|
* }
|
|
2008
2311
|
* ```
|
|
2009
2312
|
*/
|
|
2010
|
-
declare function createLoadAccountsParams(
|
|
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>;
|
|
2011
2321
|
/**
|
|
2012
2322
|
* Calculate compute units for compressible load operation
|
|
2013
2323
|
*/
|
|
2014
|
-
declare function calculateCompressibleLoadComputeUnits(
|
|
2324
|
+
declare function calculateCompressibleLoadComputeUnits(
|
|
2325
|
+
compressedAccountCount: number,
|
|
2326
|
+
hasValidityProof: boolean,
|
|
2327
|
+
): number;
|
|
2015
2328
|
|
|
2016
2329
|
/**
|
|
2017
2330
|
* Create a wrap instruction that moves tokens from an SPL/T22 account to a
|
|
@@ -2025,9 +2338,20 @@ declare function calculateCompressibleLoadComputeUnits(compressedAccountCount: n
|
|
|
2025
2338
|
* @param splInterfaceInfo SPL interface info for the compression
|
|
2026
2339
|
* @param decimals Mint decimals (required for transfer_checked)
|
|
2027
2340
|
* @param payer Fee payer (defaults to owner)
|
|
2341
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
2028
2342
|
* @returns Instruction to wrap tokens
|
|
2029
2343
|
*/
|
|
2030
|
-
declare function createWrapInstruction(
|
|
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;
|
|
2031
2355
|
|
|
2032
2356
|
/**
|
|
2033
2357
|
* Create an unwrap instruction that moves tokens from a c-token account to an
|
|
@@ -2041,9 +2365,20 @@ declare function createWrapInstruction(source: PublicKey, destination: PublicKey
|
|
|
2041
2365
|
* @param splInterfaceInfo SPL interface info for the decompression
|
|
2042
2366
|
* @param decimals Mint decimals (required for transfer_checked)
|
|
2043
2367
|
* @param payer Fee payer (defaults to owner if not provided)
|
|
2368
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
2044
2369
|
* @returns TransactionInstruction to unwrap tokens
|
|
2045
2370
|
*/
|
|
2046
|
-
declare function createUnwrapInstruction(
|
|
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;
|
|
2047
2382
|
|
|
2048
2383
|
/**
|
|
2049
2384
|
* Create and initialize a new mint for SPL/T22/c-token.
|
|
@@ -2062,7 +2397,19 @@ declare function createUnwrapInstruction(source: PublicKey, destination: PublicK
|
|
|
2062
2397
|
*
|
|
2063
2398
|
* @returns Object with mint address and transaction signature
|
|
2064
2399
|
*/
|
|
2065
|
-
declare function createMintInterface(
|
|
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<{
|
|
2066
2413
|
mint: PublicKey;
|
|
2067
2414
|
transactionSignature: TransactionSignature;
|
|
2068
2415
|
}>;
|
|
@@ -2078,7 +2425,14 @@ declare function createMintInterface(rpc: Rpc, payer: Signer, mintAuthority: Pub
|
|
|
2078
2425
|
* @param newMintAuthority New mint authority (or null to revoke)
|
|
2079
2426
|
* @param confirmOptions Optional confirm options
|
|
2080
2427
|
*/
|
|
2081
|
-
declare function updateMintAuthority(
|
|
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>;
|
|
2082
2436
|
/**
|
|
2083
2437
|
* Update the freeze authority of a compressed token mint.
|
|
2084
2438
|
* Works for both compressed and decompressed mints.
|
|
@@ -2090,7 +2444,14 @@ declare function updateMintAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, c
|
|
|
2090
2444
|
* @param newFreezeAuthority New freeze authority (or null to revoke)
|
|
2091
2445
|
* @param confirmOptions Optional confirm options
|
|
2092
2446
|
*/
|
|
2093
|
-
declare function updateFreezeAuthority(
|
|
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>;
|
|
2094
2455
|
|
|
2095
2456
|
/**
|
|
2096
2457
|
* Update a metadata field on a compressed token mint.
|
|
@@ -2106,7 +2467,17 @@ declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey,
|
|
|
2106
2467
|
* @param extensionIndex Extension index (default: 0)
|
|
2107
2468
|
* @param confirmOptions Optional confirm options
|
|
2108
2469
|
*/
|
|
2109
|
-
declare function updateMetadataField(
|
|
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>;
|
|
2110
2481
|
/**
|
|
2111
2482
|
* Update the metadata authority of a compressed token mint.
|
|
2112
2483
|
* Works for both compressed and decompressed mints.
|
|
@@ -2119,7 +2490,15 @@ declare function updateMetadataField(rpc: Rpc, payer: Signer, mint: PublicKey, a
|
|
|
2119
2490
|
* @param extensionIndex Extension index (default: 0)
|
|
2120
2491
|
* @param confirmOptions Optional confirm options
|
|
2121
2492
|
*/
|
|
2122
|
-
declare function updateMetadataAuthority(
|
|
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>;
|
|
2123
2502
|
/**
|
|
2124
2503
|
* Remove a metadata key from a compressed token mint.
|
|
2125
2504
|
* Works for both compressed and decompressed mints.
|
|
@@ -2133,7 +2512,16 @@ declare function updateMetadataAuthority(rpc: Rpc, payer: Signer, mint: PublicKe
|
|
|
2133
2512
|
* @param extensionIndex Extension index (default: 0)
|
|
2134
2513
|
* @param confirmOptions Optional confirm options
|
|
2135
2514
|
*/
|
|
2136
|
-
declare function removeMetadataKey(
|
|
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>;
|
|
2137
2525
|
|
|
2138
2526
|
/**
|
|
2139
2527
|
* Create an associated token account for SPL/T22/c-token. Defaults to c-token
|
|
@@ -2152,7 +2540,17 @@ declare function removeMetadataKey(rpc: Rpc, payer: Signer, mint: PublicKey, aut
|
|
|
2152
2540
|
* @param ctokenConfig Optional rent config
|
|
2153
2541
|
* @returns Address of the new associated token account
|
|
2154
2542
|
*/
|
|
2155
|
-
declare function createAtaInterface(
|
|
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>;
|
|
2156
2554
|
/**
|
|
2157
2555
|
* Create an associated token account idempotently for SPL/T22/c-token. Defaults
|
|
2158
2556
|
* to c-token program.
|
|
@@ -2173,7 +2571,17 @@ declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, ow
|
|
|
2173
2571
|
*
|
|
2174
2572
|
* @returns Address of the associated token account
|
|
2175
2573
|
*/
|
|
2176
|
-
declare function createAtaInterfaceIdempotent(
|
|
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>;
|
|
2177
2585
|
|
|
2178
2586
|
/**
|
|
2179
2587
|
* Mint tokens to a CToken account.
|
|
@@ -2191,7 +2599,16 @@ declare function createAtaInterfaceIdempotent(rpc: Rpc, payer: Signer, mint: Pub
|
|
|
2191
2599
|
* @param confirmOptions - Optional confirm options
|
|
2192
2600
|
* @returns Transaction signature
|
|
2193
2601
|
*/
|
|
2194
|
-
declare function mintTo$1(
|
|
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>;
|
|
2195
2612
|
|
|
2196
2613
|
/**
|
|
2197
2614
|
* Mint compressed tokens directly to compressed accounts.
|
|
@@ -2203,12 +2620,23 @@ declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, destination:
|
|
|
2203
2620
|
* @param recipients Array of recipients with amounts
|
|
2204
2621
|
* @param outputStateTreeInfo Optional output state tree info (auto-fetched if not provided)
|
|
2205
2622
|
* @param tokenAccountVersion Token account version (default: 3)
|
|
2623
|
+
* @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
|
|
2206
2624
|
* @param confirmOptions Optional confirm options
|
|
2207
2625
|
*/
|
|
2208
|
-
declare function mintToCompressed(
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
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>;
|
|
2212
2640
|
|
|
2213
2641
|
/**
|
|
2214
2642
|
* Mint tokens to a decompressed/onchain token account.
|
|
@@ -2231,7 +2659,17 @@ declare function mintToCompressed(rpc: Rpc, payer: Signer, mint: PublicKey, auth
|
|
|
2231
2659
|
*
|
|
2232
2660
|
* @returns Transaction signature
|
|
2233
2661
|
*/
|
|
2234
|
-
declare function mintToInterface(
|
|
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>;
|
|
2235
2673
|
|
|
2236
2674
|
/**
|
|
2237
2675
|
* Retrieve the associated token account, or create it if it doesn't exist.
|
|
@@ -2256,7 +2694,17 @@ declare function mintToInterface(rpc: Rpc, payer: Signer, mint: PublicKey, desti
|
|
|
2256
2694
|
*
|
|
2257
2695
|
* @returns AccountInterface with aggregated balance and source breakdown
|
|
2258
2696
|
*/
|
|
2259
|
-
declare function getOrCreateAtaInterface(
|
|
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>;
|
|
2260
2708
|
|
|
2261
2709
|
/**
|
|
2262
2710
|
* Decompress compressed (cold) tokens to an on-chain token account.
|
|
@@ -2274,7 +2722,17 @@ declare function getOrCreateAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKe
|
|
|
2274
2722
|
* @param confirmOptions Confirm options
|
|
2275
2723
|
* @returns Transaction signature, null if nothing to load.
|
|
2276
2724
|
*/
|
|
2277
|
-
declare function decompressInterface(
|
|
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>;
|
|
2278
2736
|
|
|
2279
2737
|
/**
|
|
2280
2738
|
* Wrap tokens from an SPL/T22 account to a c-token account.
|
|
@@ -2290,6 +2748,7 @@ declare function decompressInterface(rpc: Rpc, payer: Signer, owner: Signer, min
|
|
|
2290
2748
|
* @param mint Mint address
|
|
2291
2749
|
* @param amount Amount to wrap
|
|
2292
2750
|
* @param splInterfaceInfo Optional: SPL interface info (will be fetched if not provided)
|
|
2751
|
+
* @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
|
|
2293
2752
|
* @param confirmOptions Optional: Confirm options
|
|
2294
2753
|
*
|
|
2295
2754
|
* @example
|
|
@@ -2308,7 +2767,18 @@ declare function decompressInterface(rpc: Rpc, payer: Signer, owner: Signer, min
|
|
|
2308
2767
|
*
|
|
2309
2768
|
* @returns Transaction signature
|
|
2310
2769
|
*/
|
|
2311
|
-
declare function wrap(
|
|
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>;
|
|
2312
2782
|
|
|
2313
2783
|
/**
|
|
2314
2784
|
* Build instruction batches for unwrapping c-tokens to SPL/T22 tokens.
|
|
@@ -2328,12 +2798,24 @@ declare function wrap(rpc: Rpc, payer: Signer, source: PublicKey, destination: P
|
|
|
2328
2798
|
* @param amount Amount to unwrap (defaults to full balance)
|
|
2329
2799
|
* @param payer Fee payer (defaults to owner)
|
|
2330
2800
|
* @param splInterfaceInfo Optional: SPL interface info
|
|
2801
|
+
* @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
|
|
2331
2802
|
* @param interfaceOptions Optional: interface options for load
|
|
2332
2803
|
* @param wrap Whether to use unified (wrap) mode for loading.
|
|
2333
2804
|
* Default false.
|
|
2334
2805
|
* @returns Instruction batches - each inner array is one transaction
|
|
2335
2806
|
*/
|
|
2336
|
-
declare function createUnwrapInstructions(
|
|
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[][]>;
|
|
2337
2819
|
|
|
2338
2820
|
/**
|
|
2339
2821
|
* Select compressed inputs for a target amount.
|
|
@@ -2351,7 +2833,11 @@ declare function createUnwrapInstructions(rpc: Rpc, destination: PublicKey, owne
|
|
|
2351
2833
|
* @param neededAmount Amount that must be covered by selected inputs.
|
|
2352
2834
|
* @returns Subset of `accounts`, sorted largest-first.
|
|
2353
2835
|
*/
|
|
2354
|
-
declare function selectInputsForAmount(
|
|
2836
|
+
declare function selectInputsForAmount(
|
|
2837
|
+
accounts: ParsedTokenAccount[],
|
|
2838
|
+
neededAmount: bigint,
|
|
2839
|
+
): ParsedTokenAccount[];
|
|
2840
|
+
|
|
2355
2841
|
/**
|
|
2356
2842
|
* Create instructions to load an ATA from its AccountInterface.
|
|
2357
2843
|
*
|
|
@@ -2368,7 +2854,14 @@ declare function selectInputsForAmount(accounts: ParsedTokenAccount[], neededAmo
|
|
|
2368
2854
|
* @param targetAta Target ATA address (used for type detection in standard mode)
|
|
2369
2855
|
* @returns Array of instructions (empty if nothing to load)
|
|
2370
2856
|
*/
|
|
2371
|
-
declare function createLoadAtaInstructionsFromInterface(
|
|
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[]>;
|
|
2372
2865
|
|
|
2373
2866
|
/**
|
|
2374
2867
|
* Derive the canonical associated token address for any of SPL/T22/c-token.
|
|
@@ -2383,7 +2876,13 @@ declare function createLoadAtaInstructionsFromInterface(rpc: Rpc, payer: PublicK
|
|
|
2383
2876
|
* auto-detected.
|
|
2384
2877
|
* @returns Associated token address.
|
|
2385
2878
|
*/
|
|
2386
|
-
declare function getAssociatedTokenAddressInterface(
|
|
2879
|
+
declare function getAssociatedTokenAddressInterface(
|
|
2880
|
+
mint: PublicKey,
|
|
2881
|
+
owner: PublicKey,
|
|
2882
|
+
allowOwnerOffCurve?: boolean,
|
|
2883
|
+
programId?: PublicKey,
|
|
2884
|
+
associatedTokenProgramId?: PublicKey,
|
|
2885
|
+
): PublicKey;
|
|
2387
2886
|
|
|
2388
2887
|
/**
|
|
2389
2888
|
* Input for creating off-chain metadata JSON.
|
|
@@ -2441,7 +2940,9 @@ interface OffChainTokenMetadataJson {
|
|
|
2441
2940
|
* // Then use uri with createMint
|
|
2442
2941
|
* await createMint(rpc, payer, { ...params, uri });
|
|
2443
2942
|
*/
|
|
2444
|
-
declare function toOffChainMetadataJson(
|
|
2943
|
+
declare function toOffChainMetadataJson(
|
|
2944
|
+
meta: OffChainTokenMetadata,
|
|
2945
|
+
): OffChainTokenMetadataJson;
|
|
2445
2946
|
|
|
2446
2947
|
/**
|
|
2447
2948
|
* Approve a delegate to spend tokens
|
|
@@ -2456,7 +2957,15 @@ declare function toOffChainMetadataJson(meta: OffChainTokenMetadata): OffChainTo
|
|
|
2456
2957
|
*
|
|
2457
2958
|
* @return Signature of the confirmed transaction
|
|
2458
2959
|
*/
|
|
2459
|
-
declare function approve(
|
|
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>;
|
|
2460
2969
|
|
|
2461
2970
|
/**
|
|
2462
2971
|
* Mint compressed tokens to a solana address from an external mint authority
|
|
@@ -2475,7 +2984,17 @@ declare function approve(rpc: Rpc, payer: Signer, mint: PublicKey, amount: numbe
|
|
|
2475
2984
|
*
|
|
2476
2985
|
* @return Signature of the confirmed transaction
|
|
2477
2986
|
*/
|
|
2478
|
-
declare function approveAndMintTo(
|
|
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>;
|
|
2479
2998
|
|
|
2480
2999
|
/**
|
|
2481
3000
|
* Compress SPL tokens
|
|
@@ -2495,7 +3014,18 @@ declare function approveAndMintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPu
|
|
|
2495
3014
|
*
|
|
2496
3015
|
* @return Signature of the confirmed transaction
|
|
2497
3016
|
*/
|
|
2498
|
-
declare function compress(
|
|
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>;
|
|
2499
3029
|
|
|
2500
3030
|
/**
|
|
2501
3031
|
* Compress SPL tokens into compressed token format
|
|
@@ -2515,7 +3045,17 @@ declare function compress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: numb
|
|
|
2515
3045
|
*
|
|
2516
3046
|
* @return Signature of the confirmed transaction
|
|
2517
3047
|
*/
|
|
2518
|
-
declare function compressSplTokenAccount(
|
|
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>;
|
|
2519
3059
|
|
|
2520
3060
|
/**
|
|
2521
3061
|
* Create and initialize a new SPL token mint
|
|
@@ -2535,7 +3075,16 @@ declare function compressSplTokenAccount(rpc: Rpc, payer: Signer, mint: PublicKe
|
|
|
2535
3075
|
*
|
|
2536
3076
|
* @return Object with mint address and transaction signature
|
|
2537
3077
|
*/
|
|
2538
|
-
declare function createMint(
|
|
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<{
|
|
2539
3088
|
mint: PublicKey;
|
|
2540
3089
|
transactionSignature: TransactionSignature;
|
|
2541
3090
|
}>;
|
|
@@ -2552,7 +3101,13 @@ declare function createMint(rpc: Rpc, payer: Signer, mintAuthority: PublicKey |
|
|
|
2552
3101
|
*
|
|
2553
3102
|
* @return transaction signature
|
|
2554
3103
|
*/
|
|
2555
|
-
declare function createSplInterface(
|
|
3104
|
+
declare function createSplInterface(
|
|
3105
|
+
rpc: Rpc,
|
|
3106
|
+
payer: Signer,
|
|
3107
|
+
mint: PublicKey,
|
|
3108
|
+
confirmOptions?: ConfirmOptions,
|
|
3109
|
+
tokenProgramId?: PublicKey,
|
|
3110
|
+
): Promise<TransactionSignature>;
|
|
2556
3111
|
/**
|
|
2557
3112
|
* @deprecated Use {@link createSplInterface} instead.
|
|
2558
3113
|
*/
|
|
@@ -2571,7 +3126,14 @@ declare const createTokenPool: typeof createSplInterface;
|
|
|
2571
3126
|
*
|
|
2572
3127
|
* @return transaction signature
|
|
2573
3128
|
*/
|
|
2574
|
-
declare function addSplInterfaces(
|
|
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>;
|
|
2575
3137
|
/**
|
|
2576
3138
|
* @deprecated Use {@link addSplInterfaces} instead.
|
|
2577
3139
|
*/
|
|
@@ -2591,7 +3153,13 @@ declare const addTokenPools: typeof addSplInterfaces;
|
|
|
2591
3153
|
* @return Object with transaction signatures and the address of the created
|
|
2592
3154
|
* lookup table
|
|
2593
3155
|
*/
|
|
2594
|
-
declare function createTokenProgramLookupTable(
|
|
3156
|
+
declare function createTokenProgramLookupTable(
|
|
3157
|
+
rpc: Rpc,
|
|
3158
|
+
payer: Signer,
|
|
3159
|
+
authority: Signer,
|
|
3160
|
+
mints?: PublicKey[],
|
|
3161
|
+
additionalAccounts?: PublicKey[],
|
|
3162
|
+
): Promise<{
|
|
2595
3163
|
txIds: TransactionSignature[];
|
|
2596
3164
|
address: PublicKey;
|
|
2597
3165
|
}>;
|
|
@@ -2611,7 +3179,16 @@ declare function createTokenProgramLookupTable(rpc: Rpc, payer: Signer, authorit
|
|
|
2611
3179
|
*
|
|
2612
3180
|
* @return confirmed transaction signature
|
|
2613
3181
|
*/
|
|
2614
|
-
declare function decompress(
|
|
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>;
|
|
2615
3192
|
|
|
2616
3193
|
/**
|
|
2617
3194
|
* Merge multiple compressed token accounts for a given mint into fewer
|
|
@@ -2631,7 +3208,13 @@ declare function decompress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: nu
|
|
|
2631
3208
|
*
|
|
2632
3209
|
* @return confirmed transaction signature
|
|
2633
3210
|
*/
|
|
2634
|
-
declare function mergeTokenAccounts(
|
|
3211
|
+
declare function mergeTokenAccounts(
|
|
3212
|
+
rpc: Rpc,
|
|
3213
|
+
payer: Signer,
|
|
3214
|
+
mint: PublicKey,
|
|
3215
|
+
owner: Signer,
|
|
3216
|
+
confirmOptions?: ConfirmOptions,
|
|
3217
|
+
): Promise<TransactionSignature>;
|
|
2635
3218
|
|
|
2636
3219
|
/**
|
|
2637
3220
|
* Mint compressed tokens to a solana address
|
|
@@ -2653,7 +3236,17 @@ declare function mergeTokenAccounts(rpc: Rpc, payer: Signer, mint: PublicKey, ow
|
|
|
2653
3236
|
*
|
|
2654
3237
|
* @return Signature of the confirmed transaction
|
|
2655
3238
|
*/
|
|
2656
|
-
declare function mintTo(
|
|
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>;
|
|
2657
3250
|
|
|
2658
3251
|
/**
|
|
2659
3252
|
* Revoke one or more delegated token accounts
|
|
@@ -2667,7 +3260,13 @@ declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: Publ
|
|
|
2667
3260
|
*
|
|
2668
3261
|
* @return Signature of the confirmed transaction
|
|
2669
3262
|
*/
|
|
2670
|
-
declare function revoke(
|
|
3263
|
+
declare function revoke(
|
|
3264
|
+
rpc: Rpc,
|
|
3265
|
+
payer: Signer,
|
|
3266
|
+
accounts: ParsedTokenAccount[],
|
|
3267
|
+
owner: Signer,
|
|
3268
|
+
confirmOptions?: ConfirmOptions,
|
|
3269
|
+
): Promise<TransactionSignature>;
|
|
2671
3270
|
|
|
2672
3271
|
/**
|
|
2673
3272
|
* Transfer compressed tokens from one owner to another.
|
|
@@ -2685,7 +3284,15 @@ declare function revoke(rpc: Rpc, payer: Signer, accounts: ParsedTokenAccount[],
|
|
|
2685
3284
|
*
|
|
2686
3285
|
* @return confirmed transaction signature
|
|
2687
3286
|
*/
|
|
2688
|
-
declare function transfer(
|
|
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>;
|
|
2689
3296
|
|
|
2690
3297
|
/**
|
|
2691
3298
|
* Transfer delegated compressed tokens to another owner
|
|
@@ -2700,7 +3307,15 @@ declare function transfer(rpc: Rpc, payer: Signer, mint: PublicKey, amount: numb
|
|
|
2700
3307
|
*
|
|
2701
3308
|
* @return confirmed transaction signature
|
|
2702
3309
|
*/
|
|
2703
|
-
declare function transferDelegated(
|
|
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>;
|
|
2704
3319
|
|
|
2705
3320
|
/**
|
|
2706
3321
|
* Decompress delegated compressed tokens. Remaining compressed tokens are
|
|
@@ -2718,10 +3333,21 @@ declare function transferDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amo
|
|
|
2718
3333
|
*
|
|
2719
3334
|
* @return Signature of the confirmed transaction
|
|
2720
3335
|
*/
|
|
2721
|
-
declare function decompressDelegated(
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
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.';
|
|
2725
3351
|
/**
|
|
2726
3352
|
* Options for input account selection
|
|
2727
3353
|
*/
|
|
@@ -2736,7 +3362,9 @@ interface SelectInputAccountsOptions {
|
|
|
2736
3362
|
/**
|
|
2737
3363
|
* Groups accounts by tree type for separate processing
|
|
2738
3364
|
*/
|
|
2739
|
-
declare function groupAccountsByTreeType(
|
|
3365
|
+
declare function groupAccountsByTreeType(
|
|
3366
|
+
accounts: ParsedTokenAccount[],
|
|
3367
|
+
): Map<TreeType, ParsedTokenAccount[]>;
|
|
2740
3368
|
/**
|
|
2741
3369
|
* Result of selectAccountsByPreferredTreeType
|
|
2742
3370
|
*/
|
|
@@ -2761,7 +3389,10 @@ interface SelectedAccountsResult {
|
|
|
2761
3389
|
* @param requiredAmount Minimum amount needed (optional - if not provided, returns all from preferred type)
|
|
2762
3390
|
* @returns Selected accounts from a single tree type
|
|
2763
3391
|
*/
|
|
2764
|
-
declare function selectAccountsByPreferredTreeType(
|
|
3392
|
+
declare function selectAccountsByPreferredTreeType(
|
|
3393
|
+
accounts: ParsedTokenAccount[],
|
|
3394
|
+
requiredAmount?: BN,
|
|
3395
|
+
): SelectedAccountsResult;
|
|
2765
3396
|
/**
|
|
2766
3397
|
* Selects token accounts for approval, first trying to find an exact match, then falling back to minimum selection.
|
|
2767
3398
|
*
|
|
@@ -2780,11 +3411,16 @@ declare function selectAccountsByPreferredTreeType(accounts: ParsedTokenAccount[
|
|
|
2780
3411
|
* - totalLamports: Total lamports from selected accounts.
|
|
2781
3412
|
* - maxPossibleAmount: Max approvable amount given maxInputs.
|
|
2782
3413
|
*/
|
|
2783
|
-
declare function selectTokenAccountsForApprove(
|
|
3414
|
+
declare function selectTokenAccountsForApprove(
|
|
3415
|
+
accounts: ParsedTokenAccount[],
|
|
3416
|
+
approveAmount: BN,
|
|
3417
|
+
maxInputs?: number,
|
|
3418
|
+
options?: SelectInputAccountsOptions,
|
|
3419
|
+
): [
|
|
2784
3420
|
selectedAccounts: ParsedTokenAccount[],
|
|
2785
3421
|
total: BN,
|
|
2786
3422
|
totalLamports: BN | null,
|
|
2787
|
-
maxPossibleAmount: BN
|
|
3423
|
+
maxPossibleAmount: BN,
|
|
2788
3424
|
];
|
|
2789
3425
|
/**
|
|
2790
3426
|
* Selects the minimum number of compressed token accounts required for a
|
|
@@ -2798,7 +3434,12 @@ declare function selectTokenAccountsForApprove(accounts: ParsedTokenAccount[], a
|
|
|
2798
3434
|
*
|
|
2799
3435
|
* @returns Returns selected accounts and their totals.
|
|
2800
3436
|
*/
|
|
2801
|
-
declare function selectMinCompressedTokenAccountsForDecompression(
|
|
3437
|
+
declare function selectMinCompressedTokenAccountsForDecompression(
|
|
3438
|
+
accounts: ParsedTokenAccount[],
|
|
3439
|
+
amount: BN,
|
|
3440
|
+
maxInputs?: number,
|
|
3441
|
+
options?: SelectInputAccountsOptions,
|
|
3442
|
+
): {
|
|
2802
3443
|
selectedAccounts: ParsedTokenAccount[];
|
|
2803
3444
|
total: BN;
|
|
2804
3445
|
totalLamports: BN | null;
|
|
@@ -2822,22 +3463,31 @@ declare function selectMinCompressedTokenAccountsForDecompression(accounts: Pars
|
|
|
2822
3463
|
* maxPossibleAmount: BN
|
|
2823
3464
|
* ]
|
|
2824
3465
|
*/
|
|
2825
|
-
declare function selectMinCompressedTokenAccountsForTransfer(
|
|
3466
|
+
declare function selectMinCompressedTokenAccountsForTransfer(
|
|
3467
|
+
accounts: ParsedTokenAccount[],
|
|
3468
|
+
transferAmount: BN,
|
|
3469
|
+
maxInputs?: number,
|
|
3470
|
+
options?: SelectInputAccountsOptions,
|
|
3471
|
+
): [
|
|
2826
3472
|
selectedAccounts: ParsedTokenAccount[],
|
|
2827
3473
|
total: BN,
|
|
2828
3474
|
totalLamports: BN | null,
|
|
2829
|
-
maxPossibleAmount: BN
|
|
3475
|
+
maxPossibleAmount: BN,
|
|
2830
3476
|
];
|
|
2831
3477
|
/**
|
|
2832
3478
|
* Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
|
|
2833
3479
|
* returns partial amounts if insufficient accounts are found instead of
|
|
2834
3480
|
* throwing an error.
|
|
2835
3481
|
*/
|
|
2836
|
-
declare function selectMinCompressedTokenAccountsForTransferOrPartial(
|
|
3482
|
+
declare function selectMinCompressedTokenAccountsForTransferOrPartial(
|
|
3483
|
+
accounts: ParsedTokenAccount[],
|
|
3484
|
+
transferAmount: BN,
|
|
3485
|
+
maxInputs?: number,
|
|
3486
|
+
): [
|
|
2837
3487
|
selectedAccounts: ParsedTokenAccount[],
|
|
2838
3488
|
total: BN,
|
|
2839
3489
|
totalLamports: BN | null,
|
|
2840
|
-
maxPossibleAmount: BN
|
|
3490
|
+
maxPossibleAmount: BN,
|
|
2841
3491
|
];
|
|
2842
3492
|
/**
|
|
2843
3493
|
* Selects compressed token accounts for a transfer, ensuring one extra account
|
|
@@ -2880,22 +3530,31 @@ declare function selectMinCompressedTokenAccountsForTransferOrPartial(accounts:
|
|
|
2880
3530
|
* console.log(totalLamports!.toString()); // '15'
|
|
2881
3531
|
* console.log(maxPossibleAmount.toString()); // '150'
|
|
2882
3532
|
*/
|
|
2883
|
-
declare function selectSmartCompressedTokenAccountsForTransfer(
|
|
3533
|
+
declare function selectSmartCompressedTokenAccountsForTransfer(
|
|
3534
|
+
accounts: ParsedTokenAccount[],
|
|
3535
|
+
transferAmount: BN,
|
|
3536
|
+
maxInputs?: number,
|
|
3537
|
+
options?: SelectInputAccountsOptions,
|
|
3538
|
+
): [
|
|
2884
3539
|
selectedAccounts: ParsedTokenAccount[],
|
|
2885
3540
|
total: BN,
|
|
2886
3541
|
totalLamports: BN | null,
|
|
2887
|
-
maxPossibleAmount: BN
|
|
3542
|
+
maxPossibleAmount: BN,
|
|
2888
3543
|
];
|
|
2889
3544
|
/**
|
|
2890
3545
|
* Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
|
|
2891
3546
|
* returns partial amounts if insufficient accounts are found instead of
|
|
2892
3547
|
* throwing an error.
|
|
2893
3548
|
*/
|
|
2894
|
-
declare function selectSmartCompressedTokenAccountsForTransferOrPartial(
|
|
3549
|
+
declare function selectSmartCompressedTokenAccountsForTransferOrPartial(
|
|
3550
|
+
accounts: ParsedTokenAccount[],
|
|
3551
|
+
transferAmount: BN,
|
|
3552
|
+
maxInputs?: number,
|
|
3553
|
+
): [
|
|
2895
3554
|
selectedAccounts: ParsedTokenAccount[],
|
|
2896
3555
|
total: BN,
|
|
2897
3556
|
totalLamports: BN | null,
|
|
2898
|
-
maxPossibleAmount: BN
|
|
3557
|
+
maxPossibleAmount: BN,
|
|
2899
3558
|
];
|
|
2900
3559
|
|
|
2901
3560
|
type TokenTransferOutputData = {
|
|
@@ -2968,7 +3627,9 @@ type CompressSplTokenAccountInstructionData = {
|
|
|
2968
3627
|
remainingAmount: BN | null;
|
|
2969
3628
|
cpiContext: CompressedCpiContext | null;
|
|
2970
3629
|
};
|
|
2971
|
-
declare function isSingleSplInterfaceInfo(
|
|
3630
|
+
declare function isSingleSplInterfaceInfo(
|
|
3631
|
+
splInterfaceInfos: SplInterfaceInfo | SplInterfaceInfo[],
|
|
3632
|
+
): splInterfaceInfos is SplInterfaceInfo;
|
|
2972
3633
|
/**
|
|
2973
3634
|
* @deprecated Use {@link isSingleSplInterfaceInfo} instead.
|
|
2974
3635
|
*/
|
|
@@ -3079,7 +3740,9 @@ type PackCompressedTokenAccountsParams = {
|
|
|
3079
3740
|
/**
|
|
3080
3741
|
* Packs Compressed Token Accounts.
|
|
3081
3742
|
*/
|
|
3082
|
-
declare function packCompressedTokenAccounts(
|
|
3743
|
+
declare function packCompressedTokenAccounts(
|
|
3744
|
+
params: PackCompressedTokenAccountsParams,
|
|
3745
|
+
): {
|
|
3083
3746
|
inputTokenDataWithContext: InputTokenDataWithContext$1[];
|
|
3084
3747
|
remainingAccountMetas: AccountMeta[];
|
|
3085
3748
|
packedOutputTokenData: PackedTokenTransferOutputData[];
|
|
@@ -3092,7 +3755,10 @@ declare function packCompressedTokenAccounts(params: PackCompressedTokenAccounts
|
|
|
3092
3755
|
* @param mint The mint of the token pool
|
|
3093
3756
|
* @returns True if all input accounts belong to the same mint
|
|
3094
3757
|
*/
|
|
3095
|
-
declare function checkMint(
|
|
3758
|
+
declare function checkMint(
|
|
3759
|
+
compressedTokenAccounts: ParsedTokenAccount[],
|
|
3760
|
+
mint: PublicKey,
|
|
3761
|
+
): boolean;
|
|
3096
3762
|
|
|
3097
3763
|
type LightCompressedToken = {
|
|
3098
3764
|
version: '1.2.0';
|
|
@@ -3104,7 +3770,7 @@ type LightCompressedToken = {
|
|
|
3104
3770
|
'This instruction creates a token pool for a given mint. Every spl mint',
|
|
3105
3771
|
'can have one token pool. When a token is compressed the tokens are',
|
|
3106
3772
|
'transferrred to the token pool, and their compressed equivalent is',
|
|
3107
|
-
'minted into a Merkle tree.'
|
|
3773
|
+
'minted into a Merkle tree.',
|
|
3108
3774
|
];
|
|
3109
3775
|
accounts: [
|
|
3110
3776
|
{
|
|
@@ -3137,7 +3803,7 @@ type LightCompressedToken = {
|
|
|
3137
3803
|
name: 'cpiAuthorityPda';
|
|
3138
3804
|
isMut: false;
|
|
3139
3805
|
isSigner: false;
|
|
3140
|
-
}
|
|
3806
|
+
},
|
|
3141
3807
|
];
|
|
3142
3808
|
args: [];
|
|
3143
3809
|
},
|
|
@@ -3145,7 +3811,7 @@ type LightCompressedToken = {
|
|
|
3145
3811
|
name: 'addTokenPool';
|
|
3146
3812
|
docs: [
|
|
3147
3813
|
'This instruction creates an additional token pool for a given mint.',
|
|
3148
|
-
'The maximum number of token pools per mint is 5.'
|
|
3814
|
+
'The maximum number of token pools per mint is 5.',
|
|
3149
3815
|
];
|
|
3150
3816
|
accounts: [
|
|
3151
3817
|
{
|
|
@@ -3183,13 +3849,13 @@ type LightCompressedToken = {
|
|
|
3183
3849
|
name: 'cpiAuthorityPda';
|
|
3184
3850
|
isMut: false;
|
|
3185
3851
|
isSigner: false;
|
|
3186
|
-
}
|
|
3852
|
+
},
|
|
3187
3853
|
];
|
|
3188
3854
|
args: [
|
|
3189
3855
|
{
|
|
3190
3856
|
name: 'tokenPoolIndex';
|
|
3191
3857
|
type: 'u8';
|
|
3192
|
-
}
|
|
3858
|
+
},
|
|
3193
3859
|
];
|
|
3194
3860
|
},
|
|
3195
3861
|
{
|
|
@@ -3201,7 +3867,7 @@ type LightCompressedToken = {
|
|
|
3201
3867
|
'every amount and pubkey input pair. A constant amount of lamports can be',
|
|
3202
3868
|
'transferred to each output account to enable. A use case to add lamports',
|
|
3203
3869
|
'to a compressed token account is to prevent spam. This is the only way',
|
|
3204
|
-
'to add lamports to a compressed token account.'
|
|
3870
|
+
'to add lamports to a compressed token account.',
|
|
3205
3871
|
];
|
|
3206
3872
|
accounts: [
|
|
3207
3873
|
{
|
|
@@ -3281,7 +3947,7 @@ type LightCompressedToken = {
|
|
|
3281
3947
|
isMut: true;
|
|
3282
3948
|
isSigner: false;
|
|
3283
3949
|
isOptional: true;
|
|
3284
|
-
}
|
|
3950
|
+
},
|
|
3285
3951
|
];
|
|
3286
3952
|
args: [
|
|
3287
3953
|
{
|
|
@@ -3301,7 +3967,7 @@ type LightCompressedToken = {
|
|
|
3301
3967
|
type: {
|
|
3302
3968
|
option: 'u64';
|
|
3303
3969
|
};
|
|
3304
|
-
}
|
|
3970
|
+
},
|
|
3305
3971
|
];
|
|
3306
3972
|
},
|
|
3307
3973
|
{
|
|
@@ -3309,7 +3975,7 @@ type LightCompressedToken = {
|
|
|
3309
3975
|
docs: [
|
|
3310
3976
|
'Compresses the balance of an spl token account sub an optional remaining',
|
|
3311
3977
|
'amount. This instruction does not close the spl token account. To close',
|
|
3312
|
-
'the account bundle a close spl account instruction in your transaction.'
|
|
3978
|
+
'the account bundle a close spl account instruction in your transaction.',
|
|
3313
3979
|
];
|
|
3314
3980
|
accounts: [
|
|
3315
3981
|
{
|
|
@@ -3325,7 +3991,7 @@ type LightCompressedToken = {
|
|
|
3325
3991
|
docs: [
|
|
3326
3992
|
'Authority is verified through proof since both owner and delegate',
|
|
3327
3993
|
'are included in the token data hash, which is a public input to the',
|
|
3328
|
-
'validity proof.'
|
|
3994
|
+
'validity proof.',
|
|
3329
3995
|
];
|
|
3330
3996
|
},
|
|
3331
3997
|
{
|
|
@@ -3386,7 +4052,7 @@ type LightCompressedToken = {
|
|
|
3386
4052
|
name: 'systemProgram';
|
|
3387
4053
|
isMut: false;
|
|
3388
4054
|
isSigner: false;
|
|
3389
|
-
}
|
|
4055
|
+
},
|
|
3390
4056
|
];
|
|
3391
4057
|
args: [
|
|
3392
4058
|
{
|
|
@@ -3406,7 +4072,7 @@ type LightCompressedToken = {
|
|
|
3406
4072
|
defined: 'CompressedCpiContext';
|
|
3407
4073
|
};
|
|
3408
4074
|
};
|
|
3409
|
-
}
|
|
4075
|
+
},
|
|
3410
4076
|
];
|
|
3411
4077
|
},
|
|
3412
4078
|
{
|
|
@@ -3419,7 +4085,7 @@ type LightCompressedToken = {
|
|
|
3419
4085
|
'accounts specify less lamports than inputs the remaining lamports are',
|
|
3420
4086
|
'transferred to an output compressed account. Signer must be owner or',
|
|
3421
4087
|
'delegate. If a delegated token account is transferred the delegate is',
|
|
3422
|
-
'not preserved.'
|
|
4088
|
+
'not preserved.',
|
|
3423
4089
|
];
|
|
3424
4090
|
accounts: [
|
|
3425
4091
|
{
|
|
@@ -3435,7 +4101,7 @@ type LightCompressedToken = {
|
|
|
3435
4101
|
docs: [
|
|
3436
4102
|
'Authority is verified through proof since both owner and delegate',
|
|
3437
4103
|
'are included in the token data hash, which is a public input to the',
|
|
3438
|
-
'validity proof.'
|
|
4104
|
+
'validity proof.',
|
|
3439
4105
|
];
|
|
3440
4106
|
},
|
|
3441
4107
|
{
|
|
@@ -3496,13 +4162,13 @@ type LightCompressedToken = {
|
|
|
3496
4162
|
name: 'systemProgram';
|
|
3497
4163
|
isMut: false;
|
|
3498
4164
|
isSigner: false;
|
|
3499
|
-
}
|
|
4165
|
+
},
|
|
3500
4166
|
];
|
|
3501
4167
|
args: [
|
|
3502
4168
|
{
|
|
3503
4169
|
name: 'inputs';
|
|
3504
4170
|
type: 'bytes';
|
|
3505
|
-
}
|
|
4171
|
+
},
|
|
3506
4172
|
];
|
|
3507
4173
|
},
|
|
3508
4174
|
{
|
|
@@ -3513,7 +4179,7 @@ type LightCompressedToken = {
|
|
|
3513
4179
|
'be called by a delegate.',
|
|
3514
4180
|
'The instruction creates two output accounts:',
|
|
3515
4181
|
'1. one account with delegated amount',
|
|
3516
|
-
'2. one account with remaining(change) amount'
|
|
4182
|
+
'2. one account with remaining(change) amount',
|
|
3517
4183
|
];
|
|
3518
4184
|
accounts: [
|
|
3519
4185
|
{
|
|
@@ -3529,7 +4195,7 @@ type LightCompressedToken = {
|
|
|
3529
4195
|
docs: [
|
|
3530
4196
|
'Authority is verified through proof since both owner and delegate',
|
|
3531
4197
|
'are included in the token data hash, which is a public input to the',
|
|
3532
|
-
'validity proof.'
|
|
4198
|
+
'validity proof.',
|
|
3533
4199
|
];
|
|
3534
4200
|
},
|
|
3535
4201
|
{
|
|
@@ -3572,20 +4238,20 @@ type LightCompressedToken = {
|
|
|
3572
4238
|
name: 'systemProgram';
|
|
3573
4239
|
isMut: false;
|
|
3574
4240
|
isSigner: false;
|
|
3575
|
-
}
|
|
4241
|
+
},
|
|
3576
4242
|
];
|
|
3577
4243
|
args: [
|
|
3578
4244
|
{
|
|
3579
4245
|
name: 'inputs';
|
|
3580
4246
|
type: 'bytes';
|
|
3581
|
-
}
|
|
4247
|
+
},
|
|
3582
4248
|
];
|
|
3583
4249
|
},
|
|
3584
4250
|
{
|
|
3585
4251
|
name: 'revoke';
|
|
3586
4252
|
docs: [
|
|
3587
4253
|
'Revokes a delegation. The instruction merges all inputs into one output',
|
|
3588
|
-
'account. Cannot be called by a delegate. Delegates are not preserved.'
|
|
4254
|
+
'account. Cannot be called by a delegate. Delegates are not preserved.',
|
|
3589
4255
|
];
|
|
3590
4256
|
accounts: [
|
|
3591
4257
|
{
|
|
@@ -3601,7 +4267,7 @@ type LightCompressedToken = {
|
|
|
3601
4267
|
docs: [
|
|
3602
4268
|
'Authority is verified through proof since both owner and delegate',
|
|
3603
4269
|
'are included in the token data hash, which is a public input to the',
|
|
3604
|
-
'validity proof.'
|
|
4270
|
+
'validity proof.',
|
|
3605
4271
|
];
|
|
3606
4272
|
},
|
|
3607
4273
|
{
|
|
@@ -3644,20 +4310,20 @@ type LightCompressedToken = {
|
|
|
3644
4310
|
name: 'systemProgram';
|
|
3645
4311
|
isMut: false;
|
|
3646
4312
|
isSigner: false;
|
|
3647
|
-
}
|
|
4313
|
+
},
|
|
3648
4314
|
];
|
|
3649
4315
|
args: [
|
|
3650
4316
|
{
|
|
3651
4317
|
name: 'inputs';
|
|
3652
4318
|
type: 'bytes';
|
|
3653
|
-
}
|
|
4319
|
+
},
|
|
3654
4320
|
];
|
|
3655
4321
|
},
|
|
3656
4322
|
{
|
|
3657
4323
|
name: 'freeze';
|
|
3658
4324
|
docs: [
|
|
3659
4325
|
'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
|
|
3660
|
-
'many outputs as inputs. Balances and delegates are preserved.'
|
|
4326
|
+
'many outputs as inputs. Balances and delegates are preserved.',
|
|
3661
4327
|
];
|
|
3662
4328
|
accounts: [
|
|
3663
4329
|
{
|
|
@@ -3716,20 +4382,20 @@ type LightCompressedToken = {
|
|
|
3716
4382
|
name: 'mint';
|
|
3717
4383
|
isMut: false;
|
|
3718
4384
|
isSigner: false;
|
|
3719
|
-
}
|
|
4385
|
+
},
|
|
3720
4386
|
];
|
|
3721
4387
|
args: [
|
|
3722
4388
|
{
|
|
3723
4389
|
name: 'inputs';
|
|
3724
4390
|
type: 'bytes';
|
|
3725
|
-
}
|
|
4391
|
+
},
|
|
3726
4392
|
];
|
|
3727
4393
|
},
|
|
3728
4394
|
{
|
|
3729
4395
|
name: 'thaw';
|
|
3730
4396
|
docs: [
|
|
3731
4397
|
'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
|
|
3732
|
-
'as many outputs as inputs. Balances and delegates are preserved.'
|
|
4398
|
+
'as many outputs as inputs. Balances and delegates are preserved.',
|
|
3733
4399
|
];
|
|
3734
4400
|
accounts: [
|
|
3735
4401
|
{
|
|
@@ -3788,13 +4454,13 @@ type LightCompressedToken = {
|
|
|
3788
4454
|
name: 'mint';
|
|
3789
4455
|
isMut: false;
|
|
3790
4456
|
isSigner: false;
|
|
3791
|
-
}
|
|
4457
|
+
},
|
|
3792
4458
|
];
|
|
3793
4459
|
args: [
|
|
3794
4460
|
{
|
|
3795
4461
|
name: 'inputs';
|
|
3796
4462
|
type: 'bytes';
|
|
3797
|
-
}
|
|
4463
|
+
},
|
|
3798
4464
|
];
|
|
3799
4465
|
},
|
|
3800
4466
|
{
|
|
@@ -3802,7 +4468,7 @@ type LightCompressedToken = {
|
|
|
3802
4468
|
docs: [
|
|
3803
4469
|
'Burns compressed tokens and spl tokens from the pool account. Delegates',
|
|
3804
4470
|
'can burn tokens. The output compressed token account remains delegated.',
|
|
3805
|
-
'Creates one output compressed token account.'
|
|
4471
|
+
'Creates one output compressed token account.',
|
|
3806
4472
|
];
|
|
3807
4473
|
accounts: [
|
|
3808
4474
|
{
|
|
@@ -3818,7 +4484,7 @@ type LightCompressedToken = {
|
|
|
3818
4484
|
docs: [
|
|
3819
4485
|
'Authority is verified through proof since both owner and delegate',
|
|
3820
4486
|
'are included in the token data hash, which is a public input to the',
|
|
3821
|
-
'validity proof.'
|
|
4487
|
+
'validity proof.',
|
|
3822
4488
|
];
|
|
3823
4489
|
},
|
|
3824
4490
|
{
|
|
@@ -3875,13 +4541,13 @@ type LightCompressedToken = {
|
|
|
3875
4541
|
name: 'systemProgram';
|
|
3876
4542
|
isMut: false;
|
|
3877
4543
|
isSigner: false;
|
|
3878
|
-
}
|
|
4544
|
+
},
|
|
3879
4545
|
];
|
|
3880
4546
|
args: [
|
|
3881
4547
|
{
|
|
3882
4548
|
name: 'inputs';
|
|
3883
4549
|
type: 'bytes';
|
|
3884
|
-
}
|
|
4550
|
+
},
|
|
3885
4551
|
];
|
|
3886
4552
|
},
|
|
3887
4553
|
{
|
|
@@ -3889,7 +4555,7 @@ type LightCompressedToken = {
|
|
|
3889
4555
|
docs: [
|
|
3890
4556
|
'This function is a stub to allow Anchor to include the input types in',
|
|
3891
4557
|
'the IDL. It should not be included in production builds nor be called in',
|
|
3892
|
-
'practice.'
|
|
4558
|
+
'practice.',
|
|
3893
4559
|
];
|
|
3894
4560
|
accounts: [
|
|
3895
4561
|
{
|
|
@@ -3905,7 +4571,7 @@ type LightCompressedToken = {
|
|
|
3905
4571
|
docs: [
|
|
3906
4572
|
'Authority is verified through proof since both owner and delegate',
|
|
3907
4573
|
'are included in the token data hash, which is a public input to the',
|
|
3908
|
-
'validity proof.'
|
|
4574
|
+
'validity proof.',
|
|
3909
4575
|
];
|
|
3910
4576
|
},
|
|
3911
4577
|
{
|
|
@@ -3966,7 +4632,7 @@ type LightCompressedToken = {
|
|
|
3966
4632
|
name: 'systemProgram';
|
|
3967
4633
|
isMut: false;
|
|
3968
4634
|
isSigner: false;
|
|
3969
|
-
}
|
|
4635
|
+
},
|
|
3970
4636
|
];
|
|
3971
4637
|
args: [
|
|
3972
4638
|
{
|
|
@@ -3980,9 +4646,9 @@ type LightCompressedToken = {
|
|
|
3980
4646
|
type: {
|
|
3981
4647
|
defined: 'TokenData';
|
|
3982
4648
|
};
|
|
3983
|
-
}
|
|
4649
|
+
},
|
|
3984
4650
|
];
|
|
3985
|
-
}
|
|
4651
|
+
},
|
|
3986
4652
|
];
|
|
3987
4653
|
types: [
|
|
3988
4654
|
{
|
|
@@ -3995,7 +4661,7 @@ type LightCompressedToken = {
|
|
|
3995
4661
|
},
|
|
3996
4662
|
{
|
|
3997
4663
|
name: 'Frozen';
|
|
3998
|
-
}
|
|
4664
|
+
},
|
|
3999
4665
|
];
|
|
4000
4666
|
};
|
|
4001
4667
|
},
|
|
@@ -4027,7 +4693,7 @@ type LightCompressedToken = {
|
|
|
4027
4693
|
defined: 'CompressedAccountData';
|
|
4028
4694
|
};
|
|
4029
4695
|
};
|
|
4030
|
-
}
|
|
4696
|
+
},
|
|
4031
4697
|
];
|
|
4032
4698
|
};
|
|
4033
4699
|
},
|
|
@@ -4051,7 +4717,7 @@ type LightCompressedToken = {
|
|
|
4051
4717
|
type: {
|
|
4052
4718
|
array: ['u8', 32];
|
|
4053
4719
|
};
|
|
4054
|
-
}
|
|
4720
|
+
},
|
|
4055
4721
|
];
|
|
4056
4722
|
};
|
|
4057
4723
|
},
|
|
@@ -4064,7 +4730,7 @@ type LightCompressedToken = {
|
|
|
4064
4730
|
name: 'setContext';
|
|
4065
4731
|
docs: [
|
|
4066
4732
|
'Is set by the program that is invoking the CPI to signal that is should',
|
|
4067
|
-
'set the cpi context.'
|
|
4733
|
+
'set the cpi context.',
|
|
4068
4734
|
];
|
|
4069
4735
|
type: 'bool';
|
|
4070
4736
|
},
|
|
@@ -4072,17 +4738,17 @@ type LightCompressedToken = {
|
|
|
4072
4738
|
name: 'firstSetContext';
|
|
4073
4739
|
docs: [
|
|
4074
4740
|
'Is set to wipe the cpi context since someone could have set it before',
|
|
4075
|
-
'with unrelated data.'
|
|
4741
|
+
'with unrelated data.',
|
|
4076
4742
|
];
|
|
4077
4743
|
type: 'bool';
|
|
4078
4744
|
},
|
|
4079
4745
|
{
|
|
4080
4746
|
name: 'cpiContextAccountIndex';
|
|
4081
4747
|
docs: [
|
|
4082
|
-
'Index of cpi context account in remaining accounts.'
|
|
4748
|
+
'Index of cpi context account in remaining accounts.',
|
|
4083
4749
|
];
|
|
4084
4750
|
type: 'u8';
|
|
4085
|
-
}
|
|
4751
|
+
},
|
|
4086
4752
|
];
|
|
4087
4753
|
};
|
|
4088
4754
|
},
|
|
@@ -4108,7 +4774,7 @@ type LightCompressedToken = {
|
|
|
4108
4774
|
type: {
|
|
4109
4775
|
array: ['u8', 32];
|
|
4110
4776
|
};
|
|
4111
|
-
}
|
|
4777
|
+
},
|
|
4112
4778
|
];
|
|
4113
4779
|
};
|
|
4114
4780
|
},
|
|
@@ -4134,7 +4800,7 @@ type LightCompressedToken = {
|
|
|
4134
4800
|
docs: [
|
|
4135
4801
|
'Is required if the signer is delegate,',
|
|
4136
4802
|
'-> delegate is authority account,',
|
|
4137
|
-
'owner = Some(owner) is the owner of the token account.'
|
|
4803
|
+
'owner = Some(owner) is the owner of the token account.',
|
|
4138
4804
|
];
|
|
4139
4805
|
type: {
|
|
4140
4806
|
option: {
|
|
@@ -4181,7 +4847,7 @@ type LightCompressedToken = {
|
|
|
4181
4847
|
type: {
|
|
4182
4848
|
option: 'u8';
|
|
4183
4849
|
};
|
|
4184
|
-
}
|
|
4850
|
+
},
|
|
4185
4851
|
];
|
|
4186
4852
|
};
|
|
4187
4853
|
},
|
|
@@ -4221,7 +4887,7 @@ type LightCompressedToken = {
|
|
|
4221
4887
|
{
|
|
4222
4888
|
name: 'outputAccountMerkleTreeIndex';
|
|
4223
4889
|
type: 'u8';
|
|
4224
|
-
}
|
|
4890
|
+
},
|
|
4225
4891
|
];
|
|
4226
4892
|
};
|
|
4227
4893
|
},
|
|
@@ -4279,14 +4945,14 @@ type LightCompressedToken = {
|
|
|
4279
4945
|
type: {
|
|
4280
4946
|
option: 'u64';
|
|
4281
4947
|
};
|
|
4282
|
-
}
|
|
4948
|
+
},
|
|
4283
4949
|
];
|
|
4284
4950
|
};
|
|
4285
4951
|
},
|
|
4286
4952
|
{
|
|
4287
4953
|
name: 'DelegatedTransfer';
|
|
4288
4954
|
docs: [
|
|
4289
|
-
'Struct to provide the owner when the delegate is signer of the transaction.'
|
|
4955
|
+
'Struct to provide the owner when the delegate is signer of the transaction.',
|
|
4290
4956
|
];
|
|
4291
4957
|
type: {
|
|
4292
4958
|
kind: 'struct';
|
|
@@ -4301,12 +4967,12 @@ type LightCompressedToken = {
|
|
|
4301
4967
|
'Index of change compressed account in output compressed accounts. In',
|
|
4302
4968
|
"case that the delegate didn't spend the complete delegated compressed",
|
|
4303
4969
|
'account balance the change compressed account will be delegated to her',
|
|
4304
|
-
'as well.'
|
|
4970
|
+
'as well.',
|
|
4305
4971
|
];
|
|
4306
4972
|
type: {
|
|
4307
4973
|
option: 'u8';
|
|
4308
4974
|
};
|
|
4309
|
-
}
|
|
4975
|
+
},
|
|
4310
4976
|
];
|
|
4311
4977
|
};
|
|
4312
4978
|
},
|
|
@@ -4344,12 +5010,12 @@ type LightCompressedToken = {
|
|
|
4344
5010
|
{
|
|
4345
5011
|
name: 'tlv';
|
|
4346
5012
|
docs: [
|
|
4347
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
5013
|
+
'Placeholder for TokenExtension tlv data (unimplemented)',
|
|
4348
5014
|
];
|
|
4349
5015
|
type: {
|
|
4350
5016
|
option: 'bytes';
|
|
4351
5017
|
};
|
|
4352
|
-
}
|
|
5018
|
+
},
|
|
4353
5019
|
];
|
|
4354
5020
|
};
|
|
4355
5021
|
},
|
|
@@ -4405,7 +5071,7 @@ type LightCompressedToken = {
|
|
|
4405
5071
|
{
|
|
4406
5072
|
name: 'isCompress';
|
|
4407
5073
|
type: 'bool';
|
|
4408
|
-
}
|
|
5074
|
+
},
|
|
4409
5075
|
];
|
|
4410
5076
|
};
|
|
4411
5077
|
},
|
|
@@ -4469,7 +5135,7 @@ type LightCompressedToken = {
|
|
|
4469
5135
|
defined: 'CompressedCpiContext';
|
|
4470
5136
|
};
|
|
4471
5137
|
};
|
|
4472
|
-
}
|
|
5138
|
+
},
|
|
4473
5139
|
];
|
|
4474
5140
|
};
|
|
4475
5141
|
},
|
|
@@ -4485,7 +5151,7 @@ type LightCompressedToken = {
|
|
|
4485
5151
|
{
|
|
4486
5152
|
name: 'seq';
|
|
4487
5153
|
type: 'u64';
|
|
4488
|
-
}
|
|
5154
|
+
},
|
|
4489
5155
|
];
|
|
4490
5156
|
};
|
|
4491
5157
|
},
|
|
@@ -4511,7 +5177,7 @@ type LightCompressedToken = {
|
|
|
4511
5177
|
{
|
|
4512
5178
|
name: 'addressMerkleTreeRootIndex';
|
|
4513
5179
|
type: 'u16';
|
|
4514
|
-
}
|
|
5180
|
+
},
|
|
4515
5181
|
];
|
|
4516
5182
|
};
|
|
4517
5183
|
},
|
|
@@ -4529,7 +5195,7 @@ type LightCompressedToken = {
|
|
|
4529
5195
|
{
|
|
4530
5196
|
name: 'merkleTreeIndex';
|
|
4531
5197
|
type: 'u8';
|
|
4532
|
-
}
|
|
5198
|
+
},
|
|
4533
5199
|
];
|
|
4534
5200
|
};
|
|
4535
5201
|
},
|
|
@@ -4553,17 +5219,17 @@ type LightCompressedToken = {
|
|
|
4553
5219
|
{
|
|
4554
5220
|
name: 'rootIndex';
|
|
4555
5221
|
docs: [
|
|
4556
|
-
'Index of root used in inclusion validity proof.'
|
|
5222
|
+
'Index of root used in inclusion validity proof.',
|
|
4557
5223
|
];
|
|
4558
5224
|
type: 'u16';
|
|
4559
5225
|
},
|
|
4560
5226
|
{
|
|
4561
5227
|
name: 'readOnly';
|
|
4562
5228
|
docs: [
|
|
4563
|
-
'Placeholder to mark accounts read-only unimplemented set to false.'
|
|
5229
|
+
'Placeholder to mark accounts read-only unimplemented set to false.',
|
|
4564
5230
|
];
|
|
4565
5231
|
type: 'bool';
|
|
4566
|
-
}
|
|
5232
|
+
},
|
|
4567
5233
|
];
|
|
4568
5234
|
};
|
|
4569
5235
|
},
|
|
@@ -4587,7 +5253,7 @@ type LightCompressedToken = {
|
|
|
4587
5253
|
{
|
|
4588
5254
|
name: 'proveByIndex';
|
|
4589
5255
|
type: 'bool';
|
|
4590
|
-
}
|
|
5256
|
+
},
|
|
4591
5257
|
];
|
|
4592
5258
|
};
|
|
4593
5259
|
},
|
|
@@ -4617,12 +5283,12 @@ type LightCompressedToken = {
|
|
|
4617
5283
|
{
|
|
4618
5284
|
name: 'tlv';
|
|
4619
5285
|
docs: [
|
|
4620
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
5286
|
+
'Placeholder for TokenExtension tlv data (unimplemented)',
|
|
4621
5287
|
];
|
|
4622
5288
|
type: {
|
|
4623
5289
|
option: 'bytes';
|
|
4624
5290
|
};
|
|
4625
|
-
}
|
|
5291
|
+
},
|
|
4626
5292
|
];
|
|
4627
5293
|
};
|
|
4628
5294
|
},
|
|
@@ -4696,7 +5362,7 @@ type LightCompressedToken = {
|
|
|
4696
5362
|
type: {
|
|
4697
5363
|
option: 'bytes';
|
|
4698
5364
|
};
|
|
4699
|
-
}
|
|
5365
|
+
},
|
|
4700
5366
|
];
|
|
4701
5367
|
};
|
|
4702
5368
|
},
|
|
@@ -4714,7 +5380,7 @@ type LightCompressedToken = {
|
|
|
4714
5380
|
name: 'index';
|
|
4715
5381
|
docs: ['Index of compressed account hash in queue.'];
|
|
4716
5382
|
type: 'u16';
|
|
4717
|
-
}
|
|
5383
|
+
},
|
|
4718
5384
|
];
|
|
4719
5385
|
};
|
|
4720
5386
|
},
|
|
@@ -4742,7 +5408,7 @@ type LightCompressedToken = {
|
|
|
4742
5408
|
name: 'delegate';
|
|
4743
5409
|
docs: [
|
|
4744
5410
|
'If `delegate` is `Some` then `delegated_amount` represents',
|
|
4745
|
-
'the amount authorized by the delegate'
|
|
5411
|
+
'the amount authorized by the delegate',
|
|
4746
5412
|
];
|
|
4747
5413
|
type: {
|
|
4748
5414
|
option: 'publicKey';
|
|
@@ -4758,15 +5424,15 @@ type LightCompressedToken = {
|
|
|
4758
5424
|
{
|
|
4759
5425
|
name: 'tlv';
|
|
4760
5426
|
docs: [
|
|
4761
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
5427
|
+
'Placeholder for TokenExtension tlv data (unimplemented)',
|
|
4762
5428
|
];
|
|
4763
5429
|
type: {
|
|
4764
5430
|
option: 'bytes';
|
|
4765
5431
|
};
|
|
4766
|
-
}
|
|
5432
|
+
},
|
|
4767
5433
|
];
|
|
4768
5434
|
};
|
|
4769
|
-
}
|
|
5435
|
+
},
|
|
4770
5436
|
];
|
|
4771
5437
|
errors: [
|
|
4772
5438
|
{
|
|
@@ -4923,7 +5589,7 @@ type LightCompressedToken = {
|
|
|
4923
5589
|
{
|
|
4924
5590
|
code: 6032;
|
|
4925
5591
|
name: 'NoMatchingBumpFound';
|
|
4926
|
-
}
|
|
5592
|
+
},
|
|
4927
5593
|
];
|
|
4928
5594
|
};
|
|
4929
5595
|
declare const IDL: LightCompressedToken;
|
|
@@ -4934,14 +5600,30 @@ declare const CompressedTokenInstructionDataTransferLayout: Layout<unknown>;
|
|
|
4934
5600
|
declare const mintToLayout: Layout<unknown>;
|
|
4935
5601
|
declare const batchCompressLayout: Layout<unknown>;
|
|
4936
5602
|
declare const compressSplTokenAccountInstructionDataLayout: Layout<unknown>;
|
|
4937
|
-
declare function encodeMintToInstructionData(
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
declare function
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
declare function
|
|
4944
|
-
|
|
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;
|
|
4945
5627
|
interface BaseAccountsLayoutParams {
|
|
4946
5628
|
feePayer: PublicKey;
|
|
4947
5629
|
authority: PublicKey;
|
|
@@ -4983,20 +5665,44 @@ type freezeAccountsLayoutParams = BaseAccountsLayoutParams & {
|
|
|
4983
5665
|
mint: PublicKey;
|
|
4984
5666
|
};
|
|
4985
5667
|
type thawAccountsLayoutParams = freezeAccountsLayoutParams;
|
|
4986
|
-
declare const createTokenPoolAccountsLayout: (
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
declare const
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
declare const
|
|
4993
|
-
|
|
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[];
|
|
4994
5692
|
declare const CompressedTokenInstructionDataApproveLayout: Layout<unknown>;
|
|
4995
5693
|
declare const CompressedTokenInstructionDataRevokeLayout: Layout<unknown>;
|
|
4996
|
-
declare function encodeApproveInstructionData(
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
declare function
|
|
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;
|
|
5000
5706
|
|
|
5001
5707
|
type CompressParams = {
|
|
5002
5708
|
/**
|
|
@@ -5090,7 +5796,11 @@ type DecompressParams = {
|
|
|
5090
5796
|
/**
|
|
5091
5797
|
* Token pool(s)
|
|
5092
5798
|
*/
|
|
5093
|
-
tokenPoolInfos:
|
|
5799
|
+
tokenPoolInfos:
|
|
5800
|
+
| TokenPoolInfo
|
|
5801
|
+
| TokenPoolInfo[]
|
|
5802
|
+
| SplInterfaceInfo
|
|
5803
|
+
| SplInterfaceInfo[];
|
|
5094
5804
|
};
|
|
5095
5805
|
type TransferParams = {
|
|
5096
5806
|
/**
|
|
@@ -5375,12 +6085,17 @@ declare const validateSameTokenOwner: (accounts: ParsedTokenAccount[]) => void;
|
|
|
5375
6085
|
/**
|
|
5376
6086
|
* Parse compressed token accounts to get the mint, current owner and delegate.
|
|
5377
6087
|
*/
|
|
5378
|
-
declare const parseTokenData: (
|
|
6088
|
+
declare const parseTokenData: (
|
|
6089
|
+
compressedTokenAccounts: ParsedTokenAccount[],
|
|
6090
|
+
) => {
|
|
5379
6091
|
mint: PublicKey;
|
|
5380
6092
|
currentOwner: PublicKey;
|
|
5381
6093
|
delegate: PublicKey | null;
|
|
5382
6094
|
};
|
|
5383
|
-
declare const parseMaybeDelegatedTransfer: (
|
|
6095
|
+
declare const parseMaybeDelegatedTransfer: (
|
|
6096
|
+
inputs: ParsedTokenAccount[],
|
|
6097
|
+
outputs: TokenTransferOutputData[],
|
|
6098
|
+
) => {
|
|
5384
6099
|
delegatedTransfer: DelegatedTransfer | null;
|
|
5385
6100
|
authority: PublicKey;
|
|
5386
6101
|
};
|
|
@@ -5392,7 +6107,11 @@ declare const parseMaybeDelegatedTransfer: (inputs: ParsedTokenAccount[], output
|
|
|
5392
6107
|
* @returns Output token data for the transfer
|
|
5393
6108
|
* instruction
|
|
5394
6109
|
*/
|
|
5395
|
-
declare function createTransferOutputState(
|
|
6110
|
+
declare function createTransferOutputState(
|
|
6111
|
+
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
6112
|
+
toAddress: PublicKey,
|
|
6113
|
+
amount: number | BN,
|
|
6114
|
+
): TokenTransferOutputData[];
|
|
5396
6115
|
/**
|
|
5397
6116
|
* Create the output state for a compress transaction.
|
|
5398
6117
|
* @param inputCompressedTokenAccounts Input state
|
|
@@ -5400,7 +6119,10 @@ declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedT
|
|
|
5400
6119
|
* @returns Output token data for the compress
|
|
5401
6120
|
* instruction
|
|
5402
6121
|
*/
|
|
5403
|
-
declare function createDecompressOutputState(
|
|
6122
|
+
declare function createDecompressOutputState(
|
|
6123
|
+
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
6124
|
+
amount: number | BN,
|
|
6125
|
+
): TokenTransferOutputData[];
|
|
5404
6126
|
declare class CompressedTokenProgram {
|
|
5405
6127
|
/**
|
|
5406
6128
|
* @internal
|
|
@@ -5438,11 +6160,17 @@ declare class CompressedTokenProgram {
|
|
|
5438
6160
|
*
|
|
5439
6161
|
* @returns The index and bump number.
|
|
5440
6162
|
*/
|
|
5441
|
-
static findSplInterfaceIndexAndBump(
|
|
6163
|
+
static findSplInterfaceIndexAndBump(
|
|
6164
|
+
poolPda: PublicKey,
|
|
6165
|
+
mint: PublicKey,
|
|
6166
|
+
): [number, number];
|
|
5442
6167
|
/**
|
|
5443
6168
|
* @deprecated Use {@link findSplInterfaceIndexAndBump} instead.
|
|
5444
6169
|
*/
|
|
5445
|
-
static findTokenPoolIndexAndBump(
|
|
6170
|
+
static findTokenPoolIndexAndBump(
|
|
6171
|
+
poolPda: PublicKey,
|
|
6172
|
+
mint: PublicKey,
|
|
6173
|
+
): [number, number];
|
|
5446
6174
|
/**
|
|
5447
6175
|
* Derive the SPL interface PDA with index.
|
|
5448
6176
|
*
|
|
@@ -5452,11 +6180,17 @@ declare class CompressedTokenProgram {
|
|
|
5452
6180
|
*
|
|
5453
6181
|
* @returns The SPL interface PDA and bump.
|
|
5454
6182
|
*/
|
|
5455
|
-
static deriveSplInterfacePdaWithIndex(
|
|
6183
|
+
static deriveSplInterfacePdaWithIndex(
|
|
6184
|
+
mint: PublicKey,
|
|
6185
|
+
index: number,
|
|
6186
|
+
): [PublicKey, number];
|
|
5456
6187
|
/**
|
|
5457
6188
|
* @deprecated Use {@link deriveSplInterfacePdaWithIndex} instead.
|
|
5458
6189
|
*/
|
|
5459
|
-
static deriveTokenPoolPdaWithIndex(
|
|
6190
|
+
static deriveTokenPoolPdaWithIndex(
|
|
6191
|
+
mint: PublicKey,
|
|
6192
|
+
index: number,
|
|
6193
|
+
): [PublicKey, number];
|
|
5460
6194
|
/** @internal */
|
|
5461
6195
|
static get deriveCpiAuthorityPda(): PublicKey;
|
|
5462
6196
|
/**
|
|
@@ -5477,7 +6211,16 @@ declare class CompressedTokenProgram {
|
|
|
5477
6211
|
* Note that `createSplInterfaceInstruction` must be executed after
|
|
5478
6212
|
* `initializeMintInstruction`.
|
|
5479
6213
|
*/
|
|
5480
|
-
static createMint({
|
|
6214
|
+
static createMint({
|
|
6215
|
+
feePayer,
|
|
6216
|
+
mint,
|
|
6217
|
+
authority,
|
|
6218
|
+
freezeAuthority,
|
|
6219
|
+
decimals,
|
|
6220
|
+
rentExemptBalance,
|
|
6221
|
+
tokenProgramId,
|
|
6222
|
+
mintSize,
|
|
6223
|
+
}: CreateMintParams): Promise<TransactionInstruction[]>;
|
|
5481
6224
|
/**
|
|
5482
6225
|
* Create SPL interface (omnibus account) for an existing SPL mint.
|
|
5483
6226
|
* For new mints, use `CompressedTokenProgram.createMint`.
|
|
@@ -5489,11 +6232,17 @@ declare class CompressedTokenProgram {
|
|
|
5489
6232
|
*
|
|
5490
6233
|
* @returns The createSplInterface instruction
|
|
5491
6234
|
*/
|
|
5492
|
-
static createSplInterface({
|
|
6235
|
+
static createSplInterface({
|
|
6236
|
+
feePayer,
|
|
6237
|
+
mint,
|
|
6238
|
+
tokenProgramId,
|
|
6239
|
+
}: CreateSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5493
6240
|
/**
|
|
5494
6241
|
* @deprecated Use {@link createSplInterface} instead.
|
|
5495
6242
|
*/
|
|
5496
|
-
static createTokenPool(
|
|
6243
|
+
static createTokenPool(
|
|
6244
|
+
params: CreateSplInterfaceParams,
|
|
6245
|
+
): Promise<TransactionInstruction>;
|
|
5497
6246
|
/**
|
|
5498
6247
|
* Add a token pool to an existing SPL mint. For new mints, use
|
|
5499
6248
|
* {@link createSplInterface}.
|
|
@@ -5506,7 +6255,12 @@ declare class CompressedTokenProgram {
|
|
|
5506
6255
|
*
|
|
5507
6256
|
* @returns The addTokenPool instruction
|
|
5508
6257
|
*/
|
|
5509
|
-
static addTokenPool({
|
|
6258
|
+
static addTokenPool({
|
|
6259
|
+
feePayer,
|
|
6260
|
+
mint,
|
|
6261
|
+
poolIndex,
|
|
6262
|
+
tokenProgramId,
|
|
6263
|
+
}: AddSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5510
6264
|
/**
|
|
5511
6265
|
* Construct mintTo instruction for compressed tokens
|
|
5512
6266
|
*
|
|
@@ -5520,7 +6274,15 @@ declare class CompressedTokenProgram {
|
|
|
5520
6274
|
*
|
|
5521
6275
|
* @returns The mintTo instruction
|
|
5522
6276
|
*/
|
|
5523
|
-
static mintTo({
|
|
6277
|
+
static mintTo({
|
|
6278
|
+
feePayer,
|
|
6279
|
+
mint,
|
|
6280
|
+
authority,
|
|
6281
|
+
toPubkey,
|
|
6282
|
+
amount,
|
|
6283
|
+
outputStateTreeInfo,
|
|
6284
|
+
tokenPoolInfo,
|
|
6285
|
+
}: MintToParams): Promise<TransactionInstruction>;
|
|
5524
6286
|
/**
|
|
5525
6287
|
* Mint tokens from registered SPL mint account to a compressed account
|
|
5526
6288
|
*
|
|
@@ -5536,7 +6298,16 @@ declare class CompressedTokenProgram {
|
|
|
5536
6298
|
*
|
|
5537
6299
|
* @returns The mintTo instruction
|
|
5538
6300
|
*/
|
|
5539
|
-
static approveAndMintTo({
|
|
6301
|
+
static approveAndMintTo({
|
|
6302
|
+
feePayer,
|
|
6303
|
+
mint,
|
|
6304
|
+
authority,
|
|
6305
|
+
authorityTokenAccount,
|
|
6306
|
+
toPubkey,
|
|
6307
|
+
amount,
|
|
6308
|
+
outputStateTreeInfo,
|
|
6309
|
+
tokenPoolInfo,
|
|
6310
|
+
}: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
|
|
5540
6311
|
/**
|
|
5541
6312
|
* Construct transfer instruction for compressed tokens.
|
|
5542
6313
|
*
|
|
@@ -5551,7 +6322,14 @@ declare class CompressedTokenProgram {
|
|
|
5551
6322
|
*
|
|
5552
6323
|
* @returns The transfer instruction
|
|
5553
6324
|
*/
|
|
5554
|
-
static transfer({
|
|
6325
|
+
static transfer({
|
|
6326
|
+
payer,
|
|
6327
|
+
inputCompressedTokenAccounts,
|
|
6328
|
+
toAddress,
|
|
6329
|
+
amount,
|
|
6330
|
+
recentValidityProof,
|
|
6331
|
+
recentInputStateRootIndices,
|
|
6332
|
+
}: TransferParams): Promise<TransactionInstruction>;
|
|
5555
6333
|
/**
|
|
5556
6334
|
* Create lookup table instructions for the token program's default
|
|
5557
6335
|
* accounts.
|
|
@@ -5564,7 +6342,13 @@ declare class CompressedTokenProgram {
|
|
|
5564
6342
|
*
|
|
5565
6343
|
* @returns [createInstruction, extendInstruction, option(extendInstruction2)]
|
|
5566
6344
|
*/
|
|
5567
|
-
static createTokenProgramLookupTable({
|
|
6345
|
+
static createTokenProgramLookupTable({
|
|
6346
|
+
payer,
|
|
6347
|
+
authority,
|
|
6348
|
+
mints,
|
|
6349
|
+
recentSlot,
|
|
6350
|
+
remainingAccounts,
|
|
6351
|
+
}: CreateTokenProgramLookupTableParams): Promise<{
|
|
5568
6352
|
instructions: TransactionInstruction[];
|
|
5569
6353
|
address: PublicKey;
|
|
5570
6354
|
}>;
|
|
@@ -5582,7 +6366,16 @@ declare class CompressedTokenProgram {
|
|
|
5582
6366
|
*
|
|
5583
6367
|
* @returns The compress instruction
|
|
5584
6368
|
*/
|
|
5585
|
-
static compress({
|
|
6369
|
+
static compress({
|
|
6370
|
+
payer,
|
|
6371
|
+
owner,
|
|
6372
|
+
source,
|
|
6373
|
+
toAddress,
|
|
6374
|
+
amount,
|
|
6375
|
+
mint,
|
|
6376
|
+
outputStateTreeInfo,
|
|
6377
|
+
tokenPoolInfo,
|
|
6378
|
+
}: CompressParams): Promise<TransactionInstruction>;
|
|
5586
6379
|
/**
|
|
5587
6380
|
* Construct decompress instruction
|
|
5588
6381
|
*
|
|
@@ -5597,7 +6390,15 @@ declare class CompressedTokenProgram {
|
|
|
5597
6390
|
*
|
|
5598
6391
|
* @returns The decompress instruction
|
|
5599
6392
|
*/
|
|
5600
|
-
static decompress({
|
|
6393
|
+
static decompress({
|
|
6394
|
+
payer,
|
|
6395
|
+
inputCompressedTokenAccounts,
|
|
6396
|
+
toAddress,
|
|
6397
|
+
amount,
|
|
6398
|
+
recentValidityProof,
|
|
6399
|
+
recentInputStateRootIndices,
|
|
6400
|
+
tokenPoolInfos,
|
|
6401
|
+
}: DecompressParams): Promise<TransactionInstruction>;
|
|
5601
6402
|
/**
|
|
5602
6403
|
* Create `mergeTokenAccounts` instruction.
|
|
5603
6404
|
*
|
|
@@ -5610,7 +6411,14 @@ declare class CompressedTokenProgram {
|
|
|
5610
6411
|
* @param recentInputStateRootIndices Recent state root indices.
|
|
5611
6412
|
* @returns instruction
|
|
5612
6413
|
*/
|
|
5613
|
-
static mergeTokenAccounts({
|
|
6414
|
+
static mergeTokenAccounts({
|
|
6415
|
+
payer,
|
|
6416
|
+
owner,
|
|
6417
|
+
inputCompressedTokenAccounts,
|
|
6418
|
+
mint,
|
|
6419
|
+
recentValidityProof,
|
|
6420
|
+
recentInputStateRootIndices,
|
|
6421
|
+
}: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
|
|
5614
6422
|
/**
|
|
5615
6423
|
* Create `compressSplTokenAccount` instruction
|
|
5616
6424
|
*
|
|
@@ -5624,7 +6432,15 @@ declare class CompressedTokenProgram {
|
|
|
5624
6432
|
*
|
|
5625
6433
|
* @returns instruction
|
|
5626
6434
|
*/
|
|
5627
|
-
static compressSplTokenAccount({
|
|
6435
|
+
static compressSplTokenAccount({
|
|
6436
|
+
feePayer,
|
|
6437
|
+
authority,
|
|
6438
|
+
tokenAccount,
|
|
6439
|
+
mint,
|
|
6440
|
+
remainingAmount,
|
|
6441
|
+
outputStateTreeInfo,
|
|
6442
|
+
tokenPoolInfo,
|
|
6443
|
+
}: CompressSplTokenAccountParams): Promise<TransactionInstruction>;
|
|
5628
6444
|
/**
|
|
5629
6445
|
* Get the program ID for a mint
|
|
5630
6446
|
*
|
|
@@ -5633,7 +6449,10 @@ declare class CompressedTokenProgram {
|
|
|
5633
6449
|
*
|
|
5634
6450
|
* @returns program ID
|
|
5635
6451
|
*/
|
|
5636
|
-
static getMintProgramId(
|
|
6452
|
+
static getMintProgramId(
|
|
6453
|
+
mint: PublicKey,
|
|
6454
|
+
connection: Connection,
|
|
6455
|
+
): Promise<PublicKey | undefined>;
|
|
5637
6456
|
/**
|
|
5638
6457
|
* Create `approve` instruction to delegate compressed tokens.
|
|
5639
6458
|
*
|
|
@@ -5646,7 +6465,14 @@ declare class CompressedTokenProgram {
|
|
|
5646
6465
|
*
|
|
5647
6466
|
* @returns instruction
|
|
5648
6467
|
*/
|
|
5649
|
-
static approve({
|
|
6468
|
+
static approve({
|
|
6469
|
+
payer,
|
|
6470
|
+
inputCompressedTokenAccounts,
|
|
6471
|
+
toAddress,
|
|
6472
|
+
amount,
|
|
6473
|
+
recentValidityProof,
|
|
6474
|
+
recentInputStateRootIndices,
|
|
6475
|
+
}: ApproveParams): Promise<TransactionInstruction>;
|
|
5650
6476
|
/**
|
|
5651
6477
|
* Create `revoke` instruction to revoke delegation of compressed tokens.
|
|
5652
6478
|
*
|
|
@@ -5657,7 +6483,12 @@ declare class CompressedTokenProgram {
|
|
|
5657
6483
|
*
|
|
5658
6484
|
* @returns instruction
|
|
5659
6485
|
*/
|
|
5660
|
-
static revoke({
|
|
6486
|
+
static revoke({
|
|
6487
|
+
payer,
|
|
6488
|
+
inputCompressedTokenAccounts,
|
|
6489
|
+
recentValidityProof,
|
|
6490
|
+
recentInputStateRootIndices,
|
|
6491
|
+
}: RevokeParams): Promise<TransactionInstruction>;
|
|
5661
6492
|
}
|
|
5662
6493
|
|
|
5663
6494
|
/** Solana maximum transaction size in bytes. */
|
|
@@ -5688,7 +6519,10 @@ declare const MAX_LOAD_ONLY_BATCH_BYTES = 1000;
|
|
|
5688
6519
|
* @param numSigners Number of signers (determines signature count).
|
|
5689
6520
|
* @returns Estimated byte size of the serialized transaction.
|
|
5690
6521
|
*/
|
|
5691
|
-
declare function estimateTransactionSize(
|
|
6522
|
+
declare function estimateTransactionSize(
|
|
6523
|
+
instructions: TransactionInstruction[],
|
|
6524
|
+
numSigners: number,
|
|
6525
|
+
): number;
|
|
5692
6526
|
|
|
5693
6527
|
/**
|
|
5694
6528
|
* Retrieve associated token account for a given owner and mint.
|
|
@@ -5701,7 +6535,14 @@ declare function estimateTransactionSize(instructions: TransactionInstruction[],
|
|
|
5701
6535
|
* @param programId Optional program ID
|
|
5702
6536
|
* @returns AccountInterface with ATA metadata
|
|
5703
6537
|
*/
|
|
5704
|
-
declare function getAtaInterface(
|
|
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>;
|
|
5705
6546
|
/**
|
|
5706
6547
|
* Create instruction batches for loading token balances into an ATA.
|
|
5707
6548
|
* Returns batches of instructions, each batch is one transaction.
|
|
@@ -5714,7 +6555,14 @@ declare function getAtaInterface(rpc: Rpc, ata: PublicKey, owner: PublicKey, min
|
|
|
5714
6555
|
* @param options Optional load options
|
|
5715
6556
|
* @returns Instruction batches - each inner array is one transaction
|
|
5716
6557
|
*/
|
|
5717
|
-
declare function createLoadAtaInstructions(
|
|
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[][]>;
|
|
5718
6566
|
/**
|
|
5719
6567
|
* Load token balances into a c-token ATA.
|
|
5720
6568
|
*
|
|
@@ -5727,6 +6575,250 @@ declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: Publ
|
|
|
5727
6575
|
* @param interfaceOptions Optional interface options
|
|
5728
6576
|
* @returns Transaction signature, or null if nothing to load
|
|
5729
6577
|
*/
|
|
5730
|
-
declare function loadAta(
|
|
5731
|
-
|
|
5732
|
-
|
|
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
|
+
};
|