@lightprotocol/compressed-token 0.23.0-beta.2 → 0.23.0-beta.4
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 +218 -1
- package/dist/cjs/browser/types-qZMOMIxa.cjs +11351 -0
- package/dist/cjs/browser/types-qZMOMIxa.cjs.map +1 -0
- package/dist/cjs/browser/unified/index.cjs +379 -1
- package/dist/cjs/node/index.cjs +219 -1
- package/dist/cjs/node/types-BsKbElnz.cjs +10113 -0
- package/dist/cjs/node/types-BsKbElnz.cjs.map +1 -0
- package/dist/cjs/node/unified/index.cjs +380 -1
- package/dist/es/browser/index.js +166 -1
- package/dist/es/browser/types-pblNXos5.js +10454 -0
- package/dist/es/browser/types-pblNXos5.js.map +1 -0
- package/dist/es/browser/unified/index.js +284 -1
- package/dist/types/index.d.ts +1271 -262
- package/dist/types/unified/index.d.ts +1307 -267
- package/package.json +2 -2
- package/dist/cjs/browser/types-BYVvBJS4.cjs +0 -2
- package/dist/cjs/browser/types-BYVvBJS4.cjs.map +0 -1
- package/dist/cjs/node/types-C6bFjLLI.cjs +0 -2
- package/dist/cjs/node/types-C6bFjLLI.cjs.map +0 -1
- package/dist/es/browser/types-Z2gqWJ9V.js +0 -2
- package/dist/es/browser/types-Z2gqWJ9V.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
|
*
|
|
@@ -362,7 +449,17 @@ declare function createTokenMetadata(name: string, symbol: string, uri: string,
|
|
|
362
449
|
* @param outputStateTreeInfo Output state tree info.
|
|
363
450
|
* @param metadata Optional token metadata.
|
|
364
451
|
*/
|
|
365
|
-
declare function createMintInstruction(
|
|
452
|
+
declare function createMintInstruction(
|
|
453
|
+
mintSigner: PublicKey,
|
|
454
|
+
decimals: number,
|
|
455
|
+
mintAuthority: PublicKey,
|
|
456
|
+
freezeAuthority: PublicKey | null,
|
|
457
|
+
payer: PublicKey,
|
|
458
|
+
validityProof: ValidityProofWithContext,
|
|
459
|
+
addressTreeInfo: AddressTreeInfo,
|
|
460
|
+
outputStateTreeInfo: TreeInfo,
|
|
461
|
+
metadata?: TokenMetadataInstructionData,
|
|
462
|
+
): TransactionInstruction;
|
|
366
463
|
|
|
367
464
|
/**
|
|
368
465
|
* SPL-compatible base mint structure
|
|
@@ -496,7 +593,7 @@ declare function serializeMint(mint: CompressedMint): Buffer$1;
|
|
|
496
593
|
* Extension type constants
|
|
497
594
|
*/
|
|
498
595
|
declare enum ExtensionType {
|
|
499
|
-
TokenMetadata = 19
|
|
596
|
+
TokenMetadata = 19,
|
|
500
597
|
}
|
|
501
598
|
/**
|
|
502
599
|
* Decode TokenMetadata from raw extension data using Borsh layout
|
|
@@ -514,7 +611,9 @@ declare function encodeTokenMetadata(metadata: TokenMetadata): Buffer$1;
|
|
|
514
611
|
* @param extensions - Array of raw extensions
|
|
515
612
|
* @returns Parsed TokenMetadata or null if not found
|
|
516
613
|
*/
|
|
517
|
-
declare function extractTokenMetadata(
|
|
614
|
+
declare function extractTokenMetadata(
|
|
615
|
+
extensions: MintExtension[] | null,
|
|
616
|
+
): TokenMetadata | null;
|
|
518
617
|
/**
|
|
519
618
|
* Metadata portion of MintInstructionData
|
|
520
619
|
* Used for instruction encoding when metadata extension is present
|
|
@@ -565,7 +664,12 @@ interface MintInterface {
|
|
|
565
664
|
* @returns Object with mint, optional merkleContext, mintContext, and
|
|
566
665
|
* tokenMetadata
|
|
567
666
|
*/
|
|
568
|
-
declare function getMintInterface(
|
|
667
|
+
declare function getMintInterface(
|
|
668
|
+
rpc: Rpc,
|
|
669
|
+
address: PublicKey,
|
|
670
|
+
commitment?: Commitment,
|
|
671
|
+
programId?: PublicKey,
|
|
672
|
+
): Promise<MintInterface>;
|
|
569
673
|
/**
|
|
570
674
|
* Unpack mint info from raw account data for SPL/T22/c-token.
|
|
571
675
|
*
|
|
@@ -574,7 +678,11 @@ declare function getMintInterface(rpc: Rpc, address: PublicKey, commitment?: Com
|
|
|
574
678
|
* @param programId Token program ID. Default c-token.
|
|
575
679
|
* @returns Object with mint, optional mintContext and tokenMetadata.
|
|
576
680
|
*/
|
|
577
|
-
declare function unpackMintInterface(
|
|
681
|
+
declare function unpackMintInterface(
|
|
682
|
+
address: PublicKey,
|
|
683
|
+
data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>,
|
|
684
|
+
programId?: PublicKey,
|
|
685
|
+
): Omit<MintInterface, 'merkleContext'>;
|
|
578
686
|
/**
|
|
579
687
|
* Unpack c-token mint context and metadata from raw account data
|
|
580
688
|
*
|
|
@@ -596,7 +704,13 @@ declare function unpackMintData(data: Buffer$1 | Uint8Array): {
|
|
|
596
704
|
* @param payer Fee payer public key
|
|
597
705
|
* @param validityProof Validity proof for the compressed mint
|
|
598
706
|
*/
|
|
599
|
-
declare function createUpdateMintAuthorityInstruction(
|
|
707
|
+
declare function createUpdateMintAuthorityInstruction(
|
|
708
|
+
mintInterface: MintInterface,
|
|
709
|
+
currentMintAuthority: PublicKey,
|
|
710
|
+
newMintAuthority: PublicKey | null,
|
|
711
|
+
payer: PublicKey,
|
|
712
|
+
validityProof: ValidityProofWithContext,
|
|
713
|
+
): TransactionInstruction;
|
|
600
714
|
/**
|
|
601
715
|
* Create instruction for updating a compressed mint's freeze authority.
|
|
602
716
|
*
|
|
@@ -609,7 +723,13 @@ declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterfa
|
|
|
609
723
|
* @param payer Fee payer public key
|
|
610
724
|
* @param validityProof Validity proof for the compressed mint
|
|
611
725
|
*/
|
|
612
|
-
declare function createUpdateFreezeAuthorityInstruction(
|
|
726
|
+
declare function createUpdateFreezeAuthorityInstruction(
|
|
727
|
+
mintInterface: MintInterface,
|
|
728
|
+
currentFreezeAuthority: PublicKey,
|
|
729
|
+
newFreezeAuthority: PublicKey | null,
|
|
730
|
+
payer: PublicKey,
|
|
731
|
+
validityProof: ValidityProofWithContext,
|
|
732
|
+
): TransactionInstruction;
|
|
613
733
|
|
|
614
734
|
/**
|
|
615
735
|
* Create instruction for updating a compressed mint's metadata field.
|
|
@@ -626,7 +746,16 @@ declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInter
|
|
|
626
746
|
* @param customKey Custom key name (required if fieldType is 'custom')
|
|
627
747
|
* @param extensionIndex Extension index (default: 0)
|
|
628
748
|
*/
|
|
629
|
-
declare function createUpdateMetadataFieldInstruction(
|
|
749
|
+
declare function createUpdateMetadataFieldInstruction(
|
|
750
|
+
mintInterface: MintInterface,
|
|
751
|
+
authority: PublicKey,
|
|
752
|
+
payer: PublicKey,
|
|
753
|
+
validityProof: ValidityProofWithContext,
|
|
754
|
+
fieldType: 'name' | 'symbol' | 'uri' | 'custom',
|
|
755
|
+
value: string,
|
|
756
|
+
customKey?: string,
|
|
757
|
+
extensionIndex?: number,
|
|
758
|
+
): TransactionInstruction;
|
|
630
759
|
/**
|
|
631
760
|
* Create instruction for updating a compressed mint's metadata authority.
|
|
632
761
|
*
|
|
@@ -640,7 +769,14 @@ declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterfa
|
|
|
640
769
|
* @param validityProof Validity proof for the compressed mint
|
|
641
770
|
* @param extensionIndex Extension index (default: 0)
|
|
642
771
|
*/
|
|
643
|
-
declare function createUpdateMetadataAuthorityInstruction(
|
|
772
|
+
declare function createUpdateMetadataAuthorityInstruction(
|
|
773
|
+
mintInterface: MintInterface,
|
|
774
|
+
currentAuthority: PublicKey,
|
|
775
|
+
newAuthority: PublicKey,
|
|
776
|
+
payer: PublicKey,
|
|
777
|
+
validityProof: ValidityProofWithContext,
|
|
778
|
+
extensionIndex?: number,
|
|
779
|
+
): TransactionInstruction;
|
|
644
780
|
/**
|
|
645
781
|
* Create instruction for removing a metadata key from a compressed mint.
|
|
646
782
|
*
|
|
@@ -655,7 +791,15 @@ declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInt
|
|
|
655
791
|
* @param idempotent If true, don't error if key doesn't exist (default: false)
|
|
656
792
|
* @param extensionIndex Extension index (default: 0)
|
|
657
793
|
*/
|
|
658
|
-
declare function createRemoveMetadataKeyInstruction(
|
|
794
|
+
declare function createRemoveMetadataKeyInstruction(
|
|
795
|
+
mintInterface: MintInterface,
|
|
796
|
+
authority: PublicKey,
|
|
797
|
+
payer: PublicKey,
|
|
798
|
+
validityProof: ValidityProofWithContext,
|
|
799
|
+
key: string,
|
|
800
|
+
idempotent?: boolean,
|
|
801
|
+
extensionIndex?: number,
|
|
802
|
+
): TransactionInstruction;
|
|
659
803
|
|
|
660
804
|
interface CompressToPubkey {
|
|
661
805
|
bump: number;
|
|
@@ -684,7 +828,14 @@ interface CreateAssociatedCTokenAccountParams {
|
|
|
684
828
|
* @param configAccount Optional config account.
|
|
685
829
|
* @param rentPayerPda Optional rent payer PDA.
|
|
686
830
|
*/
|
|
687
|
-
declare function createAssociatedCTokenAccountInstruction(
|
|
831
|
+
declare function createAssociatedCTokenAccountInstruction(
|
|
832
|
+
feePayer: PublicKey,
|
|
833
|
+
owner: PublicKey,
|
|
834
|
+
mint: PublicKey,
|
|
835
|
+
compressibleConfig?: CompressibleConfig,
|
|
836
|
+
configAccount?: PublicKey,
|
|
837
|
+
rentPayerPda?: PublicKey,
|
|
838
|
+
): TransactionInstruction;
|
|
688
839
|
/**
|
|
689
840
|
* Create idempotent instruction for creating an associated compressed token account.
|
|
690
841
|
*
|
|
@@ -695,7 +846,14 @@ declare function createAssociatedCTokenAccountInstruction(feePayer: PublicKey, o
|
|
|
695
846
|
* @param configAccount Optional config account.
|
|
696
847
|
* @param rentPayerPda Optional rent payer PDA.
|
|
697
848
|
*/
|
|
698
|
-
declare function createAssociatedCTokenAccountIdempotentInstruction(
|
|
849
|
+
declare function createAssociatedCTokenAccountIdempotentInstruction(
|
|
850
|
+
feePayer: PublicKey,
|
|
851
|
+
owner: PublicKey,
|
|
852
|
+
mint: PublicKey,
|
|
853
|
+
compressibleConfig?: CompressibleConfig,
|
|
854
|
+
configAccount?: PublicKey,
|
|
855
|
+
rentPayerPda?: PublicKey,
|
|
856
|
+
): TransactionInstruction;
|
|
699
857
|
|
|
700
858
|
/**
|
|
701
859
|
* c-token-specific config for createAssociatedTokenAccountInterfaceInstruction
|
|
@@ -718,7 +876,15 @@ interface CTokenConfig {
|
|
|
718
876
|
* @param associatedTokenProgramId Associated token program ID.
|
|
719
877
|
* @param ctokenConfig Optional c-token-specific configuration.
|
|
720
878
|
*/
|
|
721
|
-
declare function createAssociatedTokenAccountInterfaceInstruction(
|
|
879
|
+
declare function createAssociatedTokenAccountInterfaceInstruction(
|
|
880
|
+
payer: PublicKey,
|
|
881
|
+
associatedToken: PublicKey,
|
|
882
|
+
owner: PublicKey,
|
|
883
|
+
mint: PublicKey,
|
|
884
|
+
programId?: PublicKey,
|
|
885
|
+
associatedTokenProgramId?: PublicKey,
|
|
886
|
+
ctokenConfig?: CTokenConfig,
|
|
887
|
+
): TransactionInstruction;
|
|
722
888
|
/**
|
|
723
889
|
* Create idempotent instruction for creating an associated token account (SPL,
|
|
724
890
|
* Token-2022, or c-token). Follows SPL Token API signature with optional c-token
|
|
@@ -732,7 +898,15 @@ declare function createAssociatedTokenAccountInterfaceInstruction(payer: PublicK
|
|
|
732
898
|
* @param associatedTokenProgramId Associated token program ID.
|
|
733
899
|
* @param ctokenConfig Optional c-token-specific configuration.
|
|
734
900
|
*/
|
|
735
|
-
declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(
|
|
901
|
+
declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(
|
|
902
|
+
payer: PublicKey,
|
|
903
|
+
associatedToken: PublicKey,
|
|
904
|
+
owner: PublicKey,
|
|
905
|
+
mint: PublicKey,
|
|
906
|
+
programId?: PublicKey,
|
|
907
|
+
associatedTokenProgramId?: PublicKey,
|
|
908
|
+
ctokenConfig?: CTokenConfig,
|
|
909
|
+
): TransactionInstruction;
|
|
736
910
|
/**
|
|
737
911
|
* Short alias for createAssociatedTokenAccountInterfaceIdempotentInstruction.
|
|
738
912
|
*/
|
|
@@ -750,7 +924,16 @@ declare const createAtaInterfaceIdempotentInstruction: typeof createAssociatedTo
|
|
|
750
924
|
* @param recipientAccount Recipient onchain token account address.
|
|
751
925
|
* @param amount Amount to mint.
|
|
752
926
|
*/
|
|
753
|
-
declare function createMintToInstruction(
|
|
927
|
+
declare function createMintToInstruction(
|
|
928
|
+
authority: PublicKey,
|
|
929
|
+
payer: PublicKey,
|
|
930
|
+
validityProof: ValidityProofWithContext,
|
|
931
|
+
merkleContext: MerkleContext,
|
|
932
|
+
mintData: MintInstructionData,
|
|
933
|
+
outputStateTreeInfo: TreeInfo,
|
|
934
|
+
recipientAccount: PublicKey,
|
|
935
|
+
amount: number | bigint,
|
|
936
|
+
): TransactionInstruction;
|
|
754
937
|
|
|
755
938
|
/**
|
|
756
939
|
* Token data version enum - mirrors Rust TokenDataVersion
|
|
@@ -762,7 +945,7 @@ declare enum TokenDataVersion {
|
|
|
762
945
|
/** V2: Poseidon hash with big-endian amount, discriminator [0,0,0,0,0,0,0,3] */
|
|
763
946
|
V2 = 2,
|
|
764
947
|
/** ShaFlat: SHA256 hash of borsh-serialized data, discriminator [0,0,0,0,0,0,0,4] */
|
|
765
|
-
ShaFlat = 3
|
|
948
|
+
ShaFlat = 3,
|
|
766
949
|
}
|
|
767
950
|
declare const POOL_SEED: Buffer$1<ArrayBuffer>;
|
|
768
951
|
declare const CPI_AUTHORITY_SEED: Buffer$1<ArrayBuffer>;
|
|
@@ -793,10 +976,19 @@ declare const DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR: Buffer$1<ArrayBuffer
|
|
|
793
976
|
* @param tokenAccountVersion Token account version (default:
|
|
794
977
|
* TokenDataVersion.ShaFlat).
|
|
795
978
|
*/
|
|
796
|
-
declare function createMintToCompressedInstruction(
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
979
|
+
declare function createMintToCompressedInstruction(
|
|
980
|
+
authority: PublicKey,
|
|
981
|
+
payer: PublicKey,
|
|
982
|
+
validityProof: ValidityProofWithContext,
|
|
983
|
+
merkleContext: MerkleContext,
|
|
984
|
+
mintData: MintInstructionData,
|
|
985
|
+
recipients: Array<{
|
|
986
|
+
recipient: PublicKey;
|
|
987
|
+
amount: number | bigint;
|
|
988
|
+
}>,
|
|
989
|
+
outputStateTreeInfo?: TreeInfo,
|
|
990
|
+
tokenAccountVersion?: TokenDataVersion,
|
|
991
|
+
): TransactionInstruction;
|
|
800
992
|
|
|
801
993
|
/**
|
|
802
994
|
* Create mint-to instruction for SPL, Token-2022, or compressed token mints.
|
|
@@ -810,7 +1002,15 @@ declare function createMintToCompressedInstruction(authority: PublicKey, payer:
|
|
|
810
1002
|
* @param validityProof Validity proof (required for compressed mints).
|
|
811
1003
|
* @param multiSigners Multi-signature signer public keys.
|
|
812
1004
|
*/
|
|
813
|
-
declare function createMintToInterfaceInstruction(
|
|
1005
|
+
declare function createMintToInterfaceInstruction(
|
|
1006
|
+
mintInterface: MintInterface,
|
|
1007
|
+
destination: PublicKey,
|
|
1008
|
+
authority: PublicKey,
|
|
1009
|
+
payer: PublicKey,
|
|
1010
|
+
amount: number | bigint,
|
|
1011
|
+
validityProof?: ValidityProofWithContext,
|
|
1012
|
+
multiSigners?: PublicKey[],
|
|
1013
|
+
): TransactionInstruction;
|
|
814
1014
|
|
|
815
1015
|
/**
|
|
816
1016
|
* Create a c-token transfer instruction.
|
|
@@ -821,7 +1021,12 @@ declare function createMintToInterfaceInstruction(mintInterface: MintInterface,
|
|
|
821
1021
|
* @param amount Amount to transfer
|
|
822
1022
|
* @returns Transaction instruction for c-token transfer
|
|
823
1023
|
*/
|
|
824
|
-
declare function createCTokenTransferInstruction(
|
|
1024
|
+
declare function createCTokenTransferInstruction(
|
|
1025
|
+
source: PublicKey,
|
|
1026
|
+
destination: PublicKey,
|
|
1027
|
+
owner: PublicKey,
|
|
1028
|
+
amount: number | bigint,
|
|
1029
|
+
): TransactionInstruction;
|
|
825
1030
|
/**
|
|
826
1031
|
* Construct a transfer instruction for SPL/T22/c-token. Defaults to c-token
|
|
827
1032
|
* program. For cross-program transfers (SPL <> c-token), use `wrap`/`unwrap`.
|
|
@@ -832,11 +1037,18 @@ declare function createCTokenTransferInstruction(source: PublicKey, destination:
|
|
|
832
1037
|
* @param amount Amount to transfer
|
|
833
1038
|
* @returns instruction for c-token transfer
|
|
834
1039
|
*/
|
|
835
|
-
declare function createTransferInterfaceInstruction(
|
|
1040
|
+
declare function createTransferInterfaceInstruction(
|
|
1041
|
+
source: PublicKey,
|
|
1042
|
+
destination: PublicKey,
|
|
1043
|
+
owner: PublicKey,
|
|
1044
|
+
amount: number | bigint,
|
|
1045
|
+
multiSigners?: (Signer | PublicKey)[],
|
|
1046
|
+
programId?: PublicKey,
|
|
1047
|
+
): TransactionInstruction;
|
|
836
1048
|
|
|
837
1049
|
declare namespace BN {
|
|
838
|
-
type Endianness =
|
|
839
|
-
type IPrimeName =
|
|
1050
|
+
type Endianness = 'le' | 'be';
|
|
1051
|
+
type IPrimeName = 'k256' | 'p224' | 'p192' | 'p25519';
|
|
840
1052
|
|
|
841
1053
|
interface MPrime {
|
|
842
1054
|
name: string;
|
|
@@ -858,7 +1070,7 @@ declare class BN {
|
|
|
858
1070
|
|
|
859
1071
|
constructor(
|
|
860
1072
|
number: bigint | number | string | number[] | Uint8Array | Buffer | BN,
|
|
861
|
-
base?: number |
|
|
1073
|
+
base?: number | 'hex',
|
|
862
1074
|
endian?: BN.Endianness,
|
|
863
1075
|
);
|
|
864
1076
|
constructor(
|
|
@@ -904,7 +1116,7 @@ declare class BN {
|
|
|
904
1116
|
/**
|
|
905
1117
|
* @description convert to base-string and pad with zeroes
|
|
906
1118
|
*/
|
|
907
|
-
toString(base?: number |
|
|
1119
|
+
toString(base?: number | 'hex', length?: number): string;
|
|
908
1120
|
|
|
909
1121
|
/**
|
|
910
1122
|
* @description convert to Javascript Number (limited to 53 bits)
|
|
@@ -1164,7 +1376,11 @@ declare class BN {
|
|
|
1164
1376
|
/**
|
|
1165
1377
|
* @description division with remainder
|
|
1166
1378
|
*/
|
|
1167
|
-
divmod(
|
|
1379
|
+
divmod(
|
|
1380
|
+
b: BN,
|
|
1381
|
+
mode?: 'div' | 'mod',
|
|
1382
|
+
positive?: boolean,
|
|
1383
|
+
): { div: BN; mod: BN };
|
|
1168
1384
|
|
|
1169
1385
|
/**
|
|
1170
1386
|
* @description reduct
|
|
@@ -1532,14 +1748,21 @@ declare function toTokenPoolInfo(info: SplInterfaceInfo): TokenPoolInfo;
|
|
|
1532
1748
|
*
|
|
1533
1749
|
* @returns SplInterfaceInfo for the to-be-initialized interface
|
|
1534
1750
|
*/
|
|
1535
|
-
declare function deriveSplInterfaceInfo(
|
|
1751
|
+
declare function deriveSplInterfaceInfo(
|
|
1752
|
+
mint: PublicKey,
|
|
1753
|
+
tokenProgramId: PublicKey,
|
|
1754
|
+
poolIndex?: number,
|
|
1755
|
+
): SplInterfaceInfo;
|
|
1536
1756
|
/**
|
|
1537
1757
|
* Check if the SPL interface info is initialized and has a balance.
|
|
1538
1758
|
* @param mint The mint of the SPL interface
|
|
1539
1759
|
* @param splInterfaceInfo The SPL interface info (or TokenPoolInfo for backward compatibility)
|
|
1540
1760
|
* @returns True if the SPL interface info is initialized and has a balance
|
|
1541
1761
|
*/
|
|
1542
|
-
declare function checkSplInterfaceInfo(
|
|
1762
|
+
declare function checkSplInterfaceInfo(
|
|
1763
|
+
splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo,
|
|
1764
|
+
mint: PublicKey,
|
|
1765
|
+
): boolean;
|
|
1543
1766
|
/**
|
|
1544
1767
|
* Get the SPL interface infos for a given mint.
|
|
1545
1768
|
* @param rpc The RPC client
|
|
@@ -1548,7 +1771,11 @@ declare function checkSplInterfaceInfo(splInterfaceInfo: SplInterfaceInfo | Toke
|
|
|
1548
1771
|
*
|
|
1549
1772
|
* @returns The SPL interface infos
|
|
1550
1773
|
*/
|
|
1551
|
-
declare function getSplInterfaceInfos(
|
|
1774
|
+
declare function getSplInterfaceInfos(
|
|
1775
|
+
rpc: Rpc,
|
|
1776
|
+
mint: PublicKey,
|
|
1777
|
+
commitment?: Commitment,
|
|
1778
|
+
): Promise<SplInterfaceInfo[]>;
|
|
1552
1779
|
type SplInterfaceActivity = {
|
|
1553
1780
|
signature: string;
|
|
1554
1781
|
amount: BN;
|
|
@@ -1560,7 +1787,7 @@ type SplInterfaceActivity = {
|
|
|
1560
1787
|
declare enum Action {
|
|
1561
1788
|
Compress = 1,
|
|
1562
1789
|
Decompress = 2,
|
|
1563
|
-
Transfer = 3
|
|
1790
|
+
Transfer = 3,
|
|
1564
1791
|
}
|
|
1565
1792
|
/**
|
|
1566
1793
|
* For `compress` and `mintTo` instructions only.
|
|
@@ -1572,7 +1799,9 @@ declare enum Action {
|
|
|
1572
1799
|
*
|
|
1573
1800
|
* @returns A random SPL interface info
|
|
1574
1801
|
*/
|
|
1575
|
-
declare function selectSplInterfaceInfo(
|
|
1802
|
+
declare function selectSplInterfaceInfo(
|
|
1803
|
+
infos: SplInterfaceInfo[],
|
|
1804
|
+
): SplInterfaceInfo;
|
|
1576
1805
|
/**
|
|
1577
1806
|
* Select one or multiple SPL interface infos from the SPL interface infos.
|
|
1578
1807
|
*
|
|
@@ -1585,7 +1814,10 @@ declare function selectSplInterfaceInfo(infos: SplInterfaceInfo[]): SplInterface
|
|
|
1585
1814
|
*
|
|
1586
1815
|
* @returns Array with one or more SPL interface infos.
|
|
1587
1816
|
*/
|
|
1588
|
-
declare function selectSplInterfaceInfosForDecompression(
|
|
1817
|
+
declare function selectSplInterfaceInfosForDecompression(
|
|
1818
|
+
infos: SplInterfaceInfo[],
|
|
1819
|
+
decompressAmount: number | BN,
|
|
1820
|
+
): SplInterfaceInfo[];
|
|
1589
1821
|
/**
|
|
1590
1822
|
* @deprecated Use {@link SplInterfaceActivity} instead.
|
|
1591
1823
|
*/
|
|
@@ -1593,15 +1825,26 @@ type TokenPoolActivity = SplInterfaceActivity;
|
|
|
1593
1825
|
/**
|
|
1594
1826
|
* @deprecated Use {@link deriveSplInterfaceInfo} instead.
|
|
1595
1827
|
*/
|
|
1596
|
-
declare function deriveTokenPoolInfo(
|
|
1828
|
+
declare function deriveTokenPoolInfo(
|
|
1829
|
+
mint: PublicKey,
|
|
1830
|
+
tokenProgramId: PublicKey,
|
|
1831
|
+
poolIndex?: number,
|
|
1832
|
+
): TokenPoolInfo;
|
|
1597
1833
|
/**
|
|
1598
1834
|
* @deprecated Use {@link checkSplInterfaceInfo} instead.
|
|
1599
1835
|
*/
|
|
1600
|
-
declare function checkTokenPoolInfo(
|
|
1836
|
+
declare function checkTokenPoolInfo(
|
|
1837
|
+
tokenPoolInfo: TokenPoolInfo,
|
|
1838
|
+
mint: PublicKey,
|
|
1839
|
+
): boolean;
|
|
1601
1840
|
/**
|
|
1602
1841
|
* @deprecated Use {@link getSplInterfaceInfos} instead.
|
|
1603
1842
|
*/
|
|
1604
|
-
declare function getTokenPoolInfos(
|
|
1843
|
+
declare function getTokenPoolInfos(
|
|
1844
|
+
rpc: Rpc,
|
|
1845
|
+
mint: PublicKey,
|
|
1846
|
+
commitment?: Commitment,
|
|
1847
|
+
): Promise<TokenPoolInfo[]>;
|
|
1605
1848
|
/**
|
|
1606
1849
|
* @deprecated Use {@link selectSplInterfaceInfo} instead.
|
|
1607
1850
|
*/
|
|
@@ -1609,7 +1852,10 @@ declare function selectTokenPoolInfo(infos: TokenPoolInfo[]): TokenPoolInfo;
|
|
|
1609
1852
|
/**
|
|
1610
1853
|
* @deprecated Use {@link selectSplInterfaceInfosForDecompression} instead.
|
|
1611
1854
|
*/
|
|
1612
|
-
declare function selectTokenPoolInfosForDecompression(
|
|
1855
|
+
declare function selectTokenPoolInfosForDecompression(
|
|
1856
|
+
infos: TokenPoolInfo[],
|
|
1857
|
+
decompressAmount: number | BN,
|
|
1858
|
+
): TokenPoolInfo[];
|
|
1613
1859
|
|
|
1614
1860
|
/**
|
|
1615
1861
|
* Create decompressInterface instruction using Transfer2.
|
|
@@ -1627,17 +1873,26 @@ declare function selectTokenPoolInfosForDecompression(infos: TokenPoolInfo[], de
|
|
|
1627
1873
|
* @param decimals Mint decimals (required for SPL destinations)
|
|
1628
1874
|
* @returns TransactionInstruction
|
|
1629
1875
|
*/
|
|
1630
|
-
declare function createDecompressInterfaceInstruction(
|
|
1876
|
+
declare function createDecompressInterfaceInstruction(
|
|
1877
|
+
payer: PublicKey,
|
|
1878
|
+
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
1879
|
+
toAddress: PublicKey,
|
|
1880
|
+
amount: bigint,
|
|
1881
|
+
validityProof: ValidityProofWithContext,
|
|
1882
|
+
splInterfaceInfo: SplInterfaceInfo | undefined,
|
|
1883
|
+
decimals: number,
|
|
1884
|
+
): TransactionInstruction;
|
|
1631
1885
|
|
|
1632
1886
|
declare const TokenAccountSourceType: {
|
|
1633
|
-
readonly Spl:
|
|
1634
|
-
readonly Token2022:
|
|
1635
|
-
readonly SplCold:
|
|
1636
|
-
readonly Token2022Cold:
|
|
1637
|
-
readonly CTokenHot:
|
|
1638
|
-
readonly CTokenCold:
|
|
1887
|
+
readonly Spl: 'spl';
|
|
1888
|
+
readonly Token2022: 'token2022';
|
|
1889
|
+
readonly SplCold: 'spl-cold';
|
|
1890
|
+
readonly Token2022Cold: 'token2022-cold';
|
|
1891
|
+
readonly CTokenHot: 'ctoken-hot';
|
|
1892
|
+
readonly CTokenCold: 'ctoken-cold';
|
|
1639
1893
|
};
|
|
1640
|
-
type TokenAccountSourceTypeValue =
|
|
1894
|
+
type TokenAccountSourceTypeValue =
|
|
1895
|
+
(typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
|
|
1641
1896
|
/** @internal */
|
|
1642
1897
|
interface TokenAccountSource {
|
|
1643
1898
|
type: TokenAccountSourceTypeValue;
|
|
@@ -1664,25 +1919,36 @@ interface AccountInterface {
|
|
|
1664
1919
|
_mint?: PublicKey;
|
|
1665
1920
|
}
|
|
1666
1921
|
/** @internal */
|
|
1667
|
-
declare function convertTokenDataToAccount(
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1922
|
+
declare function convertTokenDataToAccount(
|
|
1923
|
+
address: PublicKey,
|
|
1924
|
+
tokenData: {
|
|
1925
|
+
mint: PublicKey;
|
|
1926
|
+
owner: PublicKey;
|
|
1927
|
+
amount: BN;
|
|
1928
|
+
delegate: PublicKey | null;
|
|
1929
|
+
state: number;
|
|
1930
|
+
tlv: Buffer$1 | null;
|
|
1931
|
+
},
|
|
1932
|
+
): Account;
|
|
1675
1933
|
/** Convert compressed account to AccountInfo */
|
|
1676
|
-
declare function toAccountInfo(
|
|
1934
|
+
declare function toAccountInfo(
|
|
1935
|
+
compressedAccount: CompressedAccountWithMerkleContext,
|
|
1936
|
+
): AccountInfo<Buffer$1>;
|
|
1677
1937
|
/** @internal */
|
|
1678
|
-
declare function parseCTokenHot(
|
|
1938
|
+
declare function parseCTokenHot(
|
|
1939
|
+
address: PublicKey,
|
|
1940
|
+
accountInfo: AccountInfo<Buffer$1>,
|
|
1941
|
+
): {
|
|
1679
1942
|
accountInfo: AccountInfo<Buffer$1>;
|
|
1680
1943
|
loadContext: undefined;
|
|
1681
1944
|
parsed: Account;
|
|
1682
1945
|
isCold: false;
|
|
1683
1946
|
};
|
|
1684
1947
|
/** @internal */
|
|
1685
|
-
declare function parseCTokenCold(
|
|
1948
|
+
declare function parseCTokenCold(
|
|
1949
|
+
address: PublicKey,
|
|
1950
|
+
compressedAccount: CompressedAccountWithMerkleContext,
|
|
1951
|
+
): {
|
|
1686
1952
|
accountInfo: AccountInfo<Buffer$1>;
|
|
1687
1953
|
loadContext: MerkleContext;
|
|
1688
1954
|
parsed: Account;
|
|
@@ -1698,7 +1964,12 @@ declare function parseCTokenCold(address: PublicKey, compressedAccount: Compress
|
|
|
1698
1964
|
*
|
|
1699
1965
|
* @return Token account information with compression context if applicable
|
|
1700
1966
|
*/
|
|
1701
|
-
declare function getAccountInterface(
|
|
1967
|
+
declare function getAccountInterface(
|
|
1968
|
+
rpc: Rpc,
|
|
1969
|
+
address: PublicKey,
|
|
1970
|
+
commitment?: Commitment,
|
|
1971
|
+
programId?: PublicKey,
|
|
1972
|
+
): Promise<AccountInterface>;
|
|
1702
1973
|
|
|
1703
1974
|
/**
|
|
1704
1975
|
* Options for interface operations (load, transfer)
|
|
@@ -1725,7 +1996,19 @@ interface InterfaceOptions {
|
|
|
1725
1996
|
* @param wrap Include SPL/T22 wrapping (default: false)
|
|
1726
1997
|
* @returns Transaction signature
|
|
1727
1998
|
*/
|
|
1728
|
-
declare function transferInterface(
|
|
1999
|
+
declare function transferInterface(
|
|
2000
|
+
rpc: Rpc,
|
|
2001
|
+
payer: Signer,
|
|
2002
|
+
source: PublicKey,
|
|
2003
|
+
mint: PublicKey,
|
|
2004
|
+
destination: PublicKey,
|
|
2005
|
+
owner: Signer,
|
|
2006
|
+
amount: number | bigint | BN,
|
|
2007
|
+
programId?: PublicKey,
|
|
2008
|
+
confirmOptions?: ConfirmOptions,
|
|
2009
|
+
options?: InterfaceOptions,
|
|
2010
|
+
wrap?: boolean,
|
|
2011
|
+
): Promise<TransactionSignature>;
|
|
1729
2012
|
|
|
1730
2013
|
/**
|
|
1731
2014
|
* Account info interface for compressible accounts.
|
|
@@ -1846,11 +2129,21 @@ interface LoadResult {
|
|
|
1846
2129
|
* }
|
|
1847
2130
|
* ```
|
|
1848
2131
|
*/
|
|
1849
|
-
declare function createLoadAccountsParams(
|
|
2132
|
+
declare function createLoadAccountsParams(
|
|
2133
|
+
rpc: Rpc,
|
|
2134
|
+
payer: PublicKey,
|
|
2135
|
+
programId: PublicKey,
|
|
2136
|
+
programAccounts?: CompressibleAccountInput[],
|
|
2137
|
+
atas?: AccountInterface[],
|
|
2138
|
+
options?: InterfaceOptions,
|
|
2139
|
+
): Promise<LoadResult>;
|
|
1850
2140
|
/**
|
|
1851
2141
|
* Calculate compute units for compressible load operation
|
|
1852
2142
|
*/
|
|
1853
|
-
declare function calculateCompressibleLoadComputeUnits(
|
|
2143
|
+
declare function calculateCompressibleLoadComputeUnits(
|
|
2144
|
+
compressedAccountCount: number,
|
|
2145
|
+
hasValidityProof: boolean,
|
|
2146
|
+
): number;
|
|
1854
2147
|
|
|
1855
2148
|
/**
|
|
1856
2149
|
* Create a wrap instruction that moves tokens from an SPL/T22 account to a
|
|
@@ -1866,7 +2159,16 @@ declare function calculateCompressibleLoadComputeUnits(compressedAccountCount: n
|
|
|
1866
2159
|
* @param payer Fee payer (defaults to owner)
|
|
1867
2160
|
* @returns Instruction to wrap tokens
|
|
1868
2161
|
*/
|
|
1869
|
-
declare function createWrapInstruction(
|
|
2162
|
+
declare function createWrapInstruction(
|
|
2163
|
+
source: PublicKey,
|
|
2164
|
+
destination: PublicKey,
|
|
2165
|
+
owner: PublicKey,
|
|
2166
|
+
mint: PublicKey,
|
|
2167
|
+
amount: bigint,
|
|
2168
|
+
splInterfaceInfo: SplInterfaceInfo,
|
|
2169
|
+
decimals: number,
|
|
2170
|
+
payer?: PublicKey,
|
|
2171
|
+
): TransactionInstruction;
|
|
1870
2172
|
|
|
1871
2173
|
/**
|
|
1872
2174
|
* Create and initialize a new mint for SPL/T22/c-token.
|
|
@@ -1885,7 +2187,19 @@ declare function createWrapInstruction(source: PublicKey, destination: PublicKey
|
|
|
1885
2187
|
*
|
|
1886
2188
|
* @returns Object with mint address and transaction signature
|
|
1887
2189
|
*/
|
|
1888
|
-
declare function createMintInterface(
|
|
2190
|
+
declare function createMintInterface(
|
|
2191
|
+
rpc: Rpc,
|
|
2192
|
+
payer: Signer,
|
|
2193
|
+
mintAuthority: PublicKey | Signer,
|
|
2194
|
+
freezeAuthority: PublicKey | Signer | null,
|
|
2195
|
+
decimals: number,
|
|
2196
|
+
keypair?: Keypair,
|
|
2197
|
+
confirmOptions?: ConfirmOptions,
|
|
2198
|
+
programId?: PublicKey,
|
|
2199
|
+
tokenMetadata?: TokenMetadataInstructionData,
|
|
2200
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2201
|
+
addressTreeInfo?: AddressTreeInfo,
|
|
2202
|
+
): Promise<{
|
|
1889
2203
|
mint: PublicKey;
|
|
1890
2204
|
transactionSignature: TransactionSignature;
|
|
1891
2205
|
}>;
|
|
@@ -1900,7 +2214,14 @@ declare function createMintInterface(rpc: Rpc, payer: Signer, mintAuthority: Pub
|
|
|
1900
2214
|
* @param newMintAuthority New mint authority (or null to revoke)
|
|
1901
2215
|
* @param confirmOptions Optional confirm options
|
|
1902
2216
|
*/
|
|
1903
|
-
declare function updateMintAuthority(
|
|
2217
|
+
declare function updateMintAuthority(
|
|
2218
|
+
rpc: Rpc,
|
|
2219
|
+
payer: Signer,
|
|
2220
|
+
mint: PublicKey,
|
|
2221
|
+
currentMintAuthority: Signer,
|
|
2222
|
+
newMintAuthority: PublicKey | null,
|
|
2223
|
+
confirmOptions?: ConfirmOptions,
|
|
2224
|
+
): Promise<TransactionSignature>;
|
|
1904
2225
|
/**
|
|
1905
2226
|
* Update the freeze authority of a compressed token mint.
|
|
1906
2227
|
*
|
|
@@ -1911,7 +2232,14 @@ declare function updateMintAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, c
|
|
|
1911
2232
|
* @param newFreezeAuthority New freeze authority (or null to revoke)
|
|
1912
2233
|
* @param confirmOptions Optional confirm options
|
|
1913
2234
|
*/
|
|
1914
|
-
declare function updateFreezeAuthority(
|
|
2235
|
+
declare function updateFreezeAuthority(
|
|
2236
|
+
rpc: Rpc,
|
|
2237
|
+
payer: Signer,
|
|
2238
|
+
mint: PublicKey,
|
|
2239
|
+
currentFreezeAuthority: Signer,
|
|
2240
|
+
newFreezeAuthority: PublicKey | null,
|
|
2241
|
+
confirmOptions?: ConfirmOptions,
|
|
2242
|
+
): Promise<TransactionSignature>;
|
|
1915
2243
|
|
|
1916
2244
|
/**
|
|
1917
2245
|
* Update a metadata field on a compressed token mint.
|
|
@@ -1926,7 +2254,17 @@ declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey,
|
|
|
1926
2254
|
* @param extensionIndex Extension index (default: 0)
|
|
1927
2255
|
* @param confirmOptions Optional confirm options
|
|
1928
2256
|
*/
|
|
1929
|
-
declare function updateMetadataField(
|
|
2257
|
+
declare function updateMetadataField(
|
|
2258
|
+
rpc: Rpc,
|
|
2259
|
+
payer: Signer,
|
|
2260
|
+
mint: PublicKey,
|
|
2261
|
+
authority: Signer,
|
|
2262
|
+
fieldType: 'name' | 'symbol' | 'uri' | 'custom',
|
|
2263
|
+
value: string,
|
|
2264
|
+
customKey?: string,
|
|
2265
|
+
extensionIndex?: number,
|
|
2266
|
+
confirmOptions?: ConfirmOptions,
|
|
2267
|
+
): Promise<TransactionSignature>;
|
|
1930
2268
|
/**
|
|
1931
2269
|
* Update the metadata authority of a compressed token mint.
|
|
1932
2270
|
*
|
|
@@ -1938,7 +2276,15 @@ declare function updateMetadataField(rpc: Rpc, payer: Signer, mint: PublicKey, a
|
|
|
1938
2276
|
* @param extensionIndex Extension index (default: 0)
|
|
1939
2277
|
* @param confirmOptions Optional confirm options
|
|
1940
2278
|
*/
|
|
1941
|
-
declare function updateMetadataAuthority(
|
|
2279
|
+
declare function updateMetadataAuthority(
|
|
2280
|
+
rpc: Rpc,
|
|
2281
|
+
payer: Signer,
|
|
2282
|
+
mint: PublicKey,
|
|
2283
|
+
currentAuthority: Signer,
|
|
2284
|
+
newAuthority: PublicKey,
|
|
2285
|
+
extensionIndex?: number,
|
|
2286
|
+
confirmOptions?: ConfirmOptions,
|
|
2287
|
+
): Promise<TransactionSignature>;
|
|
1942
2288
|
/**
|
|
1943
2289
|
* Remove a metadata key from a compressed token mint.
|
|
1944
2290
|
*
|
|
@@ -1951,7 +2297,16 @@ declare function updateMetadataAuthority(rpc: Rpc, payer: Signer, mint: PublicKe
|
|
|
1951
2297
|
* @param extensionIndex Extension index (default: 0)
|
|
1952
2298
|
* @param confirmOptions Optional confirm options
|
|
1953
2299
|
*/
|
|
1954
|
-
declare function removeMetadataKey(
|
|
2300
|
+
declare function removeMetadataKey(
|
|
2301
|
+
rpc: Rpc,
|
|
2302
|
+
payer: Signer,
|
|
2303
|
+
mint: PublicKey,
|
|
2304
|
+
authority: Signer,
|
|
2305
|
+
key: string,
|
|
2306
|
+
idempotent?: boolean,
|
|
2307
|
+
extensionIndex?: number,
|
|
2308
|
+
confirmOptions?: ConfirmOptions,
|
|
2309
|
+
): Promise<TransactionSignature>;
|
|
1955
2310
|
|
|
1956
2311
|
/**
|
|
1957
2312
|
* Create an associated token account for SPL/T22/c-token. Defaults to c-token
|
|
@@ -1970,7 +2325,17 @@ declare function removeMetadataKey(rpc: Rpc, payer: Signer, mint: PublicKey, aut
|
|
|
1970
2325
|
* @param ctokenConfig Optional rent config
|
|
1971
2326
|
* @returns Address of the new associated token account
|
|
1972
2327
|
*/
|
|
1973
|
-
declare function createAtaInterface(
|
|
2328
|
+
declare function createAtaInterface(
|
|
2329
|
+
rpc: Rpc,
|
|
2330
|
+
payer: Signer,
|
|
2331
|
+
mint: PublicKey,
|
|
2332
|
+
owner: PublicKey,
|
|
2333
|
+
allowOwnerOffCurve?: boolean,
|
|
2334
|
+
confirmOptions?: ConfirmOptions,
|
|
2335
|
+
programId?: PublicKey,
|
|
2336
|
+
associatedTokenProgramId?: PublicKey,
|
|
2337
|
+
ctokenConfig?: CTokenConfig,
|
|
2338
|
+
): Promise<PublicKey>;
|
|
1974
2339
|
/**
|
|
1975
2340
|
* Create an associated token account idempotently for SPL/T22/c-token. Defaults
|
|
1976
2341
|
* to c-token program.
|
|
@@ -1991,9 +2356,28 @@ declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, ow
|
|
|
1991
2356
|
*
|
|
1992
2357
|
* @returns Address of the associated token account
|
|
1993
2358
|
*/
|
|
1994
|
-
declare function createAtaInterfaceIdempotent(
|
|
1995
|
-
|
|
1996
|
-
|
|
2359
|
+
declare function createAtaInterfaceIdempotent(
|
|
2360
|
+
rpc: Rpc,
|
|
2361
|
+
payer: Signer,
|
|
2362
|
+
mint: PublicKey,
|
|
2363
|
+
owner: PublicKey,
|
|
2364
|
+
allowOwnerOffCurve?: boolean,
|
|
2365
|
+
confirmOptions?: ConfirmOptions,
|
|
2366
|
+
programId?: PublicKey,
|
|
2367
|
+
associatedTokenProgramId?: PublicKey,
|
|
2368
|
+
ctokenConfig?: CTokenConfig,
|
|
2369
|
+
): Promise<PublicKey>;
|
|
2370
|
+
|
|
2371
|
+
declare function mintTo$1(
|
|
2372
|
+
rpc: Rpc,
|
|
2373
|
+
payer: Signer,
|
|
2374
|
+
mint: PublicKey,
|
|
2375
|
+
recipientAccount: PublicKey,
|
|
2376
|
+
authority: Signer,
|
|
2377
|
+
amount: number | bigint,
|
|
2378
|
+
outputQueue?: PublicKey,
|
|
2379
|
+
confirmOptions?: ConfirmOptions,
|
|
2380
|
+
): Promise<TransactionSignature>;
|
|
1997
2381
|
|
|
1998
2382
|
/**
|
|
1999
2383
|
* Mint compressed tokens directly to compressed accounts.
|
|
@@ -2007,10 +2391,19 @@ declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, recipientAcc
|
|
|
2007
2391
|
* @param tokenAccountVersion Token account version (default: 3)
|
|
2008
2392
|
* @param confirmOptions Optional confirm options
|
|
2009
2393
|
*/
|
|
2010
|
-
declare function mintToCompressed(
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2394
|
+
declare function mintToCompressed(
|
|
2395
|
+
rpc: Rpc,
|
|
2396
|
+
payer: Signer,
|
|
2397
|
+
mint: PublicKey,
|
|
2398
|
+
authority: Signer,
|
|
2399
|
+
recipients: Array<{
|
|
2400
|
+
recipient: PublicKey;
|
|
2401
|
+
amount: number | bigint;
|
|
2402
|
+
}>,
|
|
2403
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2404
|
+
tokenAccountVersion?: number,
|
|
2405
|
+
confirmOptions?: ConfirmOptions,
|
|
2406
|
+
): Promise<TransactionSignature>;
|
|
2014
2407
|
|
|
2015
2408
|
/**
|
|
2016
2409
|
* Mint tokens to a decompressed/onchain token account.
|
|
@@ -2031,7 +2424,17 @@ declare function mintToCompressed(rpc: Rpc, payer: Signer, mint: PublicKey, auth
|
|
|
2031
2424
|
*
|
|
2032
2425
|
* @returns Transaction signature
|
|
2033
2426
|
*/
|
|
2034
|
-
declare function mintToInterface(
|
|
2427
|
+
declare function mintToInterface(
|
|
2428
|
+
rpc: Rpc,
|
|
2429
|
+
payer: Signer,
|
|
2430
|
+
mint: PublicKey,
|
|
2431
|
+
destination: PublicKey,
|
|
2432
|
+
authority: Signer | PublicKey,
|
|
2433
|
+
amount: number | bigint,
|
|
2434
|
+
multiSigners?: Signer[],
|
|
2435
|
+
confirmOptions?: ConfirmOptions,
|
|
2436
|
+
programId?: PublicKey,
|
|
2437
|
+
): Promise<TransactionSignature>;
|
|
2035
2438
|
|
|
2036
2439
|
/**
|
|
2037
2440
|
* Retrieve the associated token account, or create it if it doesn't exist.
|
|
@@ -2056,7 +2459,17 @@ declare function mintToInterface(rpc: Rpc, payer: Signer, mint: PublicKey, desti
|
|
|
2056
2459
|
*
|
|
2057
2460
|
* @returns AccountInterface with aggregated balance and source breakdown
|
|
2058
2461
|
*/
|
|
2059
|
-
declare function getOrCreateAtaInterface(
|
|
2462
|
+
declare function getOrCreateAtaInterface(
|
|
2463
|
+
rpc: Rpc,
|
|
2464
|
+
payer: Signer,
|
|
2465
|
+
mint: PublicKey,
|
|
2466
|
+
owner: PublicKey | Signer,
|
|
2467
|
+
allowOwnerOffCurve?: boolean,
|
|
2468
|
+
commitment?: Commitment,
|
|
2469
|
+
confirmOptions?: ConfirmOptions,
|
|
2470
|
+
programId?: PublicKey,
|
|
2471
|
+
associatedTokenProgramId?: PublicKey,
|
|
2472
|
+
): Promise<AccountInterface>;
|
|
2060
2473
|
|
|
2061
2474
|
/**
|
|
2062
2475
|
* Decompress compressed (cold) tokens to an on-chain token account.
|
|
@@ -2074,7 +2487,17 @@ declare function getOrCreateAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKe
|
|
|
2074
2487
|
* @param confirmOptions Confirm options
|
|
2075
2488
|
* @returns Transaction signature, null if nothing to load.
|
|
2076
2489
|
*/
|
|
2077
|
-
declare function decompressInterface(
|
|
2490
|
+
declare function decompressInterface(
|
|
2491
|
+
rpc: Rpc,
|
|
2492
|
+
payer: Signer,
|
|
2493
|
+
owner: Signer,
|
|
2494
|
+
mint: PublicKey,
|
|
2495
|
+
amount?: number | bigint | BN,
|
|
2496
|
+
destinationAta?: PublicKey,
|
|
2497
|
+
destinationOwner?: PublicKey,
|
|
2498
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2499
|
+
confirmOptions?: ConfirmOptions,
|
|
2500
|
+
): Promise<TransactionSignature | null>;
|
|
2078
2501
|
|
|
2079
2502
|
/**
|
|
2080
2503
|
* Wrap tokens from an SPL/T22 account to a c-token account.
|
|
@@ -2108,7 +2531,17 @@ declare function decompressInterface(rpc: Rpc, payer: Signer, owner: Signer, min
|
|
|
2108
2531
|
*
|
|
2109
2532
|
* @returns Transaction signature
|
|
2110
2533
|
*/
|
|
2111
|
-
declare function wrap(
|
|
2534
|
+
declare function wrap(
|
|
2535
|
+
rpc: Rpc,
|
|
2536
|
+
payer: Signer,
|
|
2537
|
+
source: PublicKey,
|
|
2538
|
+
destination: PublicKey,
|
|
2539
|
+
owner: Signer,
|
|
2540
|
+
mint: PublicKey,
|
|
2541
|
+
amount: bigint,
|
|
2542
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2543
|
+
confirmOptions?: ConfirmOptions,
|
|
2544
|
+
): Promise<TransactionSignature>;
|
|
2112
2545
|
|
|
2113
2546
|
/**
|
|
2114
2547
|
* Create instructions to load an ATA from its AccountInterface.
|
|
@@ -2126,7 +2559,14 @@ declare function wrap(rpc: Rpc, payer: Signer, source: PublicKey, destination: P
|
|
|
2126
2559
|
* @param targetAta Target ATA address (used for type detection in standard mode)
|
|
2127
2560
|
* @returns Array of instructions (empty if nothing to load)
|
|
2128
2561
|
*/
|
|
2129
|
-
declare function createLoadAtaInstructionsFromInterface(
|
|
2562
|
+
declare function createLoadAtaInstructionsFromInterface(
|
|
2563
|
+
rpc: Rpc,
|
|
2564
|
+
payer: PublicKey,
|
|
2565
|
+
ata: AccountInterface,
|
|
2566
|
+
options?: InterfaceOptions,
|
|
2567
|
+
wrap?: boolean,
|
|
2568
|
+
targetAta?: PublicKey,
|
|
2569
|
+
): Promise<TransactionInstruction[]>;
|
|
2130
2570
|
|
|
2131
2571
|
/**
|
|
2132
2572
|
* Derive the canonical associated token address for any of SPL/T22/c-token.
|
|
@@ -2141,7 +2581,13 @@ declare function createLoadAtaInstructionsFromInterface(rpc: Rpc, payer: PublicK
|
|
|
2141
2581
|
* auto-detected.
|
|
2142
2582
|
* @returns Associated token address.
|
|
2143
2583
|
*/
|
|
2144
|
-
declare function getAssociatedTokenAddressInterface(
|
|
2584
|
+
declare function getAssociatedTokenAddressInterface(
|
|
2585
|
+
mint: PublicKey,
|
|
2586
|
+
owner: PublicKey,
|
|
2587
|
+
allowOwnerOffCurve?: boolean,
|
|
2588
|
+
programId?: PublicKey,
|
|
2589
|
+
associatedTokenProgramId?: PublicKey,
|
|
2590
|
+
): PublicKey;
|
|
2145
2591
|
|
|
2146
2592
|
/**
|
|
2147
2593
|
* Input for creating off-chain metadata JSON.
|
|
@@ -2199,7 +2645,9 @@ interface OffChainTokenMetadataJson {
|
|
|
2199
2645
|
* // Then use uri with createMint
|
|
2200
2646
|
* await createMint(rpc, payer, { ...params, uri });
|
|
2201
2647
|
*/
|
|
2202
|
-
declare function toOffChainMetadataJson(
|
|
2648
|
+
declare function toOffChainMetadataJson(
|
|
2649
|
+
meta: OffChainTokenMetadata,
|
|
2650
|
+
): OffChainTokenMetadataJson;
|
|
2203
2651
|
|
|
2204
2652
|
/**
|
|
2205
2653
|
* Approve a delegate to spend tokens
|
|
@@ -2214,7 +2662,15 @@ declare function toOffChainMetadataJson(meta: OffChainTokenMetadata): OffChainTo
|
|
|
2214
2662
|
*
|
|
2215
2663
|
* @return Signature of the confirmed transaction
|
|
2216
2664
|
*/
|
|
2217
|
-
declare function approve(
|
|
2665
|
+
declare function approve(
|
|
2666
|
+
rpc: Rpc,
|
|
2667
|
+
payer: Signer,
|
|
2668
|
+
mint: PublicKey,
|
|
2669
|
+
amount: number | BN,
|
|
2670
|
+
owner: Signer,
|
|
2671
|
+
delegate: PublicKey,
|
|
2672
|
+
confirmOptions?: ConfirmOptions,
|
|
2673
|
+
): Promise<TransactionSignature>;
|
|
2218
2674
|
|
|
2219
2675
|
/**
|
|
2220
2676
|
* Mint compressed tokens to a solana address from an external mint authority
|
|
@@ -2233,7 +2689,17 @@ declare function approve(rpc: Rpc, payer: Signer, mint: PublicKey, amount: numbe
|
|
|
2233
2689
|
*
|
|
2234
2690
|
* @return Signature of the confirmed transaction
|
|
2235
2691
|
*/
|
|
2236
|
-
declare function approveAndMintTo(
|
|
2692
|
+
declare function approveAndMintTo(
|
|
2693
|
+
rpc: Rpc,
|
|
2694
|
+
payer: Signer,
|
|
2695
|
+
mint: PublicKey,
|
|
2696
|
+
toPubkey: PublicKey,
|
|
2697
|
+
authority: Signer,
|
|
2698
|
+
amount: number | BN,
|
|
2699
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2700
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2701
|
+
confirmOptions?: ConfirmOptions,
|
|
2702
|
+
): Promise<TransactionSignature>;
|
|
2237
2703
|
|
|
2238
2704
|
/**
|
|
2239
2705
|
* Compress SPL tokens
|
|
@@ -2253,7 +2719,18 @@ declare function approveAndMintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPu
|
|
|
2253
2719
|
*
|
|
2254
2720
|
* @return Signature of the confirmed transaction
|
|
2255
2721
|
*/
|
|
2256
|
-
declare function compress(
|
|
2722
|
+
declare function compress(
|
|
2723
|
+
rpc: Rpc,
|
|
2724
|
+
payer: Signer,
|
|
2725
|
+
mint: PublicKey,
|
|
2726
|
+
amount: number | BN | number[] | BN[],
|
|
2727
|
+
owner: Signer,
|
|
2728
|
+
sourceTokenAccount: PublicKey,
|
|
2729
|
+
toAddress: PublicKey | Array<PublicKey>,
|
|
2730
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2731
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2732
|
+
confirmOptions?: ConfirmOptions,
|
|
2733
|
+
): Promise<TransactionSignature>;
|
|
2257
2734
|
|
|
2258
2735
|
/**
|
|
2259
2736
|
* Compress SPL tokens into compressed token format
|
|
@@ -2273,7 +2750,17 @@ declare function compress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: numb
|
|
|
2273
2750
|
*
|
|
2274
2751
|
* @return Signature of the confirmed transaction
|
|
2275
2752
|
*/
|
|
2276
|
-
declare function compressSplTokenAccount(
|
|
2753
|
+
declare function compressSplTokenAccount(
|
|
2754
|
+
rpc: Rpc,
|
|
2755
|
+
payer: Signer,
|
|
2756
|
+
mint: PublicKey,
|
|
2757
|
+
owner: Signer,
|
|
2758
|
+
tokenAccount: PublicKey,
|
|
2759
|
+
remainingAmount?: BN,
|
|
2760
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2761
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2762
|
+
confirmOptions?: ConfirmOptions,
|
|
2763
|
+
): Promise<TransactionSignature>;
|
|
2277
2764
|
|
|
2278
2765
|
/**
|
|
2279
2766
|
* Create and initialize a new SPL token mint
|
|
@@ -2293,7 +2780,16 @@ declare function compressSplTokenAccount(rpc: Rpc, payer: Signer, mint: PublicKe
|
|
|
2293
2780
|
*
|
|
2294
2781
|
* @return Object with mint address and transaction signature
|
|
2295
2782
|
*/
|
|
2296
|
-
declare function createMint(
|
|
2783
|
+
declare function createMint(
|
|
2784
|
+
rpc: Rpc,
|
|
2785
|
+
payer: Signer,
|
|
2786
|
+
mintAuthority: PublicKey | Signer,
|
|
2787
|
+
decimals: number,
|
|
2788
|
+
keypair?: Keypair,
|
|
2789
|
+
confirmOptions?: ConfirmOptions,
|
|
2790
|
+
tokenProgramId?: PublicKey | boolean,
|
|
2791
|
+
freezeAuthority?: PublicKey | Signer | null,
|
|
2792
|
+
): Promise<{
|
|
2297
2793
|
mint: PublicKey;
|
|
2298
2794
|
transactionSignature: TransactionSignature;
|
|
2299
2795
|
}>;
|
|
@@ -2310,7 +2806,13 @@ declare function createMint(rpc: Rpc, payer: Signer, mintAuthority: PublicKey |
|
|
|
2310
2806
|
*
|
|
2311
2807
|
* @return transaction signature
|
|
2312
2808
|
*/
|
|
2313
|
-
declare function createSplInterface(
|
|
2809
|
+
declare function createSplInterface(
|
|
2810
|
+
rpc: Rpc,
|
|
2811
|
+
payer: Signer,
|
|
2812
|
+
mint: PublicKey,
|
|
2813
|
+
confirmOptions?: ConfirmOptions,
|
|
2814
|
+
tokenProgramId?: PublicKey,
|
|
2815
|
+
): Promise<TransactionSignature>;
|
|
2314
2816
|
/**
|
|
2315
2817
|
* @deprecated Use {@link createSplInterface} instead.
|
|
2316
2818
|
*/
|
|
@@ -2329,7 +2831,14 @@ declare const createTokenPool: typeof createSplInterface;
|
|
|
2329
2831
|
*
|
|
2330
2832
|
* @return transaction signature
|
|
2331
2833
|
*/
|
|
2332
|
-
declare function addSplInterfaces(
|
|
2834
|
+
declare function addSplInterfaces(
|
|
2835
|
+
rpc: Rpc,
|
|
2836
|
+
payer: Signer,
|
|
2837
|
+
mint: PublicKey,
|
|
2838
|
+
numMaxAdditionalPools: number,
|
|
2839
|
+
confirmOptions?: ConfirmOptions,
|
|
2840
|
+
tokenProgramId?: PublicKey,
|
|
2841
|
+
): Promise<string>;
|
|
2333
2842
|
/**
|
|
2334
2843
|
* @deprecated Use {@link addSplInterfaces} instead.
|
|
2335
2844
|
*/
|
|
@@ -2349,7 +2858,13 @@ declare const addTokenPools: typeof addSplInterfaces;
|
|
|
2349
2858
|
* @return Object with transaction signatures and the address of the created
|
|
2350
2859
|
* lookup table
|
|
2351
2860
|
*/
|
|
2352
|
-
declare function createTokenProgramLookupTable(
|
|
2861
|
+
declare function createTokenProgramLookupTable(
|
|
2862
|
+
rpc: Rpc,
|
|
2863
|
+
payer: Signer,
|
|
2864
|
+
authority: Signer,
|
|
2865
|
+
mints?: PublicKey[],
|
|
2866
|
+
additionalAccounts?: PublicKey[],
|
|
2867
|
+
): Promise<{
|
|
2353
2868
|
txIds: TransactionSignature[];
|
|
2354
2869
|
address: PublicKey;
|
|
2355
2870
|
}>;
|
|
@@ -2369,7 +2884,16 @@ declare function createTokenProgramLookupTable(rpc: Rpc, payer: Signer, authorit
|
|
|
2369
2884
|
*
|
|
2370
2885
|
* @return confirmed transaction signature
|
|
2371
2886
|
*/
|
|
2372
|
-
declare function decompress(
|
|
2887
|
+
declare function decompress(
|
|
2888
|
+
rpc: Rpc,
|
|
2889
|
+
payer: Signer,
|
|
2890
|
+
mint: PublicKey,
|
|
2891
|
+
amount: number | BN,
|
|
2892
|
+
owner: Signer,
|
|
2893
|
+
toAddress: PublicKey,
|
|
2894
|
+
splInterfaceInfos?: SplInterfaceInfo[],
|
|
2895
|
+
confirmOptions?: ConfirmOptions,
|
|
2896
|
+
): Promise<TransactionSignature>;
|
|
2373
2897
|
|
|
2374
2898
|
/**
|
|
2375
2899
|
* Merge multiple compressed token accounts for a given mint into fewer
|
|
@@ -2389,7 +2913,13 @@ declare function decompress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: nu
|
|
|
2389
2913
|
*
|
|
2390
2914
|
* @return confirmed transaction signature
|
|
2391
2915
|
*/
|
|
2392
|
-
declare function mergeTokenAccounts(
|
|
2916
|
+
declare function mergeTokenAccounts(
|
|
2917
|
+
rpc: Rpc,
|
|
2918
|
+
payer: Signer,
|
|
2919
|
+
mint: PublicKey,
|
|
2920
|
+
owner: Signer,
|
|
2921
|
+
confirmOptions?: ConfirmOptions,
|
|
2922
|
+
): Promise<TransactionSignature>;
|
|
2393
2923
|
|
|
2394
2924
|
/**
|
|
2395
2925
|
* Mint compressed tokens to a solana address
|
|
@@ -2411,7 +2941,17 @@ declare function mergeTokenAccounts(rpc: Rpc, payer: Signer, mint: PublicKey, ow
|
|
|
2411
2941
|
*
|
|
2412
2942
|
* @return Signature of the confirmed transaction
|
|
2413
2943
|
*/
|
|
2414
|
-
declare function mintTo(
|
|
2944
|
+
declare function mintTo(
|
|
2945
|
+
rpc: Rpc,
|
|
2946
|
+
payer: Signer,
|
|
2947
|
+
mint: PublicKey,
|
|
2948
|
+
toPubkey: PublicKey | PublicKey[],
|
|
2949
|
+
authority: Signer,
|
|
2950
|
+
amount: number | BN | number[] | BN[],
|
|
2951
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2952
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2953
|
+
confirmOptions?: ConfirmOptions,
|
|
2954
|
+
): Promise<TransactionSignature>;
|
|
2415
2955
|
|
|
2416
2956
|
/**
|
|
2417
2957
|
* Revoke one or more delegated token accounts
|
|
@@ -2425,7 +2965,13 @@ declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: Publ
|
|
|
2425
2965
|
*
|
|
2426
2966
|
* @return Signature of the confirmed transaction
|
|
2427
2967
|
*/
|
|
2428
|
-
declare function revoke(
|
|
2968
|
+
declare function revoke(
|
|
2969
|
+
rpc: Rpc,
|
|
2970
|
+
payer: Signer,
|
|
2971
|
+
accounts: ParsedTokenAccount[],
|
|
2972
|
+
owner: Signer,
|
|
2973
|
+
confirmOptions?: ConfirmOptions,
|
|
2974
|
+
): Promise<TransactionSignature>;
|
|
2429
2975
|
|
|
2430
2976
|
/**
|
|
2431
2977
|
* Transfer compressed tokens from one owner to another.
|
|
@@ -2443,7 +2989,15 @@ declare function revoke(rpc: Rpc, payer: Signer, accounts: ParsedTokenAccount[],
|
|
|
2443
2989
|
*
|
|
2444
2990
|
* @return confirmed transaction signature
|
|
2445
2991
|
*/
|
|
2446
|
-
declare function transfer(
|
|
2992
|
+
declare function transfer(
|
|
2993
|
+
rpc: Rpc,
|
|
2994
|
+
payer: Signer,
|
|
2995
|
+
mint: PublicKey,
|
|
2996
|
+
amount: number | BN,
|
|
2997
|
+
owner: Signer,
|
|
2998
|
+
toAddress: PublicKey,
|
|
2999
|
+
confirmOptions?: ConfirmOptions,
|
|
3000
|
+
): Promise<TransactionSignature>;
|
|
2447
3001
|
|
|
2448
3002
|
/**
|
|
2449
3003
|
* Transfer delegated compressed tokens to another owner
|
|
@@ -2458,7 +3012,15 @@ declare function transfer(rpc: Rpc, payer: Signer, mint: PublicKey, amount: numb
|
|
|
2458
3012
|
*
|
|
2459
3013
|
* @return confirmed transaction signature
|
|
2460
3014
|
*/
|
|
2461
|
-
declare function transferDelegated(
|
|
3015
|
+
declare function transferDelegated(
|
|
3016
|
+
rpc: Rpc,
|
|
3017
|
+
payer: Signer,
|
|
3018
|
+
mint: PublicKey,
|
|
3019
|
+
amount: number | BN,
|
|
3020
|
+
owner: Signer,
|
|
3021
|
+
toAddress: PublicKey,
|
|
3022
|
+
confirmOptions?: ConfirmOptions,
|
|
3023
|
+
): Promise<TransactionSignature>;
|
|
2462
3024
|
|
|
2463
3025
|
/**
|
|
2464
3026
|
* Decompress delegated compressed tokens. Remaining compressed tokens are
|
|
@@ -2476,10 +3038,21 @@ declare function transferDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amo
|
|
|
2476
3038
|
*
|
|
2477
3039
|
* @return Signature of the confirmed transaction
|
|
2478
3040
|
*/
|
|
2479
|
-
declare function decompressDelegated(
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
3041
|
+
declare function decompressDelegated(
|
|
3042
|
+
rpc: Rpc,
|
|
3043
|
+
payer: Signer,
|
|
3044
|
+
mint: PublicKey,
|
|
3045
|
+
amount: number | BN,
|
|
3046
|
+
owner: Signer,
|
|
3047
|
+
toAddress: PublicKey,
|
|
3048
|
+
splInterfaceInfos?: SplInterfaceInfo[],
|
|
3049
|
+
confirmOptions?: ConfirmOptions,
|
|
3050
|
+
): Promise<TransactionSignature>;
|
|
3051
|
+
|
|
3052
|
+
declare const ERROR_NO_ACCOUNTS_FOUND =
|
|
3053
|
+
'Could not find accounts to select for transfer.';
|
|
3054
|
+
declare const ERROR_MIXED_TREE_TYPES =
|
|
3055
|
+
'Cannot select accounts from different tree types (V1/V2) in the same batch. Filter accounts by tree type first.';
|
|
2483
3056
|
/**
|
|
2484
3057
|
* Options for input account selection
|
|
2485
3058
|
*/
|
|
@@ -2494,7 +3067,9 @@ interface SelectInputAccountsOptions {
|
|
|
2494
3067
|
/**
|
|
2495
3068
|
* Groups accounts by tree type for separate processing
|
|
2496
3069
|
*/
|
|
2497
|
-
declare function groupAccountsByTreeType(
|
|
3070
|
+
declare function groupAccountsByTreeType(
|
|
3071
|
+
accounts: ParsedTokenAccount[],
|
|
3072
|
+
): Map<TreeType, ParsedTokenAccount[]>;
|
|
2498
3073
|
/**
|
|
2499
3074
|
* Result of selectAccountsByPreferredTreeType
|
|
2500
3075
|
*/
|
|
@@ -2519,7 +3094,10 @@ interface SelectedAccountsResult {
|
|
|
2519
3094
|
* @param requiredAmount Minimum amount needed (optional - if not provided, returns all from preferred type)
|
|
2520
3095
|
* @returns Selected accounts from a single tree type
|
|
2521
3096
|
*/
|
|
2522
|
-
declare function selectAccountsByPreferredTreeType(
|
|
3097
|
+
declare function selectAccountsByPreferredTreeType(
|
|
3098
|
+
accounts: ParsedTokenAccount[],
|
|
3099
|
+
requiredAmount?: BN,
|
|
3100
|
+
): SelectedAccountsResult;
|
|
2523
3101
|
/**
|
|
2524
3102
|
* Selects token accounts for approval, first trying to find an exact match, then falling back to minimum selection.
|
|
2525
3103
|
*
|
|
@@ -2538,11 +3116,16 @@ declare function selectAccountsByPreferredTreeType(accounts: ParsedTokenAccount[
|
|
|
2538
3116
|
* - totalLamports: Total lamports from selected accounts.
|
|
2539
3117
|
* - maxPossibleAmount: Max approvable amount given maxInputs.
|
|
2540
3118
|
*/
|
|
2541
|
-
declare function selectTokenAccountsForApprove(
|
|
3119
|
+
declare function selectTokenAccountsForApprove(
|
|
3120
|
+
accounts: ParsedTokenAccount[],
|
|
3121
|
+
approveAmount: BN,
|
|
3122
|
+
maxInputs?: number,
|
|
3123
|
+
options?: SelectInputAccountsOptions,
|
|
3124
|
+
): [
|
|
2542
3125
|
selectedAccounts: ParsedTokenAccount[],
|
|
2543
3126
|
total: BN,
|
|
2544
3127
|
totalLamports: BN | null,
|
|
2545
|
-
maxPossibleAmount: BN
|
|
3128
|
+
maxPossibleAmount: BN,
|
|
2546
3129
|
];
|
|
2547
3130
|
/**
|
|
2548
3131
|
* Selects the minimum number of compressed token accounts required for a
|
|
@@ -2556,7 +3139,12 @@ declare function selectTokenAccountsForApprove(accounts: ParsedTokenAccount[], a
|
|
|
2556
3139
|
*
|
|
2557
3140
|
* @returns Returns selected accounts and their totals.
|
|
2558
3141
|
*/
|
|
2559
|
-
declare function selectMinCompressedTokenAccountsForDecompression(
|
|
3142
|
+
declare function selectMinCompressedTokenAccountsForDecompression(
|
|
3143
|
+
accounts: ParsedTokenAccount[],
|
|
3144
|
+
amount: BN,
|
|
3145
|
+
maxInputs?: number,
|
|
3146
|
+
options?: SelectInputAccountsOptions,
|
|
3147
|
+
): {
|
|
2560
3148
|
selectedAccounts: ParsedTokenAccount[];
|
|
2561
3149
|
total: BN;
|
|
2562
3150
|
totalLamports: BN | null;
|
|
@@ -2580,22 +3168,31 @@ declare function selectMinCompressedTokenAccountsForDecompression(accounts: Pars
|
|
|
2580
3168
|
* maxPossibleAmount: BN
|
|
2581
3169
|
* ]
|
|
2582
3170
|
*/
|
|
2583
|
-
declare function selectMinCompressedTokenAccountsForTransfer(
|
|
3171
|
+
declare function selectMinCompressedTokenAccountsForTransfer(
|
|
3172
|
+
accounts: ParsedTokenAccount[],
|
|
3173
|
+
transferAmount: BN,
|
|
3174
|
+
maxInputs?: number,
|
|
3175
|
+
options?: SelectInputAccountsOptions,
|
|
3176
|
+
): [
|
|
2584
3177
|
selectedAccounts: ParsedTokenAccount[],
|
|
2585
3178
|
total: BN,
|
|
2586
3179
|
totalLamports: BN | null,
|
|
2587
|
-
maxPossibleAmount: BN
|
|
3180
|
+
maxPossibleAmount: BN,
|
|
2588
3181
|
];
|
|
2589
3182
|
/**
|
|
2590
3183
|
* Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
|
|
2591
3184
|
* returns partial amounts if insufficient accounts are found instead of
|
|
2592
3185
|
* throwing an error.
|
|
2593
3186
|
*/
|
|
2594
|
-
declare function selectMinCompressedTokenAccountsForTransferOrPartial(
|
|
3187
|
+
declare function selectMinCompressedTokenAccountsForTransferOrPartial(
|
|
3188
|
+
accounts: ParsedTokenAccount[],
|
|
3189
|
+
transferAmount: BN,
|
|
3190
|
+
maxInputs?: number,
|
|
3191
|
+
): [
|
|
2595
3192
|
selectedAccounts: ParsedTokenAccount[],
|
|
2596
3193
|
total: BN,
|
|
2597
3194
|
totalLamports: BN | null,
|
|
2598
|
-
maxPossibleAmount: BN
|
|
3195
|
+
maxPossibleAmount: BN,
|
|
2599
3196
|
];
|
|
2600
3197
|
/**
|
|
2601
3198
|
* Selects compressed token accounts for a transfer, ensuring one extra account
|
|
@@ -2638,22 +3235,31 @@ declare function selectMinCompressedTokenAccountsForTransferOrPartial(accounts:
|
|
|
2638
3235
|
* console.log(totalLamports!.toString()); // '15'
|
|
2639
3236
|
* console.log(maxPossibleAmount.toString()); // '150'
|
|
2640
3237
|
*/
|
|
2641
|
-
declare function selectSmartCompressedTokenAccountsForTransfer(
|
|
3238
|
+
declare function selectSmartCompressedTokenAccountsForTransfer(
|
|
3239
|
+
accounts: ParsedTokenAccount[],
|
|
3240
|
+
transferAmount: BN,
|
|
3241
|
+
maxInputs?: number,
|
|
3242
|
+
options?: SelectInputAccountsOptions,
|
|
3243
|
+
): [
|
|
2642
3244
|
selectedAccounts: ParsedTokenAccount[],
|
|
2643
3245
|
total: BN,
|
|
2644
3246
|
totalLamports: BN | null,
|
|
2645
|
-
maxPossibleAmount: BN
|
|
3247
|
+
maxPossibleAmount: BN,
|
|
2646
3248
|
];
|
|
2647
3249
|
/**
|
|
2648
3250
|
* Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
|
|
2649
3251
|
* returns partial amounts if insufficient accounts are found instead of
|
|
2650
3252
|
* throwing an error.
|
|
2651
3253
|
*/
|
|
2652
|
-
declare function selectSmartCompressedTokenAccountsForTransferOrPartial(
|
|
3254
|
+
declare function selectSmartCompressedTokenAccountsForTransferOrPartial(
|
|
3255
|
+
accounts: ParsedTokenAccount[],
|
|
3256
|
+
transferAmount: BN,
|
|
3257
|
+
maxInputs?: number,
|
|
3258
|
+
): [
|
|
2653
3259
|
selectedAccounts: ParsedTokenAccount[],
|
|
2654
3260
|
total: BN,
|
|
2655
3261
|
totalLamports: BN | null,
|
|
2656
|
-
maxPossibleAmount: BN
|
|
3262
|
+
maxPossibleAmount: BN,
|
|
2657
3263
|
];
|
|
2658
3264
|
|
|
2659
3265
|
type TokenTransferOutputData = {
|
|
@@ -2726,7 +3332,9 @@ type CompressSplTokenAccountInstructionData = {
|
|
|
2726
3332
|
remainingAmount: BN | null;
|
|
2727
3333
|
cpiContext: CompressedCpiContext | null;
|
|
2728
3334
|
};
|
|
2729
|
-
declare function isSingleSplInterfaceInfo(
|
|
3335
|
+
declare function isSingleSplInterfaceInfo(
|
|
3336
|
+
splInterfaceInfos: SplInterfaceInfo | SplInterfaceInfo[],
|
|
3337
|
+
): splInterfaceInfos is SplInterfaceInfo;
|
|
2730
3338
|
/**
|
|
2731
3339
|
* @deprecated Use {@link isSingleSplInterfaceInfo} instead.
|
|
2732
3340
|
*/
|
|
@@ -2837,7 +3445,9 @@ type PackCompressedTokenAccountsParams = {
|
|
|
2837
3445
|
/**
|
|
2838
3446
|
* Packs Compressed Token Accounts.
|
|
2839
3447
|
*/
|
|
2840
|
-
declare function packCompressedTokenAccounts(
|
|
3448
|
+
declare function packCompressedTokenAccounts(
|
|
3449
|
+
params: PackCompressedTokenAccountsParams,
|
|
3450
|
+
): {
|
|
2841
3451
|
inputTokenDataWithContext: InputTokenDataWithContext$1[];
|
|
2842
3452
|
remainingAccountMetas: AccountMeta[];
|
|
2843
3453
|
packedOutputTokenData: PackedTokenTransferOutputData[];
|
|
@@ -2850,7 +3460,10 @@ declare function packCompressedTokenAccounts(params: PackCompressedTokenAccounts
|
|
|
2850
3460
|
* @param mint The mint of the token pool
|
|
2851
3461
|
* @returns True if all input accounts belong to the same mint
|
|
2852
3462
|
*/
|
|
2853
|
-
declare function checkMint(
|
|
3463
|
+
declare function checkMint(
|
|
3464
|
+
compressedTokenAccounts: ParsedTokenAccount[],
|
|
3465
|
+
mint: PublicKey,
|
|
3466
|
+
): boolean;
|
|
2854
3467
|
|
|
2855
3468
|
type LightCompressedToken = {
|
|
2856
3469
|
version: '1.2.0';
|
|
@@ -2862,7 +3475,7 @@ type LightCompressedToken = {
|
|
|
2862
3475
|
'This instruction creates a token pool for a given mint. Every spl mint',
|
|
2863
3476
|
'can have one token pool. When a token is compressed the tokens are',
|
|
2864
3477
|
'transferrred to the token pool, and their compressed equivalent is',
|
|
2865
|
-
'minted into a Merkle tree.'
|
|
3478
|
+
'minted into a Merkle tree.',
|
|
2866
3479
|
];
|
|
2867
3480
|
accounts: [
|
|
2868
3481
|
{
|
|
@@ -2895,7 +3508,7 @@ type LightCompressedToken = {
|
|
|
2895
3508
|
name: 'cpiAuthorityPda';
|
|
2896
3509
|
isMut: false;
|
|
2897
3510
|
isSigner: false;
|
|
2898
|
-
}
|
|
3511
|
+
},
|
|
2899
3512
|
];
|
|
2900
3513
|
args: [];
|
|
2901
3514
|
},
|
|
@@ -2903,7 +3516,7 @@ type LightCompressedToken = {
|
|
|
2903
3516
|
name: 'addTokenPool';
|
|
2904
3517
|
docs: [
|
|
2905
3518
|
'This instruction creates an additional token pool for a given mint.',
|
|
2906
|
-
'The maximum number of token pools per mint is 5.'
|
|
3519
|
+
'The maximum number of token pools per mint is 5.',
|
|
2907
3520
|
];
|
|
2908
3521
|
accounts: [
|
|
2909
3522
|
{
|
|
@@ -2941,13 +3554,13 @@ type LightCompressedToken = {
|
|
|
2941
3554
|
name: 'cpiAuthorityPda';
|
|
2942
3555
|
isMut: false;
|
|
2943
3556
|
isSigner: false;
|
|
2944
|
-
}
|
|
3557
|
+
},
|
|
2945
3558
|
];
|
|
2946
3559
|
args: [
|
|
2947
3560
|
{
|
|
2948
3561
|
name: 'tokenPoolIndex';
|
|
2949
3562
|
type: 'u8';
|
|
2950
|
-
}
|
|
3563
|
+
},
|
|
2951
3564
|
];
|
|
2952
3565
|
},
|
|
2953
3566
|
{
|
|
@@ -2959,7 +3572,7 @@ type LightCompressedToken = {
|
|
|
2959
3572
|
'every amount and pubkey input pair. A constant amount of lamports can be',
|
|
2960
3573
|
'transferred to each output account to enable. A use case to add lamports',
|
|
2961
3574
|
'to a compressed token account is to prevent spam. This is the only way',
|
|
2962
|
-
'to add lamports to a compressed token account.'
|
|
3575
|
+
'to add lamports to a compressed token account.',
|
|
2963
3576
|
];
|
|
2964
3577
|
accounts: [
|
|
2965
3578
|
{
|
|
@@ -3039,7 +3652,7 @@ type LightCompressedToken = {
|
|
|
3039
3652
|
isMut: true;
|
|
3040
3653
|
isSigner: false;
|
|
3041
3654
|
isOptional: true;
|
|
3042
|
-
}
|
|
3655
|
+
},
|
|
3043
3656
|
];
|
|
3044
3657
|
args: [
|
|
3045
3658
|
{
|
|
@@ -3059,7 +3672,7 @@ type LightCompressedToken = {
|
|
|
3059
3672
|
type: {
|
|
3060
3673
|
option: 'u64';
|
|
3061
3674
|
};
|
|
3062
|
-
}
|
|
3675
|
+
},
|
|
3063
3676
|
];
|
|
3064
3677
|
},
|
|
3065
3678
|
{
|
|
@@ -3067,7 +3680,7 @@ type LightCompressedToken = {
|
|
|
3067
3680
|
docs: [
|
|
3068
3681
|
'Compresses the balance of an spl token account sub an optional remaining',
|
|
3069
3682
|
'amount. This instruction does not close the spl token account. To close',
|
|
3070
|
-
'the account bundle a close spl account instruction in your transaction.'
|
|
3683
|
+
'the account bundle a close spl account instruction in your transaction.',
|
|
3071
3684
|
];
|
|
3072
3685
|
accounts: [
|
|
3073
3686
|
{
|
|
@@ -3083,7 +3696,7 @@ type LightCompressedToken = {
|
|
|
3083
3696
|
docs: [
|
|
3084
3697
|
'Authority is verified through proof since both owner and delegate',
|
|
3085
3698
|
'are included in the token data hash, which is a public input to the',
|
|
3086
|
-
'validity proof.'
|
|
3699
|
+
'validity proof.',
|
|
3087
3700
|
];
|
|
3088
3701
|
},
|
|
3089
3702
|
{
|
|
@@ -3144,7 +3757,7 @@ type LightCompressedToken = {
|
|
|
3144
3757
|
name: 'systemProgram';
|
|
3145
3758
|
isMut: false;
|
|
3146
3759
|
isSigner: false;
|
|
3147
|
-
}
|
|
3760
|
+
},
|
|
3148
3761
|
];
|
|
3149
3762
|
args: [
|
|
3150
3763
|
{
|
|
@@ -3164,7 +3777,7 @@ type LightCompressedToken = {
|
|
|
3164
3777
|
defined: 'CompressedCpiContext';
|
|
3165
3778
|
};
|
|
3166
3779
|
};
|
|
3167
|
-
}
|
|
3780
|
+
},
|
|
3168
3781
|
];
|
|
3169
3782
|
},
|
|
3170
3783
|
{
|
|
@@ -3177,7 +3790,7 @@ type LightCompressedToken = {
|
|
|
3177
3790
|
'accounts specify less lamports than inputs the remaining lamports are',
|
|
3178
3791
|
'transferred to an output compressed account. Signer must be owner or',
|
|
3179
3792
|
'delegate. If a delegated token account is transferred the delegate is',
|
|
3180
|
-
'not preserved.'
|
|
3793
|
+
'not preserved.',
|
|
3181
3794
|
];
|
|
3182
3795
|
accounts: [
|
|
3183
3796
|
{
|
|
@@ -3193,7 +3806,7 @@ type LightCompressedToken = {
|
|
|
3193
3806
|
docs: [
|
|
3194
3807
|
'Authority is verified through proof since both owner and delegate',
|
|
3195
3808
|
'are included in the token data hash, which is a public input to the',
|
|
3196
|
-
'validity proof.'
|
|
3809
|
+
'validity proof.',
|
|
3197
3810
|
];
|
|
3198
3811
|
},
|
|
3199
3812
|
{
|
|
@@ -3254,13 +3867,13 @@ type LightCompressedToken = {
|
|
|
3254
3867
|
name: 'systemProgram';
|
|
3255
3868
|
isMut: false;
|
|
3256
3869
|
isSigner: false;
|
|
3257
|
-
}
|
|
3870
|
+
},
|
|
3258
3871
|
];
|
|
3259
3872
|
args: [
|
|
3260
3873
|
{
|
|
3261
3874
|
name: 'inputs';
|
|
3262
3875
|
type: 'bytes';
|
|
3263
|
-
}
|
|
3876
|
+
},
|
|
3264
3877
|
];
|
|
3265
3878
|
},
|
|
3266
3879
|
{
|
|
@@ -3271,7 +3884,7 @@ type LightCompressedToken = {
|
|
|
3271
3884
|
'be called by a delegate.',
|
|
3272
3885
|
'The instruction creates two output accounts:',
|
|
3273
3886
|
'1. one account with delegated amount',
|
|
3274
|
-
'2. one account with remaining(change) amount'
|
|
3887
|
+
'2. one account with remaining(change) amount',
|
|
3275
3888
|
];
|
|
3276
3889
|
accounts: [
|
|
3277
3890
|
{
|
|
@@ -3287,7 +3900,7 @@ type LightCompressedToken = {
|
|
|
3287
3900
|
docs: [
|
|
3288
3901
|
'Authority is verified through proof since both owner and delegate',
|
|
3289
3902
|
'are included in the token data hash, which is a public input to the',
|
|
3290
|
-
'validity proof.'
|
|
3903
|
+
'validity proof.',
|
|
3291
3904
|
];
|
|
3292
3905
|
},
|
|
3293
3906
|
{
|
|
@@ -3330,20 +3943,20 @@ type LightCompressedToken = {
|
|
|
3330
3943
|
name: 'systemProgram';
|
|
3331
3944
|
isMut: false;
|
|
3332
3945
|
isSigner: false;
|
|
3333
|
-
}
|
|
3946
|
+
},
|
|
3334
3947
|
];
|
|
3335
3948
|
args: [
|
|
3336
3949
|
{
|
|
3337
3950
|
name: 'inputs';
|
|
3338
3951
|
type: 'bytes';
|
|
3339
|
-
}
|
|
3952
|
+
},
|
|
3340
3953
|
];
|
|
3341
3954
|
},
|
|
3342
3955
|
{
|
|
3343
3956
|
name: 'revoke';
|
|
3344
3957
|
docs: [
|
|
3345
3958
|
'Revokes a delegation. The instruction merges all inputs into one output',
|
|
3346
|
-
'account. Cannot be called by a delegate. Delegates are not preserved.'
|
|
3959
|
+
'account. Cannot be called by a delegate. Delegates are not preserved.',
|
|
3347
3960
|
];
|
|
3348
3961
|
accounts: [
|
|
3349
3962
|
{
|
|
@@ -3359,7 +3972,7 @@ type LightCompressedToken = {
|
|
|
3359
3972
|
docs: [
|
|
3360
3973
|
'Authority is verified through proof since both owner and delegate',
|
|
3361
3974
|
'are included in the token data hash, which is a public input to the',
|
|
3362
|
-
'validity proof.'
|
|
3975
|
+
'validity proof.',
|
|
3363
3976
|
];
|
|
3364
3977
|
},
|
|
3365
3978
|
{
|
|
@@ -3402,20 +4015,20 @@ type LightCompressedToken = {
|
|
|
3402
4015
|
name: 'systemProgram';
|
|
3403
4016
|
isMut: false;
|
|
3404
4017
|
isSigner: false;
|
|
3405
|
-
}
|
|
4018
|
+
},
|
|
3406
4019
|
];
|
|
3407
4020
|
args: [
|
|
3408
4021
|
{
|
|
3409
4022
|
name: 'inputs';
|
|
3410
4023
|
type: 'bytes';
|
|
3411
|
-
}
|
|
4024
|
+
},
|
|
3412
4025
|
];
|
|
3413
4026
|
},
|
|
3414
4027
|
{
|
|
3415
4028
|
name: 'freeze';
|
|
3416
4029
|
docs: [
|
|
3417
4030
|
'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
|
|
3418
|
-
'many outputs as inputs. Balances and delegates are preserved.'
|
|
4031
|
+
'many outputs as inputs. Balances and delegates are preserved.',
|
|
3419
4032
|
];
|
|
3420
4033
|
accounts: [
|
|
3421
4034
|
{
|
|
@@ -3474,20 +4087,20 @@ type LightCompressedToken = {
|
|
|
3474
4087
|
name: 'mint';
|
|
3475
4088
|
isMut: false;
|
|
3476
4089
|
isSigner: false;
|
|
3477
|
-
}
|
|
4090
|
+
},
|
|
3478
4091
|
];
|
|
3479
4092
|
args: [
|
|
3480
4093
|
{
|
|
3481
4094
|
name: 'inputs';
|
|
3482
4095
|
type: 'bytes';
|
|
3483
|
-
}
|
|
4096
|
+
},
|
|
3484
4097
|
];
|
|
3485
4098
|
},
|
|
3486
4099
|
{
|
|
3487
4100
|
name: 'thaw';
|
|
3488
4101
|
docs: [
|
|
3489
4102
|
'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
|
|
3490
|
-
'as many outputs as inputs. Balances and delegates are preserved.'
|
|
4103
|
+
'as many outputs as inputs. Balances and delegates are preserved.',
|
|
3491
4104
|
];
|
|
3492
4105
|
accounts: [
|
|
3493
4106
|
{
|
|
@@ -3546,13 +4159,13 @@ type LightCompressedToken = {
|
|
|
3546
4159
|
name: 'mint';
|
|
3547
4160
|
isMut: false;
|
|
3548
4161
|
isSigner: false;
|
|
3549
|
-
}
|
|
4162
|
+
},
|
|
3550
4163
|
];
|
|
3551
4164
|
args: [
|
|
3552
4165
|
{
|
|
3553
4166
|
name: 'inputs';
|
|
3554
4167
|
type: 'bytes';
|
|
3555
|
-
}
|
|
4168
|
+
},
|
|
3556
4169
|
];
|
|
3557
4170
|
},
|
|
3558
4171
|
{
|
|
@@ -3560,7 +4173,7 @@ type LightCompressedToken = {
|
|
|
3560
4173
|
docs: [
|
|
3561
4174
|
'Burns compressed tokens and spl tokens from the pool account. Delegates',
|
|
3562
4175
|
'can burn tokens. The output compressed token account remains delegated.',
|
|
3563
|
-
'Creates one output compressed token account.'
|
|
4176
|
+
'Creates one output compressed token account.',
|
|
3564
4177
|
];
|
|
3565
4178
|
accounts: [
|
|
3566
4179
|
{
|
|
@@ -3576,7 +4189,7 @@ type LightCompressedToken = {
|
|
|
3576
4189
|
docs: [
|
|
3577
4190
|
'Authority is verified through proof since both owner and delegate',
|
|
3578
4191
|
'are included in the token data hash, which is a public input to the',
|
|
3579
|
-
'validity proof.'
|
|
4192
|
+
'validity proof.',
|
|
3580
4193
|
];
|
|
3581
4194
|
},
|
|
3582
4195
|
{
|
|
@@ -3633,13 +4246,13 @@ type LightCompressedToken = {
|
|
|
3633
4246
|
name: 'systemProgram';
|
|
3634
4247
|
isMut: false;
|
|
3635
4248
|
isSigner: false;
|
|
3636
|
-
}
|
|
4249
|
+
},
|
|
3637
4250
|
];
|
|
3638
4251
|
args: [
|
|
3639
4252
|
{
|
|
3640
4253
|
name: 'inputs';
|
|
3641
4254
|
type: 'bytes';
|
|
3642
|
-
}
|
|
4255
|
+
},
|
|
3643
4256
|
];
|
|
3644
4257
|
},
|
|
3645
4258
|
{
|
|
@@ -3647,7 +4260,7 @@ type LightCompressedToken = {
|
|
|
3647
4260
|
docs: [
|
|
3648
4261
|
'This function is a stub to allow Anchor to include the input types in',
|
|
3649
4262
|
'the IDL. It should not be included in production builds nor be called in',
|
|
3650
|
-
'practice.'
|
|
4263
|
+
'practice.',
|
|
3651
4264
|
];
|
|
3652
4265
|
accounts: [
|
|
3653
4266
|
{
|
|
@@ -3663,7 +4276,7 @@ type LightCompressedToken = {
|
|
|
3663
4276
|
docs: [
|
|
3664
4277
|
'Authority is verified through proof since both owner and delegate',
|
|
3665
4278
|
'are included in the token data hash, which is a public input to the',
|
|
3666
|
-
'validity proof.'
|
|
4279
|
+
'validity proof.',
|
|
3667
4280
|
];
|
|
3668
4281
|
},
|
|
3669
4282
|
{
|
|
@@ -3724,7 +4337,7 @@ type LightCompressedToken = {
|
|
|
3724
4337
|
name: 'systemProgram';
|
|
3725
4338
|
isMut: false;
|
|
3726
4339
|
isSigner: false;
|
|
3727
|
-
}
|
|
4340
|
+
},
|
|
3728
4341
|
];
|
|
3729
4342
|
args: [
|
|
3730
4343
|
{
|
|
@@ -3738,9 +4351,9 @@ type LightCompressedToken = {
|
|
|
3738
4351
|
type: {
|
|
3739
4352
|
defined: 'TokenData';
|
|
3740
4353
|
};
|
|
3741
|
-
}
|
|
4354
|
+
},
|
|
3742
4355
|
];
|
|
3743
|
-
}
|
|
4356
|
+
},
|
|
3744
4357
|
];
|
|
3745
4358
|
types: [
|
|
3746
4359
|
{
|
|
@@ -3753,7 +4366,7 @@ type LightCompressedToken = {
|
|
|
3753
4366
|
},
|
|
3754
4367
|
{
|
|
3755
4368
|
name: 'Frozen';
|
|
3756
|
-
}
|
|
4369
|
+
},
|
|
3757
4370
|
];
|
|
3758
4371
|
};
|
|
3759
4372
|
},
|
|
@@ -3785,7 +4398,7 @@ type LightCompressedToken = {
|
|
|
3785
4398
|
defined: 'CompressedAccountData';
|
|
3786
4399
|
};
|
|
3787
4400
|
};
|
|
3788
|
-
}
|
|
4401
|
+
},
|
|
3789
4402
|
];
|
|
3790
4403
|
};
|
|
3791
4404
|
},
|
|
@@ -3809,7 +4422,7 @@ type LightCompressedToken = {
|
|
|
3809
4422
|
type: {
|
|
3810
4423
|
array: ['u8', 32];
|
|
3811
4424
|
};
|
|
3812
|
-
}
|
|
4425
|
+
},
|
|
3813
4426
|
];
|
|
3814
4427
|
};
|
|
3815
4428
|
},
|
|
@@ -3822,7 +4435,7 @@ type LightCompressedToken = {
|
|
|
3822
4435
|
name: 'setContext';
|
|
3823
4436
|
docs: [
|
|
3824
4437
|
'Is set by the program that is invoking the CPI to signal that is should',
|
|
3825
|
-
'set the cpi context.'
|
|
4438
|
+
'set the cpi context.',
|
|
3826
4439
|
];
|
|
3827
4440
|
type: 'bool';
|
|
3828
4441
|
},
|
|
@@ -3830,17 +4443,17 @@ type LightCompressedToken = {
|
|
|
3830
4443
|
name: 'firstSetContext';
|
|
3831
4444
|
docs: [
|
|
3832
4445
|
'Is set to wipe the cpi context since someone could have set it before',
|
|
3833
|
-
'with unrelated data.'
|
|
4446
|
+
'with unrelated data.',
|
|
3834
4447
|
];
|
|
3835
4448
|
type: 'bool';
|
|
3836
4449
|
},
|
|
3837
4450
|
{
|
|
3838
4451
|
name: 'cpiContextAccountIndex';
|
|
3839
4452
|
docs: [
|
|
3840
|
-
'Index of cpi context account in remaining accounts.'
|
|
4453
|
+
'Index of cpi context account in remaining accounts.',
|
|
3841
4454
|
];
|
|
3842
4455
|
type: 'u8';
|
|
3843
|
-
}
|
|
4456
|
+
},
|
|
3844
4457
|
];
|
|
3845
4458
|
};
|
|
3846
4459
|
},
|
|
@@ -3866,7 +4479,7 @@ type LightCompressedToken = {
|
|
|
3866
4479
|
type: {
|
|
3867
4480
|
array: ['u8', 32];
|
|
3868
4481
|
};
|
|
3869
|
-
}
|
|
4482
|
+
},
|
|
3870
4483
|
];
|
|
3871
4484
|
};
|
|
3872
4485
|
},
|
|
@@ -3892,7 +4505,7 @@ type LightCompressedToken = {
|
|
|
3892
4505
|
docs: [
|
|
3893
4506
|
'Is required if the signer is delegate,',
|
|
3894
4507
|
'-> delegate is authority account,',
|
|
3895
|
-
'owner = Some(owner) is the owner of the token account.'
|
|
4508
|
+
'owner = Some(owner) is the owner of the token account.',
|
|
3896
4509
|
];
|
|
3897
4510
|
type: {
|
|
3898
4511
|
option: {
|
|
@@ -3939,7 +4552,7 @@ type LightCompressedToken = {
|
|
|
3939
4552
|
type: {
|
|
3940
4553
|
option: 'u8';
|
|
3941
4554
|
};
|
|
3942
|
-
}
|
|
4555
|
+
},
|
|
3943
4556
|
];
|
|
3944
4557
|
};
|
|
3945
4558
|
},
|
|
@@ -3979,7 +4592,7 @@ type LightCompressedToken = {
|
|
|
3979
4592
|
{
|
|
3980
4593
|
name: 'outputAccountMerkleTreeIndex';
|
|
3981
4594
|
type: 'u8';
|
|
3982
|
-
}
|
|
4595
|
+
},
|
|
3983
4596
|
];
|
|
3984
4597
|
};
|
|
3985
4598
|
},
|
|
@@ -4037,14 +4650,14 @@ type LightCompressedToken = {
|
|
|
4037
4650
|
type: {
|
|
4038
4651
|
option: 'u64';
|
|
4039
4652
|
};
|
|
4040
|
-
}
|
|
4653
|
+
},
|
|
4041
4654
|
];
|
|
4042
4655
|
};
|
|
4043
4656
|
},
|
|
4044
4657
|
{
|
|
4045
4658
|
name: 'DelegatedTransfer';
|
|
4046
4659
|
docs: [
|
|
4047
|
-
'Struct to provide the owner when the delegate is signer of the transaction.'
|
|
4660
|
+
'Struct to provide the owner when the delegate is signer of the transaction.',
|
|
4048
4661
|
];
|
|
4049
4662
|
type: {
|
|
4050
4663
|
kind: 'struct';
|
|
@@ -4059,12 +4672,12 @@ type LightCompressedToken = {
|
|
|
4059
4672
|
'Index of change compressed account in output compressed accounts. In',
|
|
4060
4673
|
"case that the delegate didn't spend the complete delegated compressed",
|
|
4061
4674
|
'account balance the change compressed account will be delegated to her',
|
|
4062
|
-
'as well.'
|
|
4675
|
+
'as well.',
|
|
4063
4676
|
];
|
|
4064
4677
|
type: {
|
|
4065
4678
|
option: 'u8';
|
|
4066
4679
|
};
|
|
4067
|
-
}
|
|
4680
|
+
},
|
|
4068
4681
|
];
|
|
4069
4682
|
};
|
|
4070
4683
|
},
|
|
@@ -4102,12 +4715,12 @@ type LightCompressedToken = {
|
|
|
4102
4715
|
{
|
|
4103
4716
|
name: 'tlv';
|
|
4104
4717
|
docs: [
|
|
4105
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
4718
|
+
'Placeholder for TokenExtension tlv data (unimplemented)',
|
|
4106
4719
|
];
|
|
4107
4720
|
type: {
|
|
4108
4721
|
option: 'bytes';
|
|
4109
4722
|
};
|
|
4110
|
-
}
|
|
4723
|
+
},
|
|
4111
4724
|
];
|
|
4112
4725
|
};
|
|
4113
4726
|
},
|
|
@@ -4163,7 +4776,7 @@ type LightCompressedToken = {
|
|
|
4163
4776
|
{
|
|
4164
4777
|
name: 'isCompress';
|
|
4165
4778
|
type: 'bool';
|
|
4166
|
-
}
|
|
4779
|
+
},
|
|
4167
4780
|
];
|
|
4168
4781
|
};
|
|
4169
4782
|
},
|
|
@@ -4227,7 +4840,7 @@ type LightCompressedToken = {
|
|
|
4227
4840
|
defined: 'CompressedCpiContext';
|
|
4228
4841
|
};
|
|
4229
4842
|
};
|
|
4230
|
-
}
|
|
4843
|
+
},
|
|
4231
4844
|
];
|
|
4232
4845
|
};
|
|
4233
4846
|
},
|
|
@@ -4243,7 +4856,7 @@ type LightCompressedToken = {
|
|
|
4243
4856
|
{
|
|
4244
4857
|
name: 'seq';
|
|
4245
4858
|
type: 'u64';
|
|
4246
|
-
}
|
|
4859
|
+
},
|
|
4247
4860
|
];
|
|
4248
4861
|
};
|
|
4249
4862
|
},
|
|
@@ -4269,7 +4882,7 @@ type LightCompressedToken = {
|
|
|
4269
4882
|
{
|
|
4270
4883
|
name: 'addressMerkleTreeRootIndex';
|
|
4271
4884
|
type: 'u16';
|
|
4272
|
-
}
|
|
4885
|
+
},
|
|
4273
4886
|
];
|
|
4274
4887
|
};
|
|
4275
4888
|
},
|
|
@@ -4287,7 +4900,7 @@ type LightCompressedToken = {
|
|
|
4287
4900
|
{
|
|
4288
4901
|
name: 'merkleTreeIndex';
|
|
4289
4902
|
type: 'u8';
|
|
4290
|
-
}
|
|
4903
|
+
},
|
|
4291
4904
|
];
|
|
4292
4905
|
};
|
|
4293
4906
|
},
|
|
@@ -4311,17 +4924,17 @@ type LightCompressedToken = {
|
|
|
4311
4924
|
{
|
|
4312
4925
|
name: 'rootIndex';
|
|
4313
4926
|
docs: [
|
|
4314
|
-
'Index of root used in inclusion validity proof.'
|
|
4927
|
+
'Index of root used in inclusion validity proof.',
|
|
4315
4928
|
];
|
|
4316
4929
|
type: 'u16';
|
|
4317
4930
|
},
|
|
4318
4931
|
{
|
|
4319
4932
|
name: 'readOnly';
|
|
4320
4933
|
docs: [
|
|
4321
|
-
'Placeholder to mark accounts read-only unimplemented set to false.'
|
|
4934
|
+
'Placeholder to mark accounts read-only unimplemented set to false.',
|
|
4322
4935
|
];
|
|
4323
4936
|
type: 'bool';
|
|
4324
|
-
}
|
|
4937
|
+
},
|
|
4325
4938
|
];
|
|
4326
4939
|
};
|
|
4327
4940
|
},
|
|
@@ -4345,7 +4958,7 @@ type LightCompressedToken = {
|
|
|
4345
4958
|
{
|
|
4346
4959
|
name: 'proveByIndex';
|
|
4347
4960
|
type: 'bool';
|
|
4348
|
-
}
|
|
4961
|
+
},
|
|
4349
4962
|
];
|
|
4350
4963
|
};
|
|
4351
4964
|
},
|
|
@@ -4375,12 +4988,12 @@ type LightCompressedToken = {
|
|
|
4375
4988
|
{
|
|
4376
4989
|
name: 'tlv';
|
|
4377
4990
|
docs: [
|
|
4378
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
4991
|
+
'Placeholder for TokenExtension tlv data (unimplemented)',
|
|
4379
4992
|
];
|
|
4380
4993
|
type: {
|
|
4381
4994
|
option: 'bytes';
|
|
4382
4995
|
};
|
|
4383
|
-
}
|
|
4996
|
+
},
|
|
4384
4997
|
];
|
|
4385
4998
|
};
|
|
4386
4999
|
},
|
|
@@ -4454,7 +5067,7 @@ type LightCompressedToken = {
|
|
|
4454
5067
|
type: {
|
|
4455
5068
|
option: 'bytes';
|
|
4456
5069
|
};
|
|
4457
|
-
}
|
|
5070
|
+
},
|
|
4458
5071
|
];
|
|
4459
5072
|
};
|
|
4460
5073
|
},
|
|
@@ -4472,7 +5085,7 @@ type LightCompressedToken = {
|
|
|
4472
5085
|
name: 'index';
|
|
4473
5086
|
docs: ['Index of compressed account hash in queue.'];
|
|
4474
5087
|
type: 'u16';
|
|
4475
|
-
}
|
|
5088
|
+
},
|
|
4476
5089
|
];
|
|
4477
5090
|
};
|
|
4478
5091
|
},
|
|
@@ -4500,7 +5113,7 @@ type LightCompressedToken = {
|
|
|
4500
5113
|
name: 'delegate';
|
|
4501
5114
|
docs: [
|
|
4502
5115
|
'If `delegate` is `Some` then `delegated_amount` represents',
|
|
4503
|
-
'the amount authorized by the delegate'
|
|
5116
|
+
'the amount authorized by the delegate',
|
|
4504
5117
|
];
|
|
4505
5118
|
type: {
|
|
4506
5119
|
option: 'publicKey';
|
|
@@ -4516,15 +5129,15 @@ type LightCompressedToken = {
|
|
|
4516
5129
|
{
|
|
4517
5130
|
name: 'tlv';
|
|
4518
5131
|
docs: [
|
|
4519
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
5132
|
+
'Placeholder for TokenExtension tlv data (unimplemented)',
|
|
4520
5133
|
];
|
|
4521
5134
|
type: {
|
|
4522
5135
|
option: 'bytes';
|
|
4523
5136
|
};
|
|
4524
|
-
}
|
|
5137
|
+
},
|
|
4525
5138
|
];
|
|
4526
5139
|
};
|
|
4527
|
-
}
|
|
5140
|
+
},
|
|
4528
5141
|
];
|
|
4529
5142
|
errors: [
|
|
4530
5143
|
{
|
|
@@ -4681,7 +5294,7 @@ type LightCompressedToken = {
|
|
|
4681
5294
|
{
|
|
4682
5295
|
code: 6032;
|
|
4683
5296
|
name: 'NoMatchingBumpFound';
|
|
4684
|
-
}
|
|
5297
|
+
},
|
|
4685
5298
|
];
|
|
4686
5299
|
};
|
|
4687
5300
|
declare const IDL: LightCompressedToken;
|
|
@@ -4692,14 +5305,30 @@ declare const CompressedTokenInstructionDataTransferLayout: Layout<unknown>;
|
|
|
4692
5305
|
declare const mintToLayout: Layout<unknown>;
|
|
4693
5306
|
declare const batchCompressLayout: Layout<unknown>;
|
|
4694
5307
|
declare const compressSplTokenAccountInstructionDataLayout: Layout<unknown>;
|
|
4695
|
-
declare function encodeMintToInstructionData(
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
declare function
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
declare function
|
|
4702
|
-
|
|
5308
|
+
declare function encodeMintToInstructionData(
|
|
5309
|
+
data: MintToInstructionData,
|
|
5310
|
+
): Buffer$1;
|
|
5311
|
+
declare function decodeMintToInstructionData(
|
|
5312
|
+
buffer: Buffer$1,
|
|
5313
|
+
): MintToInstructionData;
|
|
5314
|
+
declare function encodeBatchCompressInstructionData(
|
|
5315
|
+
data: BatchCompressInstructionData,
|
|
5316
|
+
): Buffer$1;
|
|
5317
|
+
declare function decodeBatchCompressInstructionData(
|
|
5318
|
+
buffer: Buffer$1,
|
|
5319
|
+
): BatchCompressInstructionData;
|
|
5320
|
+
declare function encodeCompressSplTokenAccountInstructionData(
|
|
5321
|
+
data: CompressSplTokenAccountInstructionData,
|
|
5322
|
+
): Buffer$1;
|
|
5323
|
+
declare function decodeCompressSplTokenAccountInstructionData(
|
|
5324
|
+
buffer: Buffer$1,
|
|
5325
|
+
): CompressSplTokenAccountInstructionData;
|
|
5326
|
+
declare function encodeTransferInstructionData(
|
|
5327
|
+
data: CompressedTokenInstructionDataTransfer,
|
|
5328
|
+
): Buffer$1;
|
|
5329
|
+
declare function decodeTransferInstructionData(
|
|
5330
|
+
buffer: Buffer$1,
|
|
5331
|
+
): CompressedTokenInstructionDataTransfer;
|
|
4703
5332
|
interface BaseAccountsLayoutParams {
|
|
4704
5333
|
feePayer: PublicKey;
|
|
4705
5334
|
authority: PublicKey;
|
|
@@ -4741,20 +5370,44 @@ type freezeAccountsLayoutParams = BaseAccountsLayoutParams & {
|
|
|
4741
5370
|
mint: PublicKey;
|
|
4742
5371
|
};
|
|
4743
5372
|
type thawAccountsLayoutParams = freezeAccountsLayoutParams;
|
|
4744
|
-
declare const createTokenPoolAccountsLayout: (
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
declare const
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
declare const
|
|
4751
|
-
|
|
5373
|
+
declare const createTokenPoolAccountsLayout: (
|
|
5374
|
+
accounts: createTokenPoolAccountsLayoutParams,
|
|
5375
|
+
) => AccountMeta[];
|
|
5376
|
+
declare const addTokenPoolAccountsLayout: (
|
|
5377
|
+
accounts: addTokenPoolAccountsLayoutParams,
|
|
5378
|
+
) => AccountMeta[];
|
|
5379
|
+
declare const mintToAccountsLayout: (
|
|
5380
|
+
accounts: mintToAccountsLayoutParams,
|
|
5381
|
+
) => AccountMeta[];
|
|
5382
|
+
declare const transferAccountsLayout: (
|
|
5383
|
+
accounts: transferAccountsLayoutParams,
|
|
5384
|
+
) => AccountMeta[];
|
|
5385
|
+
declare const approveAccountsLayout: (
|
|
5386
|
+
accounts: approveAccountsLayoutParams,
|
|
5387
|
+
) => AccountMeta[];
|
|
5388
|
+
declare const revokeAccountsLayout: (
|
|
5389
|
+
accounts: approveAccountsLayoutParams,
|
|
5390
|
+
) => AccountMeta[];
|
|
5391
|
+
declare const freezeAccountsLayout: (
|
|
5392
|
+
accounts: freezeAccountsLayoutParams,
|
|
5393
|
+
) => AccountMeta[];
|
|
5394
|
+
declare const thawAccountsLayout: (
|
|
5395
|
+
accounts: freezeAccountsLayoutParams,
|
|
5396
|
+
) => AccountMeta[];
|
|
4752
5397
|
declare const CompressedTokenInstructionDataApproveLayout: Layout<unknown>;
|
|
4753
5398
|
declare const CompressedTokenInstructionDataRevokeLayout: Layout<unknown>;
|
|
4754
|
-
declare function encodeApproveInstructionData(
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
declare function
|
|
5399
|
+
declare function encodeApproveInstructionData(
|
|
5400
|
+
data: CompressedTokenInstructionDataApprove,
|
|
5401
|
+
): Buffer$1;
|
|
5402
|
+
declare function decodeApproveInstructionData(
|
|
5403
|
+
buffer: Buffer$1,
|
|
5404
|
+
): CompressedTokenInstructionDataApprove;
|
|
5405
|
+
declare function encodeRevokeInstructionData(
|
|
5406
|
+
data: CompressedTokenInstructionDataRevoke,
|
|
5407
|
+
): Buffer$1;
|
|
5408
|
+
declare function decodeRevokeInstructionData(
|
|
5409
|
+
buffer: Buffer$1,
|
|
5410
|
+
): CompressedTokenInstructionDataRevoke;
|
|
4758
5411
|
|
|
4759
5412
|
type CompressParams = {
|
|
4760
5413
|
/**
|
|
@@ -4848,7 +5501,11 @@ type DecompressParams = {
|
|
|
4848
5501
|
/**
|
|
4849
5502
|
* Token pool(s)
|
|
4850
5503
|
*/
|
|
4851
|
-
tokenPoolInfos:
|
|
5504
|
+
tokenPoolInfos:
|
|
5505
|
+
| TokenPoolInfo
|
|
5506
|
+
| TokenPoolInfo[]
|
|
5507
|
+
| SplInterfaceInfo
|
|
5508
|
+
| SplInterfaceInfo[];
|
|
4852
5509
|
};
|
|
4853
5510
|
type TransferParams = {
|
|
4854
5511
|
/**
|
|
@@ -5133,12 +5790,17 @@ declare const validateSameTokenOwner: (accounts: ParsedTokenAccount[]) => void;
|
|
|
5133
5790
|
/**
|
|
5134
5791
|
* Parse compressed token accounts to get the mint, current owner and delegate.
|
|
5135
5792
|
*/
|
|
5136
|
-
declare const parseTokenData: (
|
|
5793
|
+
declare const parseTokenData: (
|
|
5794
|
+
compressedTokenAccounts: ParsedTokenAccount[],
|
|
5795
|
+
) => {
|
|
5137
5796
|
mint: PublicKey;
|
|
5138
5797
|
currentOwner: PublicKey;
|
|
5139
5798
|
delegate: PublicKey | null;
|
|
5140
5799
|
};
|
|
5141
|
-
declare const parseMaybeDelegatedTransfer: (
|
|
5800
|
+
declare const parseMaybeDelegatedTransfer: (
|
|
5801
|
+
inputs: ParsedTokenAccount[],
|
|
5802
|
+
outputs: TokenTransferOutputData[],
|
|
5803
|
+
) => {
|
|
5142
5804
|
delegatedTransfer: DelegatedTransfer | null;
|
|
5143
5805
|
authority: PublicKey;
|
|
5144
5806
|
};
|
|
@@ -5150,7 +5812,11 @@ declare const parseMaybeDelegatedTransfer: (inputs: ParsedTokenAccount[], output
|
|
|
5150
5812
|
* @returns Output token data for the transfer
|
|
5151
5813
|
* instruction
|
|
5152
5814
|
*/
|
|
5153
|
-
declare function createTransferOutputState(
|
|
5815
|
+
declare function createTransferOutputState(
|
|
5816
|
+
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
5817
|
+
toAddress: PublicKey,
|
|
5818
|
+
amount: number | BN,
|
|
5819
|
+
): TokenTransferOutputData[];
|
|
5154
5820
|
/**
|
|
5155
5821
|
* Create the output state for a compress transaction.
|
|
5156
5822
|
* @param inputCompressedTokenAccounts Input state
|
|
@@ -5158,7 +5824,10 @@ declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedT
|
|
|
5158
5824
|
* @returns Output token data for the compress
|
|
5159
5825
|
* instruction
|
|
5160
5826
|
*/
|
|
5161
|
-
declare function createDecompressOutputState(
|
|
5827
|
+
declare function createDecompressOutputState(
|
|
5828
|
+
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
5829
|
+
amount: number | BN,
|
|
5830
|
+
): TokenTransferOutputData[];
|
|
5162
5831
|
declare class CompressedTokenProgram {
|
|
5163
5832
|
/**
|
|
5164
5833
|
* @internal
|
|
@@ -5196,11 +5865,17 @@ declare class CompressedTokenProgram {
|
|
|
5196
5865
|
*
|
|
5197
5866
|
* @returns The index and bump number.
|
|
5198
5867
|
*/
|
|
5199
|
-
static findSplInterfaceIndexAndBump(
|
|
5868
|
+
static findSplInterfaceIndexAndBump(
|
|
5869
|
+
poolPda: PublicKey,
|
|
5870
|
+
mint: PublicKey,
|
|
5871
|
+
): [number, number];
|
|
5200
5872
|
/**
|
|
5201
5873
|
* @deprecated Use {@link findSplInterfaceIndexAndBump} instead.
|
|
5202
5874
|
*/
|
|
5203
|
-
static findTokenPoolIndexAndBump(
|
|
5875
|
+
static findTokenPoolIndexAndBump(
|
|
5876
|
+
poolPda: PublicKey,
|
|
5877
|
+
mint: PublicKey,
|
|
5878
|
+
): [number, number];
|
|
5204
5879
|
/**
|
|
5205
5880
|
* Derive the SPL interface PDA with index.
|
|
5206
5881
|
*
|
|
@@ -5210,11 +5885,17 @@ declare class CompressedTokenProgram {
|
|
|
5210
5885
|
*
|
|
5211
5886
|
* @returns The SPL interface PDA and bump.
|
|
5212
5887
|
*/
|
|
5213
|
-
static deriveSplInterfacePdaWithIndex(
|
|
5888
|
+
static deriveSplInterfacePdaWithIndex(
|
|
5889
|
+
mint: PublicKey,
|
|
5890
|
+
index: number,
|
|
5891
|
+
): [PublicKey, number];
|
|
5214
5892
|
/**
|
|
5215
5893
|
* @deprecated Use {@link deriveSplInterfacePdaWithIndex} instead.
|
|
5216
5894
|
*/
|
|
5217
|
-
static deriveTokenPoolPdaWithIndex(
|
|
5895
|
+
static deriveTokenPoolPdaWithIndex(
|
|
5896
|
+
mint: PublicKey,
|
|
5897
|
+
index: number,
|
|
5898
|
+
): [PublicKey, number];
|
|
5218
5899
|
/** @internal */
|
|
5219
5900
|
static get deriveCpiAuthorityPda(): PublicKey;
|
|
5220
5901
|
/**
|
|
@@ -5235,7 +5916,16 @@ declare class CompressedTokenProgram {
|
|
|
5235
5916
|
* Note that `createTokenPoolInstruction` must be executed after
|
|
5236
5917
|
* `initializeMintInstruction`.
|
|
5237
5918
|
*/
|
|
5238
|
-
static createMint({
|
|
5919
|
+
static createMint({
|
|
5920
|
+
feePayer,
|
|
5921
|
+
mint,
|
|
5922
|
+
authority,
|
|
5923
|
+
freezeAuthority,
|
|
5924
|
+
decimals,
|
|
5925
|
+
rentExemptBalance,
|
|
5926
|
+
tokenProgramId,
|
|
5927
|
+
mintSize,
|
|
5928
|
+
}: CreateMintParams): Promise<TransactionInstruction[]>;
|
|
5239
5929
|
/**
|
|
5240
5930
|
* Enable compression for an existing SPL mint, creating an omnibus account.
|
|
5241
5931
|
* For new mints, use `CompressedTokenProgram.createMint`.
|
|
@@ -5247,7 +5937,11 @@ declare class CompressedTokenProgram {
|
|
|
5247
5937
|
*
|
|
5248
5938
|
* @returns The createTokenPool instruction
|
|
5249
5939
|
*/
|
|
5250
|
-
static createTokenPool({
|
|
5940
|
+
static createTokenPool({
|
|
5941
|
+
feePayer,
|
|
5942
|
+
mint,
|
|
5943
|
+
tokenProgramId,
|
|
5944
|
+
}: CreateSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5251
5945
|
/**
|
|
5252
5946
|
* Add a token pool to an existing SPL mint. For new mints, use
|
|
5253
5947
|
* {@link createTokenPool}.
|
|
@@ -5260,7 +5954,12 @@ declare class CompressedTokenProgram {
|
|
|
5260
5954
|
*
|
|
5261
5955
|
* @returns The addTokenPool instruction
|
|
5262
5956
|
*/
|
|
5263
|
-
static addTokenPool({
|
|
5957
|
+
static addTokenPool({
|
|
5958
|
+
feePayer,
|
|
5959
|
+
mint,
|
|
5960
|
+
poolIndex,
|
|
5961
|
+
tokenProgramId,
|
|
5962
|
+
}: AddSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5264
5963
|
/**
|
|
5265
5964
|
* Construct mintTo instruction for compressed tokens
|
|
5266
5965
|
*
|
|
@@ -5274,7 +5973,15 @@ declare class CompressedTokenProgram {
|
|
|
5274
5973
|
*
|
|
5275
5974
|
* @returns The mintTo instruction
|
|
5276
5975
|
*/
|
|
5277
|
-
static mintTo({
|
|
5976
|
+
static mintTo({
|
|
5977
|
+
feePayer,
|
|
5978
|
+
mint,
|
|
5979
|
+
authority,
|
|
5980
|
+
toPubkey,
|
|
5981
|
+
amount,
|
|
5982
|
+
outputStateTreeInfo,
|
|
5983
|
+
tokenPoolInfo,
|
|
5984
|
+
}: MintToParams): Promise<TransactionInstruction>;
|
|
5278
5985
|
/**
|
|
5279
5986
|
* Mint tokens from registered SPL mint account to a compressed account
|
|
5280
5987
|
*
|
|
@@ -5290,7 +5997,16 @@ declare class CompressedTokenProgram {
|
|
|
5290
5997
|
*
|
|
5291
5998
|
* @returns The mintTo instruction
|
|
5292
5999
|
*/
|
|
5293
|
-
static approveAndMintTo({
|
|
6000
|
+
static approveAndMintTo({
|
|
6001
|
+
feePayer,
|
|
6002
|
+
mint,
|
|
6003
|
+
authority,
|
|
6004
|
+
authorityTokenAccount,
|
|
6005
|
+
toPubkey,
|
|
6006
|
+
amount,
|
|
6007
|
+
outputStateTreeInfo,
|
|
6008
|
+
tokenPoolInfo,
|
|
6009
|
+
}: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
|
|
5294
6010
|
/**
|
|
5295
6011
|
* Construct transfer instruction for compressed tokens.
|
|
5296
6012
|
*
|
|
@@ -5305,7 +6021,14 @@ declare class CompressedTokenProgram {
|
|
|
5305
6021
|
*
|
|
5306
6022
|
* @returns The transfer instruction
|
|
5307
6023
|
*/
|
|
5308
|
-
static transfer({
|
|
6024
|
+
static transfer({
|
|
6025
|
+
payer,
|
|
6026
|
+
inputCompressedTokenAccounts,
|
|
6027
|
+
toAddress,
|
|
6028
|
+
amount,
|
|
6029
|
+
recentValidityProof,
|
|
6030
|
+
recentInputStateRootIndices,
|
|
6031
|
+
}: TransferParams): Promise<TransactionInstruction>;
|
|
5309
6032
|
/**
|
|
5310
6033
|
* Create lookup table instructions for the token program's default
|
|
5311
6034
|
* accounts.
|
|
@@ -5318,7 +6041,13 @@ declare class CompressedTokenProgram {
|
|
|
5318
6041
|
*
|
|
5319
6042
|
* @returns [createInstruction, extendInstruction, option(extendInstruction2)]
|
|
5320
6043
|
*/
|
|
5321
|
-
static createTokenProgramLookupTable({
|
|
6044
|
+
static createTokenProgramLookupTable({
|
|
6045
|
+
payer,
|
|
6046
|
+
authority,
|
|
6047
|
+
mints,
|
|
6048
|
+
recentSlot,
|
|
6049
|
+
remainingAccounts,
|
|
6050
|
+
}: CreateTokenProgramLookupTableParams): Promise<{
|
|
5322
6051
|
instructions: TransactionInstruction[];
|
|
5323
6052
|
address: PublicKey;
|
|
5324
6053
|
}>;
|
|
@@ -5336,7 +6065,16 @@ declare class CompressedTokenProgram {
|
|
|
5336
6065
|
*
|
|
5337
6066
|
* @returns The compress instruction
|
|
5338
6067
|
*/
|
|
5339
|
-
static compress({
|
|
6068
|
+
static compress({
|
|
6069
|
+
payer,
|
|
6070
|
+
owner,
|
|
6071
|
+
source,
|
|
6072
|
+
toAddress,
|
|
6073
|
+
amount,
|
|
6074
|
+
mint,
|
|
6075
|
+
outputStateTreeInfo,
|
|
6076
|
+
tokenPoolInfo,
|
|
6077
|
+
}: CompressParams): Promise<TransactionInstruction>;
|
|
5340
6078
|
/**
|
|
5341
6079
|
* Construct decompress instruction
|
|
5342
6080
|
*
|
|
@@ -5351,7 +6089,15 @@ declare class CompressedTokenProgram {
|
|
|
5351
6089
|
*
|
|
5352
6090
|
* @returns The decompress instruction
|
|
5353
6091
|
*/
|
|
5354
|
-
static decompress({
|
|
6092
|
+
static decompress({
|
|
6093
|
+
payer,
|
|
6094
|
+
inputCompressedTokenAccounts,
|
|
6095
|
+
toAddress,
|
|
6096
|
+
amount,
|
|
6097
|
+
recentValidityProof,
|
|
6098
|
+
recentInputStateRootIndices,
|
|
6099
|
+
tokenPoolInfos,
|
|
6100
|
+
}: DecompressParams): Promise<TransactionInstruction>;
|
|
5355
6101
|
/**
|
|
5356
6102
|
* Create `mergeTokenAccounts` instruction.
|
|
5357
6103
|
*
|
|
@@ -5364,7 +6110,14 @@ declare class CompressedTokenProgram {
|
|
|
5364
6110
|
* @param recentInputStateRootIndices Recent state root indices.
|
|
5365
6111
|
* @returns instruction
|
|
5366
6112
|
*/
|
|
5367
|
-
static mergeTokenAccounts({
|
|
6113
|
+
static mergeTokenAccounts({
|
|
6114
|
+
payer,
|
|
6115
|
+
owner,
|
|
6116
|
+
inputCompressedTokenAccounts,
|
|
6117
|
+
mint,
|
|
6118
|
+
recentValidityProof,
|
|
6119
|
+
recentInputStateRootIndices,
|
|
6120
|
+
}: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
|
|
5368
6121
|
/**
|
|
5369
6122
|
* Create `compressSplTokenAccount` instruction
|
|
5370
6123
|
*
|
|
@@ -5378,7 +6131,15 @@ declare class CompressedTokenProgram {
|
|
|
5378
6131
|
*
|
|
5379
6132
|
* @returns instruction
|
|
5380
6133
|
*/
|
|
5381
|
-
static compressSplTokenAccount({
|
|
6134
|
+
static compressSplTokenAccount({
|
|
6135
|
+
feePayer,
|
|
6136
|
+
authority,
|
|
6137
|
+
tokenAccount,
|
|
6138
|
+
mint,
|
|
6139
|
+
remainingAmount,
|
|
6140
|
+
outputStateTreeInfo,
|
|
6141
|
+
tokenPoolInfo,
|
|
6142
|
+
}: CompressSplTokenAccountParams): Promise<TransactionInstruction>;
|
|
5382
6143
|
/**
|
|
5383
6144
|
* Get the program ID for a mint
|
|
5384
6145
|
*
|
|
@@ -5387,7 +6148,10 @@ declare class CompressedTokenProgram {
|
|
|
5387
6148
|
*
|
|
5388
6149
|
* @returns program ID
|
|
5389
6150
|
*/
|
|
5390
|
-
static getMintProgramId(
|
|
6151
|
+
static getMintProgramId(
|
|
6152
|
+
mint: PublicKey,
|
|
6153
|
+
connection: Connection,
|
|
6154
|
+
): Promise<PublicKey | undefined>;
|
|
5391
6155
|
/**
|
|
5392
6156
|
* Create `approve` instruction to delegate compressed tokens.
|
|
5393
6157
|
*
|
|
@@ -5400,7 +6164,14 @@ declare class CompressedTokenProgram {
|
|
|
5400
6164
|
*
|
|
5401
6165
|
* @returns instruction
|
|
5402
6166
|
*/
|
|
5403
|
-
static approve({
|
|
6167
|
+
static approve({
|
|
6168
|
+
payer,
|
|
6169
|
+
inputCompressedTokenAccounts,
|
|
6170
|
+
toAddress,
|
|
6171
|
+
amount,
|
|
6172
|
+
recentValidityProof,
|
|
6173
|
+
recentInputStateRootIndices,
|
|
6174
|
+
}: ApproveParams): Promise<TransactionInstruction>;
|
|
5404
6175
|
/**
|
|
5405
6176
|
* Create `revoke` instruction to revoke delegation of compressed tokens.
|
|
5406
6177
|
*
|
|
@@ -5411,7 +6182,12 @@ declare class CompressedTokenProgram {
|
|
|
5411
6182
|
*
|
|
5412
6183
|
* @returns instruction
|
|
5413
6184
|
*/
|
|
5414
|
-
static revoke({
|
|
6185
|
+
static revoke({
|
|
6186
|
+
payer,
|
|
6187
|
+
inputCompressedTokenAccounts,
|
|
6188
|
+
recentValidityProof,
|
|
6189
|
+
recentInputStateRootIndices,
|
|
6190
|
+
}: RevokeParams): Promise<TransactionInstruction>;
|
|
5415
6191
|
}
|
|
5416
6192
|
|
|
5417
6193
|
/**
|
|
@@ -5425,7 +6201,14 @@ declare class CompressedTokenProgram {
|
|
|
5425
6201
|
* @param programId Optional program ID
|
|
5426
6202
|
* @returns AccountInterface with ATA metadata
|
|
5427
6203
|
*/
|
|
5428
|
-
declare function getAtaInterface(
|
|
6204
|
+
declare function getAtaInterface(
|
|
6205
|
+
rpc: Rpc,
|
|
6206
|
+
ata: PublicKey,
|
|
6207
|
+
owner: PublicKey,
|
|
6208
|
+
mint: PublicKey,
|
|
6209
|
+
commitment?: Commitment,
|
|
6210
|
+
programId?: PublicKey,
|
|
6211
|
+
): Promise<AccountInterface>;
|
|
5429
6212
|
/**
|
|
5430
6213
|
* Create instructions to load token balances into a c-token ATA.
|
|
5431
6214
|
*
|
|
@@ -5437,7 +6220,14 @@ declare function getAtaInterface(rpc: Rpc, ata: PublicKey, owner: PublicKey, min
|
|
|
5437
6220
|
* @param options Optional load options
|
|
5438
6221
|
* @returns Array of instructions (empty if nothing to load)
|
|
5439
6222
|
*/
|
|
5440
|
-
declare function createLoadAtaInstructions(
|
|
6223
|
+
declare function createLoadAtaInstructions(
|
|
6224
|
+
rpc: Rpc,
|
|
6225
|
+
ata: PublicKey,
|
|
6226
|
+
owner: PublicKey,
|
|
6227
|
+
mint: PublicKey,
|
|
6228
|
+
payer?: PublicKey,
|
|
6229
|
+
options?: InterfaceOptions,
|
|
6230
|
+
): Promise<TransactionInstruction[]>;
|
|
5441
6231
|
/**
|
|
5442
6232
|
* Load token balances into a c-token ATA.
|
|
5443
6233
|
*
|
|
@@ -5450,6 +6240,225 @@ declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: Publ
|
|
|
5450
6240
|
* @param interfaceOptions Optional interface options
|
|
5451
6241
|
* @returns Transaction signature, or null if nothing to load
|
|
5452
6242
|
*/
|
|
5453
|
-
declare function loadAta(
|
|
5454
|
-
|
|
5455
|
-
|
|
6243
|
+
declare function loadAta(
|
|
6244
|
+
rpc: Rpc,
|
|
6245
|
+
ata: PublicKey,
|
|
6246
|
+
owner: Signer,
|
|
6247
|
+
mint: PublicKey,
|
|
6248
|
+
payer?: Signer,
|
|
6249
|
+
confirmOptions?: ConfirmOptions,
|
|
6250
|
+
interfaceOptions?: InterfaceOptions,
|
|
6251
|
+
): Promise<TransactionSignature | null>;
|
|
6252
|
+
|
|
6253
|
+
export {
|
|
6254
|
+
ADD_TOKEN_POOL_DISCRIMINATOR,
|
|
6255
|
+
APPROVE_DISCRIMINATOR,
|
|
6256
|
+
type AccountInterface,
|
|
6257
|
+
Action,
|
|
6258
|
+
type AddSplInterfaceParams,
|
|
6259
|
+
type AddTokenPoolParams,
|
|
6260
|
+
type ApproveAndMintToParams,
|
|
6261
|
+
type ApproveParams,
|
|
6262
|
+
BATCH_COMPRESS_DISCRIMINATOR,
|
|
6263
|
+
type BaseMint,
|
|
6264
|
+
type BatchCompressInstructionData,
|
|
6265
|
+
COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR,
|
|
6266
|
+
CPI_AUTHORITY_SEED,
|
|
6267
|
+
CREATE_TOKEN_POOL_DISCRIMINATOR,
|
|
6268
|
+
type CTokenConfig,
|
|
6269
|
+
type CompressParams,
|
|
6270
|
+
type CompressSplTokenAccountInstructionData,
|
|
6271
|
+
type CompressSplTokenAccountParams,
|
|
6272
|
+
type CompressedMint,
|
|
6273
|
+
type CompressedTokenInstructionDataApprove,
|
|
6274
|
+
CompressedTokenInstructionDataApproveLayout,
|
|
6275
|
+
type CompressedTokenInstructionDataRevoke,
|
|
6276
|
+
CompressedTokenInstructionDataRevokeLayout,
|
|
6277
|
+
type CompressedTokenInstructionDataTransfer,
|
|
6278
|
+
CompressedTokenInstructionDataTransferLayout,
|
|
6279
|
+
CompressedTokenProgram,
|
|
6280
|
+
type CompressibleAccountInput,
|
|
6281
|
+
type CompressibleConfig,
|
|
6282
|
+
type CompressibleLoadParams,
|
|
6283
|
+
CpiContextLayout,
|
|
6284
|
+
type CreateAssociatedCTokenAccountParams,
|
|
6285
|
+
type CreateMintParams,
|
|
6286
|
+
type CreateSplInterfaceParams,
|
|
6287
|
+
type CreateTokenPoolParams,
|
|
6288
|
+
type CreateTokenProgramLookupTableParams,
|
|
6289
|
+
DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR,
|
|
6290
|
+
type DecompressParams,
|
|
6291
|
+
type DelegatedTransfer,
|
|
6292
|
+
DelegatedTransferLayout,
|
|
6293
|
+
ERROR_MIXED_TREE_TYPES,
|
|
6294
|
+
ERROR_NO_ACCOUNTS_FOUND,
|
|
6295
|
+
ExtensionType,
|
|
6296
|
+
IDL,
|
|
6297
|
+
type InputTokenDataWithContext,
|
|
6298
|
+
type InterfaceOptions,
|
|
6299
|
+
type LightCompressedToken,
|
|
6300
|
+
type LoadResult,
|
|
6301
|
+
MINT_TO_DISCRIMINATOR,
|
|
6302
|
+
type MergeTokenAccountsParams,
|
|
6303
|
+
type MintContext,
|
|
6304
|
+
type MintExtension,
|
|
6305
|
+
type MintInterface,
|
|
6306
|
+
type MintToInstructionData,
|
|
6307
|
+
type MintToParams,
|
|
6308
|
+
type OffChainTokenMetadata,
|
|
6309
|
+
type OffChainTokenMetadataJson,
|
|
6310
|
+
POOL_SEED,
|
|
6311
|
+
type PackCompressedTokenAccountsParams,
|
|
6312
|
+
type PackedCompressedAccount,
|
|
6313
|
+
type PackedTokenTransferOutputData,
|
|
6314
|
+
type ParsedAccountInfoInterface,
|
|
6315
|
+
REVOKE_DISCRIMINATOR,
|
|
6316
|
+
type RevokeParams,
|
|
6317
|
+
SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE,
|
|
6318
|
+
type SelectInputAccountsOptions,
|
|
6319
|
+
type SelectedAccountsResult,
|
|
6320
|
+
type SplInterfaceActivity,
|
|
6321
|
+
type SplInterfaceInfo,
|
|
6322
|
+
TRANSFER_DISCRIMINATOR,
|
|
6323
|
+
type TokenAccountSource,
|
|
6324
|
+
type TokenData,
|
|
6325
|
+
TokenDataVersion,
|
|
6326
|
+
type TokenMetadata,
|
|
6327
|
+
type TokenMetadataInstructionData,
|
|
6328
|
+
type TokenPoolActivity,
|
|
6329
|
+
type TokenPoolInfo,
|
|
6330
|
+
type TokenTransferOutputData,
|
|
6331
|
+
type TransferParams,
|
|
6332
|
+
addSplInterfaces,
|
|
6333
|
+
addTokenPoolAccountsLayout,
|
|
6334
|
+
type addTokenPoolAccountsLayoutParams,
|
|
6335
|
+
addTokenPools,
|
|
6336
|
+
approve,
|
|
6337
|
+
approveAccountsLayout,
|
|
6338
|
+
type approveAccountsLayoutParams,
|
|
6339
|
+
approveAndMintTo,
|
|
6340
|
+
batchCompressLayout,
|
|
6341
|
+
calculateCompressibleLoadComputeUnits,
|
|
6342
|
+
checkMint,
|
|
6343
|
+
checkSplInterfaceInfo,
|
|
6344
|
+
checkTokenPoolInfo,
|
|
6345
|
+
compress,
|
|
6346
|
+
compressSplTokenAccount,
|
|
6347
|
+
compressSplTokenAccountInstructionDataLayout,
|
|
6348
|
+
convertTokenDataToAccount,
|
|
6349
|
+
createAssociatedCTokenAccountIdempotentInstruction,
|
|
6350
|
+
createAssociatedCTokenAccountInstruction,
|
|
6351
|
+
createAssociatedTokenAccountInterfaceIdempotentInstruction,
|
|
6352
|
+
createAssociatedTokenAccountInterfaceInstruction,
|
|
6353
|
+
createAtaInterface,
|
|
6354
|
+
createAtaInterfaceIdempotent,
|
|
6355
|
+
createAtaInterfaceIdempotentInstruction,
|
|
6356
|
+
createCTokenTransferInstruction,
|
|
6357
|
+
createDecompressInterfaceInstruction,
|
|
6358
|
+
createDecompressOutputState,
|
|
6359
|
+
createLoadAccountsParams,
|
|
6360
|
+
createLoadAtaInstructions,
|
|
6361
|
+
createLoadAtaInstructionsFromInterface,
|
|
6362
|
+
createMint,
|
|
6363
|
+
createMintInstruction,
|
|
6364
|
+
createMintInterface,
|
|
6365
|
+
createMintToCompressedInstruction,
|
|
6366
|
+
createMintToInstruction,
|
|
6367
|
+
createMintToInterfaceInstruction,
|
|
6368
|
+
createRemoveMetadataKeyInstruction,
|
|
6369
|
+
createSplInterface,
|
|
6370
|
+
createTokenMetadata,
|
|
6371
|
+
createTokenPool,
|
|
6372
|
+
createTokenPoolAccountsLayout,
|
|
6373
|
+
type createTokenPoolAccountsLayoutParams,
|
|
6374
|
+
createTokenProgramLookupTable,
|
|
6375
|
+
createTransferInterfaceInstruction,
|
|
6376
|
+
createTransferOutputState,
|
|
6377
|
+
createUpdateFreezeAuthorityInstruction,
|
|
6378
|
+
createUpdateMetadataAuthorityInstruction,
|
|
6379
|
+
createUpdateMetadataFieldInstruction,
|
|
6380
|
+
createUpdateMintAuthorityInstruction,
|
|
6381
|
+
createWrapInstruction,
|
|
6382
|
+
decodeApproveInstructionData,
|
|
6383
|
+
decodeBatchCompressInstructionData,
|
|
6384
|
+
decodeCompressSplTokenAccountInstructionData,
|
|
6385
|
+
decodeMintToInstructionData,
|
|
6386
|
+
decodeRevokeInstructionData,
|
|
6387
|
+
decodeTokenMetadata,
|
|
6388
|
+
decodeTransferInstructionData,
|
|
6389
|
+
decompress,
|
|
6390
|
+
decompressDelegated,
|
|
6391
|
+
decompressInterface,
|
|
6392
|
+
deriveSplInterfaceInfo,
|
|
6393
|
+
deriveTokenPoolInfo,
|
|
6394
|
+
deserializeMint,
|
|
6395
|
+
encodeApproveInstructionData,
|
|
6396
|
+
encodeBatchCompressInstructionData,
|
|
6397
|
+
encodeCompressSplTokenAccountInstructionData,
|
|
6398
|
+
encodeMintToInstructionData,
|
|
6399
|
+
encodeRevokeInstructionData,
|
|
6400
|
+
encodeTokenMetadata,
|
|
6401
|
+
encodeTransferInstructionData,
|
|
6402
|
+
extractTokenMetadata,
|
|
6403
|
+
freezeAccountsLayout,
|
|
6404
|
+
type freezeAccountsLayoutParams,
|
|
6405
|
+
getAccountInterface,
|
|
6406
|
+
getAssociatedTokenAddressInterface,
|
|
6407
|
+
getAtaInterface,
|
|
6408
|
+
getMintInterface,
|
|
6409
|
+
getOrCreateAtaInterface,
|
|
6410
|
+
getSplInterfaceInfos,
|
|
6411
|
+
getTokenPoolInfos,
|
|
6412
|
+
groupAccountsByTreeType,
|
|
6413
|
+
isSingleSplInterfaceInfo,
|
|
6414
|
+
isSingleTokenPoolInfo,
|
|
6415
|
+
loadAta,
|
|
6416
|
+
mergeTokenAccounts,
|
|
6417
|
+
mintTo,
|
|
6418
|
+
mintToAccountsLayout,
|
|
6419
|
+
type mintToAccountsLayoutParams,
|
|
6420
|
+
mintTo$1 as mintToCToken,
|
|
6421
|
+
mintToCompressed,
|
|
6422
|
+
mintToInterface,
|
|
6423
|
+
mintToLayout,
|
|
6424
|
+
packCompressedTokenAccounts,
|
|
6425
|
+
parseCTokenCold,
|
|
6426
|
+
parseCTokenHot,
|
|
6427
|
+
parseMaybeDelegatedTransfer,
|
|
6428
|
+
parseTokenData,
|
|
6429
|
+
removeMetadataKey,
|
|
6430
|
+
revoke,
|
|
6431
|
+
revokeAccountsLayout,
|
|
6432
|
+
type revokeAccountsLayoutParams,
|
|
6433
|
+
selectAccountsByPreferredTreeType,
|
|
6434
|
+
selectMinCompressedTokenAccountsForDecompression,
|
|
6435
|
+
selectMinCompressedTokenAccountsForTransfer,
|
|
6436
|
+
selectMinCompressedTokenAccountsForTransferOrPartial,
|
|
6437
|
+
selectSmartCompressedTokenAccountsForTransfer,
|
|
6438
|
+
selectSmartCompressedTokenAccountsForTransferOrPartial,
|
|
6439
|
+
selectSplInterfaceInfo,
|
|
6440
|
+
selectSplInterfaceInfosForDecompression,
|
|
6441
|
+
selectTokenAccountsForApprove,
|
|
6442
|
+
selectTokenPoolInfo,
|
|
6443
|
+
selectTokenPoolInfosForDecompression,
|
|
6444
|
+
serializeMint,
|
|
6445
|
+
sumUpTokenAmount,
|
|
6446
|
+
thawAccountsLayout,
|
|
6447
|
+
type thawAccountsLayoutParams,
|
|
6448
|
+
toAccountInfo,
|
|
6449
|
+
toOffChainMetadataJson,
|
|
6450
|
+
toTokenPoolInfo,
|
|
6451
|
+
transfer,
|
|
6452
|
+
transferAccountsLayout,
|
|
6453
|
+
type transferAccountsLayoutParams,
|
|
6454
|
+
transferDelegated,
|
|
6455
|
+
transferInterface,
|
|
6456
|
+
unpackMintData,
|
|
6457
|
+
unpackMintInterface,
|
|
6458
|
+
updateFreezeAuthority,
|
|
6459
|
+
updateMetadataAuthority,
|
|
6460
|
+
updateMetadataField,
|
|
6461
|
+
updateMintAuthority,
|
|
6462
|
+
validateSameTokenOwner,
|
|
6463
|
+
wrap,
|
|
6464
|
+
};
|