@lightprotocol/compressed-token 0.23.0-beta.4 → 0.23.0-beta.5
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 +1 -218
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/browser/types-txB3ZZWl.cjs +2 -0
- package/dist/cjs/browser/types-txB3ZZWl.cjs.map +1 -0
- package/dist/cjs/browser/unified/index.cjs +1 -379
- package/dist/cjs/browser/unified/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +1 -219
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/node/types-ClkYErSH.cjs +2 -0
- package/dist/cjs/node/types-ClkYErSH.cjs.map +1 -0
- package/dist/cjs/node/unified/index.cjs +1 -380
- package/dist/cjs/node/unified/index.cjs.map +1 -1
- package/dist/es/browser/index.js +1 -166
- package/dist/es/browser/index.js.map +1 -1
- package/dist/es/browser/types-mr7N4aLT.js +2 -0
- package/dist/es/browser/types-mr7N4aLT.js.map +1 -0
- package/dist/es/browser/unified/index.js +1 -284
- package/dist/es/browser/unified/index.js.map +1 -1
- package/dist/types/index.d.ts +352 -1279
- package/dist/types/unified/index.d.ts +357 -1315
- package/package.json +4 -3
- package/dist/cjs/browser/types-qZMOMIxa.cjs +0 -11351
- package/dist/cjs/browser/types-qZMOMIxa.cjs.map +0 -1
- package/dist/cjs/node/types-BsKbElnz.cjs +0 -10113
- package/dist/cjs/node/types-BsKbElnz.cjs.map +0 -1
- package/dist/es/browser/types-pblNXos5.js +0 -10454
- package/dist/es/browser/types-pblNXos5.js.map +0 -1
|
@@ -1,39 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
AccountInfo,
|
|
6
|
-
Commitment,
|
|
7
|
-
TransactionInstruction,
|
|
8
|
-
Signer,
|
|
9
|
-
AccountMeta,
|
|
10
|
-
Keypair,
|
|
11
|
-
ConfirmOptions,
|
|
12
|
-
TransactionSignature,
|
|
13
|
-
Connection,
|
|
14
|
-
} from '@solana/web3.js';
|
|
15
|
-
import {
|
|
16
|
-
MerkleContext,
|
|
17
|
-
CompressedAccountWithMerkleContext,
|
|
18
|
-
Rpc,
|
|
19
|
-
ValidityProofWithContext,
|
|
20
|
-
AddressTreeInfo,
|
|
21
|
-
TreeInfo,
|
|
22
|
-
ParsedTokenAccount,
|
|
23
|
-
ValidityProof,
|
|
24
|
-
TreeType,
|
|
25
|
-
PackedMerkleContextLegacy,
|
|
26
|
-
CompressedCpiContext,
|
|
27
|
-
InputTokenDataWithContext as InputTokenDataWithContext$1,
|
|
28
|
-
CompressedProof,
|
|
29
|
-
} from '@lightprotocol/stateless.js';
|
|
3
|
+
import { PublicKey, AccountInfo, Commitment, TransactionInstruction, Signer, AccountMeta, Keypair, ConfirmOptions, TransactionSignature, Connection } from '@solana/web3.js';
|
|
4
|
+
import { MerkleContext, CompressedAccountWithMerkleContext, Rpc, ValidityProofWithContext, AddressTreeInfo, TreeInfo, ParsedTokenAccount, ValidityProof, TreeType, PackedMerkleContextLegacy, CompressedCpiContext, InputTokenDataWithContext as InputTokenDataWithContext$1, CompressedProof } from '@lightprotocol/stateless.js';
|
|
30
5
|
export { ParsedTokenAccount } from '@lightprotocol/stateless.js';
|
|
31
6
|
import { Account, Mint } from '@solana/spl-token';
|
|
32
7
|
export { AccountState } from '@solana/spl-token';
|
|
33
8
|
|
|
34
9
|
declare namespace BN {
|
|
35
|
-
type Endianness =
|
|
36
|
-
type IPrimeName =
|
|
10
|
+
type Endianness = "le" | "be";
|
|
11
|
+
type IPrimeName = "k256" | "p224" | "p192" | "p25519";
|
|
37
12
|
|
|
38
13
|
interface MPrime {
|
|
39
14
|
name: string;
|
|
@@ -55,7 +30,7 @@ declare class BN {
|
|
|
55
30
|
|
|
56
31
|
constructor(
|
|
57
32
|
number: bigint | number | string | number[] | Uint8Array | Buffer | BN,
|
|
58
|
-
base?: number |
|
|
33
|
+
base?: number | "hex",
|
|
59
34
|
endian?: BN.Endianness,
|
|
60
35
|
);
|
|
61
36
|
constructor(
|
|
@@ -101,7 +76,7 @@ declare class BN {
|
|
|
101
76
|
/**
|
|
102
77
|
* @description convert to base-string and pad with zeroes
|
|
103
78
|
*/
|
|
104
|
-
toString(base?: number |
|
|
79
|
+
toString(base?: number | "hex", length?: number): string;
|
|
105
80
|
|
|
106
81
|
/**
|
|
107
82
|
* @description convert to Javascript Number (limited to 53 bits)
|
|
@@ -361,11 +336,7 @@ declare class BN {
|
|
|
361
336
|
/**
|
|
362
337
|
* @description division with remainder
|
|
363
338
|
*/
|
|
364
|
-
divmod(
|
|
365
|
-
b: BN,
|
|
366
|
-
mode?: 'div' | 'mod',
|
|
367
|
-
positive?: boolean,
|
|
368
|
-
): { div: BN; mod: BN };
|
|
339
|
+
divmod(b: BN, mode?: "div" | "mod", positive?: boolean): { div: BN; mod: BN };
|
|
369
340
|
|
|
370
341
|
/**
|
|
371
342
|
* @description reduct
|
|
@@ -629,54 +600,18 @@ declare class RedBN extends BN {
|
|
|
629
600
|
}
|
|
630
601
|
|
|
631
602
|
declare class Buffer$1 extends Uint8Array {
|
|
632
|
-
length: number
|
|
633
|
-
write(
|
|
634
|
-
string: string,
|
|
635
|
-
offset?: number,
|
|
636
|
-
length?: number,
|
|
637
|
-
encoding?: string,
|
|
638
|
-
): number;
|
|
603
|
+
length: number
|
|
604
|
+
write(string: string, offset?: number, length?: number, encoding?: string): number;
|
|
639
605
|
toString(encoding?: string, start?: number, end?: number): string;
|
|
640
|
-
toJSON(): { type: 'Buffer'
|
|
606
|
+
toJSON(): { type: 'Buffer', data: any[] };
|
|
641
607
|
equals(otherBuffer: Buffer$1): boolean;
|
|
642
|
-
compare(
|
|
643
|
-
|
|
644
|
-
targetStart?: number,
|
|
645
|
-
targetEnd?: number,
|
|
646
|
-
sourceStart?: number,
|
|
647
|
-
sourceEnd?: number,
|
|
648
|
-
): number;
|
|
649
|
-
copy(
|
|
650
|
-
targetBuffer: Buffer$1,
|
|
651
|
-
targetStart?: number,
|
|
652
|
-
sourceStart?: number,
|
|
653
|
-
sourceEnd?: number,
|
|
654
|
-
): number;
|
|
608
|
+
compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
609
|
+
copy(targetBuffer: Buffer$1, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
655
610
|
slice(start?: number, end?: number): Buffer$1;
|
|
656
|
-
writeUIntLE(
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
noAssert?: boolean,
|
|
661
|
-
): number;
|
|
662
|
-
writeUIntBE(
|
|
663
|
-
value: number,
|
|
664
|
-
offset: number,
|
|
665
|
-
byteLength: number,
|
|
666
|
-
noAssert?: boolean,
|
|
667
|
-
): number;
|
|
668
|
-
writeIntLE(
|
|
669
|
-
value: number,
|
|
670
|
-
offset: number,
|
|
671
|
-
byteLength: number,
|
|
672
|
-
noAssert?: boolean,
|
|
673
|
-
): number;
|
|
674
|
-
writeIntBE(
|
|
675
|
-
value: number,
|
|
676
|
-
offset: number,
|
|
677
|
-
byteLength: number,
|
|
678
|
-
noAssert?: boolean,
|
|
679
|
-
): number;
|
|
611
|
+
writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
612
|
+
writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
613
|
+
writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
614
|
+
writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
680
615
|
readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
681
616
|
readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
682
617
|
readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
@@ -722,21 +657,9 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
722
657
|
writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
|
|
723
658
|
writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
|
|
724
659
|
fill(value: any, offset?: number, end?: number): this;
|
|
725
|
-
indexOf(
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
encoding?: string,
|
|
729
|
-
): number;
|
|
730
|
-
lastIndexOf(
|
|
731
|
-
value: string | number | Buffer$1,
|
|
732
|
-
byteOffset?: number,
|
|
733
|
-
encoding?: string,
|
|
734
|
-
): number;
|
|
735
|
-
includes(
|
|
736
|
-
value: string | number | Buffer$1,
|
|
737
|
-
byteOffset?: number,
|
|
738
|
-
encoding?: string,
|
|
739
|
-
): boolean;
|
|
660
|
+
indexOf(value: string | number | Buffer$1, byteOffset?: number, encoding?: string): number;
|
|
661
|
+
lastIndexOf(value: string | number | Buffer$1, byteOffset?: number, encoding?: string): number;
|
|
662
|
+
includes(value: string | number | Buffer$1, byteOffset?: number, encoding?: string): boolean;
|
|
740
663
|
|
|
741
664
|
/**
|
|
742
665
|
* Allocates a new buffer containing the given {str}.
|
|
@@ -744,19 +667,19 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
744
667
|
* @param str String to store in buffer.
|
|
745
668
|
* @param encoding encoding to use, optional. Default is 'utf8'
|
|
746
669
|
*/
|
|
747
|
-
constructor(str: string, encoding?: string);
|
|
670
|
+
constructor (str: string, encoding?: string);
|
|
748
671
|
/**
|
|
749
672
|
* Allocates a new buffer of {size} octets.
|
|
750
673
|
*
|
|
751
674
|
* @param size count of octets to allocate.
|
|
752
675
|
*/
|
|
753
|
-
constructor(size: number);
|
|
676
|
+
constructor (size: number);
|
|
754
677
|
/**
|
|
755
678
|
* Allocates a new buffer containing the given {array} of octets.
|
|
756
679
|
*
|
|
757
680
|
* @param array The octets to store.
|
|
758
681
|
*/
|
|
759
|
-
constructor(array: Uint8Array);
|
|
682
|
+
constructor (array: Uint8Array);
|
|
760
683
|
/**
|
|
761
684
|
* Produces a Buffer backed by the same allocated memory as
|
|
762
685
|
* the given {ArrayBuffer}.
|
|
@@ -764,19 +687,19 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
764
687
|
*
|
|
765
688
|
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
766
689
|
*/
|
|
767
|
-
constructor(arrayBuffer: ArrayBuffer);
|
|
690
|
+
constructor (arrayBuffer: ArrayBuffer);
|
|
768
691
|
/**
|
|
769
692
|
* Allocates a new buffer containing the given {array} of octets.
|
|
770
693
|
*
|
|
771
694
|
* @param array The octets to store.
|
|
772
695
|
*/
|
|
773
|
-
constructor(array: any[]);
|
|
696
|
+
constructor (array: any[]);
|
|
774
697
|
/**
|
|
775
698
|
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
776
699
|
*
|
|
777
700
|
* @param buffer The buffer to copy.
|
|
778
701
|
*/
|
|
779
|
-
constructor(buffer: Buffer$1);
|
|
702
|
+
constructor (buffer: Buffer$1);
|
|
780
703
|
prototype: Buffer$1;
|
|
781
704
|
/**
|
|
782
705
|
* Allocates a new Buffer using an {array} of octets.
|
|
@@ -794,11 +717,7 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
794
717
|
* @param byteOffset
|
|
795
718
|
* @param length
|
|
796
719
|
*/
|
|
797
|
-
static from(
|
|
798
|
-
arrayBuffer: ArrayBuffer,
|
|
799
|
-
byteOffset?: number,
|
|
800
|
-
length?: number,
|
|
801
|
-
): Buffer$1;
|
|
720
|
+
static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer$1;
|
|
802
721
|
/**
|
|
803
722
|
* Copies the passed {buffer} data onto a new Buffer instance.
|
|
804
723
|
*
|
|
@@ -858,11 +777,7 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
858
777
|
* If parameter is omitted, buffer will be filled with zeros.
|
|
859
778
|
* @param encoding encoding used for call to buf.fill while initializing
|
|
860
779
|
*/
|
|
861
|
-
static alloc(
|
|
862
|
-
size: number,
|
|
863
|
-
fill?: string | Buffer$1 | number,
|
|
864
|
-
encoding?: string,
|
|
865
|
-
): Buffer$1;
|
|
780
|
+
static alloc(size: number, fill?: string | Buffer$1 | number, encoding?: string): Buffer$1;
|
|
866
781
|
/**
|
|
867
782
|
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
|
|
868
783
|
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
@@ -880,15 +795,14 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
880
795
|
}
|
|
881
796
|
|
|
882
797
|
declare const TokenAccountSourceType: {
|
|
883
|
-
readonly Spl:
|
|
884
|
-
readonly Token2022:
|
|
885
|
-
readonly SplCold:
|
|
886
|
-
readonly Token2022Cold:
|
|
887
|
-
readonly CTokenHot:
|
|
888
|
-
readonly CTokenCold:
|
|
798
|
+
readonly Spl: "spl";
|
|
799
|
+
readonly Token2022: "token2022";
|
|
800
|
+
readonly SplCold: "spl-cold";
|
|
801
|
+
readonly Token2022Cold: "token2022-cold";
|
|
802
|
+
readonly CTokenHot: "ctoken-hot";
|
|
803
|
+
readonly CTokenCold: "ctoken-cold";
|
|
889
804
|
};
|
|
890
|
-
type TokenAccountSourceTypeValue =
|
|
891
|
-
(typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
|
|
805
|
+
type TokenAccountSourceTypeValue = (typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
|
|
892
806
|
/** @internal */
|
|
893
807
|
interface TokenAccountSource {
|
|
894
808
|
type: TokenAccountSourceTypeValue;
|
|
@@ -915,36 +829,25 @@ interface AccountInterface {
|
|
|
915
829
|
_mint?: PublicKey;
|
|
916
830
|
}
|
|
917
831
|
/** @internal */
|
|
918
|
-
declare function convertTokenDataToAccount(
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
tlv: Buffer$1 | null;
|
|
927
|
-
},
|
|
928
|
-
): Account;
|
|
832
|
+
declare function convertTokenDataToAccount(address: PublicKey, tokenData: {
|
|
833
|
+
mint: PublicKey;
|
|
834
|
+
owner: PublicKey;
|
|
835
|
+
amount: BN;
|
|
836
|
+
delegate: PublicKey | null;
|
|
837
|
+
state: number;
|
|
838
|
+
tlv: Buffer$1 | null;
|
|
839
|
+
}): Account;
|
|
929
840
|
/** Convert compressed account to AccountInfo */
|
|
930
|
-
declare function toAccountInfo(
|
|
931
|
-
compressedAccount: CompressedAccountWithMerkleContext,
|
|
932
|
-
): AccountInfo<Buffer$1>;
|
|
841
|
+
declare function toAccountInfo(compressedAccount: CompressedAccountWithMerkleContext): AccountInfo<Buffer$1>;
|
|
933
842
|
/** @internal */
|
|
934
|
-
declare function parseCTokenHot(
|
|
935
|
-
address: PublicKey,
|
|
936
|
-
accountInfo: AccountInfo<Buffer$1>,
|
|
937
|
-
): {
|
|
843
|
+
declare function parseCTokenHot(address: PublicKey, accountInfo: AccountInfo<Buffer$1>): {
|
|
938
844
|
accountInfo: AccountInfo<Buffer$1>;
|
|
939
845
|
loadContext: undefined;
|
|
940
846
|
parsed: Account;
|
|
941
847
|
isCold: false;
|
|
942
848
|
};
|
|
943
849
|
/** @internal */
|
|
944
|
-
declare function parseCTokenCold(
|
|
945
|
-
address: PublicKey,
|
|
946
|
-
compressedAccount: CompressedAccountWithMerkleContext,
|
|
947
|
-
): {
|
|
850
|
+
declare function parseCTokenCold(address: PublicKey, compressedAccount: CompressedAccountWithMerkleContext): {
|
|
948
851
|
accountInfo: AccountInfo<Buffer$1>;
|
|
949
852
|
loadContext: MerkleContext;
|
|
950
853
|
parsed: Account;
|
|
@@ -960,12 +863,7 @@ declare function parseCTokenCold(
|
|
|
960
863
|
*
|
|
961
864
|
* @return Token account information with compression context if applicable
|
|
962
865
|
*/
|
|
963
|
-
declare function getAccountInterface(
|
|
964
|
-
rpc: Rpc,
|
|
965
|
-
address: PublicKey,
|
|
966
|
-
commitment?: Commitment,
|
|
967
|
-
programId?: PublicKey,
|
|
968
|
-
): Promise<AccountInterface>;
|
|
866
|
+
declare function getAccountInterface(rpc: Rpc, address: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<AccountInterface>;
|
|
969
867
|
|
|
970
868
|
interface LayoutObject {
|
|
971
869
|
[key: string]: any;
|
|
@@ -1115,13 +1013,7 @@ interface TokenMetadataInstructionData {
|
|
|
1115
1013
|
updateAuthority?: PublicKey | null;
|
|
1116
1014
|
additionalMetadata: AdditionalMetadata[] | null;
|
|
1117
1015
|
}
|
|
1118
|
-
declare function createTokenMetadata(
|
|
1119
|
-
name: string,
|
|
1120
|
-
symbol: string,
|
|
1121
|
-
uri: string,
|
|
1122
|
-
updateAuthority?: PublicKey | null,
|
|
1123
|
-
additionalMetadata?: AdditionalMetadata[] | null,
|
|
1124
|
-
): TokenMetadataInstructionData;
|
|
1016
|
+
declare function createTokenMetadata(name: string, symbol: string, uri: string, updateAuthority?: PublicKey | null, additionalMetadata?: AdditionalMetadata[] | null): TokenMetadataInstructionData;
|
|
1125
1017
|
/**
|
|
1126
1018
|
* Create instruction for initializing a c-token mint.
|
|
1127
1019
|
*
|
|
@@ -1135,17 +1027,7 @@ declare function createTokenMetadata(
|
|
|
1135
1027
|
* @param outputStateTreeInfo Output state tree info.
|
|
1136
1028
|
* @param metadata Optional token metadata.
|
|
1137
1029
|
*/
|
|
1138
|
-
declare function createMintInstruction(
|
|
1139
|
-
mintSigner: PublicKey,
|
|
1140
|
-
decimals: number,
|
|
1141
|
-
mintAuthority: PublicKey,
|
|
1142
|
-
freezeAuthority: PublicKey | null,
|
|
1143
|
-
payer: PublicKey,
|
|
1144
|
-
validityProof: ValidityProofWithContext,
|
|
1145
|
-
addressTreeInfo: AddressTreeInfo,
|
|
1146
|
-
outputStateTreeInfo: TreeInfo,
|
|
1147
|
-
metadata?: TokenMetadataInstructionData,
|
|
1148
|
-
): TransactionInstruction;
|
|
1030
|
+
declare function createMintInstruction(mintSigner: PublicKey, decimals: number, mintAuthority: PublicKey, freezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext, addressTreeInfo: AddressTreeInfo, outputStateTreeInfo: TreeInfo, metadata?: TokenMetadataInstructionData): TransactionInstruction;
|
|
1149
1031
|
|
|
1150
1032
|
/**
|
|
1151
1033
|
* SPL-compatible base mint structure
|
|
@@ -1279,7 +1161,7 @@ declare function serializeMint(mint: CompressedMint): Buffer$1;
|
|
|
1279
1161
|
* Extension type constants
|
|
1280
1162
|
*/
|
|
1281
1163
|
declare enum ExtensionType {
|
|
1282
|
-
TokenMetadata = 19
|
|
1164
|
+
TokenMetadata = 19
|
|
1283
1165
|
}
|
|
1284
1166
|
/**
|
|
1285
1167
|
* Decode TokenMetadata from raw extension data using Borsh layout
|
|
@@ -1297,9 +1179,7 @@ declare function encodeTokenMetadata(metadata: TokenMetadata): Buffer$1;
|
|
|
1297
1179
|
* @param extensions - Array of raw extensions
|
|
1298
1180
|
* @returns Parsed TokenMetadata or null if not found
|
|
1299
1181
|
*/
|
|
1300
|
-
declare function extractTokenMetadata(
|
|
1301
|
-
extensions: MintExtension[] | null,
|
|
1302
|
-
): TokenMetadata | null;
|
|
1182
|
+
declare function extractTokenMetadata(extensions: MintExtension[] | null): TokenMetadata | null;
|
|
1303
1183
|
/**
|
|
1304
1184
|
* Metadata portion of MintInstructionData
|
|
1305
1185
|
* Used for instruction encoding when metadata extension is present
|
|
@@ -1350,12 +1230,7 @@ interface MintInterface {
|
|
|
1350
1230
|
* @returns Object with mint, optional merkleContext, mintContext, and
|
|
1351
1231
|
* tokenMetadata
|
|
1352
1232
|
*/
|
|
1353
|
-
declare function getMintInterface(
|
|
1354
|
-
rpc: Rpc,
|
|
1355
|
-
address: PublicKey,
|
|
1356
|
-
commitment?: Commitment,
|
|
1357
|
-
programId?: PublicKey,
|
|
1358
|
-
): Promise<MintInterface>;
|
|
1233
|
+
declare function getMintInterface(rpc: Rpc, address: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<MintInterface>;
|
|
1359
1234
|
/**
|
|
1360
1235
|
* Unpack mint info from raw account data for SPL/T22/c-token.
|
|
1361
1236
|
*
|
|
@@ -1364,11 +1239,7 @@ declare function getMintInterface(
|
|
|
1364
1239
|
* @param programId Token program ID. Default c-token.
|
|
1365
1240
|
* @returns Object with mint, optional mintContext and tokenMetadata.
|
|
1366
1241
|
*/
|
|
1367
|
-
declare function unpackMintInterface(
|
|
1368
|
-
address: PublicKey,
|
|
1369
|
-
data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>,
|
|
1370
|
-
programId?: PublicKey,
|
|
1371
|
-
): Omit<MintInterface, 'merkleContext'>;
|
|
1242
|
+
declare function unpackMintInterface(address: PublicKey, data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>, programId?: PublicKey): Omit<MintInterface, 'merkleContext'>;
|
|
1372
1243
|
/**
|
|
1373
1244
|
* Unpack c-token mint context and metadata from raw account data
|
|
1374
1245
|
*
|
|
@@ -1390,13 +1261,7 @@ declare function unpackMintData(data: Buffer$1 | Uint8Array): {
|
|
|
1390
1261
|
* @param payer Fee payer public key
|
|
1391
1262
|
* @param validityProof Validity proof for the compressed mint
|
|
1392
1263
|
*/
|
|
1393
|
-
declare function createUpdateMintAuthorityInstruction(
|
|
1394
|
-
mintInterface: MintInterface,
|
|
1395
|
-
currentMintAuthority: PublicKey,
|
|
1396
|
-
newMintAuthority: PublicKey | null,
|
|
1397
|
-
payer: PublicKey,
|
|
1398
|
-
validityProof: ValidityProofWithContext,
|
|
1399
|
-
): TransactionInstruction;
|
|
1264
|
+
declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterface, currentMintAuthority: PublicKey, newMintAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext): TransactionInstruction;
|
|
1400
1265
|
/**
|
|
1401
1266
|
* Create instruction for updating a compressed mint's freeze authority.
|
|
1402
1267
|
*
|
|
@@ -1409,13 +1274,7 @@ declare function createUpdateMintAuthorityInstruction(
|
|
|
1409
1274
|
* @param payer Fee payer public key
|
|
1410
1275
|
* @param validityProof Validity proof for the compressed mint
|
|
1411
1276
|
*/
|
|
1412
|
-
declare function createUpdateFreezeAuthorityInstruction(
|
|
1413
|
-
mintInterface: MintInterface,
|
|
1414
|
-
currentFreezeAuthority: PublicKey,
|
|
1415
|
-
newFreezeAuthority: PublicKey | null,
|
|
1416
|
-
payer: PublicKey,
|
|
1417
|
-
validityProof: ValidityProofWithContext,
|
|
1418
|
-
): TransactionInstruction;
|
|
1277
|
+
declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInterface, currentFreezeAuthority: PublicKey, newFreezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext): TransactionInstruction;
|
|
1419
1278
|
|
|
1420
1279
|
/**
|
|
1421
1280
|
* Create instruction for updating a compressed mint's metadata field.
|
|
@@ -1432,16 +1291,7 @@ declare function createUpdateFreezeAuthorityInstruction(
|
|
|
1432
1291
|
* @param customKey Custom key name (required if fieldType is 'custom')
|
|
1433
1292
|
* @param extensionIndex Extension index (default: 0)
|
|
1434
1293
|
*/
|
|
1435
|
-
declare function createUpdateMetadataFieldInstruction(
|
|
1436
|
-
mintInterface: MintInterface,
|
|
1437
|
-
authority: PublicKey,
|
|
1438
|
-
payer: PublicKey,
|
|
1439
|
-
validityProof: ValidityProofWithContext,
|
|
1440
|
-
fieldType: 'name' | 'symbol' | 'uri' | 'custom',
|
|
1441
|
-
value: string,
|
|
1442
|
-
customKey?: string,
|
|
1443
|
-
extensionIndex?: number,
|
|
1444
|
-
): TransactionInstruction;
|
|
1294
|
+
declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, fieldType: 'name' | 'symbol' | 'uri' | 'custom', value: string, customKey?: string, extensionIndex?: number): TransactionInstruction;
|
|
1445
1295
|
/**
|
|
1446
1296
|
* Create instruction for updating a compressed mint's metadata authority.
|
|
1447
1297
|
*
|
|
@@ -1455,14 +1305,7 @@ declare function createUpdateMetadataFieldInstruction(
|
|
|
1455
1305
|
* @param validityProof Validity proof for the compressed mint
|
|
1456
1306
|
* @param extensionIndex Extension index (default: 0)
|
|
1457
1307
|
*/
|
|
1458
|
-
declare function createUpdateMetadataAuthorityInstruction(
|
|
1459
|
-
mintInterface: MintInterface,
|
|
1460
|
-
currentAuthority: PublicKey,
|
|
1461
|
-
newAuthority: PublicKey,
|
|
1462
|
-
payer: PublicKey,
|
|
1463
|
-
validityProof: ValidityProofWithContext,
|
|
1464
|
-
extensionIndex?: number,
|
|
1465
|
-
): TransactionInstruction;
|
|
1308
|
+
declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInterface, currentAuthority: PublicKey, newAuthority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, extensionIndex?: number): TransactionInstruction;
|
|
1466
1309
|
/**
|
|
1467
1310
|
* Create instruction for removing a metadata key from a compressed mint.
|
|
1468
1311
|
*
|
|
@@ -1477,15 +1320,7 @@ declare function createUpdateMetadataAuthorityInstruction(
|
|
|
1477
1320
|
* @param idempotent If true, don't error if key doesn't exist (default: false)
|
|
1478
1321
|
* @param extensionIndex Extension index (default: 0)
|
|
1479
1322
|
*/
|
|
1480
|
-
declare function createRemoveMetadataKeyInstruction(
|
|
1481
|
-
mintInterface: MintInterface,
|
|
1482
|
-
authority: PublicKey,
|
|
1483
|
-
payer: PublicKey,
|
|
1484
|
-
validityProof: ValidityProofWithContext,
|
|
1485
|
-
key: string,
|
|
1486
|
-
idempotent?: boolean,
|
|
1487
|
-
extensionIndex?: number,
|
|
1488
|
-
): TransactionInstruction;
|
|
1323
|
+
declare function createRemoveMetadataKeyInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, key: string, idempotent?: boolean, extensionIndex?: number): TransactionInstruction;
|
|
1489
1324
|
|
|
1490
1325
|
interface CompressToPubkey {
|
|
1491
1326
|
bump: number;
|
|
@@ -1495,7 +1330,6 @@ interface CompressToPubkey {
|
|
|
1495
1330
|
interface CompressibleConfig {
|
|
1496
1331
|
tokenAccountVersion: number;
|
|
1497
1332
|
rentPayment: number;
|
|
1498
|
-
hasTopUp: number;
|
|
1499
1333
|
compressionOnly: number;
|
|
1500
1334
|
writeTopUp: number;
|
|
1501
1335
|
compressToAccountPubkey?: CompressToPubkey | null;
|
|
@@ -1504,42 +1338,62 @@ interface CreateAssociatedCTokenAccountParams {
|
|
|
1504
1338
|
bump: number;
|
|
1505
1339
|
compressibleConfig?: CompressibleConfig;
|
|
1506
1340
|
}
|
|
1341
|
+
/**
|
|
1342
|
+
* Default compressible config for c-token ATAs - matches Rust SDK defaults.
|
|
1343
|
+
*
|
|
1344
|
+
* - tokenAccountVersion: 3 (ShaFlat) - latest hashing scheme
|
|
1345
|
+
* - rentPayment: 16 - prepay 16 epochs (~24 hours rent)
|
|
1346
|
+
* - compressionOnly: 1 - required for ATAs
|
|
1347
|
+
* - writeTopUp: 766 - per-write top-up (~2 epochs rent) when rent < 2 epochs
|
|
1348
|
+
* - compressToAccountPubkey: null - required for ATAs
|
|
1349
|
+
*
|
|
1350
|
+
* Cost breakdown at ATA creation:
|
|
1351
|
+
* - Rent sponsor PDA (LIGHT_TOKEN_RENT_SPONSOR) pays: rent exemption (~890,880 lamports)
|
|
1352
|
+
* - Fee payer pays: compression_cost (11K) + 16 epochs rent (~6,400) = ~17,400 lamports + tx fees
|
|
1353
|
+
*
|
|
1354
|
+
* Per-write top-up (transfers):
|
|
1355
|
+
* - When account rent is below 2 epochs, fee payer pays 766 lamports top-up
|
|
1356
|
+
* - This keeps the account perpetually funded when actively used
|
|
1357
|
+
*
|
|
1358
|
+
* Rent calculation (272-byte compressible ctoken account):
|
|
1359
|
+
* - rent_per_epoch = base_rent (128) + bytes * rent_per_byte (272 * 1) = 400 lamports
|
|
1360
|
+
* - 16 epochs = 16 * 400 = 6,400 lamports (24 hours)
|
|
1361
|
+
* - 2 epochs = 2 * 400 = 800 lamports (~3 hours, writeTopUp = 766 is conservative)
|
|
1362
|
+
*
|
|
1363
|
+
* Account size breakdown (272 bytes):
|
|
1364
|
+
* - 165 bytes: SPL token base layout
|
|
1365
|
+
* - 1 byte: account_type discriminator
|
|
1366
|
+
* - 1 byte: Option discriminator for extensions
|
|
1367
|
+
* - 4 bytes: Vec length prefix
|
|
1368
|
+
* - 1 byte: extension type discriminant
|
|
1369
|
+
* - 4 bytes: CompressibleExtension header (decimals_option, decimals, compression_only, is_ata)
|
|
1370
|
+
* - 96 bytes: CompressionInfo struct
|
|
1371
|
+
*/
|
|
1372
|
+
declare const DEFAULT_COMPRESSIBLE_CONFIG: CompressibleConfig;
|
|
1507
1373
|
/**
|
|
1508
1374
|
* Create instruction for creating an associated compressed token account.
|
|
1375
|
+
* Uses the default rent sponsor PDA by default.
|
|
1509
1376
|
*
|
|
1510
1377
|
* @param feePayer Fee payer public key.
|
|
1511
1378
|
* @param owner Owner of the associated token account.
|
|
1512
1379
|
* @param mint Mint address.
|
|
1513
|
-
* @param compressibleConfig
|
|
1514
|
-
* @param configAccount
|
|
1515
|
-
* @param rentPayerPda
|
|
1516
|
-
*/
|
|
1517
|
-
declare function createAssociatedCTokenAccountInstruction(
|
|
1518
|
-
feePayer: PublicKey,
|
|
1519
|
-
owner: PublicKey,
|
|
1520
|
-
mint: PublicKey,
|
|
1521
|
-
compressibleConfig?: CompressibleConfig,
|
|
1522
|
-
configAccount?: PublicKey,
|
|
1523
|
-
rentPayerPda?: PublicKey,
|
|
1524
|
-
): TransactionInstruction;
|
|
1380
|
+
* @param compressibleConfig Compressible configuration (defaults to rent sponsor config).
|
|
1381
|
+
* @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
|
|
1382
|
+
* @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
|
|
1383
|
+
*/
|
|
1384
|
+
declare function createAssociatedCTokenAccountInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
|
|
1525
1385
|
/**
|
|
1526
1386
|
* Create idempotent instruction for creating an associated compressed token account.
|
|
1387
|
+
* Uses the default rent sponsor PDA by default.
|
|
1527
1388
|
*
|
|
1528
1389
|
* @param feePayer Fee payer public key.
|
|
1529
1390
|
* @param owner Owner of the associated token account.
|
|
1530
1391
|
* @param mint Mint address.
|
|
1531
|
-
* @param compressibleConfig
|
|
1532
|
-
* @param configAccount
|
|
1533
|
-
* @param rentPayerPda
|
|
1392
|
+
* @param compressibleConfig Compressible configuration (defaults to rent sponsor config).
|
|
1393
|
+
* @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
|
|
1394
|
+
* @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
|
|
1534
1395
|
*/
|
|
1535
|
-
declare function createAssociatedCTokenAccountIdempotentInstruction(
|
|
1536
|
-
feePayer: PublicKey,
|
|
1537
|
-
owner: PublicKey,
|
|
1538
|
-
mint: PublicKey,
|
|
1539
|
-
compressibleConfig?: CompressibleConfig,
|
|
1540
|
-
configAccount?: PublicKey,
|
|
1541
|
-
rentPayerPda?: PublicKey,
|
|
1542
|
-
): TransactionInstruction;
|
|
1396
|
+
declare function createAssociatedCTokenAccountIdempotentInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
|
|
1543
1397
|
|
|
1544
1398
|
/**
|
|
1545
1399
|
* c-token-specific config for createAssociatedTokenAccountInterfaceInstruction
|
|
@@ -1562,15 +1416,7 @@ interface CTokenConfig {
|
|
|
1562
1416
|
* @param associatedTokenProgramId Associated token program ID.
|
|
1563
1417
|
* @param ctokenConfig Optional c-token-specific configuration.
|
|
1564
1418
|
*/
|
|
1565
|
-
declare function createAssociatedTokenAccountInterfaceInstruction(
|
|
1566
|
-
payer: PublicKey,
|
|
1567
|
-
associatedToken: PublicKey,
|
|
1568
|
-
owner: PublicKey,
|
|
1569
|
-
mint: PublicKey,
|
|
1570
|
-
programId?: PublicKey,
|
|
1571
|
-
associatedTokenProgramId?: PublicKey,
|
|
1572
|
-
ctokenConfig?: CTokenConfig,
|
|
1573
|
-
): TransactionInstruction;
|
|
1419
|
+
declare function createAssociatedTokenAccountInterfaceInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, ctokenConfig?: CTokenConfig): TransactionInstruction;
|
|
1574
1420
|
/**
|
|
1575
1421
|
* Create idempotent instruction for creating an associated token account (SPL,
|
|
1576
1422
|
* Token-2022, or c-token). Follows SPL Token API signature with optional c-token
|
|
@@ -1584,15 +1430,7 @@ declare function createAssociatedTokenAccountInterfaceInstruction(
|
|
|
1584
1430
|
* @param associatedTokenProgramId Associated token program ID.
|
|
1585
1431
|
* @param ctokenConfig Optional c-token-specific configuration.
|
|
1586
1432
|
*/
|
|
1587
|
-
declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(
|
|
1588
|
-
payer: PublicKey,
|
|
1589
|
-
associatedToken: PublicKey,
|
|
1590
|
-
owner: PublicKey,
|
|
1591
|
-
mint: PublicKey,
|
|
1592
|
-
programId?: PublicKey,
|
|
1593
|
-
associatedTokenProgramId?: PublicKey,
|
|
1594
|
-
ctokenConfig?: CTokenConfig,
|
|
1595
|
-
): TransactionInstruction;
|
|
1433
|
+
declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey, ctokenConfig?: CTokenConfig): TransactionInstruction;
|
|
1596
1434
|
/**
|
|
1597
1435
|
* Short alias for createAssociatedTokenAccountInterfaceIdempotentInstruction.
|
|
1598
1436
|
*/
|
|
@@ -1610,17 +1448,12 @@ declare const createAtaInterfaceIdempotentInstruction: typeof createAssociatedTo
|
|
|
1610
1448
|
* @param recipientAccount Recipient onchain token account address.
|
|
1611
1449
|
* @param amount Amount to mint.
|
|
1612
1450
|
*/
|
|
1613
|
-
declare function createMintToInstruction(
|
|
1614
|
-
authority: PublicKey,
|
|
1615
|
-
payer: PublicKey,
|
|
1616
|
-
validityProof: ValidityProofWithContext,
|
|
1617
|
-
merkleContext: MerkleContext,
|
|
1618
|
-
mintData: MintInstructionData,
|
|
1619
|
-
outputStateTreeInfo: TreeInfo,
|
|
1620
|
-
recipientAccount: PublicKey,
|
|
1621
|
-
amount: number | bigint,
|
|
1622
|
-
): TransactionInstruction;
|
|
1451
|
+
declare function createMintToInstruction(authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, merkleContext: MerkleContext, mintData: MintInstructionData, outputStateTreeInfo: TreeInfo, recipientAccount: PublicKey, amount: number | bigint): TransactionInstruction;
|
|
1623
1452
|
|
|
1453
|
+
/** Default compressible config PDA (V1) */
|
|
1454
|
+
declare const LIGHT_TOKEN_CONFIG: PublicKey;
|
|
1455
|
+
/** Default rent sponsor PDA (V1) */
|
|
1456
|
+
declare const LIGHT_TOKEN_RENT_SPONSOR: PublicKey;
|
|
1624
1457
|
/**
|
|
1625
1458
|
* Token data version enum - mirrors Rust TokenDataVersion
|
|
1626
1459
|
* Used for compressed token account hashing strategy
|
|
@@ -1631,7 +1464,7 @@ declare enum TokenDataVersion {
|
|
|
1631
1464
|
/** V2: Poseidon hash with big-endian amount, discriminator [0,0,0,0,0,0,0,3] */
|
|
1632
1465
|
V2 = 2,
|
|
1633
1466
|
/** ShaFlat: SHA256 hash of borsh-serialized data, discriminator [0,0,0,0,0,0,0,4] */
|
|
1634
|
-
ShaFlat = 3
|
|
1467
|
+
ShaFlat = 3
|
|
1635
1468
|
}
|
|
1636
1469
|
declare const POOL_SEED: Buffer$1<ArrayBuffer>;
|
|
1637
1470
|
declare const CPI_AUTHORITY_SEED: Buffer$1<ArrayBuffer>;
|
|
@@ -1645,6 +1478,47 @@ declare const APPROVE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
|
1645
1478
|
declare const REVOKE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
1646
1479
|
declare const ADD_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
1647
1480
|
declare const DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
1481
|
+
/**
|
|
1482
|
+
* Rent configuration constants for compressible ctoken accounts.
|
|
1483
|
+
* These match the Rust SDK defaults in program-libs/compressible/src/rent/config.rs
|
|
1484
|
+
*/
|
|
1485
|
+
/** Base rent per epoch (lamports) */
|
|
1486
|
+
declare const BASE_RENT_PER_EPOCH = 128;
|
|
1487
|
+
/** Rent per byte per epoch (lamports) */
|
|
1488
|
+
declare const RENT_PER_BYTE_PER_EPOCH = 1;
|
|
1489
|
+
/** Slots per rent epoch (1.5 hours) */
|
|
1490
|
+
declare const SLOTS_PER_RENT_EPOCH = 13500;
|
|
1491
|
+
/** Compression cost (lamports) - paid at account creation */
|
|
1492
|
+
declare const COMPRESSION_COST = 10000;
|
|
1493
|
+
/** Compression incentive (lamports) - paid at account creation */
|
|
1494
|
+
declare const COMPRESSION_INCENTIVE = 1000;
|
|
1495
|
+
/** Total compression cost (COMPRESSION_COST + COMPRESSION_INCENTIVE) */
|
|
1496
|
+
declare const TOTAL_COMPRESSION_COST: number;
|
|
1497
|
+
/**
|
|
1498
|
+
* Compressible ctoken account size in bytes.
|
|
1499
|
+
* = 165 (base SPL token) + 1 (account_type) + 1 (Option) + 4 (Vec len) + 1 (ext disc) + 4 (ext header) + 96 (CompressionInfo) = 272
|
|
1500
|
+
* Source: program-libs/token-interface/src/state/token/top_up.rs MIN_SIZE_WITH_COMPRESSIBLE
|
|
1501
|
+
*/
|
|
1502
|
+
declare const COMPRESSIBLE_CTOKEN_ACCOUNT_SIZE = 272;
|
|
1503
|
+
/**
|
|
1504
|
+
* Calculate rent per epoch for a given account size.
|
|
1505
|
+
* Formula: base_rent + (bytes * lamports_per_byte_per_epoch)
|
|
1506
|
+
*/
|
|
1507
|
+
declare function rentPerEpoch(bytes: number): number;
|
|
1508
|
+
/**
|
|
1509
|
+
* Default rent per epoch for a compressible ctoken account (272 bytes).
|
|
1510
|
+
* = 128 + 272 = 400 lamports
|
|
1511
|
+
*/
|
|
1512
|
+
declare const COMPRESSIBLE_CTOKEN_RENT_PER_EPOCH: number;
|
|
1513
|
+
/** Default prepaid epochs (24 hours = 16 epochs * 1.5h) */
|
|
1514
|
+
declare const DEFAULT_PREPAY_EPOCHS = 16;
|
|
1515
|
+
/** Default write top-up (lamports) - ~2 epochs rent */
|
|
1516
|
+
declare const DEFAULT_WRITE_TOP_UP = 766;
|
|
1517
|
+
/**
|
|
1518
|
+
* Calculate fee payer cost at ATA creation.
|
|
1519
|
+
* = compression_cost (11K) + (prepay_epochs * rent_per_epoch)
|
|
1520
|
+
*/
|
|
1521
|
+
declare function calculateFeePayerCostAtCreation(prepayEpochs?: number, accountBytes?: number): number;
|
|
1648
1522
|
|
|
1649
1523
|
/**
|
|
1650
1524
|
* Create instruction for minting tokens from a c-mint to compressed accounts.
|
|
@@ -1662,19 +1536,10 @@ declare const DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR: Buffer$1<ArrayBuffer
|
|
|
1662
1536
|
* @param tokenAccountVersion Token account version (default:
|
|
1663
1537
|
* TokenDataVersion.ShaFlat).
|
|
1664
1538
|
*/
|
|
1665
|
-
declare function createMintToCompressedInstruction(
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
merkleContext: MerkleContext,
|
|
1670
|
-
mintData: MintInstructionData,
|
|
1671
|
-
recipients: Array<{
|
|
1672
|
-
recipient: PublicKey;
|
|
1673
|
-
amount: number | bigint;
|
|
1674
|
-
}>,
|
|
1675
|
-
outputStateTreeInfo?: TreeInfo,
|
|
1676
|
-
tokenAccountVersion?: TokenDataVersion,
|
|
1677
|
-
): TransactionInstruction;
|
|
1539
|
+
declare function createMintToCompressedInstruction(authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, merkleContext: MerkleContext, mintData: MintInstructionData, recipients: Array<{
|
|
1540
|
+
recipient: PublicKey;
|
|
1541
|
+
amount: number | bigint;
|
|
1542
|
+
}>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: TokenDataVersion): TransactionInstruction;
|
|
1678
1543
|
|
|
1679
1544
|
/**
|
|
1680
1545
|
* Create mint-to instruction for SPL, Token-2022, or compressed token mints.
|
|
@@ -1688,31 +1553,22 @@ declare function createMintToCompressedInstruction(
|
|
|
1688
1553
|
* @param validityProof Validity proof (required for compressed mints).
|
|
1689
1554
|
* @param multiSigners Multi-signature signer public keys.
|
|
1690
1555
|
*/
|
|
1691
|
-
declare function createMintToInterfaceInstruction(
|
|
1692
|
-
mintInterface: MintInterface,
|
|
1693
|
-
destination: PublicKey,
|
|
1694
|
-
authority: PublicKey,
|
|
1695
|
-
payer: PublicKey,
|
|
1696
|
-
amount: number | bigint,
|
|
1697
|
-
validityProof?: ValidityProofWithContext,
|
|
1698
|
-
multiSigners?: PublicKey[],
|
|
1699
|
-
): TransactionInstruction;
|
|
1556
|
+
declare function createMintToInterfaceInstruction(mintInterface: MintInterface, destination: PublicKey, authority: PublicKey, payer: PublicKey, amount: number | bigint, validityProof?: ValidityProofWithContext, multiSigners?: PublicKey[]): TransactionInstruction;
|
|
1700
1557
|
|
|
1701
1558
|
/**
|
|
1702
1559
|
* Create a c-token transfer instruction.
|
|
1703
1560
|
*
|
|
1561
|
+
* For c-token accounts with compressible extension, the program needs
|
|
1562
|
+
* system_program and fee_payer to handle rent top-ups.
|
|
1563
|
+
*
|
|
1704
1564
|
* @param source Source c-token account
|
|
1705
1565
|
* @param destination Destination c-token account
|
|
1706
1566
|
* @param owner Owner of the source account (signer, also pays for compressible extension top-ups)
|
|
1707
1567
|
* @param amount Amount to transfer
|
|
1568
|
+
* @param feePayer Optional fee payer for top-ups (defaults to owner)
|
|
1708
1569
|
* @returns Transaction instruction for c-token transfer
|
|
1709
1570
|
*/
|
|
1710
|
-
declare function createCTokenTransferInstruction(
|
|
1711
|
-
source: PublicKey,
|
|
1712
|
-
destination: PublicKey,
|
|
1713
|
-
owner: PublicKey,
|
|
1714
|
-
amount: number | bigint,
|
|
1715
|
-
): TransactionInstruction;
|
|
1571
|
+
declare function createCTokenTransferInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, amount: number | bigint, feePayer?: PublicKey): TransactionInstruction;
|
|
1716
1572
|
/**
|
|
1717
1573
|
* Construct a transfer instruction for SPL/T22/c-token. Defaults to c-token
|
|
1718
1574
|
* program. For cross-program transfers (SPL <> c-token), use `wrap`/`unwrap`.
|
|
@@ -1723,14 +1579,7 @@ declare function createCTokenTransferInstruction(
|
|
|
1723
1579
|
* @param amount Amount to transfer
|
|
1724
1580
|
* @returns instruction for c-token transfer
|
|
1725
1581
|
*/
|
|
1726
|
-
declare function createTransferInterfaceInstruction(
|
|
1727
|
-
source: PublicKey,
|
|
1728
|
-
destination: PublicKey,
|
|
1729
|
-
owner: PublicKey,
|
|
1730
|
-
amount: number | bigint,
|
|
1731
|
-
multiSigners?: (Signer | PublicKey)[],
|
|
1732
|
-
programId?: PublicKey,
|
|
1733
|
-
): TransactionInstruction;
|
|
1582
|
+
declare function createTransferInterfaceInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, amount: number | bigint, multiSigners?: (Signer | PublicKey)[], programId?: PublicKey): TransactionInstruction;
|
|
1734
1583
|
|
|
1735
1584
|
/**
|
|
1736
1585
|
* SPL interface PDA info.
|
|
@@ -1837,21 +1686,14 @@ declare function toTokenPoolInfo(info: SplInterfaceInfo): TokenPoolInfo;
|
|
|
1837
1686
|
*
|
|
1838
1687
|
* @returns SplInterfaceInfo for the to-be-initialized interface
|
|
1839
1688
|
*/
|
|
1840
|
-
declare function deriveSplInterfaceInfo(
|
|
1841
|
-
mint: PublicKey,
|
|
1842
|
-
tokenProgramId: PublicKey,
|
|
1843
|
-
poolIndex?: number,
|
|
1844
|
-
): SplInterfaceInfo;
|
|
1689
|
+
declare function deriveSplInterfaceInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): SplInterfaceInfo;
|
|
1845
1690
|
/**
|
|
1846
1691
|
* Check if the SPL interface info is initialized and has a balance.
|
|
1847
1692
|
* @param mint The mint of the SPL interface
|
|
1848
1693
|
* @param splInterfaceInfo The SPL interface info (or TokenPoolInfo for backward compatibility)
|
|
1849
1694
|
* @returns True if the SPL interface info is initialized and has a balance
|
|
1850
1695
|
*/
|
|
1851
|
-
declare function checkSplInterfaceInfo(
|
|
1852
|
-
splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo,
|
|
1853
|
-
mint: PublicKey,
|
|
1854
|
-
): boolean;
|
|
1696
|
+
declare function checkSplInterfaceInfo(splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo, mint: PublicKey): boolean;
|
|
1855
1697
|
/**
|
|
1856
1698
|
* Get the SPL interface infos for a given mint.
|
|
1857
1699
|
* @param rpc The RPC client
|
|
@@ -1860,11 +1702,7 @@ declare function checkSplInterfaceInfo(
|
|
|
1860
1702
|
*
|
|
1861
1703
|
* @returns The SPL interface infos
|
|
1862
1704
|
*/
|
|
1863
|
-
declare function getSplInterfaceInfos(
|
|
1864
|
-
rpc: Rpc,
|
|
1865
|
-
mint: PublicKey,
|
|
1866
|
-
commitment?: Commitment,
|
|
1867
|
-
): Promise<SplInterfaceInfo[]>;
|
|
1705
|
+
declare function getSplInterfaceInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<SplInterfaceInfo[]>;
|
|
1868
1706
|
type SplInterfaceActivity = {
|
|
1869
1707
|
signature: string;
|
|
1870
1708
|
amount: BN;
|
|
@@ -1876,7 +1714,7 @@ type SplInterfaceActivity = {
|
|
|
1876
1714
|
declare enum Action {
|
|
1877
1715
|
Compress = 1,
|
|
1878
1716
|
Decompress = 2,
|
|
1879
|
-
Transfer = 3
|
|
1717
|
+
Transfer = 3
|
|
1880
1718
|
}
|
|
1881
1719
|
/**
|
|
1882
1720
|
* For `compress` and `mintTo` instructions only.
|
|
@@ -1888,9 +1726,7 @@ declare enum Action {
|
|
|
1888
1726
|
*
|
|
1889
1727
|
* @returns A random SPL interface info
|
|
1890
1728
|
*/
|
|
1891
|
-
declare function selectSplInterfaceInfo(
|
|
1892
|
-
infos: SplInterfaceInfo[],
|
|
1893
|
-
): SplInterfaceInfo;
|
|
1729
|
+
declare function selectSplInterfaceInfo(infos: SplInterfaceInfo[]): SplInterfaceInfo;
|
|
1894
1730
|
/**
|
|
1895
1731
|
* Select one or multiple SPL interface infos from the SPL interface infos.
|
|
1896
1732
|
*
|
|
@@ -1903,10 +1739,7 @@ declare function selectSplInterfaceInfo(
|
|
|
1903
1739
|
*
|
|
1904
1740
|
* @returns Array with one or more SPL interface infos.
|
|
1905
1741
|
*/
|
|
1906
|
-
declare function selectSplInterfaceInfosForDecompression(
|
|
1907
|
-
infos: SplInterfaceInfo[],
|
|
1908
|
-
decompressAmount: number | BN,
|
|
1909
|
-
): SplInterfaceInfo[];
|
|
1742
|
+
declare function selectSplInterfaceInfosForDecompression(infos: SplInterfaceInfo[], decompressAmount: number | BN): SplInterfaceInfo[];
|
|
1910
1743
|
/**
|
|
1911
1744
|
* @deprecated Use {@link SplInterfaceActivity} instead.
|
|
1912
1745
|
*/
|
|
@@ -1914,26 +1747,15 @@ type TokenPoolActivity = SplInterfaceActivity;
|
|
|
1914
1747
|
/**
|
|
1915
1748
|
* @deprecated Use {@link deriveSplInterfaceInfo} instead.
|
|
1916
1749
|
*/
|
|
1917
|
-
declare function deriveTokenPoolInfo(
|
|
1918
|
-
mint: PublicKey,
|
|
1919
|
-
tokenProgramId: PublicKey,
|
|
1920
|
-
poolIndex?: number,
|
|
1921
|
-
): TokenPoolInfo;
|
|
1750
|
+
declare function deriveTokenPoolInfo(mint: PublicKey, tokenProgramId: PublicKey, poolIndex?: number): TokenPoolInfo;
|
|
1922
1751
|
/**
|
|
1923
1752
|
* @deprecated Use {@link checkSplInterfaceInfo} instead.
|
|
1924
1753
|
*/
|
|
1925
|
-
declare function checkTokenPoolInfo(
|
|
1926
|
-
tokenPoolInfo: TokenPoolInfo,
|
|
1927
|
-
mint: PublicKey,
|
|
1928
|
-
): boolean;
|
|
1754
|
+
declare function checkTokenPoolInfo(tokenPoolInfo: TokenPoolInfo, mint: PublicKey): boolean;
|
|
1929
1755
|
/**
|
|
1930
1756
|
* @deprecated Use {@link getSplInterfaceInfos} instead.
|
|
1931
1757
|
*/
|
|
1932
|
-
declare function getTokenPoolInfos(
|
|
1933
|
-
rpc: Rpc,
|
|
1934
|
-
mint: PublicKey,
|
|
1935
|
-
commitment?: Commitment,
|
|
1936
|
-
): Promise<TokenPoolInfo[]>;
|
|
1758
|
+
declare function getTokenPoolInfos(rpc: Rpc, mint: PublicKey, commitment?: Commitment): Promise<TokenPoolInfo[]>;
|
|
1937
1759
|
/**
|
|
1938
1760
|
* @deprecated Use {@link selectSplInterfaceInfo} instead.
|
|
1939
1761
|
*/
|
|
@@ -1941,10 +1763,7 @@ declare function selectTokenPoolInfo(infos: TokenPoolInfo[]): TokenPoolInfo;
|
|
|
1941
1763
|
/**
|
|
1942
1764
|
* @deprecated Use {@link selectSplInterfaceInfosForDecompression} instead.
|
|
1943
1765
|
*/
|
|
1944
|
-
declare function selectTokenPoolInfosForDecompression(
|
|
1945
|
-
infos: TokenPoolInfo[],
|
|
1946
|
-
decompressAmount: number | BN,
|
|
1947
|
-
): TokenPoolInfo[];
|
|
1766
|
+
declare function selectTokenPoolInfosForDecompression(infos: TokenPoolInfo[], decompressAmount: number | BN): TokenPoolInfo[];
|
|
1948
1767
|
|
|
1949
1768
|
/**
|
|
1950
1769
|
* Create decompressInterface instruction using Transfer2.
|
|
@@ -1962,15 +1781,7 @@ declare function selectTokenPoolInfosForDecompression(
|
|
|
1962
1781
|
* @param decimals Mint decimals (required for SPL destinations)
|
|
1963
1782
|
* @returns TransactionInstruction
|
|
1964
1783
|
*/
|
|
1965
|
-
declare function createDecompressInterfaceInstruction(
|
|
1966
|
-
payer: PublicKey,
|
|
1967
|
-
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
1968
|
-
toAddress: PublicKey,
|
|
1969
|
-
amount: bigint,
|
|
1970
|
-
validityProof: ValidityProofWithContext,
|
|
1971
|
-
splInterfaceInfo: SplInterfaceInfo | undefined,
|
|
1972
|
-
decimals: number,
|
|
1973
|
-
): TransactionInstruction;
|
|
1784
|
+
declare function createDecompressInterfaceInstruction(payer: PublicKey, inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: bigint, validityProof: ValidityProofWithContext, splInterfaceInfo: SplInterfaceInfo | undefined, decimals: number): TransactionInstruction;
|
|
1974
1785
|
|
|
1975
1786
|
/**
|
|
1976
1787
|
* Options for interface operations (load, transfer)
|
|
@@ -2099,21 +1910,11 @@ interface LoadResult {
|
|
|
2099
1910
|
* }
|
|
2100
1911
|
* ```
|
|
2101
1912
|
*/
|
|
2102
|
-
declare function createLoadAccountsParams(
|
|
2103
|
-
rpc: Rpc,
|
|
2104
|
-
payer: PublicKey,
|
|
2105
|
-
programId: PublicKey,
|
|
2106
|
-
programAccounts?: CompressibleAccountInput[],
|
|
2107
|
-
atas?: AccountInterface[],
|
|
2108
|
-
options?: InterfaceOptions,
|
|
2109
|
-
): Promise<LoadResult>;
|
|
1913
|
+
declare function createLoadAccountsParams(rpc: Rpc, payer: PublicKey, programId: PublicKey, programAccounts?: CompressibleAccountInput[], atas?: AccountInterface[], options?: InterfaceOptions): Promise<LoadResult>;
|
|
2110
1914
|
/**
|
|
2111
1915
|
* Calculate compute units for compressible load operation
|
|
2112
1916
|
*/
|
|
2113
|
-
declare function calculateCompressibleLoadComputeUnits(
|
|
2114
|
-
compressedAccountCount: number,
|
|
2115
|
-
hasValidityProof: boolean,
|
|
2116
|
-
): number;
|
|
1917
|
+
declare function calculateCompressibleLoadComputeUnits(compressedAccountCount: number, hasValidityProof: boolean): number;
|
|
2117
1918
|
|
|
2118
1919
|
/**
|
|
2119
1920
|
* Create a wrap instruction that moves tokens from an SPL/T22 account to a
|
|
@@ -2129,16 +1930,7 @@ declare function calculateCompressibleLoadComputeUnits(
|
|
|
2129
1930
|
* @param payer Fee payer (defaults to owner)
|
|
2130
1931
|
* @returns Instruction to wrap tokens
|
|
2131
1932
|
*/
|
|
2132
|
-
declare function createWrapInstruction(
|
|
2133
|
-
source: PublicKey,
|
|
2134
|
-
destination: PublicKey,
|
|
2135
|
-
owner: PublicKey,
|
|
2136
|
-
mint: PublicKey,
|
|
2137
|
-
amount: bigint,
|
|
2138
|
-
splInterfaceInfo: SplInterfaceInfo,
|
|
2139
|
-
decimals: number,
|
|
2140
|
-
payer?: PublicKey,
|
|
2141
|
-
): TransactionInstruction;
|
|
1933
|
+
declare function createWrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey): TransactionInstruction;
|
|
2142
1934
|
|
|
2143
1935
|
/**
|
|
2144
1936
|
* Create an unwrap instruction that moves tokens from a c-token account to an
|
|
@@ -2154,16 +1946,7 @@ declare function createWrapInstruction(
|
|
|
2154
1946
|
* @param payer Fee payer (defaults to owner if not provided)
|
|
2155
1947
|
* @returns TransactionInstruction to unwrap tokens
|
|
2156
1948
|
*/
|
|
2157
|
-
declare function createUnwrapInstruction(
|
|
2158
|
-
source: PublicKey,
|
|
2159
|
-
destination: PublicKey,
|
|
2160
|
-
owner: PublicKey,
|
|
2161
|
-
mint: PublicKey,
|
|
2162
|
-
amount: bigint,
|
|
2163
|
-
splInterfaceInfo: SplInterfaceInfo,
|
|
2164
|
-
decimals: number,
|
|
2165
|
-
payer?: PublicKey,
|
|
2166
|
-
): TransactionInstruction;
|
|
1949
|
+
declare function createUnwrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey): TransactionInstruction;
|
|
2167
1950
|
|
|
2168
1951
|
/**
|
|
2169
1952
|
* Create and initialize a new mint for SPL/T22/c-token.
|
|
@@ -2182,19 +1965,7 @@ declare function createUnwrapInstruction(
|
|
|
2182
1965
|
*
|
|
2183
1966
|
* @returns Object with mint address and transaction signature
|
|
2184
1967
|
*/
|
|
2185
|
-
declare function createMintInterface(
|
|
2186
|
-
rpc: Rpc,
|
|
2187
|
-
payer: Signer,
|
|
2188
|
-
mintAuthority: PublicKey | Signer,
|
|
2189
|
-
freezeAuthority: PublicKey | Signer | null,
|
|
2190
|
-
decimals: number,
|
|
2191
|
-
keypair?: Keypair,
|
|
2192
|
-
confirmOptions?: ConfirmOptions,
|
|
2193
|
-
programId?: PublicKey,
|
|
2194
|
-
tokenMetadata?: TokenMetadataInstructionData,
|
|
2195
|
-
outputStateTreeInfo?: TreeInfo,
|
|
2196
|
-
addressTreeInfo?: AddressTreeInfo,
|
|
2197
|
-
): Promise<{
|
|
1968
|
+
declare function createMintInterface(rpc: Rpc, payer: Signer, mintAuthority: PublicKey | Signer, freezeAuthority: PublicKey | Signer | null, decimals: number, keypair?: Keypair, confirmOptions?: ConfirmOptions, programId?: PublicKey, tokenMetadata?: TokenMetadataInstructionData, outputStateTreeInfo?: TreeInfo, addressTreeInfo?: AddressTreeInfo): Promise<{
|
|
2198
1969
|
mint: PublicKey;
|
|
2199
1970
|
transactionSignature: TransactionSignature;
|
|
2200
1971
|
}>;
|
|
@@ -2209,14 +1980,7 @@ declare function createMintInterface(
|
|
|
2209
1980
|
* @param newMintAuthority New mint authority (or null to revoke)
|
|
2210
1981
|
* @param confirmOptions Optional confirm options
|
|
2211
1982
|
*/
|
|
2212
|
-
declare function updateMintAuthority(
|
|
2213
|
-
rpc: Rpc,
|
|
2214
|
-
payer: Signer,
|
|
2215
|
-
mint: PublicKey,
|
|
2216
|
-
currentMintAuthority: Signer,
|
|
2217
|
-
newMintAuthority: PublicKey | null,
|
|
2218
|
-
confirmOptions?: ConfirmOptions,
|
|
2219
|
-
): Promise<TransactionSignature>;
|
|
1983
|
+
declare function updateMintAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentMintAuthority: Signer, newMintAuthority: PublicKey | null, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2220
1984
|
/**
|
|
2221
1985
|
* Update the freeze authority of a compressed token mint.
|
|
2222
1986
|
*
|
|
@@ -2227,14 +1991,7 @@ declare function updateMintAuthority(
|
|
|
2227
1991
|
* @param newFreezeAuthority New freeze authority (or null to revoke)
|
|
2228
1992
|
* @param confirmOptions Optional confirm options
|
|
2229
1993
|
*/
|
|
2230
|
-
declare function updateFreezeAuthority(
|
|
2231
|
-
rpc: Rpc,
|
|
2232
|
-
payer: Signer,
|
|
2233
|
-
mint: PublicKey,
|
|
2234
|
-
currentFreezeAuthority: Signer,
|
|
2235
|
-
newFreezeAuthority: PublicKey | null,
|
|
2236
|
-
confirmOptions?: ConfirmOptions,
|
|
2237
|
-
): Promise<TransactionSignature>;
|
|
1994
|
+
declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentFreezeAuthority: Signer, newFreezeAuthority: PublicKey | null, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2238
1995
|
|
|
2239
1996
|
/**
|
|
2240
1997
|
* Update a metadata field on a compressed token mint.
|
|
@@ -2249,17 +2006,7 @@ declare function updateFreezeAuthority(
|
|
|
2249
2006
|
* @param extensionIndex Extension index (default: 0)
|
|
2250
2007
|
* @param confirmOptions Optional confirm options
|
|
2251
2008
|
*/
|
|
2252
|
-
declare function updateMetadataField(
|
|
2253
|
-
rpc: Rpc,
|
|
2254
|
-
payer: Signer,
|
|
2255
|
-
mint: PublicKey,
|
|
2256
|
-
authority: Signer,
|
|
2257
|
-
fieldType: 'name' | 'symbol' | 'uri' | 'custom',
|
|
2258
|
-
value: string,
|
|
2259
|
-
customKey?: string,
|
|
2260
|
-
extensionIndex?: number,
|
|
2261
|
-
confirmOptions?: ConfirmOptions,
|
|
2262
|
-
): Promise<TransactionSignature>;
|
|
2009
|
+
declare function updateMetadataField(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, fieldType: 'name' | 'symbol' | 'uri' | 'custom', value: string, customKey?: string, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2263
2010
|
/**
|
|
2264
2011
|
* Update the metadata authority of a compressed token mint.
|
|
2265
2012
|
*
|
|
@@ -2271,15 +2018,7 @@ declare function updateMetadataField(
|
|
|
2271
2018
|
* @param extensionIndex Extension index (default: 0)
|
|
2272
2019
|
* @param confirmOptions Optional confirm options
|
|
2273
2020
|
*/
|
|
2274
|
-
declare function updateMetadataAuthority(
|
|
2275
|
-
rpc: Rpc,
|
|
2276
|
-
payer: Signer,
|
|
2277
|
-
mint: PublicKey,
|
|
2278
|
-
currentAuthority: Signer,
|
|
2279
|
-
newAuthority: PublicKey,
|
|
2280
|
-
extensionIndex?: number,
|
|
2281
|
-
confirmOptions?: ConfirmOptions,
|
|
2282
|
-
): Promise<TransactionSignature>;
|
|
2021
|
+
declare function updateMetadataAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentAuthority: Signer, newAuthority: PublicKey, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2283
2022
|
/**
|
|
2284
2023
|
* Remove a metadata key from a compressed token mint.
|
|
2285
2024
|
*
|
|
@@ -2292,16 +2031,7 @@ declare function updateMetadataAuthority(
|
|
|
2292
2031
|
* @param extensionIndex Extension index (default: 0)
|
|
2293
2032
|
* @param confirmOptions Optional confirm options
|
|
2294
2033
|
*/
|
|
2295
|
-
declare function removeMetadataKey(
|
|
2296
|
-
rpc: Rpc,
|
|
2297
|
-
payer: Signer,
|
|
2298
|
-
mint: PublicKey,
|
|
2299
|
-
authority: Signer,
|
|
2300
|
-
key: string,
|
|
2301
|
-
idempotent?: boolean,
|
|
2302
|
-
extensionIndex?: number,
|
|
2303
|
-
confirmOptions?: ConfirmOptions,
|
|
2304
|
-
): Promise<TransactionSignature>;
|
|
2034
|
+
declare function removeMetadataKey(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, key: string, idempotent?: boolean, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2305
2035
|
|
|
2306
2036
|
/**
|
|
2307
2037
|
* Create an associated token account for SPL/T22/c-token. Defaults to c-token
|
|
@@ -2320,17 +2050,7 @@ declare function removeMetadataKey(
|
|
|
2320
2050
|
* @param ctokenConfig Optional rent config
|
|
2321
2051
|
* @returns Address of the new associated token account
|
|
2322
2052
|
*/
|
|
2323
|
-
declare function createAtaInterface(
|
|
2324
|
-
rpc: Rpc,
|
|
2325
|
-
payer: Signer,
|
|
2326
|
-
mint: PublicKey,
|
|
2327
|
-
owner: PublicKey,
|
|
2328
|
-
allowOwnerOffCurve?: boolean,
|
|
2329
|
-
confirmOptions?: ConfirmOptions,
|
|
2330
|
-
programId?: PublicKey,
|
|
2331
|
-
associatedTokenProgramId?: PublicKey,
|
|
2332
|
-
ctokenConfig?: CTokenConfig,
|
|
2333
|
-
): Promise<PublicKey>;
|
|
2053
|
+
declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, ctokenConfig?: CTokenConfig): Promise<PublicKey>;
|
|
2334
2054
|
/**
|
|
2335
2055
|
* Create an associated token account idempotently for SPL/T22/c-token. Defaults
|
|
2336
2056
|
* to c-token program.
|
|
@@ -2351,28 +2071,9 @@ declare function createAtaInterface(
|
|
|
2351
2071
|
*
|
|
2352
2072
|
* @returns Address of the associated token account
|
|
2353
2073
|
*/
|
|
2354
|
-
declare function createAtaInterfaceIdempotent(
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
mint: PublicKey,
|
|
2358
|
-
owner: PublicKey,
|
|
2359
|
-
allowOwnerOffCurve?: boolean,
|
|
2360
|
-
confirmOptions?: ConfirmOptions,
|
|
2361
|
-
programId?: PublicKey,
|
|
2362
|
-
associatedTokenProgramId?: PublicKey,
|
|
2363
|
-
ctokenConfig?: CTokenConfig,
|
|
2364
|
-
): Promise<PublicKey>;
|
|
2365
|
-
|
|
2366
|
-
declare function mintTo$1(
|
|
2367
|
-
rpc: Rpc,
|
|
2368
|
-
payer: Signer,
|
|
2369
|
-
mint: PublicKey,
|
|
2370
|
-
recipientAccount: PublicKey,
|
|
2371
|
-
authority: Signer,
|
|
2372
|
-
amount: number | bigint,
|
|
2373
|
-
outputQueue?: PublicKey,
|
|
2374
|
-
confirmOptions?: ConfirmOptions,
|
|
2375
|
-
): Promise<TransactionSignature>;
|
|
2074
|
+
declare function createAtaInterfaceIdempotent(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, ctokenConfig?: CTokenConfig): Promise<PublicKey>;
|
|
2075
|
+
|
|
2076
|
+
declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, recipientAccount: PublicKey, authority: Signer, amount: number | bigint, outputQueue?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2376
2077
|
|
|
2377
2078
|
/**
|
|
2378
2079
|
* Mint compressed tokens directly to compressed accounts.
|
|
@@ -2386,19 +2087,10 @@ declare function mintTo$1(
|
|
|
2386
2087
|
* @param tokenAccountVersion Token account version (default: 3)
|
|
2387
2088
|
* @param confirmOptions Optional confirm options
|
|
2388
2089
|
*/
|
|
2389
|
-
declare function mintToCompressed(
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
authority: Signer,
|
|
2394
|
-
recipients: Array<{
|
|
2395
|
-
recipient: PublicKey;
|
|
2396
|
-
amount: number | bigint;
|
|
2397
|
-
}>,
|
|
2398
|
-
outputStateTreeInfo?: TreeInfo,
|
|
2399
|
-
tokenAccountVersion?: number,
|
|
2400
|
-
confirmOptions?: ConfirmOptions,
|
|
2401
|
-
): Promise<TransactionSignature>;
|
|
2090
|
+
declare function mintToCompressed(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, recipients: Array<{
|
|
2091
|
+
recipient: PublicKey;
|
|
2092
|
+
amount: number | bigint;
|
|
2093
|
+
}>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2402
2094
|
|
|
2403
2095
|
/**
|
|
2404
2096
|
* Mint tokens to a decompressed/onchain token account.
|
|
@@ -2419,17 +2111,7 @@ declare function mintToCompressed(
|
|
|
2419
2111
|
*
|
|
2420
2112
|
* @returns Transaction signature
|
|
2421
2113
|
*/
|
|
2422
|
-
declare function mintToInterface(
|
|
2423
|
-
rpc: Rpc,
|
|
2424
|
-
payer: Signer,
|
|
2425
|
-
mint: PublicKey,
|
|
2426
|
-
destination: PublicKey,
|
|
2427
|
-
authority: Signer | PublicKey,
|
|
2428
|
-
amount: number | bigint,
|
|
2429
|
-
multiSigners?: Signer[],
|
|
2430
|
-
confirmOptions?: ConfirmOptions,
|
|
2431
|
-
programId?: PublicKey,
|
|
2432
|
-
): Promise<TransactionSignature>;
|
|
2114
|
+
declare function mintToInterface(rpc: Rpc, payer: Signer, mint: PublicKey, destination: PublicKey, authority: Signer | PublicKey, amount: number | bigint, multiSigners?: Signer[], confirmOptions?: ConfirmOptions, programId?: PublicKey): Promise<TransactionSignature>;
|
|
2433
2115
|
|
|
2434
2116
|
/**
|
|
2435
2117
|
* Decompress compressed (cold) tokens to an on-chain token account.
|
|
@@ -2447,17 +2129,7 @@ declare function mintToInterface(
|
|
|
2447
2129
|
* @param confirmOptions Confirm options
|
|
2448
2130
|
* @returns Transaction signature, null if nothing to load.
|
|
2449
2131
|
*/
|
|
2450
|
-
declare function decompressInterface(
|
|
2451
|
-
rpc: Rpc,
|
|
2452
|
-
payer: Signer,
|
|
2453
|
-
owner: Signer,
|
|
2454
|
-
mint: PublicKey,
|
|
2455
|
-
amount?: number | bigint | BN,
|
|
2456
|
-
destinationAta?: PublicKey,
|
|
2457
|
-
destinationOwner?: PublicKey,
|
|
2458
|
-
splInterfaceInfo?: SplInterfaceInfo,
|
|
2459
|
-
confirmOptions?: ConfirmOptions,
|
|
2460
|
-
): Promise<TransactionSignature | null>;
|
|
2132
|
+
declare function decompressInterface(rpc: Rpc, payer: Signer, owner: Signer, mint: PublicKey, amount?: number | bigint | BN, destinationAta?: PublicKey, destinationOwner?: PublicKey, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature | null>;
|
|
2461
2133
|
|
|
2462
2134
|
/**
|
|
2463
2135
|
* Wrap tokens from an SPL/T22 account to a c-token account.
|
|
@@ -2491,17 +2163,7 @@ declare function decompressInterface(
|
|
|
2491
2163
|
*
|
|
2492
2164
|
* @returns Transaction signature
|
|
2493
2165
|
*/
|
|
2494
|
-
declare function wrap(
|
|
2495
|
-
rpc: Rpc,
|
|
2496
|
-
payer: Signer,
|
|
2497
|
-
source: PublicKey,
|
|
2498
|
-
destination: PublicKey,
|
|
2499
|
-
owner: Signer,
|
|
2500
|
-
mint: PublicKey,
|
|
2501
|
-
amount: bigint,
|
|
2502
|
-
splInterfaceInfo?: SplInterfaceInfo,
|
|
2503
|
-
confirmOptions?: ConfirmOptions,
|
|
2504
|
-
): Promise<TransactionSignature>;
|
|
2166
|
+
declare function wrap(rpc: Rpc, payer: Signer, source: PublicKey, destination: PublicKey, owner: Signer, mint: PublicKey, amount: bigint, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2505
2167
|
|
|
2506
2168
|
/**
|
|
2507
2169
|
* Unwrap c-tokens to SPL tokens.
|
|
@@ -2517,16 +2179,7 @@ declare function wrap(
|
|
|
2517
2179
|
*
|
|
2518
2180
|
* @returns Transaction signature
|
|
2519
2181
|
*/
|
|
2520
|
-
declare function unwrap(
|
|
2521
|
-
rpc: Rpc,
|
|
2522
|
-
payer: Signer,
|
|
2523
|
-
destination: PublicKey,
|
|
2524
|
-
owner: Signer,
|
|
2525
|
-
mint: PublicKey,
|
|
2526
|
-
amount?: number | bigint | BN,
|
|
2527
|
-
splInterfaceInfo?: SplInterfaceInfo,
|
|
2528
|
-
confirmOptions?: ConfirmOptions,
|
|
2529
|
-
): Promise<TransactionSignature>;
|
|
2182
|
+
declare function unwrap(rpc: Rpc, payer: Signer, destination: PublicKey, owner: Signer, mint: PublicKey, amount?: number | bigint | BN, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2530
2183
|
|
|
2531
2184
|
/**
|
|
2532
2185
|
* Create instructions to load an ATA from its AccountInterface.
|
|
@@ -2544,14 +2197,7 @@ declare function unwrap(
|
|
|
2544
2197
|
* @param targetAta Target ATA address (used for type detection in standard mode)
|
|
2545
2198
|
* @returns Array of instructions (empty if nothing to load)
|
|
2546
2199
|
*/
|
|
2547
|
-
declare function createLoadAtaInstructionsFromInterface(
|
|
2548
|
-
rpc: Rpc,
|
|
2549
|
-
payer: PublicKey,
|
|
2550
|
-
ata: AccountInterface,
|
|
2551
|
-
options?: InterfaceOptions,
|
|
2552
|
-
wrap?: boolean,
|
|
2553
|
-
targetAta?: PublicKey,
|
|
2554
|
-
): Promise<TransactionInstruction[]>;
|
|
2200
|
+
declare function createLoadAtaInstructionsFromInterface(rpc: Rpc, payer: PublicKey, ata: AccountInterface, options?: InterfaceOptions, wrap?: boolean, targetAta?: PublicKey): Promise<TransactionInstruction[]>;
|
|
2555
2201
|
|
|
2556
2202
|
/**
|
|
2557
2203
|
* Input for creating off-chain metadata JSON.
|
|
@@ -2609,17 +2255,12 @@ interface OffChainTokenMetadataJson {
|
|
|
2609
2255
|
* // Then use uri with createMint
|
|
2610
2256
|
* await createMint(rpc, payer, { ...params, uri });
|
|
2611
2257
|
*/
|
|
2612
|
-
declare function toOffChainMetadataJson(
|
|
2613
|
-
meta: OffChainTokenMetadata,
|
|
2614
|
-
): OffChainTokenMetadataJson;
|
|
2258
|
+
declare function toOffChainMetadataJson(meta: OffChainTokenMetadata): OffChainTokenMetadataJson;
|
|
2615
2259
|
|
|
2616
2260
|
/**
|
|
2617
2261
|
* Returns the compressed mint address as bytes.
|
|
2618
2262
|
*/
|
|
2619
|
-
declare function deriveCMintAddress(
|
|
2620
|
-
mintSeed: PublicKey,
|
|
2621
|
-
addressTreeInfo: TreeInfo,
|
|
2622
|
-
): number[];
|
|
2263
|
+
declare function deriveCMintAddress(mintSeed: PublicKey, addressTreeInfo: TreeInfo): number[];
|
|
2623
2264
|
declare const COMPRESSED_MINT_SEED: Buffer$1;
|
|
2624
2265
|
/**
|
|
2625
2266
|
* Finds the SPL mint PDA for a c-token mint.
|
|
@@ -2627,14 +2268,8 @@ declare const COMPRESSED_MINT_SEED: Buffer$1;
|
|
|
2627
2268
|
* @returns [PDA, bump]
|
|
2628
2269
|
*/
|
|
2629
2270
|
declare function findMintAddress(mintSigner: PublicKey): [PublicKey, number];
|
|
2630
|
-
declare function getAssociatedCTokenAddressAndBump(
|
|
2631
|
-
|
|
2632
|
-
mint: PublicKey,
|
|
2633
|
-
): [PublicKey, number];
|
|
2634
|
-
declare function getAssociatedCTokenAddress(
|
|
2635
|
-
owner: PublicKey,
|
|
2636
|
-
mint: PublicKey,
|
|
2637
|
-
): PublicKey;
|
|
2271
|
+
declare function getAssociatedCTokenAddressAndBump(owner: PublicKey, mint: PublicKey): [PublicKey, number];
|
|
2272
|
+
declare function getAssociatedCTokenAddress(owner: PublicKey, mint: PublicKey): PublicKey;
|
|
2638
2273
|
|
|
2639
2274
|
/**
|
|
2640
2275
|
* Approve a delegate to spend tokens
|
|
@@ -2649,15 +2284,7 @@ declare function getAssociatedCTokenAddress(
|
|
|
2649
2284
|
*
|
|
2650
2285
|
* @return Signature of the confirmed transaction
|
|
2651
2286
|
*/
|
|
2652
|
-
declare function approve(
|
|
2653
|
-
rpc: Rpc,
|
|
2654
|
-
payer: Signer,
|
|
2655
|
-
mint: PublicKey,
|
|
2656
|
-
amount: number | BN,
|
|
2657
|
-
owner: Signer,
|
|
2658
|
-
delegate: PublicKey,
|
|
2659
|
-
confirmOptions?: ConfirmOptions,
|
|
2660
|
-
): Promise<TransactionSignature>;
|
|
2287
|
+
declare function approve(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, delegate: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2661
2288
|
|
|
2662
2289
|
/**
|
|
2663
2290
|
* Mint compressed tokens to a solana address from an external mint authority
|
|
@@ -2676,17 +2303,7 @@ declare function approve(
|
|
|
2676
2303
|
*
|
|
2677
2304
|
* @return Signature of the confirmed transaction
|
|
2678
2305
|
*/
|
|
2679
|
-
declare function approveAndMintTo(
|
|
2680
|
-
rpc: Rpc,
|
|
2681
|
-
payer: Signer,
|
|
2682
|
-
mint: PublicKey,
|
|
2683
|
-
toPubkey: PublicKey,
|
|
2684
|
-
authority: Signer,
|
|
2685
|
-
amount: number | BN,
|
|
2686
|
-
outputStateTreeInfo?: TreeInfo,
|
|
2687
|
-
splInterfaceInfo?: SplInterfaceInfo,
|
|
2688
|
-
confirmOptions?: ConfirmOptions,
|
|
2689
|
-
): Promise<TransactionSignature>;
|
|
2306
|
+
declare function approveAndMintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: PublicKey, authority: Signer, amount: number | BN, outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2690
2307
|
|
|
2691
2308
|
/**
|
|
2692
2309
|
* Compress SPL tokens
|
|
@@ -2706,18 +2323,7 @@ declare function approveAndMintTo(
|
|
|
2706
2323
|
*
|
|
2707
2324
|
* @return Signature of the confirmed transaction
|
|
2708
2325
|
*/
|
|
2709
|
-
declare function compress(
|
|
2710
|
-
rpc: Rpc,
|
|
2711
|
-
payer: Signer,
|
|
2712
|
-
mint: PublicKey,
|
|
2713
|
-
amount: number | BN | number[] | BN[],
|
|
2714
|
-
owner: Signer,
|
|
2715
|
-
sourceTokenAccount: PublicKey,
|
|
2716
|
-
toAddress: PublicKey | Array<PublicKey>,
|
|
2717
|
-
outputStateTreeInfo?: TreeInfo,
|
|
2718
|
-
splInterfaceInfo?: SplInterfaceInfo,
|
|
2719
|
-
confirmOptions?: ConfirmOptions,
|
|
2720
|
-
): Promise<TransactionSignature>;
|
|
2326
|
+
declare function compress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN | number[] | BN[], owner: Signer, sourceTokenAccount: PublicKey, toAddress: PublicKey | Array<PublicKey>, outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2721
2327
|
|
|
2722
2328
|
/**
|
|
2723
2329
|
* Compress SPL tokens into compressed token format
|
|
@@ -2737,17 +2343,7 @@ declare function compress(
|
|
|
2737
2343
|
*
|
|
2738
2344
|
* @return Signature of the confirmed transaction
|
|
2739
2345
|
*/
|
|
2740
|
-
declare function compressSplTokenAccount(
|
|
2741
|
-
rpc: Rpc,
|
|
2742
|
-
payer: Signer,
|
|
2743
|
-
mint: PublicKey,
|
|
2744
|
-
owner: Signer,
|
|
2745
|
-
tokenAccount: PublicKey,
|
|
2746
|
-
remainingAmount?: BN,
|
|
2747
|
-
outputStateTreeInfo?: TreeInfo,
|
|
2748
|
-
splInterfaceInfo?: SplInterfaceInfo,
|
|
2749
|
-
confirmOptions?: ConfirmOptions,
|
|
2750
|
-
): Promise<TransactionSignature>;
|
|
2346
|
+
declare function compressSplTokenAccount(rpc: Rpc, payer: Signer, mint: PublicKey, owner: Signer, tokenAccount: PublicKey, remainingAmount?: BN, outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2751
2347
|
|
|
2752
2348
|
/**
|
|
2753
2349
|
* Create and initialize a new SPL token mint
|
|
@@ -2767,16 +2363,7 @@ declare function compressSplTokenAccount(
|
|
|
2767
2363
|
*
|
|
2768
2364
|
* @return Object with mint address and transaction signature
|
|
2769
2365
|
*/
|
|
2770
|
-
declare function createMint(
|
|
2771
|
-
rpc: Rpc,
|
|
2772
|
-
payer: Signer,
|
|
2773
|
-
mintAuthority: PublicKey | Signer,
|
|
2774
|
-
decimals: number,
|
|
2775
|
-
keypair?: Keypair,
|
|
2776
|
-
confirmOptions?: ConfirmOptions,
|
|
2777
|
-
tokenProgramId?: PublicKey | boolean,
|
|
2778
|
-
freezeAuthority?: PublicKey | Signer | null,
|
|
2779
|
-
): Promise<{
|
|
2366
|
+
declare function createMint(rpc: Rpc, payer: Signer, mintAuthority: PublicKey | Signer, decimals: number, keypair?: Keypair, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey | boolean, freezeAuthority?: PublicKey | Signer | null): Promise<{
|
|
2780
2367
|
mint: PublicKey;
|
|
2781
2368
|
transactionSignature: TransactionSignature;
|
|
2782
2369
|
}>;
|
|
@@ -2793,13 +2380,7 @@ declare function createMint(
|
|
|
2793
2380
|
*
|
|
2794
2381
|
* @return transaction signature
|
|
2795
2382
|
*/
|
|
2796
|
-
declare function createSplInterface(
|
|
2797
|
-
rpc: Rpc,
|
|
2798
|
-
payer: Signer,
|
|
2799
|
-
mint: PublicKey,
|
|
2800
|
-
confirmOptions?: ConfirmOptions,
|
|
2801
|
-
tokenProgramId?: PublicKey,
|
|
2802
|
-
): Promise<TransactionSignature>;
|
|
2383
|
+
declare function createSplInterface(rpc: Rpc, payer: Signer, mint: PublicKey, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey): Promise<TransactionSignature>;
|
|
2803
2384
|
/**
|
|
2804
2385
|
* @deprecated Use {@link createSplInterface} instead.
|
|
2805
2386
|
*/
|
|
@@ -2818,14 +2399,7 @@ declare const createTokenPool: typeof createSplInterface;
|
|
|
2818
2399
|
*
|
|
2819
2400
|
* @return transaction signature
|
|
2820
2401
|
*/
|
|
2821
|
-
declare function addSplInterfaces(
|
|
2822
|
-
rpc: Rpc,
|
|
2823
|
-
payer: Signer,
|
|
2824
|
-
mint: PublicKey,
|
|
2825
|
-
numMaxAdditionalPools: number,
|
|
2826
|
-
confirmOptions?: ConfirmOptions,
|
|
2827
|
-
tokenProgramId?: PublicKey,
|
|
2828
|
-
): Promise<string>;
|
|
2402
|
+
declare function addSplInterfaces(rpc: Rpc, payer: Signer, mint: PublicKey, numMaxAdditionalPools: number, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey): Promise<string>;
|
|
2829
2403
|
/**
|
|
2830
2404
|
* @deprecated Use {@link addSplInterfaces} instead.
|
|
2831
2405
|
*/
|
|
@@ -2845,13 +2419,7 @@ declare const addTokenPools: typeof addSplInterfaces;
|
|
|
2845
2419
|
* @return Object with transaction signatures and the address of the created
|
|
2846
2420
|
* lookup table
|
|
2847
2421
|
*/
|
|
2848
|
-
declare function createTokenProgramLookupTable(
|
|
2849
|
-
rpc: Rpc,
|
|
2850
|
-
payer: Signer,
|
|
2851
|
-
authority: Signer,
|
|
2852
|
-
mints?: PublicKey[],
|
|
2853
|
-
additionalAccounts?: PublicKey[],
|
|
2854
|
-
): Promise<{
|
|
2422
|
+
declare function createTokenProgramLookupTable(rpc: Rpc, payer: Signer, authority: Signer, mints?: PublicKey[], additionalAccounts?: PublicKey[]): Promise<{
|
|
2855
2423
|
txIds: TransactionSignature[];
|
|
2856
2424
|
address: PublicKey;
|
|
2857
2425
|
}>;
|
|
@@ -2871,16 +2439,7 @@ declare function createTokenProgramLookupTable(
|
|
|
2871
2439
|
*
|
|
2872
2440
|
* @return confirmed transaction signature
|
|
2873
2441
|
*/
|
|
2874
|
-
declare function decompress(
|
|
2875
|
-
rpc: Rpc,
|
|
2876
|
-
payer: Signer,
|
|
2877
|
-
mint: PublicKey,
|
|
2878
|
-
amount: number | BN,
|
|
2879
|
-
owner: Signer,
|
|
2880
|
-
toAddress: PublicKey,
|
|
2881
|
-
splInterfaceInfos?: SplInterfaceInfo[],
|
|
2882
|
-
confirmOptions?: ConfirmOptions,
|
|
2883
|
-
): Promise<TransactionSignature>;
|
|
2442
|
+
declare function decompress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, splInterfaceInfos?: SplInterfaceInfo[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2884
2443
|
|
|
2885
2444
|
/**
|
|
2886
2445
|
* Merge multiple compressed token accounts for a given mint into fewer
|
|
@@ -2900,13 +2459,7 @@ declare function decompress(
|
|
|
2900
2459
|
*
|
|
2901
2460
|
* @return confirmed transaction signature
|
|
2902
2461
|
*/
|
|
2903
|
-
declare function mergeTokenAccounts(
|
|
2904
|
-
rpc: Rpc,
|
|
2905
|
-
payer: Signer,
|
|
2906
|
-
mint: PublicKey,
|
|
2907
|
-
owner: Signer,
|
|
2908
|
-
confirmOptions?: ConfirmOptions,
|
|
2909
|
-
): Promise<TransactionSignature>;
|
|
2462
|
+
declare function mergeTokenAccounts(rpc: Rpc, payer: Signer, mint: PublicKey, owner: Signer, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2910
2463
|
|
|
2911
2464
|
/**
|
|
2912
2465
|
* Mint compressed tokens to a solana address
|
|
@@ -2928,17 +2481,7 @@ declare function mergeTokenAccounts(
|
|
|
2928
2481
|
*
|
|
2929
2482
|
* @return Signature of the confirmed transaction
|
|
2930
2483
|
*/
|
|
2931
|
-
declare function mintTo(
|
|
2932
|
-
rpc: Rpc,
|
|
2933
|
-
payer: Signer,
|
|
2934
|
-
mint: PublicKey,
|
|
2935
|
-
toPubkey: PublicKey | PublicKey[],
|
|
2936
|
-
authority: Signer,
|
|
2937
|
-
amount: number | BN | number[] | BN[],
|
|
2938
|
-
outputStateTreeInfo?: TreeInfo,
|
|
2939
|
-
splInterfaceInfo?: SplInterfaceInfo,
|
|
2940
|
-
confirmOptions?: ConfirmOptions,
|
|
2941
|
-
): Promise<TransactionSignature>;
|
|
2484
|
+
declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: PublicKey | PublicKey[], authority: Signer, amount: number | BN | number[] | BN[], outputStateTreeInfo?: TreeInfo, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2942
2485
|
|
|
2943
2486
|
/**
|
|
2944
2487
|
* Revoke one or more delegated token accounts
|
|
@@ -2952,13 +2495,7 @@ declare function mintTo(
|
|
|
2952
2495
|
*
|
|
2953
2496
|
* @return Signature of the confirmed transaction
|
|
2954
2497
|
*/
|
|
2955
|
-
declare function revoke(
|
|
2956
|
-
rpc: Rpc,
|
|
2957
|
-
payer: Signer,
|
|
2958
|
-
accounts: ParsedTokenAccount[],
|
|
2959
|
-
owner: Signer,
|
|
2960
|
-
confirmOptions?: ConfirmOptions,
|
|
2961
|
-
): Promise<TransactionSignature>;
|
|
2498
|
+
declare function revoke(rpc: Rpc, payer: Signer, accounts: ParsedTokenAccount[], owner: Signer, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2962
2499
|
|
|
2963
2500
|
/**
|
|
2964
2501
|
* Transfer compressed tokens from one owner to another.
|
|
@@ -2976,15 +2513,7 @@ declare function revoke(
|
|
|
2976
2513
|
*
|
|
2977
2514
|
* @return confirmed transaction signature
|
|
2978
2515
|
*/
|
|
2979
|
-
declare function transfer(
|
|
2980
|
-
rpc: Rpc,
|
|
2981
|
-
payer: Signer,
|
|
2982
|
-
mint: PublicKey,
|
|
2983
|
-
amount: number | BN,
|
|
2984
|
-
owner: Signer,
|
|
2985
|
-
toAddress: PublicKey,
|
|
2986
|
-
confirmOptions?: ConfirmOptions,
|
|
2987
|
-
): Promise<TransactionSignature>;
|
|
2516
|
+
declare function transfer(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2988
2517
|
|
|
2989
2518
|
/**
|
|
2990
2519
|
* Transfer delegated compressed tokens to another owner
|
|
@@ -2999,15 +2528,7 @@ declare function transfer(
|
|
|
2999
2528
|
*
|
|
3000
2529
|
* @return confirmed transaction signature
|
|
3001
2530
|
*/
|
|
3002
|
-
declare function transferDelegated(
|
|
3003
|
-
rpc: Rpc,
|
|
3004
|
-
payer: Signer,
|
|
3005
|
-
mint: PublicKey,
|
|
3006
|
-
amount: number | BN,
|
|
3007
|
-
owner: Signer,
|
|
3008
|
-
toAddress: PublicKey,
|
|
3009
|
-
confirmOptions?: ConfirmOptions,
|
|
3010
|
-
): Promise<TransactionSignature>;
|
|
2531
|
+
declare function transferDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
3011
2532
|
|
|
3012
2533
|
/**
|
|
3013
2534
|
* Decompress delegated compressed tokens. Remaining compressed tokens are
|
|
@@ -3025,21 +2546,10 @@ declare function transferDelegated(
|
|
|
3025
2546
|
*
|
|
3026
2547
|
* @return Signature of the confirmed transaction
|
|
3027
2548
|
*/
|
|
3028
|
-
declare function decompressDelegated(
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
amount: number | BN,
|
|
3033
|
-
owner: Signer,
|
|
3034
|
-
toAddress: PublicKey,
|
|
3035
|
-
splInterfaceInfos?: SplInterfaceInfo[],
|
|
3036
|
-
confirmOptions?: ConfirmOptions,
|
|
3037
|
-
): Promise<TransactionSignature>;
|
|
3038
|
-
|
|
3039
|
-
declare const ERROR_NO_ACCOUNTS_FOUND =
|
|
3040
|
-
'Could not find accounts to select for transfer.';
|
|
3041
|
-
declare const ERROR_MIXED_TREE_TYPES =
|
|
3042
|
-
'Cannot select accounts from different tree types (V1/V2) in the same batch. Filter accounts by tree type first.';
|
|
2549
|
+
declare function decompressDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, splInterfaceInfos?: SplInterfaceInfo[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2550
|
+
|
|
2551
|
+
declare const ERROR_NO_ACCOUNTS_FOUND = "Could not find accounts to select for transfer.";
|
|
2552
|
+
declare const ERROR_MIXED_TREE_TYPES = "Cannot select accounts from different tree types (V1/V2) in the same batch. Filter accounts by tree type first.";
|
|
3043
2553
|
/**
|
|
3044
2554
|
* Options for input account selection
|
|
3045
2555
|
*/
|
|
@@ -3054,9 +2564,7 @@ interface SelectInputAccountsOptions {
|
|
|
3054
2564
|
/**
|
|
3055
2565
|
* Groups accounts by tree type for separate processing
|
|
3056
2566
|
*/
|
|
3057
|
-
declare function groupAccountsByTreeType(
|
|
3058
|
-
accounts: ParsedTokenAccount[],
|
|
3059
|
-
): Map<TreeType, ParsedTokenAccount[]>;
|
|
2567
|
+
declare function groupAccountsByTreeType(accounts: ParsedTokenAccount[]): Map<TreeType, ParsedTokenAccount[]>;
|
|
3060
2568
|
/**
|
|
3061
2569
|
* Result of selectAccountsByPreferredTreeType
|
|
3062
2570
|
*/
|
|
@@ -3081,10 +2589,7 @@ interface SelectedAccountsResult {
|
|
|
3081
2589
|
* @param requiredAmount Minimum amount needed (optional - if not provided, returns all from preferred type)
|
|
3082
2590
|
* @returns Selected accounts from a single tree type
|
|
3083
2591
|
*/
|
|
3084
|
-
declare function selectAccountsByPreferredTreeType(
|
|
3085
|
-
accounts: ParsedTokenAccount[],
|
|
3086
|
-
requiredAmount?: BN,
|
|
3087
|
-
): SelectedAccountsResult;
|
|
2592
|
+
declare function selectAccountsByPreferredTreeType(accounts: ParsedTokenAccount[], requiredAmount?: BN): SelectedAccountsResult;
|
|
3088
2593
|
/**
|
|
3089
2594
|
* Selects token accounts for approval, first trying to find an exact match, then falling back to minimum selection.
|
|
3090
2595
|
*
|
|
@@ -3103,16 +2608,11 @@ declare function selectAccountsByPreferredTreeType(
|
|
|
3103
2608
|
* - totalLamports: Total lamports from selected accounts.
|
|
3104
2609
|
* - maxPossibleAmount: Max approvable amount given maxInputs.
|
|
3105
2610
|
*/
|
|
3106
|
-
declare function selectTokenAccountsForApprove(
|
|
3107
|
-
accounts: ParsedTokenAccount[],
|
|
3108
|
-
approveAmount: BN,
|
|
3109
|
-
maxInputs?: number,
|
|
3110
|
-
options?: SelectInputAccountsOptions,
|
|
3111
|
-
): [
|
|
2611
|
+
declare function selectTokenAccountsForApprove(accounts: ParsedTokenAccount[], approveAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
|
|
3112
2612
|
selectedAccounts: ParsedTokenAccount[],
|
|
3113
2613
|
total: BN,
|
|
3114
2614
|
totalLamports: BN | null,
|
|
3115
|
-
maxPossibleAmount: BN
|
|
2615
|
+
maxPossibleAmount: BN
|
|
3116
2616
|
];
|
|
3117
2617
|
/**
|
|
3118
2618
|
* Selects the minimum number of compressed token accounts required for a
|
|
@@ -3126,12 +2626,7 @@ declare function selectTokenAccountsForApprove(
|
|
|
3126
2626
|
*
|
|
3127
2627
|
* @returns Returns selected accounts and their totals.
|
|
3128
2628
|
*/
|
|
3129
|
-
declare function selectMinCompressedTokenAccountsForDecompression(
|
|
3130
|
-
accounts: ParsedTokenAccount[],
|
|
3131
|
-
amount: BN,
|
|
3132
|
-
maxInputs?: number,
|
|
3133
|
-
options?: SelectInputAccountsOptions,
|
|
3134
|
-
): {
|
|
2629
|
+
declare function selectMinCompressedTokenAccountsForDecompression(accounts: ParsedTokenAccount[], amount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): {
|
|
3135
2630
|
selectedAccounts: ParsedTokenAccount[];
|
|
3136
2631
|
total: BN;
|
|
3137
2632
|
totalLamports: BN | null;
|
|
@@ -3155,31 +2650,22 @@ declare function selectMinCompressedTokenAccountsForDecompression(
|
|
|
3155
2650
|
* maxPossibleAmount: BN
|
|
3156
2651
|
* ]
|
|
3157
2652
|
*/
|
|
3158
|
-
declare function selectMinCompressedTokenAccountsForTransfer(
|
|
3159
|
-
accounts: ParsedTokenAccount[],
|
|
3160
|
-
transferAmount: BN,
|
|
3161
|
-
maxInputs?: number,
|
|
3162
|
-
options?: SelectInputAccountsOptions,
|
|
3163
|
-
): [
|
|
2653
|
+
declare function selectMinCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
|
|
3164
2654
|
selectedAccounts: ParsedTokenAccount[],
|
|
3165
2655
|
total: BN,
|
|
3166
2656
|
totalLamports: BN | null,
|
|
3167
|
-
maxPossibleAmount: BN
|
|
2657
|
+
maxPossibleAmount: BN
|
|
3168
2658
|
];
|
|
3169
2659
|
/**
|
|
3170
2660
|
* Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
|
|
3171
2661
|
* returns partial amounts if insufficient accounts are found instead of
|
|
3172
2662
|
* throwing an error.
|
|
3173
2663
|
*/
|
|
3174
|
-
declare function selectMinCompressedTokenAccountsForTransferOrPartial(
|
|
3175
|
-
accounts: ParsedTokenAccount[],
|
|
3176
|
-
transferAmount: BN,
|
|
3177
|
-
maxInputs?: number,
|
|
3178
|
-
): [
|
|
2664
|
+
declare function selectMinCompressedTokenAccountsForTransferOrPartial(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
|
|
3179
2665
|
selectedAccounts: ParsedTokenAccount[],
|
|
3180
2666
|
total: BN,
|
|
3181
2667
|
totalLamports: BN | null,
|
|
3182
|
-
maxPossibleAmount: BN
|
|
2668
|
+
maxPossibleAmount: BN
|
|
3183
2669
|
];
|
|
3184
2670
|
/**
|
|
3185
2671
|
* Selects compressed token accounts for a transfer, ensuring one extra account
|
|
@@ -3222,31 +2708,22 @@ declare function selectMinCompressedTokenAccountsForTransferOrPartial(
|
|
|
3222
2708
|
* console.log(totalLamports!.toString()); // '15'
|
|
3223
2709
|
* console.log(maxPossibleAmount.toString()); // '150'
|
|
3224
2710
|
*/
|
|
3225
|
-
declare function selectSmartCompressedTokenAccountsForTransfer(
|
|
3226
|
-
accounts: ParsedTokenAccount[],
|
|
3227
|
-
transferAmount: BN,
|
|
3228
|
-
maxInputs?: number,
|
|
3229
|
-
options?: SelectInputAccountsOptions,
|
|
3230
|
-
): [
|
|
2711
|
+
declare function selectSmartCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
|
|
3231
2712
|
selectedAccounts: ParsedTokenAccount[],
|
|
3232
2713
|
total: BN,
|
|
3233
2714
|
totalLamports: BN | null,
|
|
3234
|
-
maxPossibleAmount: BN
|
|
2715
|
+
maxPossibleAmount: BN
|
|
3235
2716
|
];
|
|
3236
2717
|
/**
|
|
3237
2718
|
* Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
|
|
3238
2719
|
* returns partial amounts if insufficient accounts are found instead of
|
|
3239
2720
|
* throwing an error.
|
|
3240
2721
|
*/
|
|
3241
|
-
declare function selectSmartCompressedTokenAccountsForTransferOrPartial(
|
|
3242
|
-
accounts: ParsedTokenAccount[],
|
|
3243
|
-
transferAmount: BN,
|
|
3244
|
-
maxInputs?: number,
|
|
3245
|
-
): [
|
|
2722
|
+
declare function selectSmartCompressedTokenAccountsForTransferOrPartial(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
|
|
3246
2723
|
selectedAccounts: ParsedTokenAccount[],
|
|
3247
2724
|
total: BN,
|
|
3248
2725
|
totalLamports: BN | null,
|
|
3249
|
-
maxPossibleAmount: BN
|
|
2726
|
+
maxPossibleAmount: BN
|
|
3250
2727
|
];
|
|
3251
2728
|
|
|
3252
2729
|
type TokenTransferOutputData = {
|
|
@@ -3319,9 +2796,7 @@ type CompressSplTokenAccountInstructionData = {
|
|
|
3319
2796
|
remainingAmount: BN | null;
|
|
3320
2797
|
cpiContext: CompressedCpiContext | null;
|
|
3321
2798
|
};
|
|
3322
|
-
declare function isSingleSplInterfaceInfo(
|
|
3323
|
-
splInterfaceInfos: SplInterfaceInfo | SplInterfaceInfo[],
|
|
3324
|
-
): splInterfaceInfos is SplInterfaceInfo;
|
|
2799
|
+
declare function isSingleSplInterfaceInfo(splInterfaceInfos: SplInterfaceInfo | SplInterfaceInfo[]): splInterfaceInfos is SplInterfaceInfo;
|
|
3325
2800
|
/**
|
|
3326
2801
|
* @deprecated Use {@link isSingleSplInterfaceInfo} instead.
|
|
3327
2802
|
*/
|
|
@@ -3432,9 +2907,7 @@ type PackCompressedTokenAccountsParams = {
|
|
|
3432
2907
|
/**
|
|
3433
2908
|
* Packs Compressed Token Accounts.
|
|
3434
2909
|
*/
|
|
3435
|
-
declare function packCompressedTokenAccounts(
|
|
3436
|
-
params: PackCompressedTokenAccountsParams,
|
|
3437
|
-
): {
|
|
2910
|
+
declare function packCompressedTokenAccounts(params: PackCompressedTokenAccountsParams): {
|
|
3438
2911
|
inputTokenDataWithContext: InputTokenDataWithContext$1[];
|
|
3439
2912
|
remainingAccountMetas: AccountMeta[];
|
|
3440
2913
|
packedOutputTokenData: PackedTokenTransferOutputData[];
|
|
@@ -3447,10 +2920,7 @@ declare function packCompressedTokenAccounts(
|
|
|
3447
2920
|
* @param mint The mint of the token pool
|
|
3448
2921
|
* @returns True if all input accounts belong to the same mint
|
|
3449
2922
|
*/
|
|
3450
|
-
declare function checkMint(
|
|
3451
|
-
compressedTokenAccounts: ParsedTokenAccount[],
|
|
3452
|
-
mint: PublicKey,
|
|
3453
|
-
): boolean;
|
|
2923
|
+
declare function checkMint(compressedTokenAccounts: ParsedTokenAccount[], mint: PublicKey): boolean;
|
|
3454
2924
|
|
|
3455
2925
|
type LightCompressedToken = {
|
|
3456
2926
|
version: '1.2.0';
|
|
@@ -3462,7 +2932,7 @@ type LightCompressedToken = {
|
|
|
3462
2932
|
'This instruction creates a token pool for a given mint. Every spl mint',
|
|
3463
2933
|
'can have one token pool. When a token is compressed the tokens are',
|
|
3464
2934
|
'transferrred to the token pool, and their compressed equivalent is',
|
|
3465
|
-
'minted into a Merkle tree.'
|
|
2935
|
+
'minted into a Merkle tree.'
|
|
3466
2936
|
];
|
|
3467
2937
|
accounts: [
|
|
3468
2938
|
{
|
|
@@ -3495,7 +2965,7 @@ type LightCompressedToken = {
|
|
|
3495
2965
|
name: 'cpiAuthorityPda';
|
|
3496
2966
|
isMut: false;
|
|
3497
2967
|
isSigner: false;
|
|
3498
|
-
}
|
|
2968
|
+
}
|
|
3499
2969
|
];
|
|
3500
2970
|
args: [];
|
|
3501
2971
|
},
|
|
@@ -3503,7 +2973,7 @@ type LightCompressedToken = {
|
|
|
3503
2973
|
name: 'addTokenPool';
|
|
3504
2974
|
docs: [
|
|
3505
2975
|
'This instruction creates an additional token pool for a given mint.',
|
|
3506
|
-
'The maximum number of token pools per mint is 5.'
|
|
2976
|
+
'The maximum number of token pools per mint is 5.'
|
|
3507
2977
|
];
|
|
3508
2978
|
accounts: [
|
|
3509
2979
|
{
|
|
@@ -3541,13 +3011,13 @@ type LightCompressedToken = {
|
|
|
3541
3011
|
name: 'cpiAuthorityPda';
|
|
3542
3012
|
isMut: false;
|
|
3543
3013
|
isSigner: false;
|
|
3544
|
-
}
|
|
3014
|
+
}
|
|
3545
3015
|
];
|
|
3546
3016
|
args: [
|
|
3547
3017
|
{
|
|
3548
3018
|
name: 'tokenPoolIndex';
|
|
3549
3019
|
type: 'u8';
|
|
3550
|
-
}
|
|
3020
|
+
}
|
|
3551
3021
|
];
|
|
3552
3022
|
},
|
|
3553
3023
|
{
|
|
@@ -3559,7 +3029,7 @@ type LightCompressedToken = {
|
|
|
3559
3029
|
'every amount and pubkey input pair. A constant amount of lamports can be',
|
|
3560
3030
|
'transferred to each output account to enable. A use case to add lamports',
|
|
3561
3031
|
'to a compressed token account is to prevent spam. This is the only way',
|
|
3562
|
-
'to add lamports to a compressed token account.'
|
|
3032
|
+
'to add lamports to a compressed token account.'
|
|
3563
3033
|
];
|
|
3564
3034
|
accounts: [
|
|
3565
3035
|
{
|
|
@@ -3639,7 +3109,7 @@ type LightCompressedToken = {
|
|
|
3639
3109
|
isMut: true;
|
|
3640
3110
|
isSigner: false;
|
|
3641
3111
|
isOptional: true;
|
|
3642
|
-
}
|
|
3112
|
+
}
|
|
3643
3113
|
];
|
|
3644
3114
|
args: [
|
|
3645
3115
|
{
|
|
@@ -3659,7 +3129,7 @@ type LightCompressedToken = {
|
|
|
3659
3129
|
type: {
|
|
3660
3130
|
option: 'u64';
|
|
3661
3131
|
};
|
|
3662
|
-
}
|
|
3132
|
+
}
|
|
3663
3133
|
];
|
|
3664
3134
|
},
|
|
3665
3135
|
{
|
|
@@ -3667,7 +3137,7 @@ type LightCompressedToken = {
|
|
|
3667
3137
|
docs: [
|
|
3668
3138
|
'Compresses the balance of an spl token account sub an optional remaining',
|
|
3669
3139
|
'amount. This instruction does not close the spl token account. To close',
|
|
3670
|
-
'the account bundle a close spl account instruction in your transaction.'
|
|
3140
|
+
'the account bundle a close spl account instruction in your transaction.'
|
|
3671
3141
|
];
|
|
3672
3142
|
accounts: [
|
|
3673
3143
|
{
|
|
@@ -3683,7 +3153,7 @@ type LightCompressedToken = {
|
|
|
3683
3153
|
docs: [
|
|
3684
3154
|
'Authority is verified through proof since both owner and delegate',
|
|
3685
3155
|
'are included in the token data hash, which is a public input to the',
|
|
3686
|
-
'validity proof.'
|
|
3156
|
+
'validity proof.'
|
|
3687
3157
|
];
|
|
3688
3158
|
},
|
|
3689
3159
|
{
|
|
@@ -3744,7 +3214,7 @@ type LightCompressedToken = {
|
|
|
3744
3214
|
name: 'systemProgram';
|
|
3745
3215
|
isMut: false;
|
|
3746
3216
|
isSigner: false;
|
|
3747
|
-
}
|
|
3217
|
+
}
|
|
3748
3218
|
];
|
|
3749
3219
|
args: [
|
|
3750
3220
|
{
|
|
@@ -3764,7 +3234,7 @@ type LightCompressedToken = {
|
|
|
3764
3234
|
defined: 'CompressedCpiContext';
|
|
3765
3235
|
};
|
|
3766
3236
|
};
|
|
3767
|
-
}
|
|
3237
|
+
}
|
|
3768
3238
|
];
|
|
3769
3239
|
},
|
|
3770
3240
|
{
|
|
@@ -3777,7 +3247,7 @@ type LightCompressedToken = {
|
|
|
3777
3247
|
'accounts specify less lamports than inputs the remaining lamports are',
|
|
3778
3248
|
'transferred to an output compressed account. Signer must be owner or',
|
|
3779
3249
|
'delegate. If a delegated token account is transferred the delegate is',
|
|
3780
|
-
'not preserved.'
|
|
3250
|
+
'not preserved.'
|
|
3781
3251
|
];
|
|
3782
3252
|
accounts: [
|
|
3783
3253
|
{
|
|
@@ -3793,7 +3263,7 @@ type LightCompressedToken = {
|
|
|
3793
3263
|
docs: [
|
|
3794
3264
|
'Authority is verified through proof since both owner and delegate',
|
|
3795
3265
|
'are included in the token data hash, which is a public input to the',
|
|
3796
|
-
'validity proof.'
|
|
3266
|
+
'validity proof.'
|
|
3797
3267
|
];
|
|
3798
3268
|
},
|
|
3799
3269
|
{
|
|
@@ -3854,13 +3324,13 @@ type LightCompressedToken = {
|
|
|
3854
3324
|
name: 'systemProgram';
|
|
3855
3325
|
isMut: false;
|
|
3856
3326
|
isSigner: false;
|
|
3857
|
-
}
|
|
3327
|
+
}
|
|
3858
3328
|
];
|
|
3859
3329
|
args: [
|
|
3860
3330
|
{
|
|
3861
3331
|
name: 'inputs';
|
|
3862
3332
|
type: 'bytes';
|
|
3863
|
-
}
|
|
3333
|
+
}
|
|
3864
3334
|
];
|
|
3865
3335
|
},
|
|
3866
3336
|
{
|
|
@@ -3871,7 +3341,7 @@ type LightCompressedToken = {
|
|
|
3871
3341
|
'be called by a delegate.',
|
|
3872
3342
|
'The instruction creates two output accounts:',
|
|
3873
3343
|
'1. one account with delegated amount',
|
|
3874
|
-
'2. one account with remaining(change) amount'
|
|
3344
|
+
'2. one account with remaining(change) amount'
|
|
3875
3345
|
];
|
|
3876
3346
|
accounts: [
|
|
3877
3347
|
{
|
|
@@ -3887,7 +3357,7 @@ type LightCompressedToken = {
|
|
|
3887
3357
|
docs: [
|
|
3888
3358
|
'Authority is verified through proof since both owner and delegate',
|
|
3889
3359
|
'are included in the token data hash, which is a public input to the',
|
|
3890
|
-
'validity proof.'
|
|
3360
|
+
'validity proof.'
|
|
3891
3361
|
];
|
|
3892
3362
|
},
|
|
3893
3363
|
{
|
|
@@ -3930,20 +3400,20 @@ type LightCompressedToken = {
|
|
|
3930
3400
|
name: 'systemProgram';
|
|
3931
3401
|
isMut: false;
|
|
3932
3402
|
isSigner: false;
|
|
3933
|
-
}
|
|
3403
|
+
}
|
|
3934
3404
|
];
|
|
3935
3405
|
args: [
|
|
3936
3406
|
{
|
|
3937
3407
|
name: 'inputs';
|
|
3938
3408
|
type: 'bytes';
|
|
3939
|
-
}
|
|
3409
|
+
}
|
|
3940
3410
|
];
|
|
3941
3411
|
},
|
|
3942
3412
|
{
|
|
3943
3413
|
name: 'revoke';
|
|
3944
3414
|
docs: [
|
|
3945
3415
|
'Revokes a delegation. The instruction merges all inputs into one output',
|
|
3946
|
-
'account. Cannot be called by a delegate. Delegates are not preserved.'
|
|
3416
|
+
'account. Cannot be called by a delegate. Delegates are not preserved.'
|
|
3947
3417
|
];
|
|
3948
3418
|
accounts: [
|
|
3949
3419
|
{
|
|
@@ -3959,7 +3429,7 @@ type LightCompressedToken = {
|
|
|
3959
3429
|
docs: [
|
|
3960
3430
|
'Authority is verified through proof since both owner and delegate',
|
|
3961
3431
|
'are included in the token data hash, which is a public input to the',
|
|
3962
|
-
'validity proof.'
|
|
3432
|
+
'validity proof.'
|
|
3963
3433
|
];
|
|
3964
3434
|
},
|
|
3965
3435
|
{
|
|
@@ -4002,20 +3472,20 @@ type LightCompressedToken = {
|
|
|
4002
3472
|
name: 'systemProgram';
|
|
4003
3473
|
isMut: false;
|
|
4004
3474
|
isSigner: false;
|
|
4005
|
-
}
|
|
3475
|
+
}
|
|
4006
3476
|
];
|
|
4007
3477
|
args: [
|
|
4008
3478
|
{
|
|
4009
3479
|
name: 'inputs';
|
|
4010
3480
|
type: 'bytes';
|
|
4011
|
-
}
|
|
3481
|
+
}
|
|
4012
3482
|
];
|
|
4013
3483
|
},
|
|
4014
3484
|
{
|
|
4015
3485
|
name: 'freeze';
|
|
4016
3486
|
docs: [
|
|
4017
3487
|
'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
|
|
4018
|
-
'many outputs as inputs. Balances and delegates are preserved.'
|
|
3488
|
+
'many outputs as inputs. Balances and delegates are preserved.'
|
|
4019
3489
|
];
|
|
4020
3490
|
accounts: [
|
|
4021
3491
|
{
|
|
@@ -4074,20 +3544,20 @@ type LightCompressedToken = {
|
|
|
4074
3544
|
name: 'mint';
|
|
4075
3545
|
isMut: false;
|
|
4076
3546
|
isSigner: false;
|
|
4077
|
-
}
|
|
3547
|
+
}
|
|
4078
3548
|
];
|
|
4079
3549
|
args: [
|
|
4080
3550
|
{
|
|
4081
3551
|
name: 'inputs';
|
|
4082
3552
|
type: 'bytes';
|
|
4083
|
-
}
|
|
3553
|
+
}
|
|
4084
3554
|
];
|
|
4085
3555
|
},
|
|
4086
3556
|
{
|
|
4087
3557
|
name: 'thaw';
|
|
4088
3558
|
docs: [
|
|
4089
3559
|
'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
|
|
4090
|
-
'as many outputs as inputs. Balances and delegates are preserved.'
|
|
3560
|
+
'as many outputs as inputs. Balances and delegates are preserved.'
|
|
4091
3561
|
];
|
|
4092
3562
|
accounts: [
|
|
4093
3563
|
{
|
|
@@ -4146,13 +3616,13 @@ type LightCompressedToken = {
|
|
|
4146
3616
|
name: 'mint';
|
|
4147
3617
|
isMut: false;
|
|
4148
3618
|
isSigner: false;
|
|
4149
|
-
}
|
|
3619
|
+
}
|
|
4150
3620
|
];
|
|
4151
3621
|
args: [
|
|
4152
3622
|
{
|
|
4153
3623
|
name: 'inputs';
|
|
4154
3624
|
type: 'bytes';
|
|
4155
|
-
}
|
|
3625
|
+
}
|
|
4156
3626
|
];
|
|
4157
3627
|
},
|
|
4158
3628
|
{
|
|
@@ -4160,7 +3630,7 @@ type LightCompressedToken = {
|
|
|
4160
3630
|
docs: [
|
|
4161
3631
|
'Burns compressed tokens and spl tokens from the pool account. Delegates',
|
|
4162
3632
|
'can burn tokens. The output compressed token account remains delegated.',
|
|
4163
|
-
'Creates one output compressed token account.'
|
|
3633
|
+
'Creates one output compressed token account.'
|
|
4164
3634
|
];
|
|
4165
3635
|
accounts: [
|
|
4166
3636
|
{
|
|
@@ -4176,7 +3646,7 @@ type LightCompressedToken = {
|
|
|
4176
3646
|
docs: [
|
|
4177
3647
|
'Authority is verified through proof since both owner and delegate',
|
|
4178
3648
|
'are included in the token data hash, which is a public input to the',
|
|
4179
|
-
'validity proof.'
|
|
3649
|
+
'validity proof.'
|
|
4180
3650
|
];
|
|
4181
3651
|
},
|
|
4182
3652
|
{
|
|
@@ -4233,13 +3703,13 @@ type LightCompressedToken = {
|
|
|
4233
3703
|
name: 'systemProgram';
|
|
4234
3704
|
isMut: false;
|
|
4235
3705
|
isSigner: false;
|
|
4236
|
-
}
|
|
3706
|
+
}
|
|
4237
3707
|
];
|
|
4238
3708
|
args: [
|
|
4239
3709
|
{
|
|
4240
3710
|
name: 'inputs';
|
|
4241
3711
|
type: 'bytes';
|
|
4242
|
-
}
|
|
3712
|
+
}
|
|
4243
3713
|
];
|
|
4244
3714
|
},
|
|
4245
3715
|
{
|
|
@@ -4247,7 +3717,7 @@ type LightCompressedToken = {
|
|
|
4247
3717
|
docs: [
|
|
4248
3718
|
'This function is a stub to allow Anchor to include the input types in',
|
|
4249
3719
|
'the IDL. It should not be included in production builds nor be called in',
|
|
4250
|
-
'practice.'
|
|
3720
|
+
'practice.'
|
|
4251
3721
|
];
|
|
4252
3722
|
accounts: [
|
|
4253
3723
|
{
|
|
@@ -4263,7 +3733,7 @@ type LightCompressedToken = {
|
|
|
4263
3733
|
docs: [
|
|
4264
3734
|
'Authority is verified through proof since both owner and delegate',
|
|
4265
3735
|
'are included in the token data hash, which is a public input to the',
|
|
4266
|
-
'validity proof.'
|
|
3736
|
+
'validity proof.'
|
|
4267
3737
|
];
|
|
4268
3738
|
},
|
|
4269
3739
|
{
|
|
@@ -4324,7 +3794,7 @@ type LightCompressedToken = {
|
|
|
4324
3794
|
name: 'systemProgram';
|
|
4325
3795
|
isMut: false;
|
|
4326
3796
|
isSigner: false;
|
|
4327
|
-
}
|
|
3797
|
+
}
|
|
4328
3798
|
];
|
|
4329
3799
|
args: [
|
|
4330
3800
|
{
|
|
@@ -4338,9 +3808,9 @@ type LightCompressedToken = {
|
|
|
4338
3808
|
type: {
|
|
4339
3809
|
defined: 'TokenData';
|
|
4340
3810
|
};
|
|
4341
|
-
}
|
|
3811
|
+
}
|
|
4342
3812
|
];
|
|
4343
|
-
}
|
|
3813
|
+
}
|
|
4344
3814
|
];
|
|
4345
3815
|
types: [
|
|
4346
3816
|
{
|
|
@@ -4353,7 +3823,7 @@ type LightCompressedToken = {
|
|
|
4353
3823
|
},
|
|
4354
3824
|
{
|
|
4355
3825
|
name: 'Frozen';
|
|
4356
|
-
}
|
|
3826
|
+
}
|
|
4357
3827
|
];
|
|
4358
3828
|
};
|
|
4359
3829
|
},
|
|
@@ -4385,7 +3855,7 @@ type LightCompressedToken = {
|
|
|
4385
3855
|
defined: 'CompressedAccountData';
|
|
4386
3856
|
};
|
|
4387
3857
|
};
|
|
4388
|
-
}
|
|
3858
|
+
}
|
|
4389
3859
|
];
|
|
4390
3860
|
};
|
|
4391
3861
|
},
|
|
@@ -4409,7 +3879,7 @@ type LightCompressedToken = {
|
|
|
4409
3879
|
type: {
|
|
4410
3880
|
array: ['u8', 32];
|
|
4411
3881
|
};
|
|
4412
|
-
}
|
|
3882
|
+
}
|
|
4413
3883
|
];
|
|
4414
3884
|
};
|
|
4415
3885
|
},
|
|
@@ -4422,7 +3892,7 @@ type LightCompressedToken = {
|
|
|
4422
3892
|
name: 'setContext';
|
|
4423
3893
|
docs: [
|
|
4424
3894
|
'Is set by the program that is invoking the CPI to signal that is should',
|
|
4425
|
-
'set the cpi context.'
|
|
3895
|
+
'set the cpi context.'
|
|
4426
3896
|
];
|
|
4427
3897
|
type: 'bool';
|
|
4428
3898
|
},
|
|
@@ -4430,17 +3900,17 @@ type LightCompressedToken = {
|
|
|
4430
3900
|
name: 'firstSetContext';
|
|
4431
3901
|
docs: [
|
|
4432
3902
|
'Is set to wipe the cpi context since someone could have set it before',
|
|
4433
|
-
'with unrelated data.'
|
|
3903
|
+
'with unrelated data.'
|
|
4434
3904
|
];
|
|
4435
3905
|
type: 'bool';
|
|
4436
3906
|
},
|
|
4437
3907
|
{
|
|
4438
3908
|
name: 'cpiContextAccountIndex';
|
|
4439
3909
|
docs: [
|
|
4440
|
-
'Index of cpi context account in remaining accounts.'
|
|
3910
|
+
'Index of cpi context account in remaining accounts.'
|
|
4441
3911
|
];
|
|
4442
3912
|
type: 'u8';
|
|
4443
|
-
}
|
|
3913
|
+
}
|
|
4444
3914
|
];
|
|
4445
3915
|
};
|
|
4446
3916
|
},
|
|
@@ -4466,7 +3936,7 @@ type LightCompressedToken = {
|
|
|
4466
3936
|
type: {
|
|
4467
3937
|
array: ['u8', 32];
|
|
4468
3938
|
};
|
|
4469
|
-
}
|
|
3939
|
+
}
|
|
4470
3940
|
];
|
|
4471
3941
|
};
|
|
4472
3942
|
},
|
|
@@ -4492,7 +3962,7 @@ type LightCompressedToken = {
|
|
|
4492
3962
|
docs: [
|
|
4493
3963
|
'Is required if the signer is delegate,',
|
|
4494
3964
|
'-> delegate is authority account,',
|
|
4495
|
-
'owner = Some(owner) is the owner of the token account.'
|
|
3965
|
+
'owner = Some(owner) is the owner of the token account.'
|
|
4496
3966
|
];
|
|
4497
3967
|
type: {
|
|
4498
3968
|
option: {
|
|
@@ -4539,7 +4009,7 @@ type LightCompressedToken = {
|
|
|
4539
4009
|
type: {
|
|
4540
4010
|
option: 'u8';
|
|
4541
4011
|
};
|
|
4542
|
-
}
|
|
4012
|
+
}
|
|
4543
4013
|
];
|
|
4544
4014
|
};
|
|
4545
4015
|
},
|
|
@@ -4579,7 +4049,7 @@ type LightCompressedToken = {
|
|
|
4579
4049
|
{
|
|
4580
4050
|
name: 'outputAccountMerkleTreeIndex';
|
|
4581
4051
|
type: 'u8';
|
|
4582
|
-
}
|
|
4052
|
+
}
|
|
4583
4053
|
];
|
|
4584
4054
|
};
|
|
4585
4055
|
},
|
|
@@ -4637,14 +4107,14 @@ type LightCompressedToken = {
|
|
|
4637
4107
|
type: {
|
|
4638
4108
|
option: 'u64';
|
|
4639
4109
|
};
|
|
4640
|
-
}
|
|
4110
|
+
}
|
|
4641
4111
|
];
|
|
4642
4112
|
};
|
|
4643
4113
|
},
|
|
4644
4114
|
{
|
|
4645
4115
|
name: 'DelegatedTransfer';
|
|
4646
4116
|
docs: [
|
|
4647
|
-
'Struct to provide the owner when the delegate is signer of the transaction.'
|
|
4117
|
+
'Struct to provide the owner when the delegate is signer of the transaction.'
|
|
4648
4118
|
];
|
|
4649
4119
|
type: {
|
|
4650
4120
|
kind: 'struct';
|
|
@@ -4659,12 +4129,12 @@ type LightCompressedToken = {
|
|
|
4659
4129
|
'Index of change compressed account in output compressed accounts. In',
|
|
4660
4130
|
"case that the delegate didn't spend the complete delegated compressed",
|
|
4661
4131
|
'account balance the change compressed account will be delegated to her',
|
|
4662
|
-
'as well.'
|
|
4132
|
+
'as well.'
|
|
4663
4133
|
];
|
|
4664
4134
|
type: {
|
|
4665
4135
|
option: 'u8';
|
|
4666
4136
|
};
|
|
4667
|
-
}
|
|
4137
|
+
}
|
|
4668
4138
|
];
|
|
4669
4139
|
};
|
|
4670
4140
|
},
|
|
@@ -4702,12 +4172,12 @@ type LightCompressedToken = {
|
|
|
4702
4172
|
{
|
|
4703
4173
|
name: 'tlv';
|
|
4704
4174
|
docs: [
|
|
4705
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
4175
|
+
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
4706
4176
|
];
|
|
4707
4177
|
type: {
|
|
4708
4178
|
option: 'bytes';
|
|
4709
4179
|
};
|
|
4710
|
-
}
|
|
4180
|
+
}
|
|
4711
4181
|
];
|
|
4712
4182
|
};
|
|
4713
4183
|
},
|
|
@@ -4763,7 +4233,7 @@ type LightCompressedToken = {
|
|
|
4763
4233
|
{
|
|
4764
4234
|
name: 'isCompress';
|
|
4765
4235
|
type: 'bool';
|
|
4766
|
-
}
|
|
4236
|
+
}
|
|
4767
4237
|
];
|
|
4768
4238
|
};
|
|
4769
4239
|
},
|
|
@@ -4827,7 +4297,7 @@ type LightCompressedToken = {
|
|
|
4827
4297
|
defined: 'CompressedCpiContext';
|
|
4828
4298
|
};
|
|
4829
4299
|
};
|
|
4830
|
-
}
|
|
4300
|
+
}
|
|
4831
4301
|
];
|
|
4832
4302
|
};
|
|
4833
4303
|
},
|
|
@@ -4843,7 +4313,7 @@ type LightCompressedToken = {
|
|
|
4843
4313
|
{
|
|
4844
4314
|
name: 'seq';
|
|
4845
4315
|
type: 'u64';
|
|
4846
|
-
}
|
|
4316
|
+
}
|
|
4847
4317
|
];
|
|
4848
4318
|
};
|
|
4849
4319
|
},
|
|
@@ -4869,7 +4339,7 @@ type LightCompressedToken = {
|
|
|
4869
4339
|
{
|
|
4870
4340
|
name: 'addressMerkleTreeRootIndex';
|
|
4871
4341
|
type: 'u16';
|
|
4872
|
-
}
|
|
4342
|
+
}
|
|
4873
4343
|
];
|
|
4874
4344
|
};
|
|
4875
4345
|
},
|
|
@@ -4887,7 +4357,7 @@ type LightCompressedToken = {
|
|
|
4887
4357
|
{
|
|
4888
4358
|
name: 'merkleTreeIndex';
|
|
4889
4359
|
type: 'u8';
|
|
4890
|
-
}
|
|
4360
|
+
}
|
|
4891
4361
|
];
|
|
4892
4362
|
};
|
|
4893
4363
|
},
|
|
@@ -4911,17 +4381,17 @@ type LightCompressedToken = {
|
|
|
4911
4381
|
{
|
|
4912
4382
|
name: 'rootIndex';
|
|
4913
4383
|
docs: [
|
|
4914
|
-
'Index of root used in inclusion validity proof.'
|
|
4384
|
+
'Index of root used in inclusion validity proof.'
|
|
4915
4385
|
];
|
|
4916
4386
|
type: 'u16';
|
|
4917
4387
|
},
|
|
4918
4388
|
{
|
|
4919
4389
|
name: 'readOnly';
|
|
4920
4390
|
docs: [
|
|
4921
|
-
'Placeholder to mark accounts read-only unimplemented set to false.'
|
|
4391
|
+
'Placeholder to mark accounts read-only unimplemented set to false.'
|
|
4922
4392
|
];
|
|
4923
4393
|
type: 'bool';
|
|
4924
|
-
}
|
|
4394
|
+
}
|
|
4925
4395
|
];
|
|
4926
4396
|
};
|
|
4927
4397
|
},
|
|
@@ -4945,7 +4415,7 @@ type LightCompressedToken = {
|
|
|
4945
4415
|
{
|
|
4946
4416
|
name: 'proveByIndex';
|
|
4947
4417
|
type: 'bool';
|
|
4948
|
-
}
|
|
4418
|
+
}
|
|
4949
4419
|
];
|
|
4950
4420
|
};
|
|
4951
4421
|
},
|
|
@@ -4975,12 +4445,12 @@ type LightCompressedToken = {
|
|
|
4975
4445
|
{
|
|
4976
4446
|
name: 'tlv';
|
|
4977
4447
|
docs: [
|
|
4978
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
4448
|
+
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
4979
4449
|
];
|
|
4980
4450
|
type: {
|
|
4981
4451
|
option: 'bytes';
|
|
4982
4452
|
};
|
|
4983
|
-
}
|
|
4453
|
+
}
|
|
4984
4454
|
];
|
|
4985
4455
|
};
|
|
4986
4456
|
},
|
|
@@ -5054,7 +4524,7 @@ type LightCompressedToken = {
|
|
|
5054
4524
|
type: {
|
|
5055
4525
|
option: 'bytes';
|
|
5056
4526
|
};
|
|
5057
|
-
}
|
|
4527
|
+
}
|
|
5058
4528
|
];
|
|
5059
4529
|
};
|
|
5060
4530
|
},
|
|
@@ -5072,7 +4542,7 @@ type LightCompressedToken = {
|
|
|
5072
4542
|
name: 'index';
|
|
5073
4543
|
docs: ['Index of compressed account hash in queue.'];
|
|
5074
4544
|
type: 'u16';
|
|
5075
|
-
}
|
|
4545
|
+
}
|
|
5076
4546
|
];
|
|
5077
4547
|
};
|
|
5078
4548
|
},
|
|
@@ -5100,7 +4570,7 @@ type LightCompressedToken = {
|
|
|
5100
4570
|
name: 'delegate';
|
|
5101
4571
|
docs: [
|
|
5102
4572
|
'If `delegate` is `Some` then `delegated_amount` represents',
|
|
5103
|
-
'the amount authorized by the delegate'
|
|
4573
|
+
'the amount authorized by the delegate'
|
|
5104
4574
|
];
|
|
5105
4575
|
type: {
|
|
5106
4576
|
option: 'publicKey';
|
|
@@ -5116,15 +4586,15 @@ type LightCompressedToken = {
|
|
|
5116
4586
|
{
|
|
5117
4587
|
name: 'tlv';
|
|
5118
4588
|
docs: [
|
|
5119
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
4589
|
+
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
5120
4590
|
];
|
|
5121
4591
|
type: {
|
|
5122
4592
|
option: 'bytes';
|
|
5123
4593
|
};
|
|
5124
|
-
}
|
|
4594
|
+
}
|
|
5125
4595
|
];
|
|
5126
4596
|
};
|
|
5127
|
-
}
|
|
4597
|
+
}
|
|
5128
4598
|
];
|
|
5129
4599
|
errors: [
|
|
5130
4600
|
{
|
|
@@ -5281,7 +4751,7 @@ type LightCompressedToken = {
|
|
|
5281
4751
|
{
|
|
5282
4752
|
code: 6032;
|
|
5283
4753
|
name: 'NoMatchingBumpFound';
|
|
5284
|
-
}
|
|
4754
|
+
}
|
|
5285
4755
|
];
|
|
5286
4756
|
};
|
|
5287
4757
|
declare const IDL: LightCompressedToken;
|
|
@@ -5292,30 +4762,14 @@ declare const CompressedTokenInstructionDataTransferLayout: Layout<unknown>;
|
|
|
5292
4762
|
declare const mintToLayout: Layout<unknown>;
|
|
5293
4763
|
declare const batchCompressLayout: Layout<unknown>;
|
|
5294
4764
|
declare const compressSplTokenAccountInstructionDataLayout: Layout<unknown>;
|
|
5295
|
-
declare function encodeMintToInstructionData(
|
|
5296
|
-
|
|
5297
|
-
): Buffer$1;
|
|
5298
|
-
declare function
|
|
5299
|
-
|
|
5300
|
-
):
|
|
5301
|
-
declare function
|
|
5302
|
-
|
|
5303
|
-
): Buffer$1;
|
|
5304
|
-
declare function decodeBatchCompressInstructionData(
|
|
5305
|
-
buffer: Buffer$1,
|
|
5306
|
-
): BatchCompressInstructionData;
|
|
5307
|
-
declare function encodeCompressSplTokenAccountInstructionData(
|
|
5308
|
-
data: CompressSplTokenAccountInstructionData,
|
|
5309
|
-
): Buffer$1;
|
|
5310
|
-
declare function decodeCompressSplTokenAccountInstructionData(
|
|
5311
|
-
buffer: Buffer$1,
|
|
5312
|
-
): CompressSplTokenAccountInstructionData;
|
|
5313
|
-
declare function encodeTransferInstructionData(
|
|
5314
|
-
data: CompressedTokenInstructionDataTransfer,
|
|
5315
|
-
): Buffer$1;
|
|
5316
|
-
declare function decodeTransferInstructionData(
|
|
5317
|
-
buffer: Buffer$1,
|
|
5318
|
-
): CompressedTokenInstructionDataTransfer;
|
|
4765
|
+
declare function encodeMintToInstructionData(data: MintToInstructionData): Buffer$1;
|
|
4766
|
+
declare function decodeMintToInstructionData(buffer: Buffer$1): MintToInstructionData;
|
|
4767
|
+
declare function encodeBatchCompressInstructionData(data: BatchCompressInstructionData): Buffer$1;
|
|
4768
|
+
declare function decodeBatchCompressInstructionData(buffer: Buffer$1): BatchCompressInstructionData;
|
|
4769
|
+
declare function encodeCompressSplTokenAccountInstructionData(data: CompressSplTokenAccountInstructionData): Buffer$1;
|
|
4770
|
+
declare function decodeCompressSplTokenAccountInstructionData(buffer: Buffer$1): CompressSplTokenAccountInstructionData;
|
|
4771
|
+
declare function encodeTransferInstructionData(data: CompressedTokenInstructionDataTransfer): Buffer$1;
|
|
4772
|
+
declare function decodeTransferInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataTransfer;
|
|
5319
4773
|
interface BaseAccountsLayoutParams {
|
|
5320
4774
|
feePayer: PublicKey;
|
|
5321
4775
|
authority: PublicKey;
|
|
@@ -5357,44 +4811,20 @@ type freezeAccountsLayoutParams = BaseAccountsLayoutParams & {
|
|
|
5357
4811
|
mint: PublicKey;
|
|
5358
4812
|
};
|
|
5359
4813
|
type thawAccountsLayoutParams = freezeAccountsLayoutParams;
|
|
5360
|
-
declare const createTokenPoolAccountsLayout: (
|
|
5361
|
-
|
|
5362
|
-
) => AccountMeta[];
|
|
5363
|
-
declare const
|
|
5364
|
-
|
|
5365
|
-
) => AccountMeta[];
|
|
5366
|
-
declare const
|
|
5367
|
-
|
|
5368
|
-
) => AccountMeta[];
|
|
5369
|
-
declare const transferAccountsLayout: (
|
|
5370
|
-
accounts: transferAccountsLayoutParams,
|
|
5371
|
-
) => AccountMeta[];
|
|
5372
|
-
declare const approveAccountsLayout: (
|
|
5373
|
-
accounts: approveAccountsLayoutParams,
|
|
5374
|
-
) => AccountMeta[];
|
|
5375
|
-
declare const revokeAccountsLayout: (
|
|
5376
|
-
accounts: approveAccountsLayoutParams,
|
|
5377
|
-
) => AccountMeta[];
|
|
5378
|
-
declare const freezeAccountsLayout: (
|
|
5379
|
-
accounts: freezeAccountsLayoutParams,
|
|
5380
|
-
) => AccountMeta[];
|
|
5381
|
-
declare const thawAccountsLayout: (
|
|
5382
|
-
accounts: freezeAccountsLayoutParams,
|
|
5383
|
-
) => AccountMeta[];
|
|
4814
|
+
declare const createTokenPoolAccountsLayout: (accounts: createTokenPoolAccountsLayoutParams) => AccountMeta[];
|
|
4815
|
+
declare const addTokenPoolAccountsLayout: (accounts: addTokenPoolAccountsLayoutParams) => AccountMeta[];
|
|
4816
|
+
declare const mintToAccountsLayout: (accounts: mintToAccountsLayoutParams) => AccountMeta[];
|
|
4817
|
+
declare const transferAccountsLayout: (accounts: transferAccountsLayoutParams) => AccountMeta[];
|
|
4818
|
+
declare const approveAccountsLayout: (accounts: approveAccountsLayoutParams) => AccountMeta[];
|
|
4819
|
+
declare const revokeAccountsLayout: (accounts: approveAccountsLayoutParams) => AccountMeta[];
|
|
4820
|
+
declare const freezeAccountsLayout: (accounts: freezeAccountsLayoutParams) => AccountMeta[];
|
|
4821
|
+
declare const thawAccountsLayout: (accounts: freezeAccountsLayoutParams) => AccountMeta[];
|
|
5384
4822
|
declare const CompressedTokenInstructionDataApproveLayout: Layout<unknown>;
|
|
5385
4823
|
declare const CompressedTokenInstructionDataRevokeLayout: Layout<unknown>;
|
|
5386
|
-
declare function encodeApproveInstructionData(
|
|
5387
|
-
|
|
5388
|
-
): Buffer$1;
|
|
5389
|
-
declare function
|
|
5390
|
-
buffer: Buffer$1,
|
|
5391
|
-
): CompressedTokenInstructionDataApprove;
|
|
5392
|
-
declare function encodeRevokeInstructionData(
|
|
5393
|
-
data: CompressedTokenInstructionDataRevoke,
|
|
5394
|
-
): Buffer$1;
|
|
5395
|
-
declare function decodeRevokeInstructionData(
|
|
5396
|
-
buffer: Buffer$1,
|
|
5397
|
-
): CompressedTokenInstructionDataRevoke;
|
|
4824
|
+
declare function encodeApproveInstructionData(data: CompressedTokenInstructionDataApprove): Buffer$1;
|
|
4825
|
+
declare function decodeApproveInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataApprove;
|
|
4826
|
+
declare function encodeRevokeInstructionData(data: CompressedTokenInstructionDataRevoke): Buffer$1;
|
|
4827
|
+
declare function decodeRevokeInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataRevoke;
|
|
5398
4828
|
|
|
5399
4829
|
type CompressParams = {
|
|
5400
4830
|
/**
|
|
@@ -5488,11 +4918,7 @@ type DecompressParams = {
|
|
|
5488
4918
|
/**
|
|
5489
4919
|
* Token pool(s)
|
|
5490
4920
|
*/
|
|
5491
|
-
tokenPoolInfos:
|
|
5492
|
-
| TokenPoolInfo
|
|
5493
|
-
| TokenPoolInfo[]
|
|
5494
|
-
| SplInterfaceInfo
|
|
5495
|
-
| SplInterfaceInfo[];
|
|
4921
|
+
tokenPoolInfos: TokenPoolInfo | TokenPoolInfo[] | SplInterfaceInfo | SplInterfaceInfo[];
|
|
5496
4922
|
};
|
|
5497
4923
|
type TransferParams = {
|
|
5498
4924
|
/**
|
|
@@ -5777,17 +5203,12 @@ declare const validateSameTokenOwner: (accounts: ParsedTokenAccount[]) => void;
|
|
|
5777
5203
|
/**
|
|
5778
5204
|
* Parse compressed token accounts to get the mint, current owner and delegate.
|
|
5779
5205
|
*/
|
|
5780
|
-
declare const parseTokenData: (
|
|
5781
|
-
compressedTokenAccounts: ParsedTokenAccount[],
|
|
5782
|
-
) => {
|
|
5206
|
+
declare const parseTokenData: (compressedTokenAccounts: ParsedTokenAccount[]) => {
|
|
5783
5207
|
mint: PublicKey;
|
|
5784
5208
|
currentOwner: PublicKey;
|
|
5785
5209
|
delegate: PublicKey | null;
|
|
5786
5210
|
};
|
|
5787
|
-
declare const parseMaybeDelegatedTransfer: (
|
|
5788
|
-
inputs: ParsedTokenAccount[],
|
|
5789
|
-
outputs: TokenTransferOutputData[],
|
|
5790
|
-
) => {
|
|
5211
|
+
declare const parseMaybeDelegatedTransfer: (inputs: ParsedTokenAccount[], outputs: TokenTransferOutputData[]) => {
|
|
5791
5212
|
delegatedTransfer: DelegatedTransfer | null;
|
|
5792
5213
|
authority: PublicKey;
|
|
5793
5214
|
};
|
|
@@ -5799,11 +5220,7 @@ declare const parseMaybeDelegatedTransfer: (
|
|
|
5799
5220
|
* @returns Output token data for the transfer
|
|
5800
5221
|
* instruction
|
|
5801
5222
|
*/
|
|
5802
|
-
declare function createTransferOutputState(
|
|
5803
|
-
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
5804
|
-
toAddress: PublicKey,
|
|
5805
|
-
amount: number | BN,
|
|
5806
|
-
): TokenTransferOutputData[];
|
|
5223
|
+
declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: number | BN): TokenTransferOutputData[];
|
|
5807
5224
|
/**
|
|
5808
5225
|
* Create the output state for a compress transaction.
|
|
5809
5226
|
* @param inputCompressedTokenAccounts Input state
|
|
@@ -5811,10 +5228,7 @@ declare function createTransferOutputState(
|
|
|
5811
5228
|
* @returns Output token data for the compress
|
|
5812
5229
|
* instruction
|
|
5813
5230
|
*/
|
|
5814
|
-
declare function createDecompressOutputState(
|
|
5815
|
-
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
5816
|
-
amount: number | BN,
|
|
5817
|
-
): TokenTransferOutputData[];
|
|
5231
|
+
declare function createDecompressOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], amount: number | BN): TokenTransferOutputData[];
|
|
5818
5232
|
declare class CompressedTokenProgram {
|
|
5819
5233
|
/**
|
|
5820
5234
|
* @internal
|
|
@@ -5852,17 +5266,11 @@ declare class CompressedTokenProgram {
|
|
|
5852
5266
|
*
|
|
5853
5267
|
* @returns The index and bump number.
|
|
5854
5268
|
*/
|
|
5855
|
-
static findSplInterfaceIndexAndBump(
|
|
5856
|
-
poolPda: PublicKey,
|
|
5857
|
-
mint: PublicKey,
|
|
5858
|
-
): [number, number];
|
|
5269
|
+
static findSplInterfaceIndexAndBump(poolPda: PublicKey, mint: PublicKey): [number, number];
|
|
5859
5270
|
/**
|
|
5860
5271
|
* @deprecated Use {@link findSplInterfaceIndexAndBump} instead.
|
|
5861
5272
|
*/
|
|
5862
|
-
static findTokenPoolIndexAndBump(
|
|
5863
|
-
poolPda: PublicKey,
|
|
5864
|
-
mint: PublicKey,
|
|
5865
|
-
): [number, number];
|
|
5273
|
+
static findTokenPoolIndexAndBump(poolPda: PublicKey, mint: PublicKey): [number, number];
|
|
5866
5274
|
/**
|
|
5867
5275
|
* Derive the SPL interface PDA with index.
|
|
5868
5276
|
*
|
|
@@ -5872,17 +5280,11 @@ declare class CompressedTokenProgram {
|
|
|
5872
5280
|
*
|
|
5873
5281
|
* @returns The SPL interface PDA and bump.
|
|
5874
5282
|
*/
|
|
5875
|
-
static deriveSplInterfacePdaWithIndex(
|
|
5876
|
-
mint: PublicKey,
|
|
5877
|
-
index: number,
|
|
5878
|
-
): [PublicKey, number];
|
|
5283
|
+
static deriveSplInterfacePdaWithIndex(mint: PublicKey, index: number): [PublicKey, number];
|
|
5879
5284
|
/**
|
|
5880
5285
|
* @deprecated Use {@link deriveSplInterfacePdaWithIndex} instead.
|
|
5881
5286
|
*/
|
|
5882
|
-
static deriveTokenPoolPdaWithIndex(
|
|
5883
|
-
mint: PublicKey,
|
|
5884
|
-
index: number,
|
|
5885
|
-
): [PublicKey, number];
|
|
5287
|
+
static deriveTokenPoolPdaWithIndex(mint: PublicKey, index: number): [PublicKey, number];
|
|
5886
5288
|
/** @internal */
|
|
5887
5289
|
static get deriveCpiAuthorityPda(): PublicKey;
|
|
5888
5290
|
/**
|
|
@@ -5903,16 +5305,7 @@ declare class CompressedTokenProgram {
|
|
|
5903
5305
|
* Note that `createTokenPoolInstruction` must be executed after
|
|
5904
5306
|
* `initializeMintInstruction`.
|
|
5905
5307
|
*/
|
|
5906
|
-
static createMint({
|
|
5907
|
-
feePayer,
|
|
5908
|
-
mint,
|
|
5909
|
-
authority,
|
|
5910
|
-
freezeAuthority,
|
|
5911
|
-
decimals,
|
|
5912
|
-
rentExemptBalance,
|
|
5913
|
-
tokenProgramId,
|
|
5914
|
-
mintSize,
|
|
5915
|
-
}: CreateMintParams): Promise<TransactionInstruction[]>;
|
|
5308
|
+
static createMint({ feePayer, mint, authority, freezeAuthority, decimals, rentExemptBalance, tokenProgramId, mintSize, }: CreateMintParams): Promise<TransactionInstruction[]>;
|
|
5916
5309
|
/**
|
|
5917
5310
|
* Enable compression for an existing SPL mint, creating an omnibus account.
|
|
5918
5311
|
* For new mints, use `CompressedTokenProgram.createMint`.
|
|
@@ -5924,11 +5317,7 @@ declare class CompressedTokenProgram {
|
|
|
5924
5317
|
*
|
|
5925
5318
|
* @returns The createTokenPool instruction
|
|
5926
5319
|
*/
|
|
5927
|
-
static createTokenPool({
|
|
5928
|
-
feePayer,
|
|
5929
|
-
mint,
|
|
5930
|
-
tokenProgramId,
|
|
5931
|
-
}: CreateSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5320
|
+
static createTokenPool({ feePayer, mint, tokenProgramId, }: CreateSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5932
5321
|
/**
|
|
5933
5322
|
* Add a token pool to an existing SPL mint. For new mints, use
|
|
5934
5323
|
* {@link createTokenPool}.
|
|
@@ -5941,12 +5330,7 @@ declare class CompressedTokenProgram {
|
|
|
5941
5330
|
*
|
|
5942
5331
|
* @returns The addTokenPool instruction
|
|
5943
5332
|
*/
|
|
5944
|
-
static addTokenPool({
|
|
5945
|
-
feePayer,
|
|
5946
|
-
mint,
|
|
5947
|
-
poolIndex,
|
|
5948
|
-
tokenProgramId,
|
|
5949
|
-
}: AddSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5333
|
+
static addTokenPool({ feePayer, mint, poolIndex, tokenProgramId, }: AddSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5950
5334
|
/**
|
|
5951
5335
|
* Construct mintTo instruction for compressed tokens
|
|
5952
5336
|
*
|
|
@@ -5960,15 +5344,7 @@ declare class CompressedTokenProgram {
|
|
|
5960
5344
|
*
|
|
5961
5345
|
* @returns The mintTo instruction
|
|
5962
5346
|
*/
|
|
5963
|
-
static mintTo({
|
|
5964
|
-
feePayer,
|
|
5965
|
-
mint,
|
|
5966
|
-
authority,
|
|
5967
|
-
toPubkey,
|
|
5968
|
-
amount,
|
|
5969
|
-
outputStateTreeInfo,
|
|
5970
|
-
tokenPoolInfo,
|
|
5971
|
-
}: MintToParams): Promise<TransactionInstruction>;
|
|
5347
|
+
static mintTo({ feePayer, mint, authority, toPubkey, amount, outputStateTreeInfo, tokenPoolInfo, }: MintToParams): Promise<TransactionInstruction>;
|
|
5972
5348
|
/**
|
|
5973
5349
|
* Mint tokens from registered SPL mint account to a compressed account
|
|
5974
5350
|
*
|
|
@@ -5984,16 +5360,7 @@ declare class CompressedTokenProgram {
|
|
|
5984
5360
|
*
|
|
5985
5361
|
* @returns The mintTo instruction
|
|
5986
5362
|
*/
|
|
5987
|
-
static approveAndMintTo({
|
|
5988
|
-
feePayer,
|
|
5989
|
-
mint,
|
|
5990
|
-
authority,
|
|
5991
|
-
authorityTokenAccount,
|
|
5992
|
-
toPubkey,
|
|
5993
|
-
amount,
|
|
5994
|
-
outputStateTreeInfo,
|
|
5995
|
-
tokenPoolInfo,
|
|
5996
|
-
}: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
|
|
5363
|
+
static approveAndMintTo({ feePayer, mint, authority, authorityTokenAccount, toPubkey, amount, outputStateTreeInfo, tokenPoolInfo, }: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
|
|
5997
5364
|
/**
|
|
5998
5365
|
* Construct transfer instruction for compressed tokens.
|
|
5999
5366
|
*
|
|
@@ -6008,14 +5375,7 @@ declare class CompressedTokenProgram {
|
|
|
6008
5375
|
*
|
|
6009
5376
|
* @returns The transfer instruction
|
|
6010
5377
|
*/
|
|
6011
|
-
static transfer({
|
|
6012
|
-
payer,
|
|
6013
|
-
inputCompressedTokenAccounts,
|
|
6014
|
-
toAddress,
|
|
6015
|
-
amount,
|
|
6016
|
-
recentValidityProof,
|
|
6017
|
-
recentInputStateRootIndices,
|
|
6018
|
-
}: TransferParams): Promise<TransactionInstruction>;
|
|
5378
|
+
static transfer({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, }: TransferParams): Promise<TransactionInstruction>;
|
|
6019
5379
|
/**
|
|
6020
5380
|
* Create lookup table instructions for the token program's default
|
|
6021
5381
|
* accounts.
|
|
@@ -6028,13 +5388,7 @@ declare class CompressedTokenProgram {
|
|
|
6028
5388
|
*
|
|
6029
5389
|
* @returns [createInstruction, extendInstruction, option(extendInstruction2)]
|
|
6030
5390
|
*/
|
|
6031
|
-
static createTokenProgramLookupTable({
|
|
6032
|
-
payer,
|
|
6033
|
-
authority,
|
|
6034
|
-
mints,
|
|
6035
|
-
recentSlot,
|
|
6036
|
-
remainingAccounts,
|
|
6037
|
-
}: CreateTokenProgramLookupTableParams): Promise<{
|
|
5391
|
+
static createTokenProgramLookupTable({ payer, authority, mints, recentSlot, remainingAccounts, }: CreateTokenProgramLookupTableParams): Promise<{
|
|
6038
5392
|
instructions: TransactionInstruction[];
|
|
6039
5393
|
address: PublicKey;
|
|
6040
5394
|
}>;
|
|
@@ -6052,16 +5406,7 @@ declare class CompressedTokenProgram {
|
|
|
6052
5406
|
*
|
|
6053
5407
|
* @returns The compress instruction
|
|
6054
5408
|
*/
|
|
6055
|
-
static compress({
|
|
6056
|
-
payer,
|
|
6057
|
-
owner,
|
|
6058
|
-
source,
|
|
6059
|
-
toAddress,
|
|
6060
|
-
amount,
|
|
6061
|
-
mint,
|
|
6062
|
-
outputStateTreeInfo,
|
|
6063
|
-
tokenPoolInfo,
|
|
6064
|
-
}: CompressParams): Promise<TransactionInstruction>;
|
|
5409
|
+
static compress({ payer, owner, source, toAddress, amount, mint, outputStateTreeInfo, tokenPoolInfo, }: CompressParams): Promise<TransactionInstruction>;
|
|
6065
5410
|
/**
|
|
6066
5411
|
* Construct decompress instruction
|
|
6067
5412
|
*
|
|
@@ -6076,15 +5421,7 @@ declare class CompressedTokenProgram {
|
|
|
6076
5421
|
*
|
|
6077
5422
|
* @returns The decompress instruction
|
|
6078
5423
|
*/
|
|
6079
|
-
static decompress({
|
|
6080
|
-
payer,
|
|
6081
|
-
inputCompressedTokenAccounts,
|
|
6082
|
-
toAddress,
|
|
6083
|
-
amount,
|
|
6084
|
-
recentValidityProof,
|
|
6085
|
-
recentInputStateRootIndices,
|
|
6086
|
-
tokenPoolInfos,
|
|
6087
|
-
}: DecompressParams): Promise<TransactionInstruction>;
|
|
5424
|
+
static decompress({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, tokenPoolInfos, }: DecompressParams): Promise<TransactionInstruction>;
|
|
6088
5425
|
/**
|
|
6089
5426
|
* Create `mergeTokenAccounts` instruction.
|
|
6090
5427
|
*
|
|
@@ -6097,14 +5434,7 @@ declare class CompressedTokenProgram {
|
|
|
6097
5434
|
* @param recentInputStateRootIndices Recent state root indices.
|
|
6098
5435
|
* @returns instruction
|
|
6099
5436
|
*/
|
|
6100
|
-
static mergeTokenAccounts({
|
|
6101
|
-
payer,
|
|
6102
|
-
owner,
|
|
6103
|
-
inputCompressedTokenAccounts,
|
|
6104
|
-
mint,
|
|
6105
|
-
recentValidityProof,
|
|
6106
|
-
recentInputStateRootIndices,
|
|
6107
|
-
}: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
|
|
5437
|
+
static mergeTokenAccounts({ payer, owner, inputCompressedTokenAccounts, mint, recentValidityProof, recentInputStateRootIndices, }: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
|
|
6108
5438
|
/**
|
|
6109
5439
|
* Create `compressSplTokenAccount` instruction
|
|
6110
5440
|
*
|
|
@@ -6118,15 +5448,7 @@ declare class CompressedTokenProgram {
|
|
|
6118
5448
|
*
|
|
6119
5449
|
* @returns instruction
|
|
6120
5450
|
*/
|
|
6121
|
-
static compressSplTokenAccount({
|
|
6122
|
-
feePayer,
|
|
6123
|
-
authority,
|
|
6124
|
-
tokenAccount,
|
|
6125
|
-
mint,
|
|
6126
|
-
remainingAmount,
|
|
6127
|
-
outputStateTreeInfo,
|
|
6128
|
-
tokenPoolInfo,
|
|
6129
|
-
}: CompressSplTokenAccountParams): Promise<TransactionInstruction>;
|
|
5451
|
+
static compressSplTokenAccount({ feePayer, authority, tokenAccount, mint, remainingAmount, outputStateTreeInfo, tokenPoolInfo, }: CompressSplTokenAccountParams): Promise<TransactionInstruction>;
|
|
6130
5452
|
/**
|
|
6131
5453
|
* Get the program ID for a mint
|
|
6132
5454
|
*
|
|
@@ -6135,10 +5457,7 @@ declare class CompressedTokenProgram {
|
|
|
6135
5457
|
*
|
|
6136
5458
|
* @returns program ID
|
|
6137
5459
|
*/
|
|
6138
|
-
static getMintProgramId(
|
|
6139
|
-
mint: PublicKey,
|
|
6140
|
-
connection: Connection,
|
|
6141
|
-
): Promise<PublicKey | undefined>;
|
|
5460
|
+
static getMintProgramId(mint: PublicKey, connection: Connection): Promise<PublicKey | undefined>;
|
|
6142
5461
|
/**
|
|
6143
5462
|
* Create `approve` instruction to delegate compressed tokens.
|
|
6144
5463
|
*
|
|
@@ -6151,14 +5470,7 @@ declare class CompressedTokenProgram {
|
|
|
6151
5470
|
*
|
|
6152
5471
|
* @returns instruction
|
|
6153
5472
|
*/
|
|
6154
|
-
static approve({
|
|
6155
|
-
payer,
|
|
6156
|
-
inputCompressedTokenAccounts,
|
|
6157
|
-
toAddress,
|
|
6158
|
-
amount,
|
|
6159
|
-
recentValidityProof,
|
|
6160
|
-
recentInputStateRootIndices,
|
|
6161
|
-
}: ApproveParams): Promise<TransactionInstruction>;
|
|
5473
|
+
static approve({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, }: ApproveParams): Promise<TransactionInstruction>;
|
|
6162
5474
|
/**
|
|
6163
5475
|
* Create `revoke` instruction to revoke delegation of compressed tokens.
|
|
6164
5476
|
*
|
|
@@ -6169,12 +5481,7 @@ declare class CompressedTokenProgram {
|
|
|
6169
5481
|
*
|
|
6170
5482
|
* @returns instruction
|
|
6171
5483
|
*/
|
|
6172
|
-
static revoke({
|
|
6173
|
-
payer,
|
|
6174
|
-
inputCompressedTokenAccounts,
|
|
6175
|
-
recentValidityProof,
|
|
6176
|
-
recentInputStateRootIndices,
|
|
6177
|
-
}: RevokeParams): Promise<TransactionInstruction>;
|
|
5484
|
+
static revoke({ payer, inputCompressedTokenAccounts, recentValidityProof, recentInputStateRootIndices, }: RevokeParams): Promise<TransactionInstruction>;
|
|
6178
5485
|
}
|
|
6179
5486
|
|
|
6180
5487
|
/**
|
|
@@ -6188,14 +5495,7 @@ declare class CompressedTokenProgram {
|
|
|
6188
5495
|
* @param programId Optional program ID (omit for unified behavior)
|
|
6189
5496
|
* @returns AccountInterface with aggregated balance from all sources
|
|
6190
5497
|
*/
|
|
6191
|
-
declare function getAtaInterface(
|
|
6192
|
-
rpc: Rpc,
|
|
6193
|
-
ata: PublicKey,
|
|
6194
|
-
owner: PublicKey,
|
|
6195
|
-
mint: PublicKey,
|
|
6196
|
-
commitment?: Commitment,
|
|
6197
|
-
programId?: PublicKey,
|
|
6198
|
-
): Promise<AccountInterface>;
|
|
5498
|
+
declare function getAtaInterface(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<AccountInterface>;
|
|
6199
5499
|
/**
|
|
6200
5500
|
* Derive the canonical token ATA for SPL/T22/c-token in the unified path.
|
|
6201
5501
|
*
|
|
@@ -6209,13 +5509,7 @@ declare function getAtaInterface(
|
|
|
6209
5509
|
* auto-detected.
|
|
6210
5510
|
* @returns Associated token address.
|
|
6211
5511
|
*/
|
|
6212
|
-
declare function getAssociatedTokenAddressInterface(
|
|
6213
|
-
mint: PublicKey,
|
|
6214
|
-
owner: PublicKey,
|
|
6215
|
-
allowOwnerOffCurve?: boolean,
|
|
6216
|
-
programId?: PublicKey,
|
|
6217
|
-
associatedTokenProgramId?: PublicKey,
|
|
6218
|
-
): PublicKey;
|
|
5512
|
+
declare function getAssociatedTokenAddressInterface(mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, programId?: PublicKey, associatedTokenProgramId?: PublicKey): PublicKey;
|
|
6219
5513
|
/**
|
|
6220
5514
|
* Create instructions to load ALL token balances into a c-token ATA.
|
|
6221
5515
|
*
|
|
@@ -6227,14 +5521,7 @@ declare function getAssociatedTokenAddressInterface(
|
|
|
6227
5521
|
* @param options Optional interface options
|
|
6228
5522
|
* @returns Array of instructions (empty if nothing to load)
|
|
6229
5523
|
*/
|
|
6230
|
-
declare function createLoadAtaInstructions(
|
|
6231
|
-
rpc: Rpc,
|
|
6232
|
-
ata: PublicKey,
|
|
6233
|
-
owner: PublicKey,
|
|
6234
|
-
mint: PublicKey,
|
|
6235
|
-
payer?: PublicKey,
|
|
6236
|
-
options?: InterfaceOptions,
|
|
6237
|
-
): Promise<_solana_web3_js.TransactionInstruction[]>;
|
|
5524
|
+
declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, payer?: PublicKey, options?: InterfaceOptions): Promise<_solana_web3_js.TransactionInstruction[]>;
|
|
6238
5525
|
/**
|
|
6239
5526
|
* Load all token balances into the c-token ATA.
|
|
6240
5527
|
*
|
|
@@ -6251,15 +5538,7 @@ declare function createLoadAtaInstructions(
|
|
|
6251
5538
|
* @param interfaceOptions Optional interface options
|
|
6252
5539
|
* @returns Transaction signature, or null if ATA exists and nothing to load
|
|
6253
5540
|
*/
|
|
6254
|
-
declare function loadAta(
|
|
6255
|
-
rpc: Rpc,
|
|
6256
|
-
ata: PublicKey,
|
|
6257
|
-
owner: Signer,
|
|
6258
|
-
mint: PublicKey,
|
|
6259
|
-
payer?: Signer,
|
|
6260
|
-
confirmOptions?: ConfirmOptions,
|
|
6261
|
-
interfaceOptions?: InterfaceOptions,
|
|
6262
|
-
): Promise<string | null>;
|
|
5541
|
+
declare function loadAta(rpc: Rpc, ata: PublicKey, owner: Signer, mint: PublicKey, payer?: Signer, confirmOptions?: ConfirmOptions, interfaceOptions?: InterfaceOptions): Promise<string | null>;
|
|
6263
5542
|
/**
|
|
6264
5543
|
* Transfer tokens using the unified ata interface.
|
|
6265
5544
|
*
|
|
@@ -6277,18 +5556,7 @@ declare function loadAta(
|
|
|
6277
5556
|
* @param options Optional interface options
|
|
6278
5557
|
* @returns Transaction signature
|
|
6279
5558
|
*/
|
|
6280
|
-
declare function transferInterface(
|
|
6281
|
-
rpc: Rpc,
|
|
6282
|
-
payer: Signer,
|
|
6283
|
-
source: PublicKey,
|
|
6284
|
-
mint: PublicKey,
|
|
6285
|
-
destination: PublicKey,
|
|
6286
|
-
owner: Signer,
|
|
6287
|
-
amount: number | bigint | BN,
|
|
6288
|
-
programId?: PublicKey,
|
|
6289
|
-
confirmOptions?: ConfirmOptions,
|
|
6290
|
-
options?: InterfaceOptions,
|
|
6291
|
-
): Promise<string>;
|
|
5559
|
+
declare function transferInterface(rpc: Rpc, payer: Signer, source: PublicKey, mint: PublicKey, destination: PublicKey, owner: Signer, amount: number | bigint | BN, programId?: PublicKey, confirmOptions?: ConfirmOptions, options?: InterfaceOptions): Promise<string>;
|
|
6292
5560
|
/**
|
|
6293
5561
|
* Get or create c-token ATA with unified balance detection and auto-loading.
|
|
6294
5562
|
*
|
|
@@ -6317,232 +5585,6 @@ declare function transferInterface(
|
|
|
6317
5585
|
* @param confirmOptions Optional confirm options
|
|
6318
5586
|
* @returns AccountInterface with unified balance and source breakdown
|
|
6319
5587
|
*/
|
|
6320
|
-
declare function getOrCreateAtaInterface(
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
mint: PublicKey,
|
|
6324
|
-
owner: PublicKey | Signer,
|
|
6325
|
-
allowOwnerOffCurve?: boolean,
|
|
6326
|
-
commitment?: Commitment,
|
|
6327
|
-
confirmOptions?: ConfirmOptions,
|
|
6328
|
-
): Promise<AccountInterface>;
|
|
6329
|
-
|
|
6330
|
-
export {
|
|
6331
|
-
ADD_TOKEN_POOL_DISCRIMINATOR,
|
|
6332
|
-
APPROVE_DISCRIMINATOR,
|
|
6333
|
-
type AccountInterface,
|
|
6334
|
-
Action,
|
|
6335
|
-
type AddSplInterfaceParams,
|
|
6336
|
-
type AddTokenPoolParams,
|
|
6337
|
-
type ApproveAndMintToParams,
|
|
6338
|
-
type ApproveParams,
|
|
6339
|
-
BATCH_COMPRESS_DISCRIMINATOR,
|
|
6340
|
-
type BaseMint,
|
|
6341
|
-
type BatchCompressInstructionData,
|
|
6342
|
-
COMPRESSED_MINT_SEED,
|
|
6343
|
-
COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR,
|
|
6344
|
-
CPI_AUTHORITY_SEED,
|
|
6345
|
-
CREATE_TOKEN_POOL_DISCRIMINATOR,
|
|
6346
|
-
type CTokenConfig,
|
|
6347
|
-
type CompressParams,
|
|
6348
|
-
type CompressSplTokenAccountInstructionData,
|
|
6349
|
-
type CompressSplTokenAccountParams,
|
|
6350
|
-
type CompressedMint,
|
|
6351
|
-
type CompressedTokenInstructionDataApprove,
|
|
6352
|
-
CompressedTokenInstructionDataApproveLayout,
|
|
6353
|
-
type CompressedTokenInstructionDataRevoke,
|
|
6354
|
-
CompressedTokenInstructionDataRevokeLayout,
|
|
6355
|
-
type CompressedTokenInstructionDataTransfer,
|
|
6356
|
-
CompressedTokenInstructionDataTransferLayout,
|
|
6357
|
-
CompressedTokenProgram,
|
|
6358
|
-
type CompressibleAccountInput,
|
|
6359
|
-
type CompressibleConfig,
|
|
6360
|
-
type CompressibleLoadParams,
|
|
6361
|
-
CpiContextLayout,
|
|
6362
|
-
type CreateAssociatedCTokenAccountParams,
|
|
6363
|
-
type CreateMintParams,
|
|
6364
|
-
type CreateSplInterfaceParams,
|
|
6365
|
-
type CreateTokenPoolParams,
|
|
6366
|
-
type CreateTokenProgramLookupTableParams,
|
|
6367
|
-
DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR,
|
|
6368
|
-
type DecompressParams,
|
|
6369
|
-
type DelegatedTransfer,
|
|
6370
|
-
DelegatedTransferLayout,
|
|
6371
|
-
ERROR_MIXED_TREE_TYPES,
|
|
6372
|
-
ERROR_NO_ACCOUNTS_FOUND,
|
|
6373
|
-
ExtensionType,
|
|
6374
|
-
IDL,
|
|
6375
|
-
type InputTokenDataWithContext,
|
|
6376
|
-
type InterfaceOptions,
|
|
6377
|
-
type LightCompressedToken,
|
|
6378
|
-
type LoadResult,
|
|
6379
|
-
MINT_TO_DISCRIMINATOR,
|
|
6380
|
-
type MergeTokenAccountsParams,
|
|
6381
|
-
type MintContext,
|
|
6382
|
-
type MintExtension,
|
|
6383
|
-
type MintInterface,
|
|
6384
|
-
type MintToInstructionData,
|
|
6385
|
-
type MintToParams,
|
|
6386
|
-
type OffChainTokenMetadata,
|
|
6387
|
-
type OffChainTokenMetadataJson,
|
|
6388
|
-
POOL_SEED,
|
|
6389
|
-
type PackCompressedTokenAccountsParams,
|
|
6390
|
-
type PackedCompressedAccount,
|
|
6391
|
-
type PackedTokenTransferOutputData,
|
|
6392
|
-
type ParsedAccountInfoInterface,
|
|
6393
|
-
REVOKE_DISCRIMINATOR,
|
|
6394
|
-
type RevokeParams,
|
|
6395
|
-
SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE,
|
|
6396
|
-
type SelectInputAccountsOptions,
|
|
6397
|
-
type SelectedAccountsResult,
|
|
6398
|
-
type SplInterfaceActivity,
|
|
6399
|
-
type SplInterfaceInfo,
|
|
6400
|
-
TRANSFER_DISCRIMINATOR,
|
|
6401
|
-
type TokenAccountSource,
|
|
6402
|
-
type TokenData,
|
|
6403
|
-
TokenDataVersion,
|
|
6404
|
-
type TokenMetadata,
|
|
6405
|
-
type TokenMetadataInstructionData,
|
|
6406
|
-
type TokenPoolActivity,
|
|
6407
|
-
type TokenPoolInfo,
|
|
6408
|
-
type TokenTransferOutputData,
|
|
6409
|
-
type TransferParams,
|
|
6410
|
-
addSplInterfaces,
|
|
6411
|
-
addTokenPoolAccountsLayout,
|
|
6412
|
-
type addTokenPoolAccountsLayoutParams,
|
|
6413
|
-
addTokenPools,
|
|
6414
|
-
approve,
|
|
6415
|
-
approveAccountsLayout,
|
|
6416
|
-
type approveAccountsLayoutParams,
|
|
6417
|
-
approveAndMintTo,
|
|
6418
|
-
batchCompressLayout,
|
|
6419
|
-
calculateCompressibleLoadComputeUnits,
|
|
6420
|
-
checkMint,
|
|
6421
|
-
checkSplInterfaceInfo,
|
|
6422
|
-
checkTokenPoolInfo,
|
|
6423
|
-
compress,
|
|
6424
|
-
compressSplTokenAccount,
|
|
6425
|
-
compressSplTokenAccountInstructionDataLayout,
|
|
6426
|
-
convertTokenDataToAccount,
|
|
6427
|
-
createAssociatedCTokenAccountIdempotentInstruction,
|
|
6428
|
-
createAssociatedCTokenAccountInstruction,
|
|
6429
|
-
createAssociatedTokenAccountInterfaceIdempotentInstruction,
|
|
6430
|
-
createAssociatedTokenAccountInterfaceInstruction,
|
|
6431
|
-
createAtaInterface,
|
|
6432
|
-
createAtaInterfaceIdempotent,
|
|
6433
|
-
createAtaInterfaceIdempotentInstruction,
|
|
6434
|
-
createCTokenTransferInstruction,
|
|
6435
|
-
createDecompressInterfaceInstruction,
|
|
6436
|
-
createDecompressOutputState,
|
|
6437
|
-
createLoadAccountsParams,
|
|
6438
|
-
createLoadAtaInstructions,
|
|
6439
|
-
createLoadAtaInstructionsFromInterface,
|
|
6440
|
-
createMint,
|
|
6441
|
-
createMintInstruction,
|
|
6442
|
-
createMintInterface,
|
|
6443
|
-
createMintToCompressedInstruction,
|
|
6444
|
-
createMintToInstruction,
|
|
6445
|
-
createMintToInterfaceInstruction,
|
|
6446
|
-
createRemoveMetadataKeyInstruction,
|
|
6447
|
-
createSplInterface,
|
|
6448
|
-
createTokenMetadata,
|
|
6449
|
-
createTokenPool,
|
|
6450
|
-
createTokenPoolAccountsLayout,
|
|
6451
|
-
type createTokenPoolAccountsLayoutParams,
|
|
6452
|
-
createTokenProgramLookupTable,
|
|
6453
|
-
createTransferInterfaceInstruction,
|
|
6454
|
-
createTransferOutputState,
|
|
6455
|
-
createUnwrapInstruction,
|
|
6456
|
-
createUpdateFreezeAuthorityInstruction,
|
|
6457
|
-
createUpdateMetadataAuthorityInstruction,
|
|
6458
|
-
createUpdateMetadataFieldInstruction,
|
|
6459
|
-
createUpdateMintAuthorityInstruction,
|
|
6460
|
-
createWrapInstruction,
|
|
6461
|
-
decodeApproveInstructionData,
|
|
6462
|
-
decodeBatchCompressInstructionData,
|
|
6463
|
-
decodeCompressSplTokenAccountInstructionData,
|
|
6464
|
-
decodeMintToInstructionData,
|
|
6465
|
-
decodeRevokeInstructionData,
|
|
6466
|
-
decodeTokenMetadata,
|
|
6467
|
-
decodeTransferInstructionData,
|
|
6468
|
-
decompress,
|
|
6469
|
-
decompressDelegated,
|
|
6470
|
-
decompressInterface,
|
|
6471
|
-
deriveCMintAddress,
|
|
6472
|
-
deriveSplInterfaceInfo,
|
|
6473
|
-
deriveTokenPoolInfo,
|
|
6474
|
-
deserializeMint,
|
|
6475
|
-
encodeApproveInstructionData,
|
|
6476
|
-
encodeBatchCompressInstructionData,
|
|
6477
|
-
encodeCompressSplTokenAccountInstructionData,
|
|
6478
|
-
encodeMintToInstructionData,
|
|
6479
|
-
encodeRevokeInstructionData,
|
|
6480
|
-
encodeTokenMetadata,
|
|
6481
|
-
encodeTransferInstructionData,
|
|
6482
|
-
extractTokenMetadata,
|
|
6483
|
-
findMintAddress,
|
|
6484
|
-
freezeAccountsLayout,
|
|
6485
|
-
type freezeAccountsLayoutParams,
|
|
6486
|
-
getAccountInterface,
|
|
6487
|
-
getAssociatedCTokenAddress,
|
|
6488
|
-
getAssociatedCTokenAddressAndBump,
|
|
6489
|
-
getAssociatedTokenAddressInterface,
|
|
6490
|
-
getAtaInterface,
|
|
6491
|
-
getMintInterface,
|
|
6492
|
-
getOrCreateAtaInterface,
|
|
6493
|
-
getSplInterfaceInfos,
|
|
6494
|
-
getTokenPoolInfos,
|
|
6495
|
-
groupAccountsByTreeType,
|
|
6496
|
-
isSingleSplInterfaceInfo,
|
|
6497
|
-
isSingleTokenPoolInfo,
|
|
6498
|
-
loadAta,
|
|
6499
|
-
mergeTokenAccounts,
|
|
6500
|
-
mintTo,
|
|
6501
|
-
mintToAccountsLayout,
|
|
6502
|
-
type mintToAccountsLayoutParams,
|
|
6503
|
-
mintTo$1 as mintToCToken,
|
|
6504
|
-
mintToCompressed,
|
|
6505
|
-
mintToInterface,
|
|
6506
|
-
mintToLayout,
|
|
6507
|
-
packCompressedTokenAccounts,
|
|
6508
|
-
parseCTokenCold,
|
|
6509
|
-
parseCTokenHot,
|
|
6510
|
-
parseMaybeDelegatedTransfer,
|
|
6511
|
-
parseTokenData,
|
|
6512
|
-
removeMetadataKey,
|
|
6513
|
-
revoke,
|
|
6514
|
-
revokeAccountsLayout,
|
|
6515
|
-
type revokeAccountsLayoutParams,
|
|
6516
|
-
selectAccountsByPreferredTreeType,
|
|
6517
|
-
selectMinCompressedTokenAccountsForDecompression,
|
|
6518
|
-
selectMinCompressedTokenAccountsForTransfer,
|
|
6519
|
-
selectMinCompressedTokenAccountsForTransferOrPartial,
|
|
6520
|
-
selectSmartCompressedTokenAccountsForTransfer,
|
|
6521
|
-
selectSmartCompressedTokenAccountsForTransferOrPartial,
|
|
6522
|
-
selectSplInterfaceInfo,
|
|
6523
|
-
selectSplInterfaceInfosForDecompression,
|
|
6524
|
-
selectTokenAccountsForApprove,
|
|
6525
|
-
selectTokenPoolInfo,
|
|
6526
|
-
selectTokenPoolInfosForDecompression,
|
|
6527
|
-
serializeMint,
|
|
6528
|
-
sumUpTokenAmount,
|
|
6529
|
-
thawAccountsLayout,
|
|
6530
|
-
type thawAccountsLayoutParams,
|
|
6531
|
-
toAccountInfo,
|
|
6532
|
-
toOffChainMetadataJson,
|
|
6533
|
-
toTokenPoolInfo,
|
|
6534
|
-
transfer,
|
|
6535
|
-
transferAccountsLayout,
|
|
6536
|
-
type transferAccountsLayoutParams,
|
|
6537
|
-
transferDelegated,
|
|
6538
|
-
transferInterface,
|
|
6539
|
-
unpackMintData,
|
|
6540
|
-
unpackMintInterface,
|
|
6541
|
-
unwrap,
|
|
6542
|
-
updateFreezeAuthority,
|
|
6543
|
-
updateMetadataAuthority,
|
|
6544
|
-
updateMetadataField,
|
|
6545
|
-
updateMintAuthority,
|
|
6546
|
-
validateSameTokenOwner,
|
|
6547
|
-
wrap,
|
|
6548
|
-
};
|
|
5588
|
+
declare function getOrCreateAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey | Signer, allowOwnerOffCurve?: boolean, commitment?: Commitment, confirmOptions?: ConfirmOptions): Promise<AccountInterface>;
|
|
5589
|
+
|
|
5590
|
+
export { ADD_TOKEN_POOL_DISCRIMINATOR, APPROVE_DISCRIMINATOR, type AccountInterface, Action, type AddSplInterfaceParams, type AddTokenPoolParams, type ApproveAndMintToParams, type ApproveParams, BASE_RENT_PER_EPOCH, BATCH_COMPRESS_DISCRIMINATOR, type BaseMint, type BatchCompressInstructionData, COMPRESSED_MINT_SEED, COMPRESSIBLE_CTOKEN_ACCOUNT_SIZE, COMPRESSIBLE_CTOKEN_RENT_PER_EPOCH, COMPRESSION_COST, COMPRESSION_INCENTIVE, COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR, CPI_AUTHORITY_SEED, CREATE_TOKEN_POOL_DISCRIMINATOR, type CTokenConfig, type CompressParams, type CompressSplTokenAccountInstructionData, type CompressSplTokenAccountParams, type CompressedMint, type CompressedTokenInstructionDataApprove, CompressedTokenInstructionDataApproveLayout, type CompressedTokenInstructionDataRevoke, CompressedTokenInstructionDataRevokeLayout, type CompressedTokenInstructionDataTransfer, CompressedTokenInstructionDataTransferLayout, CompressedTokenProgram, type CompressibleAccountInput, type CompressibleConfig, type CompressibleLoadParams, CpiContextLayout, type CreateAssociatedCTokenAccountParams, type CreateMintParams, type CreateSplInterfaceParams, type CreateTokenPoolParams, type CreateTokenProgramLookupTableParams, DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR, DEFAULT_COMPRESSIBLE_CONFIG, DEFAULT_PREPAY_EPOCHS, DEFAULT_WRITE_TOP_UP, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, ERROR_MIXED_TREE_TYPES, ERROR_NO_ACCOUNTS_FOUND, ExtensionType, IDL, type InputTokenDataWithContext, type InterfaceOptions, LIGHT_TOKEN_CONFIG, LIGHT_TOKEN_RENT_SPONSOR, type LightCompressedToken, type LoadResult, MINT_TO_DISCRIMINATOR, type MergeTokenAccountsParams, type MintContext, type MintExtension, type MintInterface, type MintToInstructionData, type MintToParams, type OffChainTokenMetadata, type OffChainTokenMetadataJson, POOL_SEED, type PackCompressedTokenAccountsParams, type PackedCompressedAccount, type PackedTokenTransferOutputData, type ParsedAccountInfoInterface, RENT_PER_BYTE_PER_EPOCH, REVOKE_DISCRIMINATOR, type RevokeParams, SLOTS_PER_RENT_EPOCH, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, type SelectInputAccountsOptions, type SelectedAccountsResult, type SplInterfaceActivity, type SplInterfaceInfo, TOTAL_COMPRESSION_COST, TRANSFER_DISCRIMINATOR, type TokenAccountSource, type TokenData, TokenDataVersion, type TokenMetadata, type TokenMetadataInstructionData, type TokenPoolActivity, type TokenPoolInfo, type TokenTransferOutputData, type TransferParams, addSplInterfaces, addTokenPoolAccountsLayout, type addTokenPoolAccountsLayoutParams, addTokenPools, approve, approveAccountsLayout, type approveAccountsLayoutParams, approveAndMintTo, batchCompressLayout, calculateCompressibleLoadComputeUnits, calculateFeePayerCostAtCreation, checkMint, checkSplInterfaceInfo, checkTokenPoolInfo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, convertTokenDataToAccount, createAssociatedCTokenAccountIdempotentInstruction, createAssociatedCTokenAccountInstruction, createAssociatedTokenAccountInterfaceIdempotentInstruction, createAssociatedTokenAccountInterfaceInstruction, createAtaInterface, createAtaInterfaceIdempotent, createAtaInterfaceIdempotentInstruction, createCTokenTransferInstruction, createDecompressInterfaceInstruction, createDecompressOutputState, createLoadAccountsParams, createLoadAtaInstructions, createLoadAtaInstructionsFromInterface, createMint, createMintInstruction, createMintInterface, createMintToCompressedInstruction, createMintToInstruction, createMintToInterfaceInstruction, createRemoveMetadataKeyInstruction, createSplInterface, createTokenMetadata, createTokenPool, createTokenPoolAccountsLayout, type createTokenPoolAccountsLayoutParams, createTokenProgramLookupTable, createTransferInterfaceInstruction, createTransferOutputState, createUnwrapInstruction, createUpdateFreezeAuthorityInstruction, createUpdateMetadataAuthorityInstruction, createUpdateMetadataFieldInstruction, createUpdateMintAuthorityInstruction, createWrapInstruction, decodeApproveInstructionData, decodeBatchCompressInstructionData, decodeCompressSplTokenAccountInstructionData, decodeMintToInstructionData, decodeRevokeInstructionData, decodeTokenMetadata, decodeTransferInstructionData, decompress, decompressDelegated, decompressInterface, deriveCMintAddress, deriveSplInterfaceInfo, deriveTokenPoolInfo, deserializeMint, encodeApproveInstructionData, encodeBatchCompressInstructionData, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeRevokeInstructionData, encodeTokenMetadata, encodeTransferInstructionData, extractTokenMetadata, findMintAddress, freezeAccountsLayout, type freezeAccountsLayoutParams, getAccountInterface, getAssociatedCTokenAddress, getAssociatedCTokenAddressAndBump, getAssociatedTokenAddressInterface, getAtaInterface, getMintInterface, getOrCreateAtaInterface, getSplInterfaceInfos, getTokenPoolInfos, groupAccountsByTreeType, isSingleSplInterfaceInfo, isSingleTokenPoolInfo, loadAta, mergeTokenAccounts, mintTo, mintToAccountsLayout, type mintToAccountsLayoutParams, mintTo$1 as mintToCToken, mintToCompressed, mintToInterface, mintToLayout, packCompressedTokenAccounts, parseCTokenCold, parseCTokenHot, parseMaybeDelegatedTransfer, parseTokenData, removeMetadataKey, rentPerEpoch, revoke, revokeAccountsLayout, type revokeAccountsLayoutParams, selectAccountsByPreferredTreeType, selectMinCompressedTokenAccountsForDecompression, selectMinCompressedTokenAccountsForTransfer, selectMinCompressedTokenAccountsForTransferOrPartial, selectSmartCompressedTokenAccountsForTransfer, selectSmartCompressedTokenAccountsForTransferOrPartial, selectSplInterfaceInfo, selectSplInterfaceInfosForDecompression, selectTokenAccountsForApprove, selectTokenPoolInfo, selectTokenPoolInfosForDecompression, serializeMint, sumUpTokenAmount, thawAccountsLayout, type thawAccountsLayoutParams, toAccountInfo, toOffChainMetadataJson, toTokenPoolInfo, transfer, transferAccountsLayout, type transferAccountsLayoutParams, transferDelegated, transferInterface, unpackMintData, unpackMintInterface, unwrap, updateFreezeAuthority, updateMetadataAuthority, updateMetadataField, updateMintAuthority, validateSameTokenOwner, wrap };
|