@lightprotocol/compressed-token 0.23.0-beta.8 → 0.23.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/browser/index.cjs +246 -1
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/browser/types-pEpHwEnq.cjs +11988 -0
- package/dist/cjs/browser/types-pEpHwEnq.cjs.map +1 -0
- package/dist/cjs/browser/unified/index.cjs +337 -1
- package/dist/cjs/browser/unified/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +248 -1
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/node/types-EuCij2TU.cjs +10752 -0
- package/dist/cjs/node/types-EuCij2TU.cjs.map +1 -0
- package/dist/cjs/node/unified/index.cjs +338 -1
- package/dist/cjs/node/unified/index.cjs.map +1 -1
- package/dist/es/browser/index.js +191 -1
- package/dist/es/browser/index.js.map +1 -1
- package/dist/es/browser/types-BSM3Bq3L.js +10887 -0
- package/dist/es/browser/types-BSM3Bq3L.js.map +1 -0
- package/dist/es/browser/unified/index.js +242 -1
- package/dist/es/browser/unified/index.js.map +1 -1
- package/dist/types/index.d.ts +1365 -273
- package/dist/types/unified/index.d.ts +1372 -275
- package/package.json +2 -2
- package/dist/cjs/browser/types-yDZoEoYW.cjs +0 -2
- package/dist/cjs/browser/types-yDZoEoYW.cjs.map +0 -1
- package/dist/cjs/node/types-n2UYeAW3.cjs +0 -2
- package/dist/cjs/node/types-n2UYeAW3.cjs.map +0 -1
- package/dist/es/browser/types-DGrEdIo3.js +0 -2
- package/dist/es/browser/types-DGrEdIo3.js.map +0 -1
|
@@ -1,13 +1,38 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
PublicKey,
|
|
4
|
+
AccountInfo,
|
|
5
|
+
Commitment,
|
|
6
|
+
TransactionInstruction,
|
|
7
|
+
AccountMeta,
|
|
8
|
+
Signer,
|
|
9
|
+
Keypair,
|
|
10
|
+
ConfirmOptions,
|
|
11
|
+
TransactionSignature,
|
|
12
|
+
Connection,
|
|
13
|
+
} from '@solana/web3.js';
|
|
14
|
+
import {
|
|
15
|
+
MerkleContext,
|
|
16
|
+
CompressedAccountWithMerkleContext,
|
|
17
|
+
Rpc,
|
|
18
|
+
ValidityProofWithContext,
|
|
19
|
+
AddressTreeInfo,
|
|
20
|
+
TreeInfo,
|
|
21
|
+
ParsedTokenAccount,
|
|
22
|
+
ValidityProof,
|
|
23
|
+
TreeType,
|
|
24
|
+
PackedMerkleContextLegacy,
|
|
25
|
+
CompressedCpiContext,
|
|
26
|
+
InputTokenDataWithContext as InputTokenDataWithContext$1,
|
|
27
|
+
CompressedProof,
|
|
28
|
+
} from '@lightprotocol/stateless.js';
|
|
4
29
|
export { ParsedTokenAccount } from '@lightprotocol/stateless.js';
|
|
5
30
|
import { Account, Mint } from '@solana/spl-token';
|
|
6
31
|
export { AccountState } from '@solana/spl-token';
|
|
7
32
|
|
|
8
33
|
declare namespace BN {
|
|
9
|
-
type Endianness =
|
|
10
|
-
type IPrimeName =
|
|
34
|
+
type Endianness = 'le' | 'be';
|
|
35
|
+
type IPrimeName = 'k256' | 'p224' | 'p192' | 'p25519';
|
|
11
36
|
|
|
12
37
|
interface MPrime {
|
|
13
38
|
name: string;
|
|
@@ -29,7 +54,7 @@ declare class BN {
|
|
|
29
54
|
|
|
30
55
|
constructor(
|
|
31
56
|
number: bigint | number | string | number[] | Uint8Array | Buffer | BN,
|
|
32
|
-
base?: number |
|
|
57
|
+
base?: number | 'hex',
|
|
33
58
|
endian?: BN.Endianness,
|
|
34
59
|
);
|
|
35
60
|
constructor(
|
|
@@ -75,7 +100,7 @@ declare class BN {
|
|
|
75
100
|
/**
|
|
76
101
|
* @description convert to base-string and pad with zeroes
|
|
77
102
|
*/
|
|
78
|
-
toString(base?: number |
|
|
103
|
+
toString(base?: number | 'hex', length?: number): string;
|
|
79
104
|
|
|
80
105
|
/**
|
|
81
106
|
* @description convert to Javascript Number (limited to 53 bits)
|
|
@@ -335,7 +360,11 @@ declare class BN {
|
|
|
335
360
|
/**
|
|
336
361
|
* @description division with remainder
|
|
337
362
|
*/
|
|
338
|
-
divmod(
|
|
363
|
+
divmod(
|
|
364
|
+
b: BN,
|
|
365
|
+
mode?: 'div' | 'mod',
|
|
366
|
+
positive?: boolean,
|
|
367
|
+
): { div: BN; mod: BN };
|
|
339
368
|
|
|
340
369
|
/**
|
|
341
370
|
* @description reduct
|
|
@@ -599,18 +628,54 @@ declare class RedBN extends BN {
|
|
|
599
628
|
}
|
|
600
629
|
|
|
601
630
|
declare class Buffer$1 extends Uint8Array {
|
|
602
|
-
length: number
|
|
603
|
-
write(
|
|
631
|
+
length: number;
|
|
632
|
+
write(
|
|
633
|
+
string: string,
|
|
634
|
+
offset?: number,
|
|
635
|
+
length?: number,
|
|
636
|
+
encoding?: string,
|
|
637
|
+
): number;
|
|
604
638
|
toString(encoding?: string, start?: number, end?: number): string;
|
|
605
|
-
toJSON(): { type: 'Buffer'
|
|
639
|
+
toJSON(): { type: 'Buffer'; data: any[] };
|
|
606
640
|
equals(otherBuffer: Buffer$1): boolean;
|
|
607
|
-
compare(
|
|
608
|
-
|
|
641
|
+
compare(
|
|
642
|
+
otherBuffer: Uint8Array,
|
|
643
|
+
targetStart?: number,
|
|
644
|
+
targetEnd?: number,
|
|
645
|
+
sourceStart?: number,
|
|
646
|
+
sourceEnd?: number,
|
|
647
|
+
): number;
|
|
648
|
+
copy(
|
|
649
|
+
targetBuffer: Buffer$1,
|
|
650
|
+
targetStart?: number,
|
|
651
|
+
sourceStart?: number,
|
|
652
|
+
sourceEnd?: number,
|
|
653
|
+
): number;
|
|
609
654
|
slice(start?: number, end?: number): Buffer$1;
|
|
610
|
-
writeUIntLE(
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
655
|
+
writeUIntLE(
|
|
656
|
+
value: number,
|
|
657
|
+
offset: number,
|
|
658
|
+
byteLength: number,
|
|
659
|
+
noAssert?: boolean,
|
|
660
|
+
): number;
|
|
661
|
+
writeUIntBE(
|
|
662
|
+
value: number,
|
|
663
|
+
offset: number,
|
|
664
|
+
byteLength: number,
|
|
665
|
+
noAssert?: boolean,
|
|
666
|
+
): number;
|
|
667
|
+
writeIntLE(
|
|
668
|
+
value: number,
|
|
669
|
+
offset: number,
|
|
670
|
+
byteLength: number,
|
|
671
|
+
noAssert?: boolean,
|
|
672
|
+
): number;
|
|
673
|
+
writeIntBE(
|
|
674
|
+
value: number,
|
|
675
|
+
offset: number,
|
|
676
|
+
byteLength: number,
|
|
677
|
+
noAssert?: boolean,
|
|
678
|
+
): number;
|
|
614
679
|
readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
615
680
|
readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
616
681
|
readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
@@ -656,9 +721,21 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
656
721
|
writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
|
|
657
722
|
writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
|
|
658
723
|
fill(value: any, offset?: number, end?: number): this;
|
|
659
|
-
indexOf(
|
|
660
|
-
|
|
661
|
-
|
|
724
|
+
indexOf(
|
|
725
|
+
value: string | number | Buffer$1,
|
|
726
|
+
byteOffset?: number,
|
|
727
|
+
encoding?: string,
|
|
728
|
+
): number;
|
|
729
|
+
lastIndexOf(
|
|
730
|
+
value: string | number | Buffer$1,
|
|
731
|
+
byteOffset?: number,
|
|
732
|
+
encoding?: string,
|
|
733
|
+
): number;
|
|
734
|
+
includes(
|
|
735
|
+
value: string | number | Buffer$1,
|
|
736
|
+
byteOffset?: number,
|
|
737
|
+
encoding?: string,
|
|
738
|
+
): boolean;
|
|
662
739
|
|
|
663
740
|
/**
|
|
664
741
|
* Allocates a new buffer containing the given {str}.
|
|
@@ -666,19 +743,19 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
666
743
|
* @param str String to store in buffer.
|
|
667
744
|
* @param encoding encoding to use, optional. Default is 'utf8'
|
|
668
745
|
*/
|
|
669
|
-
constructor
|
|
746
|
+
constructor(str: string, encoding?: string);
|
|
670
747
|
/**
|
|
671
748
|
* Allocates a new buffer of {size} octets.
|
|
672
749
|
*
|
|
673
750
|
* @param size count of octets to allocate.
|
|
674
751
|
*/
|
|
675
|
-
constructor
|
|
752
|
+
constructor(size: number);
|
|
676
753
|
/**
|
|
677
754
|
* Allocates a new buffer containing the given {array} of octets.
|
|
678
755
|
*
|
|
679
756
|
* @param array The octets to store.
|
|
680
757
|
*/
|
|
681
|
-
constructor
|
|
758
|
+
constructor(array: Uint8Array);
|
|
682
759
|
/**
|
|
683
760
|
* Produces a Buffer backed by the same allocated memory as
|
|
684
761
|
* the given {ArrayBuffer}.
|
|
@@ -686,19 +763,19 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
686
763
|
*
|
|
687
764
|
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
688
765
|
*/
|
|
689
|
-
constructor
|
|
766
|
+
constructor(arrayBuffer: ArrayBuffer);
|
|
690
767
|
/**
|
|
691
768
|
* Allocates a new buffer containing the given {array} of octets.
|
|
692
769
|
*
|
|
693
770
|
* @param array The octets to store.
|
|
694
771
|
*/
|
|
695
|
-
constructor
|
|
772
|
+
constructor(array: any[]);
|
|
696
773
|
/**
|
|
697
774
|
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
698
775
|
*
|
|
699
776
|
* @param buffer The buffer to copy.
|
|
700
777
|
*/
|
|
701
|
-
constructor
|
|
778
|
+
constructor(buffer: Buffer$1);
|
|
702
779
|
prototype: Buffer$1;
|
|
703
780
|
/**
|
|
704
781
|
* Allocates a new Buffer using an {array} of octets.
|
|
@@ -716,7 +793,11 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
716
793
|
* @param byteOffset
|
|
717
794
|
* @param length
|
|
718
795
|
*/
|
|
719
|
-
static from(
|
|
796
|
+
static from(
|
|
797
|
+
arrayBuffer: ArrayBuffer,
|
|
798
|
+
byteOffset?: number,
|
|
799
|
+
length?: number,
|
|
800
|
+
): Buffer$1;
|
|
720
801
|
/**
|
|
721
802
|
* Copies the passed {buffer} data onto a new Buffer instance.
|
|
722
803
|
*
|
|
@@ -776,7 +857,11 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
776
857
|
* If parameter is omitted, buffer will be filled with zeros.
|
|
777
858
|
* @param encoding encoding used for call to buf.fill while initializing
|
|
778
859
|
*/
|
|
779
|
-
static alloc(
|
|
860
|
+
static alloc(
|
|
861
|
+
size: number,
|
|
862
|
+
fill?: string | Buffer$1 | number,
|
|
863
|
+
encoding?: string,
|
|
864
|
+
): Buffer$1;
|
|
780
865
|
/**
|
|
781
866
|
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
|
|
782
867
|
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
@@ -794,14 +879,15 @@ declare class Buffer$1 extends Uint8Array {
|
|
|
794
879
|
}
|
|
795
880
|
|
|
796
881
|
declare const TokenAccountSourceType: {
|
|
797
|
-
readonly Spl:
|
|
798
|
-
readonly Token2022:
|
|
799
|
-
readonly SplCold:
|
|
800
|
-
readonly Token2022Cold:
|
|
801
|
-
readonly CTokenHot:
|
|
802
|
-
readonly CTokenCold:
|
|
882
|
+
readonly Spl: 'spl';
|
|
883
|
+
readonly Token2022: 'token2022';
|
|
884
|
+
readonly SplCold: 'spl-cold';
|
|
885
|
+
readonly Token2022Cold: 'token2022-cold';
|
|
886
|
+
readonly CTokenHot: 'ctoken-hot';
|
|
887
|
+
readonly CTokenCold: 'ctoken-cold';
|
|
803
888
|
};
|
|
804
|
-
type TokenAccountSourceTypeValue =
|
|
889
|
+
type TokenAccountSourceTypeValue =
|
|
890
|
+
(typeof TokenAccountSourceType)[keyof typeof TokenAccountSourceType];
|
|
805
891
|
/** @internal */
|
|
806
892
|
interface TokenAccountSource {
|
|
807
893
|
type: TokenAccountSourceTypeValue;
|
|
@@ -828,25 +914,36 @@ interface AccountInterface {
|
|
|
828
914
|
_mint?: PublicKey;
|
|
829
915
|
}
|
|
830
916
|
/** @internal */
|
|
831
|
-
declare function convertTokenDataToAccount(
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
917
|
+
declare function convertTokenDataToAccount(
|
|
918
|
+
address: PublicKey,
|
|
919
|
+
tokenData: {
|
|
920
|
+
mint: PublicKey;
|
|
921
|
+
owner: PublicKey;
|
|
922
|
+
amount: BN;
|
|
923
|
+
delegate: PublicKey | null;
|
|
924
|
+
state: number;
|
|
925
|
+
tlv: Buffer$1 | null;
|
|
926
|
+
},
|
|
927
|
+
): Account;
|
|
839
928
|
/** Convert compressed account to AccountInfo */
|
|
840
|
-
declare function toAccountInfo(
|
|
929
|
+
declare function toAccountInfo(
|
|
930
|
+
compressedAccount: CompressedAccountWithMerkleContext,
|
|
931
|
+
): AccountInfo<Buffer$1>;
|
|
841
932
|
/** @internal */
|
|
842
|
-
declare function parseCTokenHot(
|
|
933
|
+
declare function parseCTokenHot(
|
|
934
|
+
address: PublicKey,
|
|
935
|
+
accountInfo: AccountInfo<Buffer$1>,
|
|
936
|
+
): {
|
|
843
937
|
accountInfo: AccountInfo<Buffer$1>;
|
|
844
938
|
loadContext: undefined;
|
|
845
939
|
parsed: Account;
|
|
846
940
|
isCold: false;
|
|
847
941
|
};
|
|
848
942
|
/** @internal */
|
|
849
|
-
declare function parseCTokenCold(
|
|
943
|
+
declare function parseCTokenCold(
|
|
944
|
+
address: PublicKey,
|
|
945
|
+
compressedAccount: CompressedAccountWithMerkleContext,
|
|
946
|
+
): {
|
|
850
947
|
accountInfo: AccountInfo<Buffer$1>;
|
|
851
948
|
loadContext: MerkleContext;
|
|
852
949
|
parsed: Account;
|
|
@@ -862,7 +959,12 @@ declare function parseCTokenCold(address: PublicKey, compressedAccount: Compress
|
|
|
862
959
|
*
|
|
863
960
|
* @return Token account information with compression context if applicable
|
|
864
961
|
*/
|
|
865
|
-
declare function getAccountInterface(
|
|
962
|
+
declare function getAccountInterface(
|
|
963
|
+
rpc: Rpc,
|
|
964
|
+
address: PublicKey,
|
|
965
|
+
commitment?: Commitment,
|
|
966
|
+
programId?: PublicKey,
|
|
967
|
+
): Promise<AccountInterface>;
|
|
866
968
|
|
|
867
969
|
/**
|
|
868
970
|
* SPL interface PDA info.
|
|
@@ -969,14 +1071,21 @@ declare function toTokenPoolInfo(info: SplInterfaceInfo): TokenPoolInfo;
|
|
|
969
1071
|
*
|
|
970
1072
|
* @returns SplInterfaceInfo for the to-be-initialized interface
|
|
971
1073
|
*/
|
|
972
|
-
declare function deriveSplInterfaceInfo(
|
|
1074
|
+
declare function deriveSplInterfaceInfo(
|
|
1075
|
+
mint: PublicKey,
|
|
1076
|
+
tokenProgramId: PublicKey,
|
|
1077
|
+
poolIndex?: number,
|
|
1078
|
+
): SplInterfaceInfo;
|
|
973
1079
|
/**
|
|
974
1080
|
* Check if the SPL interface info is initialized and has a balance.
|
|
975
1081
|
* @param mint The mint of the SPL interface
|
|
976
1082
|
* @param splInterfaceInfo The SPL interface info (or TokenPoolInfo for backward compatibility)
|
|
977
1083
|
* @returns True if the SPL interface info is initialized and has a balance
|
|
978
1084
|
*/
|
|
979
|
-
declare function checkSplInterfaceInfo(
|
|
1085
|
+
declare function checkSplInterfaceInfo(
|
|
1086
|
+
splInterfaceInfo: SplInterfaceInfo | TokenPoolInfo,
|
|
1087
|
+
mint: PublicKey,
|
|
1088
|
+
): boolean;
|
|
980
1089
|
/**
|
|
981
1090
|
* Get the SPL interface infos for a given mint.
|
|
982
1091
|
* @param rpc The RPC client
|
|
@@ -985,7 +1094,11 @@ declare function checkSplInterfaceInfo(splInterfaceInfo: SplInterfaceInfo | Toke
|
|
|
985
1094
|
*
|
|
986
1095
|
* @returns The SPL interface infos
|
|
987
1096
|
*/
|
|
988
|
-
declare function getSplInterfaceInfos(
|
|
1097
|
+
declare function getSplInterfaceInfos(
|
|
1098
|
+
rpc: Rpc,
|
|
1099
|
+
mint: PublicKey,
|
|
1100
|
+
commitment?: Commitment,
|
|
1101
|
+
): Promise<SplInterfaceInfo[]>;
|
|
989
1102
|
type SplInterfaceActivity = {
|
|
990
1103
|
signature: string;
|
|
991
1104
|
amount: BN;
|
|
@@ -997,7 +1110,7 @@ type SplInterfaceActivity = {
|
|
|
997
1110
|
declare enum Action {
|
|
998
1111
|
Compress = 1,
|
|
999
1112
|
Decompress = 2,
|
|
1000
|
-
Transfer = 3
|
|
1113
|
+
Transfer = 3,
|
|
1001
1114
|
}
|
|
1002
1115
|
/**
|
|
1003
1116
|
* For `compress` and `mintTo` instructions only.
|
|
@@ -1009,7 +1122,9 @@ declare enum Action {
|
|
|
1009
1122
|
*
|
|
1010
1123
|
* @returns A random SPL interface info
|
|
1011
1124
|
*/
|
|
1012
|
-
declare function selectSplInterfaceInfo(
|
|
1125
|
+
declare function selectSplInterfaceInfo(
|
|
1126
|
+
infos: SplInterfaceInfo[],
|
|
1127
|
+
): SplInterfaceInfo;
|
|
1013
1128
|
/**
|
|
1014
1129
|
* Select one or multiple SPL interface infos from the SPL interface infos.
|
|
1015
1130
|
*
|
|
@@ -1022,7 +1137,10 @@ declare function selectSplInterfaceInfo(infos: SplInterfaceInfo[]): SplInterface
|
|
|
1022
1137
|
*
|
|
1023
1138
|
* @returns Array with one or more SPL interface infos.
|
|
1024
1139
|
*/
|
|
1025
|
-
declare function selectSplInterfaceInfosForDecompression(
|
|
1140
|
+
declare function selectSplInterfaceInfosForDecompression(
|
|
1141
|
+
infos: SplInterfaceInfo[],
|
|
1142
|
+
decompressAmount: number | BN,
|
|
1143
|
+
): SplInterfaceInfo[];
|
|
1026
1144
|
/**
|
|
1027
1145
|
* @deprecated Use {@link SplInterfaceActivity} instead.
|
|
1028
1146
|
*/
|
|
@@ -1030,15 +1148,26 @@ type TokenPoolActivity = SplInterfaceActivity;
|
|
|
1030
1148
|
/**
|
|
1031
1149
|
* @deprecated Use {@link deriveSplInterfaceInfo} instead.
|
|
1032
1150
|
*/
|
|
1033
|
-
declare function deriveTokenPoolInfo(
|
|
1151
|
+
declare function deriveTokenPoolInfo(
|
|
1152
|
+
mint: PublicKey,
|
|
1153
|
+
tokenProgramId: PublicKey,
|
|
1154
|
+
poolIndex?: number,
|
|
1155
|
+
): TokenPoolInfo;
|
|
1034
1156
|
/**
|
|
1035
1157
|
* @deprecated Use {@link checkSplInterfaceInfo} instead.
|
|
1036
1158
|
*/
|
|
1037
|
-
declare function checkTokenPoolInfo(
|
|
1159
|
+
declare function checkTokenPoolInfo(
|
|
1160
|
+
tokenPoolInfo: TokenPoolInfo,
|
|
1161
|
+
mint: PublicKey,
|
|
1162
|
+
): boolean;
|
|
1038
1163
|
/**
|
|
1039
1164
|
* @deprecated Use {@link getSplInterfaceInfos} instead.
|
|
1040
1165
|
*/
|
|
1041
|
-
declare function getTokenPoolInfos(
|
|
1166
|
+
declare function getTokenPoolInfos(
|
|
1167
|
+
rpc: Rpc,
|
|
1168
|
+
mint: PublicKey,
|
|
1169
|
+
commitment?: Commitment,
|
|
1170
|
+
): Promise<TokenPoolInfo[]>;
|
|
1042
1171
|
/**
|
|
1043
1172
|
* @deprecated Use {@link selectSplInterfaceInfo} instead.
|
|
1044
1173
|
*/
|
|
@@ -1046,7 +1175,10 @@ declare function selectTokenPoolInfo(infos: TokenPoolInfo[]): TokenPoolInfo;
|
|
|
1046
1175
|
/**
|
|
1047
1176
|
* @deprecated Use {@link selectSplInterfaceInfosForDecompression} instead.
|
|
1048
1177
|
*/
|
|
1049
|
-
declare function selectTokenPoolInfosForDecompression(
|
|
1178
|
+
declare function selectTokenPoolInfosForDecompression(
|
|
1179
|
+
infos: TokenPoolInfo[],
|
|
1180
|
+
decompressAmount: number | BN,
|
|
1181
|
+
): TokenPoolInfo[];
|
|
1050
1182
|
|
|
1051
1183
|
/**
|
|
1052
1184
|
* Options for interface operations (load, transfer)
|
|
@@ -1235,7 +1367,13 @@ interface TokenMetadataInstructionData {
|
|
|
1235
1367
|
updateAuthority?: PublicKey | null;
|
|
1236
1368
|
additionalMetadata: AdditionalMetadata[] | null;
|
|
1237
1369
|
}
|
|
1238
|
-
declare function createTokenMetadata(
|
|
1370
|
+
declare function createTokenMetadata(
|
|
1371
|
+
name: string,
|
|
1372
|
+
symbol: string,
|
|
1373
|
+
uri: string,
|
|
1374
|
+
updateAuthority?: PublicKey | null,
|
|
1375
|
+
additionalMetadata?: AdditionalMetadata[] | null,
|
|
1376
|
+
): TokenMetadataInstructionData;
|
|
1239
1377
|
/**
|
|
1240
1378
|
* Create instruction for initializing a c-token mint.
|
|
1241
1379
|
*
|
|
@@ -1248,8 +1386,20 @@ declare function createTokenMetadata(name: string, symbol: string, uri: string,
|
|
|
1248
1386
|
* @param addressTreeInfo Address tree info for the mint.
|
|
1249
1387
|
* @param outputStateTreeInfo Output state tree info.
|
|
1250
1388
|
* @param metadata Optional token metadata.
|
|
1251
|
-
|
|
1252
|
-
|
|
1389
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
1390
|
+
*/
|
|
1391
|
+
declare function createMintInstruction(
|
|
1392
|
+
mintSigner: PublicKey,
|
|
1393
|
+
decimals: number,
|
|
1394
|
+
mintAuthority: PublicKey,
|
|
1395
|
+
freezeAuthority: PublicKey | null,
|
|
1396
|
+
payer: PublicKey,
|
|
1397
|
+
validityProof: ValidityProofWithContext,
|
|
1398
|
+
addressTreeInfo: AddressTreeInfo,
|
|
1399
|
+
outputStateTreeInfo: TreeInfo,
|
|
1400
|
+
metadata?: TokenMetadataInstructionData,
|
|
1401
|
+
maxTopUp?: number,
|
|
1402
|
+
): TransactionInstruction;
|
|
1253
1403
|
|
|
1254
1404
|
/**
|
|
1255
1405
|
* SPL-compatible base mint structure
|
|
@@ -1383,7 +1533,7 @@ declare function serializeMint(mint: CompressedMint): Buffer$1;
|
|
|
1383
1533
|
* Extension type constants
|
|
1384
1534
|
*/
|
|
1385
1535
|
declare enum ExtensionType {
|
|
1386
|
-
TokenMetadata = 19
|
|
1536
|
+
TokenMetadata = 19,
|
|
1387
1537
|
}
|
|
1388
1538
|
/**
|
|
1389
1539
|
* Decode TokenMetadata from raw extension data using Borsh layout
|
|
@@ -1401,7 +1551,9 @@ declare function encodeTokenMetadata(metadata: TokenMetadata): Buffer$1;
|
|
|
1401
1551
|
* @param extensions - Array of raw extensions
|
|
1402
1552
|
* @returns Parsed TokenMetadata or null if not found
|
|
1403
1553
|
*/
|
|
1404
|
-
declare function extractTokenMetadata(
|
|
1554
|
+
declare function extractTokenMetadata(
|
|
1555
|
+
extensions: MintExtension[] | null,
|
|
1556
|
+
): TokenMetadata | null;
|
|
1405
1557
|
/**
|
|
1406
1558
|
* Metadata portion of MintInstructionData
|
|
1407
1559
|
* Used for instruction encoding when metadata extension is present
|
|
@@ -1452,7 +1604,12 @@ interface MintInterface {
|
|
|
1452
1604
|
* @returns Object with mint, optional merkleContext, mintContext, and
|
|
1453
1605
|
* tokenMetadata
|
|
1454
1606
|
*/
|
|
1455
|
-
declare function getMintInterface(
|
|
1607
|
+
declare function getMintInterface(
|
|
1608
|
+
rpc: Rpc,
|
|
1609
|
+
address: PublicKey,
|
|
1610
|
+
commitment?: Commitment,
|
|
1611
|
+
programId?: PublicKey,
|
|
1612
|
+
): Promise<MintInterface>;
|
|
1456
1613
|
/**
|
|
1457
1614
|
* Unpack mint info from raw account data for SPL/T22/c-token.
|
|
1458
1615
|
*
|
|
@@ -1461,7 +1618,11 @@ declare function getMintInterface(rpc: Rpc, address: PublicKey, commitment?: Com
|
|
|
1461
1618
|
* @param programId Token program ID. Default c-token.
|
|
1462
1619
|
* @returns Object with mint, optional mintContext and tokenMetadata.
|
|
1463
1620
|
*/
|
|
1464
|
-
declare function unpackMintInterface(
|
|
1621
|
+
declare function unpackMintInterface(
|
|
1622
|
+
address: PublicKey,
|
|
1623
|
+
data: Buffer$1 | Uint8Array | AccountInfo<Buffer$1>,
|
|
1624
|
+
programId?: PublicKey,
|
|
1625
|
+
): Omit<MintInterface, 'merkleContext'>;
|
|
1465
1626
|
/**
|
|
1466
1627
|
* Unpack c-token mint context and metadata from raw account data
|
|
1467
1628
|
*
|
|
@@ -1483,8 +1644,16 @@ declare function unpackMintData(data: Buffer$1 | Uint8Array): {
|
|
|
1483
1644
|
* @param newMintAuthority New mint authority (or null to revoke)
|
|
1484
1645
|
* @param payer Fee payer public key
|
|
1485
1646
|
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
1647
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
1486
1648
|
*/
|
|
1487
|
-
declare function createUpdateMintAuthorityInstruction(
|
|
1649
|
+
declare function createUpdateMintAuthorityInstruction(
|
|
1650
|
+
mintInterface: MintInterface,
|
|
1651
|
+
currentMintAuthority: PublicKey,
|
|
1652
|
+
newMintAuthority: PublicKey | null,
|
|
1653
|
+
payer: PublicKey,
|
|
1654
|
+
validityProof: ValidityProofWithContext | null,
|
|
1655
|
+
maxTopUp?: number,
|
|
1656
|
+
): TransactionInstruction;
|
|
1488
1657
|
/**
|
|
1489
1658
|
* Create instruction for updating a compressed mint's freeze authority.
|
|
1490
1659
|
* Works for both compressed and decompressed mints.
|
|
@@ -1497,8 +1666,16 @@ declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterfa
|
|
|
1497
1666
|
* @param newFreezeAuthority New freeze authority (or null to revoke)
|
|
1498
1667
|
* @param payer Fee payer public key
|
|
1499
1668
|
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
1669
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
1500
1670
|
*/
|
|
1501
|
-
declare function createUpdateFreezeAuthorityInstruction(
|
|
1671
|
+
declare function createUpdateFreezeAuthorityInstruction(
|
|
1672
|
+
mintInterface: MintInterface,
|
|
1673
|
+
currentFreezeAuthority: PublicKey,
|
|
1674
|
+
newFreezeAuthority: PublicKey | null,
|
|
1675
|
+
payer: PublicKey,
|
|
1676
|
+
validityProof: ValidityProofWithContext | null,
|
|
1677
|
+
maxTopUp?: number,
|
|
1678
|
+
): TransactionInstruction;
|
|
1502
1679
|
|
|
1503
1680
|
/**
|
|
1504
1681
|
* Create instruction for updating a compressed mint's metadata field.
|
|
@@ -1514,8 +1691,19 @@ declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInter
|
|
|
1514
1691
|
* @param value New value for the field
|
|
1515
1692
|
* @param customKey Custom key name (required if fieldType is 'custom')
|
|
1516
1693
|
* @param extensionIndex Extension index (default: 0)
|
|
1517
|
-
|
|
1518
|
-
|
|
1694
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
1695
|
+
*/
|
|
1696
|
+
declare function createUpdateMetadataFieldInstruction(
|
|
1697
|
+
mintInterface: MintInterface,
|
|
1698
|
+
authority: PublicKey,
|
|
1699
|
+
payer: PublicKey,
|
|
1700
|
+
validityProof: ValidityProofWithContext | null,
|
|
1701
|
+
fieldType: 'name' | 'symbol' | 'uri' | 'custom',
|
|
1702
|
+
value: string,
|
|
1703
|
+
customKey?: string,
|
|
1704
|
+
extensionIndex?: number,
|
|
1705
|
+
maxTopUp?: number,
|
|
1706
|
+
): TransactionInstruction;
|
|
1519
1707
|
/**
|
|
1520
1708
|
* Create instruction for updating a compressed mint's metadata authority.
|
|
1521
1709
|
*
|
|
@@ -1528,8 +1716,17 @@ declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterfa
|
|
|
1528
1716
|
* @param payer Fee payer public key
|
|
1529
1717
|
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
1530
1718
|
* @param extensionIndex Extension index (default: 0)
|
|
1531
|
-
|
|
1532
|
-
|
|
1719
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
1720
|
+
*/
|
|
1721
|
+
declare function createUpdateMetadataAuthorityInstruction(
|
|
1722
|
+
mintInterface: MintInterface,
|
|
1723
|
+
currentAuthority: PublicKey,
|
|
1724
|
+
newAuthority: PublicKey,
|
|
1725
|
+
payer: PublicKey,
|
|
1726
|
+
validityProof: ValidityProofWithContext | null,
|
|
1727
|
+
extensionIndex?: number,
|
|
1728
|
+
maxTopUp?: number,
|
|
1729
|
+
): TransactionInstruction;
|
|
1533
1730
|
/**
|
|
1534
1731
|
* Create instruction for removing a metadata key from a compressed mint.
|
|
1535
1732
|
*
|
|
@@ -1543,8 +1740,18 @@ declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInt
|
|
|
1543
1740
|
* @param key Metadata key to remove
|
|
1544
1741
|
* @param idempotent If true, don't error if key doesn't exist (default: false)
|
|
1545
1742
|
* @param extensionIndex Extension index (default: 0)
|
|
1546
|
-
|
|
1547
|
-
|
|
1743
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
1744
|
+
*/
|
|
1745
|
+
declare function createRemoveMetadataKeyInstruction(
|
|
1746
|
+
mintInterface: MintInterface,
|
|
1747
|
+
authority: PublicKey,
|
|
1748
|
+
payer: PublicKey,
|
|
1749
|
+
validityProof: ValidityProofWithContext | null,
|
|
1750
|
+
key: string,
|
|
1751
|
+
idempotent?: boolean,
|
|
1752
|
+
extensionIndex?: number,
|
|
1753
|
+
maxTopUp?: number,
|
|
1754
|
+
): TransactionInstruction;
|
|
1548
1755
|
|
|
1549
1756
|
interface CompressToPubkey {
|
|
1550
1757
|
bump: number;
|
|
@@ -1604,7 +1811,14 @@ declare const DEFAULT_COMPRESSIBLE_CONFIG: CompressibleConfig;
|
|
|
1604
1811
|
* @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
|
|
1605
1812
|
* @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
|
|
1606
1813
|
*/
|
|
1607
|
-
declare function createAssociatedCTokenAccountInstruction(
|
|
1814
|
+
declare function createAssociatedCTokenAccountInstruction(
|
|
1815
|
+
feePayer: PublicKey,
|
|
1816
|
+
owner: PublicKey,
|
|
1817
|
+
mint: PublicKey,
|
|
1818
|
+
compressibleConfig?: CompressibleConfig | null,
|
|
1819
|
+
configAccount?: PublicKey,
|
|
1820
|
+
rentPayerPda?: PublicKey,
|
|
1821
|
+
): TransactionInstruction;
|
|
1608
1822
|
/**
|
|
1609
1823
|
* Create idempotent instruction for creating an associated compressed token account.
|
|
1610
1824
|
* Uses the default rent sponsor PDA by default.
|
|
@@ -1616,7 +1830,14 @@ declare function createAssociatedCTokenAccountInstruction(feePayer: PublicKey, o
|
|
|
1616
1830
|
* @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
|
|
1617
1831
|
* @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
|
|
1618
1832
|
*/
|
|
1619
|
-
declare function createAssociatedCTokenAccountIdempotentInstruction(
|
|
1833
|
+
declare function createAssociatedCTokenAccountIdempotentInstruction(
|
|
1834
|
+
feePayer: PublicKey,
|
|
1835
|
+
owner: PublicKey,
|
|
1836
|
+
mint: PublicKey,
|
|
1837
|
+
compressibleConfig?: CompressibleConfig | null,
|
|
1838
|
+
configAccount?: PublicKey,
|
|
1839
|
+
rentPayerPda?: PublicKey,
|
|
1840
|
+
): TransactionInstruction;
|
|
1620
1841
|
|
|
1621
1842
|
/**
|
|
1622
1843
|
* c-token-specific config for createAssociatedTokenAccountInterfaceInstruction
|
|
@@ -1639,7 +1860,15 @@ interface CTokenConfig {
|
|
|
1639
1860
|
* @param associatedTokenProgramId Associated token program ID.
|
|
1640
1861
|
* @param ctokenConfig Optional c-token-specific configuration.
|
|
1641
1862
|
*/
|
|
1642
|
-
declare function createAssociatedTokenAccountInterfaceInstruction(
|
|
1863
|
+
declare function createAssociatedTokenAccountInterfaceInstruction(
|
|
1864
|
+
payer: PublicKey,
|
|
1865
|
+
associatedToken: PublicKey,
|
|
1866
|
+
owner: PublicKey,
|
|
1867
|
+
mint: PublicKey,
|
|
1868
|
+
programId?: PublicKey,
|
|
1869
|
+
associatedTokenProgramId?: PublicKey,
|
|
1870
|
+
ctokenConfig?: CTokenConfig,
|
|
1871
|
+
): TransactionInstruction;
|
|
1643
1872
|
/**
|
|
1644
1873
|
* Create idempotent instruction for creating an associated token account (SPL,
|
|
1645
1874
|
* Token-2022, or c-token). Follows SPL Token API signature with optional c-token
|
|
@@ -1653,7 +1882,15 @@ declare function createAssociatedTokenAccountInterfaceInstruction(payer: PublicK
|
|
|
1653
1882
|
* @param associatedTokenProgramId Associated token program ID.
|
|
1654
1883
|
* @param ctokenConfig Optional c-token-specific configuration.
|
|
1655
1884
|
*/
|
|
1656
|
-
declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(
|
|
1885
|
+
declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(
|
|
1886
|
+
payer: PublicKey,
|
|
1887
|
+
associatedToken: PublicKey,
|
|
1888
|
+
owner: PublicKey,
|
|
1889
|
+
mint: PublicKey,
|
|
1890
|
+
programId?: PublicKey,
|
|
1891
|
+
associatedTokenProgramId?: PublicKey,
|
|
1892
|
+
ctokenConfig?: CTokenConfig,
|
|
1893
|
+
): TransactionInstruction;
|
|
1657
1894
|
/**
|
|
1658
1895
|
* Short alias for createAssociatedTokenAccountInterfaceIdempotentInstruction.
|
|
1659
1896
|
*/
|
|
@@ -1671,7 +1908,7 @@ interface CreateMintToInstructionParams {
|
|
|
1671
1908
|
amount: number | bigint;
|
|
1672
1909
|
/** Mint authority (must be signer) */
|
|
1673
1910
|
authority: PublicKey;
|
|
1674
|
-
/** Maximum lamports for rent and top-up combined. Transaction fails if exceeded. (0 = no
|
|
1911
|
+
/** Maximum lamports for rent and top-up combined. Transaction fails if exceeded. (u16::MAX = no limit, 0 = no top-ups allowed) */
|
|
1675
1912
|
maxTopUp?: number;
|
|
1676
1913
|
/** Optional fee payer for rent top-ups. If not provided, authority pays. */
|
|
1677
1914
|
feePayer?: PublicKey;
|
|
@@ -1685,7 +1922,9 @@ interface CreateMintToInstructionParams {
|
|
|
1685
1922
|
* @param params - Mint instruction parameters
|
|
1686
1923
|
* @returns TransactionInstruction for minting tokens
|
|
1687
1924
|
*/
|
|
1688
|
-
declare function createMintToInstruction(
|
|
1925
|
+
declare function createMintToInstruction(
|
|
1926
|
+
params: CreateMintToInstructionParams,
|
|
1927
|
+
): TransactionInstruction;
|
|
1689
1928
|
|
|
1690
1929
|
/** Default compressible config PDA (V1) */
|
|
1691
1930
|
declare const LIGHT_TOKEN_CONFIG: PublicKey;
|
|
@@ -1701,7 +1940,7 @@ declare enum TokenDataVersion {
|
|
|
1701
1940
|
/** V2: Poseidon hash with big-endian amount, discriminator [0,0,0,0,0,0,0,3] */
|
|
1702
1941
|
V2 = 2,
|
|
1703
1942
|
/** ShaFlat: SHA256 hash of borsh-serialized data, discriminator [0,0,0,0,0,0,0,4] */
|
|
1704
|
-
ShaFlat = 3
|
|
1943
|
+
ShaFlat = 3,
|
|
1705
1944
|
}
|
|
1706
1945
|
declare const POOL_SEED: Buffer$1<ArrayBuffer>;
|
|
1707
1946
|
declare const CPI_AUTHORITY_SEED: Buffer$1<ArrayBuffer>;
|
|
@@ -1715,6 +1954,12 @@ declare const APPROVE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
|
1715
1954
|
declare const REVOKE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
1716
1955
|
declare const ADD_TOKEN_POOL_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
1717
1956
|
declare const DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
|
|
1957
|
+
/**
|
|
1958
|
+
* Maximum lamports for rent top-up in a single instruction.
|
|
1959
|
+
* u16::MAX = no limit; 0 = no top-ups allowed.
|
|
1960
|
+
* Matches Rust SDK (e.g. token-sdk create_mints uses u16::MAX for "no limit").
|
|
1961
|
+
*/
|
|
1962
|
+
declare const MAX_TOP_UP = 65535;
|
|
1718
1963
|
/**
|
|
1719
1964
|
* Rent configuration constants for compressible ctoken accounts.
|
|
1720
1965
|
* These match the Rust SDK defaults in program-libs/compressible/src/rent/config.rs
|
|
@@ -1755,7 +2000,10 @@ declare const DEFAULT_WRITE_TOP_UP = 766;
|
|
|
1755
2000
|
* Calculate fee payer cost at ATA creation.
|
|
1756
2001
|
* = compression_cost (11K) + (prepay_epochs * rent_per_epoch)
|
|
1757
2002
|
*/
|
|
1758
|
-
declare function calculateFeePayerCostAtCreation(
|
|
2003
|
+
declare function calculateFeePayerCostAtCreation(
|
|
2004
|
+
prepayEpochs?: number,
|
|
2005
|
+
accountBytes?: number,
|
|
2006
|
+
): number;
|
|
1759
2007
|
|
|
1760
2008
|
/**
|
|
1761
2009
|
* Create instruction for minting tokens from a c-mint to compressed accounts.
|
|
@@ -1772,11 +2020,22 @@ declare function calculateFeePayerCostAtCreation(prepayEpochs?: number, accountB
|
|
|
1772
2020
|
* context queue if not provided.
|
|
1773
2021
|
* @param tokenAccountVersion Token account version (default:
|
|
1774
2022
|
* TokenDataVersion.ShaFlat).
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
2023
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
2024
|
+
*/
|
|
2025
|
+
declare function createMintToCompressedInstruction(
|
|
2026
|
+
authority: PublicKey,
|
|
2027
|
+
payer: PublicKey,
|
|
2028
|
+
validityProof: ValidityProofWithContext,
|
|
2029
|
+
merkleContext: MerkleContext,
|
|
2030
|
+
mintData: MintInstructionData,
|
|
2031
|
+
recipients: Array<{
|
|
2032
|
+
recipient: PublicKey;
|
|
2033
|
+
amount: number | bigint;
|
|
2034
|
+
}>,
|
|
2035
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2036
|
+
tokenAccountVersion?: TokenDataVersion,
|
|
2037
|
+
maxTopUp?: number,
|
|
2038
|
+
): TransactionInstruction;
|
|
1780
2039
|
|
|
1781
2040
|
/**
|
|
1782
2041
|
* Create mint-to instruction for SPL, Token-2022, or CToken mints.
|
|
@@ -1792,7 +2051,15 @@ declare function createMintToCompressedInstruction(authority: PublicKey, payer:
|
|
|
1792
2051
|
* @param validityProof Not used (legacy parameter, kept for compatibility).
|
|
1793
2052
|
* @param multiSigners Multi-signature signer public keys (SPL/T22 only).
|
|
1794
2053
|
*/
|
|
1795
|
-
declare function createMintToInterfaceInstruction(
|
|
2054
|
+
declare function createMintToInterfaceInstruction(
|
|
2055
|
+
mintInterface: MintInterface,
|
|
2056
|
+
destination: PublicKey,
|
|
2057
|
+
authority: PublicKey,
|
|
2058
|
+
payer: PublicKey,
|
|
2059
|
+
amount: number | bigint,
|
|
2060
|
+
validityProof?: ValidityProofWithContext,
|
|
2061
|
+
multiSigners?: PublicKey[],
|
|
2062
|
+
): TransactionInstruction;
|
|
1796
2063
|
|
|
1797
2064
|
/**
|
|
1798
2065
|
* Create a Light token transfer instruction.
|
|
@@ -1807,7 +2074,13 @@ declare function createMintToInterfaceInstruction(mintInterface: MintInterface,
|
|
|
1807
2074
|
* @param feePayer Optional fee payer for top-ups (defaults to owner)
|
|
1808
2075
|
* @returns Transaction instruction for Light token transfer
|
|
1809
2076
|
*/
|
|
1810
|
-
declare function createLightTokenTransferInstruction(
|
|
2077
|
+
declare function createLightTokenTransferInstruction(
|
|
2078
|
+
source: PublicKey,
|
|
2079
|
+
destination: PublicKey,
|
|
2080
|
+
owner: PublicKey,
|
|
2081
|
+
amount: number | bigint,
|
|
2082
|
+
feePayer?: PublicKey,
|
|
2083
|
+
): TransactionInstruction;
|
|
1811
2084
|
|
|
1812
2085
|
/**
|
|
1813
2086
|
* Create decompressInterface instruction using Transfer2.
|
|
@@ -1823,9 +2096,19 @@ declare function createLightTokenTransferInstruction(source: PublicKey, destinat
|
|
|
1823
2096
|
* @param validityProof Validity proof (contains compressedProof and rootIndices)
|
|
1824
2097
|
* @param splInterfaceInfo Optional: SPL interface info for SPL destinations
|
|
1825
2098
|
* @param decimals Mint decimals (required for SPL destinations)
|
|
2099
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
1826
2100
|
* @returns TransactionInstruction
|
|
1827
2101
|
*/
|
|
1828
|
-
declare function createDecompressInterfaceInstruction(
|
|
2102
|
+
declare function createDecompressInterfaceInstruction(
|
|
2103
|
+
payer: PublicKey,
|
|
2104
|
+
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
2105
|
+
toAddress: PublicKey,
|
|
2106
|
+
amount: bigint,
|
|
2107
|
+
validityProof: ValidityProofWithContext,
|
|
2108
|
+
splInterfaceInfo: SplInterfaceInfo | undefined,
|
|
2109
|
+
decimals: number,
|
|
2110
|
+
maxTopUp?: number,
|
|
2111
|
+
): TransactionInstruction;
|
|
1829
2112
|
|
|
1830
2113
|
/**
|
|
1831
2114
|
* Account info interface for compressible accounts.
|
|
@@ -1946,11 +2229,21 @@ interface LoadResult {
|
|
|
1946
2229
|
* }
|
|
1947
2230
|
* ```
|
|
1948
2231
|
*/
|
|
1949
|
-
declare function createLoadAccountsParams(
|
|
2232
|
+
declare function createLoadAccountsParams(
|
|
2233
|
+
rpc: Rpc,
|
|
2234
|
+
payer: PublicKey,
|
|
2235
|
+
programId: PublicKey,
|
|
2236
|
+
programAccounts?: CompressibleAccountInput[],
|
|
2237
|
+
atas?: AccountInterface[],
|
|
2238
|
+
options?: InterfaceOptions,
|
|
2239
|
+
): Promise<LoadResult>;
|
|
1950
2240
|
/**
|
|
1951
2241
|
* Calculate compute units for compressible load operation
|
|
1952
2242
|
*/
|
|
1953
|
-
declare function calculateCompressibleLoadComputeUnits(
|
|
2243
|
+
declare function calculateCompressibleLoadComputeUnits(
|
|
2244
|
+
compressedAccountCount: number,
|
|
2245
|
+
hasValidityProof: boolean,
|
|
2246
|
+
): number;
|
|
1954
2247
|
|
|
1955
2248
|
/**
|
|
1956
2249
|
* Create a wrap instruction that moves tokens from an SPL/T22 account to a
|
|
@@ -1964,9 +2257,20 @@ declare function calculateCompressibleLoadComputeUnits(compressedAccountCount: n
|
|
|
1964
2257
|
* @param splInterfaceInfo SPL interface info for the compression
|
|
1965
2258
|
* @param decimals Mint decimals (required for transfer_checked)
|
|
1966
2259
|
* @param payer Fee payer (defaults to owner)
|
|
2260
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
1967
2261
|
* @returns Instruction to wrap tokens
|
|
1968
2262
|
*/
|
|
1969
|
-
declare function createWrapInstruction(
|
|
2263
|
+
declare function createWrapInstruction(
|
|
2264
|
+
source: PublicKey,
|
|
2265
|
+
destination: PublicKey,
|
|
2266
|
+
owner: PublicKey,
|
|
2267
|
+
mint: PublicKey,
|
|
2268
|
+
amount: bigint,
|
|
2269
|
+
splInterfaceInfo: SplInterfaceInfo,
|
|
2270
|
+
decimals: number,
|
|
2271
|
+
payer?: PublicKey,
|
|
2272
|
+
maxTopUp?: number,
|
|
2273
|
+
): TransactionInstruction;
|
|
1970
2274
|
|
|
1971
2275
|
/**
|
|
1972
2276
|
* Create an unwrap instruction that moves tokens from a c-token account to an
|
|
@@ -1980,9 +2284,20 @@ declare function createWrapInstruction(source: PublicKey, destination: PublicKey
|
|
|
1980
2284
|
* @param splInterfaceInfo SPL interface info for the decompression
|
|
1981
2285
|
* @param decimals Mint decimals (required for transfer_checked)
|
|
1982
2286
|
* @param payer Fee payer (defaults to owner if not provided)
|
|
2287
|
+
* @param maxTopUp Optional cap on rent top-up (units of 1k lamports; default no cap)
|
|
1983
2288
|
* @returns TransactionInstruction to unwrap tokens
|
|
1984
2289
|
*/
|
|
1985
|
-
declare function createUnwrapInstruction(
|
|
2290
|
+
declare function createUnwrapInstruction(
|
|
2291
|
+
source: PublicKey,
|
|
2292
|
+
destination: PublicKey,
|
|
2293
|
+
owner: PublicKey,
|
|
2294
|
+
mint: PublicKey,
|
|
2295
|
+
amount: bigint,
|
|
2296
|
+
splInterfaceInfo: SplInterfaceInfo,
|
|
2297
|
+
decimals: number,
|
|
2298
|
+
payer?: PublicKey,
|
|
2299
|
+
maxTopUp?: number,
|
|
2300
|
+
): TransactionInstruction;
|
|
1986
2301
|
|
|
1987
2302
|
/**
|
|
1988
2303
|
* Create and initialize a new mint for SPL/T22/c-token.
|
|
@@ -2001,7 +2316,19 @@ declare function createUnwrapInstruction(source: PublicKey, destination: PublicK
|
|
|
2001
2316
|
*
|
|
2002
2317
|
* @returns Object with mint address and transaction signature
|
|
2003
2318
|
*/
|
|
2004
|
-
declare function createMintInterface(
|
|
2319
|
+
declare function createMintInterface(
|
|
2320
|
+
rpc: Rpc,
|
|
2321
|
+
payer: Signer,
|
|
2322
|
+
mintAuthority: PublicKey | Signer,
|
|
2323
|
+
freezeAuthority: PublicKey | Signer | null,
|
|
2324
|
+
decimals: number,
|
|
2325
|
+
keypair?: Keypair,
|
|
2326
|
+
confirmOptions?: ConfirmOptions,
|
|
2327
|
+
programId?: PublicKey,
|
|
2328
|
+
tokenMetadata?: TokenMetadataInstructionData,
|
|
2329
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2330
|
+
addressTreeInfo?: AddressTreeInfo,
|
|
2331
|
+
): Promise<{
|
|
2005
2332
|
mint: PublicKey;
|
|
2006
2333
|
transactionSignature: TransactionSignature;
|
|
2007
2334
|
}>;
|
|
@@ -2017,7 +2344,14 @@ declare function createMintInterface(rpc: Rpc, payer: Signer, mintAuthority: Pub
|
|
|
2017
2344
|
* @param newMintAuthority New mint authority (or null to revoke)
|
|
2018
2345
|
* @param confirmOptions Optional confirm options
|
|
2019
2346
|
*/
|
|
2020
|
-
declare function updateMintAuthority(
|
|
2347
|
+
declare function updateMintAuthority(
|
|
2348
|
+
rpc: Rpc,
|
|
2349
|
+
payer: Signer,
|
|
2350
|
+
mint: PublicKey,
|
|
2351
|
+
currentMintAuthority: Signer,
|
|
2352
|
+
newMintAuthority: PublicKey | null,
|
|
2353
|
+
confirmOptions?: ConfirmOptions,
|
|
2354
|
+
): Promise<TransactionSignature>;
|
|
2021
2355
|
/**
|
|
2022
2356
|
* Update the freeze authority of a compressed token mint.
|
|
2023
2357
|
* Works for both compressed and decompressed mints.
|
|
@@ -2029,7 +2363,14 @@ declare function updateMintAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, c
|
|
|
2029
2363
|
* @param newFreezeAuthority New freeze authority (or null to revoke)
|
|
2030
2364
|
* @param confirmOptions Optional confirm options
|
|
2031
2365
|
*/
|
|
2032
|
-
declare function updateFreezeAuthority(
|
|
2366
|
+
declare function updateFreezeAuthority(
|
|
2367
|
+
rpc: Rpc,
|
|
2368
|
+
payer: Signer,
|
|
2369
|
+
mint: PublicKey,
|
|
2370
|
+
currentFreezeAuthority: Signer,
|
|
2371
|
+
newFreezeAuthority: PublicKey | null,
|
|
2372
|
+
confirmOptions?: ConfirmOptions,
|
|
2373
|
+
): Promise<TransactionSignature>;
|
|
2033
2374
|
|
|
2034
2375
|
/**
|
|
2035
2376
|
* Update a metadata field on a compressed token mint.
|
|
@@ -2045,7 +2386,17 @@ declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey,
|
|
|
2045
2386
|
* @param extensionIndex Extension index (default: 0)
|
|
2046
2387
|
* @param confirmOptions Optional confirm options
|
|
2047
2388
|
*/
|
|
2048
|
-
declare function updateMetadataField(
|
|
2389
|
+
declare function updateMetadataField(
|
|
2390
|
+
rpc: Rpc,
|
|
2391
|
+
payer: Signer,
|
|
2392
|
+
mint: PublicKey,
|
|
2393
|
+
authority: Signer,
|
|
2394
|
+
fieldType: 'name' | 'symbol' | 'uri' | 'custom',
|
|
2395
|
+
value: string,
|
|
2396
|
+
customKey?: string,
|
|
2397
|
+
extensionIndex?: number,
|
|
2398
|
+
confirmOptions?: ConfirmOptions,
|
|
2399
|
+
): Promise<TransactionSignature>;
|
|
2049
2400
|
/**
|
|
2050
2401
|
* Update the metadata authority of a compressed token mint.
|
|
2051
2402
|
* Works for both compressed and decompressed mints.
|
|
@@ -2058,7 +2409,15 @@ declare function updateMetadataField(rpc: Rpc, payer: Signer, mint: PublicKey, a
|
|
|
2058
2409
|
* @param extensionIndex Extension index (default: 0)
|
|
2059
2410
|
* @param confirmOptions Optional confirm options
|
|
2060
2411
|
*/
|
|
2061
|
-
declare function updateMetadataAuthority(
|
|
2412
|
+
declare function updateMetadataAuthority(
|
|
2413
|
+
rpc: Rpc,
|
|
2414
|
+
payer: Signer,
|
|
2415
|
+
mint: PublicKey,
|
|
2416
|
+
currentAuthority: Signer,
|
|
2417
|
+
newAuthority: PublicKey,
|
|
2418
|
+
extensionIndex?: number,
|
|
2419
|
+
confirmOptions?: ConfirmOptions,
|
|
2420
|
+
): Promise<TransactionSignature>;
|
|
2062
2421
|
/**
|
|
2063
2422
|
* Remove a metadata key from a compressed token mint.
|
|
2064
2423
|
* Works for both compressed and decompressed mints.
|
|
@@ -2072,7 +2431,16 @@ declare function updateMetadataAuthority(rpc: Rpc, payer: Signer, mint: PublicKe
|
|
|
2072
2431
|
* @param extensionIndex Extension index (default: 0)
|
|
2073
2432
|
* @param confirmOptions Optional confirm options
|
|
2074
2433
|
*/
|
|
2075
|
-
declare function removeMetadataKey(
|
|
2434
|
+
declare function removeMetadataKey(
|
|
2435
|
+
rpc: Rpc,
|
|
2436
|
+
payer: Signer,
|
|
2437
|
+
mint: PublicKey,
|
|
2438
|
+
authority: Signer,
|
|
2439
|
+
key: string,
|
|
2440
|
+
idempotent?: boolean,
|
|
2441
|
+
extensionIndex?: number,
|
|
2442
|
+
confirmOptions?: ConfirmOptions,
|
|
2443
|
+
): Promise<TransactionSignature>;
|
|
2076
2444
|
|
|
2077
2445
|
/**
|
|
2078
2446
|
* Create an associated token account for SPL/T22/c-token. Defaults to c-token
|
|
@@ -2091,7 +2459,17 @@ declare function removeMetadataKey(rpc: Rpc, payer: Signer, mint: PublicKey, aut
|
|
|
2091
2459
|
* @param ctokenConfig Optional rent config
|
|
2092
2460
|
* @returns Address of the new associated token account
|
|
2093
2461
|
*/
|
|
2094
|
-
declare function createAtaInterface(
|
|
2462
|
+
declare function createAtaInterface(
|
|
2463
|
+
rpc: Rpc,
|
|
2464
|
+
payer: Signer,
|
|
2465
|
+
mint: PublicKey,
|
|
2466
|
+
owner: PublicKey,
|
|
2467
|
+
allowOwnerOffCurve?: boolean,
|
|
2468
|
+
confirmOptions?: ConfirmOptions,
|
|
2469
|
+
programId?: PublicKey,
|
|
2470
|
+
associatedTokenProgramId?: PublicKey,
|
|
2471
|
+
ctokenConfig?: CTokenConfig,
|
|
2472
|
+
): Promise<PublicKey>;
|
|
2095
2473
|
/**
|
|
2096
2474
|
* Create an associated token account idempotently for SPL/T22/c-token. Defaults
|
|
2097
2475
|
* to c-token program.
|
|
@@ -2112,7 +2490,17 @@ declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, ow
|
|
|
2112
2490
|
*
|
|
2113
2491
|
* @returns Address of the associated token account
|
|
2114
2492
|
*/
|
|
2115
|
-
declare function createAtaInterfaceIdempotent(
|
|
2493
|
+
declare function createAtaInterfaceIdempotent(
|
|
2494
|
+
rpc: Rpc,
|
|
2495
|
+
payer: Signer,
|
|
2496
|
+
mint: PublicKey,
|
|
2497
|
+
owner: PublicKey,
|
|
2498
|
+
allowOwnerOffCurve?: boolean,
|
|
2499
|
+
confirmOptions?: ConfirmOptions,
|
|
2500
|
+
programId?: PublicKey,
|
|
2501
|
+
associatedTokenProgramId?: PublicKey,
|
|
2502
|
+
ctokenConfig?: CTokenConfig,
|
|
2503
|
+
): Promise<PublicKey>;
|
|
2116
2504
|
|
|
2117
2505
|
/**
|
|
2118
2506
|
* Mint tokens to a CToken account.
|
|
@@ -2130,7 +2518,16 @@ declare function createAtaInterfaceIdempotent(rpc: Rpc, payer: Signer, mint: Pub
|
|
|
2130
2518
|
* @param confirmOptions - Optional confirm options
|
|
2131
2519
|
* @returns Transaction signature
|
|
2132
2520
|
*/
|
|
2133
|
-
declare function mintTo$1(
|
|
2521
|
+
declare function mintTo$1(
|
|
2522
|
+
rpc: Rpc,
|
|
2523
|
+
payer: Signer,
|
|
2524
|
+
mint: PublicKey,
|
|
2525
|
+
destination: PublicKey,
|
|
2526
|
+
authority: Signer,
|
|
2527
|
+
amount: number | bigint,
|
|
2528
|
+
maxTopUp?: number,
|
|
2529
|
+
confirmOptions?: ConfirmOptions,
|
|
2530
|
+
): Promise<TransactionSignature>;
|
|
2134
2531
|
|
|
2135
2532
|
/**
|
|
2136
2533
|
* Mint compressed tokens directly to compressed accounts.
|
|
@@ -2142,12 +2539,23 @@ declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, destination:
|
|
|
2142
2539
|
* @param recipients Array of recipients with amounts
|
|
2143
2540
|
* @param outputStateTreeInfo Optional output state tree info (auto-fetched if not provided)
|
|
2144
2541
|
* @param tokenAccountVersion Token account version (default: 3)
|
|
2542
|
+
* @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
|
|
2145
2543
|
* @param confirmOptions Optional confirm options
|
|
2146
2544
|
*/
|
|
2147
|
-
declare function mintToCompressed(
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2545
|
+
declare function mintToCompressed(
|
|
2546
|
+
rpc: Rpc,
|
|
2547
|
+
payer: Signer,
|
|
2548
|
+
mint: PublicKey,
|
|
2549
|
+
authority: Signer,
|
|
2550
|
+
recipients: Array<{
|
|
2551
|
+
recipient: PublicKey;
|
|
2552
|
+
amount: number | bigint;
|
|
2553
|
+
}>,
|
|
2554
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2555
|
+
tokenAccountVersion?: number,
|
|
2556
|
+
maxTopUp?: number,
|
|
2557
|
+
confirmOptions?: ConfirmOptions,
|
|
2558
|
+
): Promise<TransactionSignature>;
|
|
2151
2559
|
|
|
2152
2560
|
/**
|
|
2153
2561
|
* Mint tokens to a decompressed/onchain token account.
|
|
@@ -2170,7 +2578,17 @@ declare function mintToCompressed(rpc: Rpc, payer: Signer, mint: PublicKey, auth
|
|
|
2170
2578
|
*
|
|
2171
2579
|
* @returns Transaction signature
|
|
2172
2580
|
*/
|
|
2173
|
-
declare function mintToInterface(
|
|
2581
|
+
declare function mintToInterface(
|
|
2582
|
+
rpc: Rpc,
|
|
2583
|
+
payer: Signer,
|
|
2584
|
+
mint: PublicKey,
|
|
2585
|
+
destination: PublicKey,
|
|
2586
|
+
authority: Signer | PublicKey,
|
|
2587
|
+
amount: number | bigint,
|
|
2588
|
+
multiSigners?: Signer[],
|
|
2589
|
+
confirmOptions?: ConfirmOptions,
|
|
2590
|
+
programId?: PublicKey,
|
|
2591
|
+
): Promise<TransactionSignature>;
|
|
2174
2592
|
|
|
2175
2593
|
/**
|
|
2176
2594
|
* Decompress compressed (cold) tokens to an on-chain token account.
|
|
@@ -2188,7 +2606,17 @@ declare function mintToInterface(rpc: Rpc, payer: Signer, mint: PublicKey, desti
|
|
|
2188
2606
|
* @param confirmOptions Confirm options
|
|
2189
2607
|
* @returns Transaction signature, null if nothing to load.
|
|
2190
2608
|
*/
|
|
2191
|
-
declare function decompressInterface(
|
|
2609
|
+
declare function decompressInterface(
|
|
2610
|
+
rpc: Rpc,
|
|
2611
|
+
payer: Signer,
|
|
2612
|
+
owner: Signer,
|
|
2613
|
+
mint: PublicKey,
|
|
2614
|
+
amount?: number | bigint | BN,
|
|
2615
|
+
destinationAta?: PublicKey,
|
|
2616
|
+
destinationOwner?: PublicKey,
|
|
2617
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2618
|
+
confirmOptions?: ConfirmOptions,
|
|
2619
|
+
): Promise<TransactionSignature | null>;
|
|
2192
2620
|
|
|
2193
2621
|
/**
|
|
2194
2622
|
* Wrap tokens from an SPL/T22 account to a c-token account.
|
|
@@ -2204,6 +2632,7 @@ declare function decompressInterface(rpc: Rpc, payer: Signer, owner: Signer, min
|
|
|
2204
2632
|
* @param mint Mint address
|
|
2205
2633
|
* @param amount Amount to wrap
|
|
2206
2634
|
* @param splInterfaceInfo Optional: SPL interface info (will be fetched if not provided)
|
|
2635
|
+
* @param maxTopUp Optional: cap on rent top-up (units of 1k lamports; default no cap)
|
|
2207
2636
|
* @param confirmOptions Optional: Confirm options
|
|
2208
2637
|
*
|
|
2209
2638
|
* @example
|
|
@@ -2222,7 +2651,18 @@ declare function decompressInterface(rpc: Rpc, payer: Signer, owner: Signer, min
|
|
|
2222
2651
|
*
|
|
2223
2652
|
* @returns Transaction signature
|
|
2224
2653
|
*/
|
|
2225
|
-
declare function wrap(
|
|
2654
|
+
declare function wrap(
|
|
2655
|
+
rpc: Rpc,
|
|
2656
|
+
payer: Signer,
|
|
2657
|
+
source: PublicKey,
|
|
2658
|
+
destination: PublicKey,
|
|
2659
|
+
owner: Signer,
|
|
2660
|
+
mint: PublicKey,
|
|
2661
|
+
amount: bigint,
|
|
2662
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2663
|
+
maxTopUp?: number,
|
|
2664
|
+
confirmOptions?: ConfirmOptions,
|
|
2665
|
+
): Promise<TransactionSignature>;
|
|
2226
2666
|
|
|
2227
2667
|
/**
|
|
2228
2668
|
* Create instructions to load an ATA from its AccountInterface.
|
|
@@ -2240,7 +2680,14 @@ declare function wrap(rpc: Rpc, payer: Signer, source: PublicKey, destination: P
|
|
|
2240
2680
|
* @param targetAta Target ATA address (used for type detection in standard mode)
|
|
2241
2681
|
* @returns Array of instructions (empty if nothing to load)
|
|
2242
2682
|
*/
|
|
2243
|
-
declare function createLoadAtaInstructionsFromInterface(
|
|
2683
|
+
declare function createLoadAtaInstructionsFromInterface(
|
|
2684
|
+
rpc: Rpc,
|
|
2685
|
+
payer: PublicKey,
|
|
2686
|
+
ata: AccountInterface,
|
|
2687
|
+
options?: InterfaceOptions,
|
|
2688
|
+
wrap?: boolean,
|
|
2689
|
+
targetAta?: PublicKey,
|
|
2690
|
+
): Promise<TransactionInstruction[]>;
|
|
2244
2691
|
|
|
2245
2692
|
/**
|
|
2246
2693
|
* Input for creating off-chain metadata JSON.
|
|
@@ -2298,12 +2745,17 @@ interface OffChainTokenMetadataJson {
|
|
|
2298
2745
|
* // Then use uri with createMint
|
|
2299
2746
|
* await createMint(rpc, payer, { ...params, uri });
|
|
2300
2747
|
*/
|
|
2301
|
-
declare function toOffChainMetadataJson(
|
|
2748
|
+
declare function toOffChainMetadataJson(
|
|
2749
|
+
meta: OffChainTokenMetadata,
|
|
2750
|
+
): OffChainTokenMetadataJson;
|
|
2302
2751
|
|
|
2303
2752
|
/**
|
|
2304
2753
|
* Returns the compressed mint address as bytes.
|
|
2305
2754
|
*/
|
|
2306
|
-
declare function deriveCMintAddress(
|
|
2755
|
+
declare function deriveCMintAddress(
|
|
2756
|
+
mintSeed: PublicKey,
|
|
2757
|
+
addressTreeInfo: TreeInfo,
|
|
2758
|
+
): number[];
|
|
2307
2759
|
declare const COMPRESSED_MINT_SEED: Buffer$1;
|
|
2308
2760
|
/**
|
|
2309
2761
|
* Finds the SPL mint PDA for a c-token mint.
|
|
@@ -2311,8 +2763,14 @@ declare const COMPRESSED_MINT_SEED: Buffer$1;
|
|
|
2311
2763
|
* @returns [PDA, bump]
|
|
2312
2764
|
*/
|
|
2313
2765
|
declare function findMintAddress(mintSigner: PublicKey): [PublicKey, number];
|
|
2314
|
-
declare function getAssociatedCTokenAddressAndBump(
|
|
2315
|
-
|
|
2766
|
+
declare function getAssociatedCTokenAddressAndBump(
|
|
2767
|
+
owner: PublicKey,
|
|
2768
|
+
mint: PublicKey,
|
|
2769
|
+
): [PublicKey, number];
|
|
2770
|
+
declare function getAssociatedCTokenAddress(
|
|
2771
|
+
owner: PublicKey,
|
|
2772
|
+
mint: PublicKey,
|
|
2773
|
+
): PublicKey;
|
|
2316
2774
|
|
|
2317
2775
|
/**
|
|
2318
2776
|
* Approve a delegate to spend tokens
|
|
@@ -2327,7 +2785,15 @@ declare function getAssociatedCTokenAddress(owner: PublicKey, mint: PublicKey):
|
|
|
2327
2785
|
*
|
|
2328
2786
|
* @return Signature of the confirmed transaction
|
|
2329
2787
|
*/
|
|
2330
|
-
declare function approve(
|
|
2788
|
+
declare function approve(
|
|
2789
|
+
rpc: Rpc,
|
|
2790
|
+
payer: Signer,
|
|
2791
|
+
mint: PublicKey,
|
|
2792
|
+
amount: number | BN,
|
|
2793
|
+
owner: Signer,
|
|
2794
|
+
delegate: PublicKey,
|
|
2795
|
+
confirmOptions?: ConfirmOptions,
|
|
2796
|
+
): Promise<TransactionSignature>;
|
|
2331
2797
|
|
|
2332
2798
|
/**
|
|
2333
2799
|
* Mint compressed tokens to a solana address from an external mint authority
|
|
@@ -2346,7 +2812,17 @@ declare function approve(rpc: Rpc, payer: Signer, mint: PublicKey, amount: numbe
|
|
|
2346
2812
|
*
|
|
2347
2813
|
* @return Signature of the confirmed transaction
|
|
2348
2814
|
*/
|
|
2349
|
-
declare function approveAndMintTo(
|
|
2815
|
+
declare function approveAndMintTo(
|
|
2816
|
+
rpc: Rpc,
|
|
2817
|
+
payer: Signer,
|
|
2818
|
+
mint: PublicKey,
|
|
2819
|
+
toPubkey: PublicKey,
|
|
2820
|
+
authority: Signer,
|
|
2821
|
+
amount: number | BN,
|
|
2822
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2823
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2824
|
+
confirmOptions?: ConfirmOptions,
|
|
2825
|
+
): Promise<TransactionSignature>;
|
|
2350
2826
|
|
|
2351
2827
|
/**
|
|
2352
2828
|
* Compress SPL tokens
|
|
@@ -2366,7 +2842,18 @@ declare function approveAndMintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPu
|
|
|
2366
2842
|
*
|
|
2367
2843
|
* @return Signature of the confirmed transaction
|
|
2368
2844
|
*/
|
|
2369
|
-
declare function compress(
|
|
2845
|
+
declare function compress(
|
|
2846
|
+
rpc: Rpc,
|
|
2847
|
+
payer: Signer,
|
|
2848
|
+
mint: PublicKey,
|
|
2849
|
+
amount: number | BN | number[] | BN[],
|
|
2850
|
+
owner: Signer,
|
|
2851
|
+
sourceTokenAccount: PublicKey,
|
|
2852
|
+
toAddress: PublicKey | Array<PublicKey>,
|
|
2853
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2854
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2855
|
+
confirmOptions?: ConfirmOptions,
|
|
2856
|
+
): Promise<TransactionSignature>;
|
|
2370
2857
|
|
|
2371
2858
|
/**
|
|
2372
2859
|
* Compress SPL tokens into compressed token format
|
|
@@ -2386,7 +2873,17 @@ declare function compress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: numb
|
|
|
2386
2873
|
*
|
|
2387
2874
|
* @return Signature of the confirmed transaction
|
|
2388
2875
|
*/
|
|
2389
|
-
declare function compressSplTokenAccount(
|
|
2876
|
+
declare function compressSplTokenAccount(
|
|
2877
|
+
rpc: Rpc,
|
|
2878
|
+
payer: Signer,
|
|
2879
|
+
mint: PublicKey,
|
|
2880
|
+
owner: Signer,
|
|
2881
|
+
tokenAccount: PublicKey,
|
|
2882
|
+
remainingAmount?: BN,
|
|
2883
|
+
outputStateTreeInfo?: TreeInfo,
|
|
2884
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
2885
|
+
confirmOptions?: ConfirmOptions,
|
|
2886
|
+
): Promise<TransactionSignature>;
|
|
2390
2887
|
|
|
2391
2888
|
/**
|
|
2392
2889
|
* Create and initialize a new SPL token mint
|
|
@@ -2406,7 +2903,16 @@ declare function compressSplTokenAccount(rpc: Rpc, payer: Signer, mint: PublicKe
|
|
|
2406
2903
|
*
|
|
2407
2904
|
* @return Object with mint address and transaction signature
|
|
2408
2905
|
*/
|
|
2409
|
-
declare function createMint(
|
|
2906
|
+
declare function createMint(
|
|
2907
|
+
rpc: Rpc,
|
|
2908
|
+
payer: Signer,
|
|
2909
|
+
mintAuthority: PublicKey | Signer,
|
|
2910
|
+
decimals: number,
|
|
2911
|
+
keypair?: Keypair,
|
|
2912
|
+
confirmOptions?: ConfirmOptions,
|
|
2913
|
+
tokenProgramId?: PublicKey | boolean,
|
|
2914
|
+
freezeAuthority?: PublicKey | Signer | null,
|
|
2915
|
+
): Promise<{
|
|
2410
2916
|
mint: PublicKey;
|
|
2411
2917
|
transactionSignature: TransactionSignature;
|
|
2412
2918
|
}>;
|
|
@@ -2423,7 +2929,13 @@ declare function createMint(rpc: Rpc, payer: Signer, mintAuthority: PublicKey |
|
|
|
2423
2929
|
*
|
|
2424
2930
|
* @return transaction signature
|
|
2425
2931
|
*/
|
|
2426
|
-
declare function createSplInterface(
|
|
2932
|
+
declare function createSplInterface(
|
|
2933
|
+
rpc: Rpc,
|
|
2934
|
+
payer: Signer,
|
|
2935
|
+
mint: PublicKey,
|
|
2936
|
+
confirmOptions?: ConfirmOptions,
|
|
2937
|
+
tokenProgramId?: PublicKey,
|
|
2938
|
+
): Promise<TransactionSignature>;
|
|
2427
2939
|
/**
|
|
2428
2940
|
* @deprecated Use {@link createSplInterface} instead.
|
|
2429
2941
|
*/
|
|
@@ -2442,7 +2954,14 @@ declare const createTokenPool: typeof createSplInterface;
|
|
|
2442
2954
|
*
|
|
2443
2955
|
* @return transaction signature
|
|
2444
2956
|
*/
|
|
2445
|
-
declare function addSplInterfaces(
|
|
2957
|
+
declare function addSplInterfaces(
|
|
2958
|
+
rpc: Rpc,
|
|
2959
|
+
payer: Signer,
|
|
2960
|
+
mint: PublicKey,
|
|
2961
|
+
numMaxAdditionalPools: number,
|
|
2962
|
+
confirmOptions?: ConfirmOptions,
|
|
2963
|
+
tokenProgramId?: PublicKey,
|
|
2964
|
+
): Promise<string>;
|
|
2446
2965
|
/**
|
|
2447
2966
|
* @deprecated Use {@link addSplInterfaces} instead.
|
|
2448
2967
|
*/
|
|
@@ -2462,7 +2981,13 @@ declare const addTokenPools: typeof addSplInterfaces;
|
|
|
2462
2981
|
* @return Object with transaction signatures and the address of the created
|
|
2463
2982
|
* lookup table
|
|
2464
2983
|
*/
|
|
2465
|
-
declare function createTokenProgramLookupTable(
|
|
2984
|
+
declare function createTokenProgramLookupTable(
|
|
2985
|
+
rpc: Rpc,
|
|
2986
|
+
payer: Signer,
|
|
2987
|
+
authority: Signer,
|
|
2988
|
+
mints?: PublicKey[],
|
|
2989
|
+
additionalAccounts?: PublicKey[],
|
|
2990
|
+
): Promise<{
|
|
2466
2991
|
txIds: TransactionSignature[];
|
|
2467
2992
|
address: PublicKey;
|
|
2468
2993
|
}>;
|
|
@@ -2482,7 +3007,16 @@ declare function createTokenProgramLookupTable(rpc: Rpc, payer: Signer, authorit
|
|
|
2482
3007
|
*
|
|
2483
3008
|
* @return confirmed transaction signature
|
|
2484
3009
|
*/
|
|
2485
|
-
declare function decompress(
|
|
3010
|
+
declare function decompress(
|
|
3011
|
+
rpc: Rpc,
|
|
3012
|
+
payer: Signer,
|
|
3013
|
+
mint: PublicKey,
|
|
3014
|
+
amount: number | BN,
|
|
3015
|
+
owner: Signer,
|
|
3016
|
+
toAddress: PublicKey,
|
|
3017
|
+
splInterfaceInfos?: SplInterfaceInfo[],
|
|
3018
|
+
confirmOptions?: ConfirmOptions,
|
|
3019
|
+
): Promise<TransactionSignature>;
|
|
2486
3020
|
|
|
2487
3021
|
/**
|
|
2488
3022
|
* Merge multiple compressed token accounts for a given mint into fewer
|
|
@@ -2502,7 +3036,13 @@ declare function decompress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: nu
|
|
|
2502
3036
|
*
|
|
2503
3037
|
* @return confirmed transaction signature
|
|
2504
3038
|
*/
|
|
2505
|
-
declare function mergeTokenAccounts(
|
|
3039
|
+
declare function mergeTokenAccounts(
|
|
3040
|
+
rpc: Rpc,
|
|
3041
|
+
payer: Signer,
|
|
3042
|
+
mint: PublicKey,
|
|
3043
|
+
owner: Signer,
|
|
3044
|
+
confirmOptions?: ConfirmOptions,
|
|
3045
|
+
): Promise<TransactionSignature>;
|
|
2506
3046
|
|
|
2507
3047
|
/**
|
|
2508
3048
|
* Mint compressed tokens to a solana address
|
|
@@ -2524,7 +3064,17 @@ declare function mergeTokenAccounts(rpc: Rpc, payer: Signer, mint: PublicKey, ow
|
|
|
2524
3064
|
*
|
|
2525
3065
|
* @return Signature of the confirmed transaction
|
|
2526
3066
|
*/
|
|
2527
|
-
declare function mintTo(
|
|
3067
|
+
declare function mintTo(
|
|
3068
|
+
rpc: Rpc,
|
|
3069
|
+
payer: Signer,
|
|
3070
|
+
mint: PublicKey,
|
|
3071
|
+
toPubkey: PublicKey | PublicKey[],
|
|
3072
|
+
authority: Signer,
|
|
3073
|
+
amount: number | BN | number[] | BN[],
|
|
3074
|
+
outputStateTreeInfo?: TreeInfo,
|
|
3075
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
3076
|
+
confirmOptions?: ConfirmOptions,
|
|
3077
|
+
): Promise<TransactionSignature>;
|
|
2528
3078
|
|
|
2529
3079
|
/**
|
|
2530
3080
|
* Revoke one or more delegated token accounts
|
|
@@ -2538,7 +3088,13 @@ declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: Publ
|
|
|
2538
3088
|
*
|
|
2539
3089
|
* @return Signature of the confirmed transaction
|
|
2540
3090
|
*/
|
|
2541
|
-
declare function revoke(
|
|
3091
|
+
declare function revoke(
|
|
3092
|
+
rpc: Rpc,
|
|
3093
|
+
payer: Signer,
|
|
3094
|
+
accounts: ParsedTokenAccount[],
|
|
3095
|
+
owner: Signer,
|
|
3096
|
+
confirmOptions?: ConfirmOptions,
|
|
3097
|
+
): Promise<TransactionSignature>;
|
|
2542
3098
|
|
|
2543
3099
|
/**
|
|
2544
3100
|
* Transfer compressed tokens from one owner to another.
|
|
@@ -2556,7 +3112,15 @@ declare function revoke(rpc: Rpc, payer: Signer, accounts: ParsedTokenAccount[],
|
|
|
2556
3112
|
*
|
|
2557
3113
|
* @return confirmed transaction signature
|
|
2558
3114
|
*/
|
|
2559
|
-
declare function transfer(
|
|
3115
|
+
declare function transfer(
|
|
3116
|
+
rpc: Rpc,
|
|
3117
|
+
payer: Signer,
|
|
3118
|
+
mint: PublicKey,
|
|
3119
|
+
amount: number | BN,
|
|
3120
|
+
owner: Signer,
|
|
3121
|
+
toAddress: PublicKey,
|
|
3122
|
+
confirmOptions?: ConfirmOptions,
|
|
3123
|
+
): Promise<TransactionSignature>;
|
|
2560
3124
|
|
|
2561
3125
|
/**
|
|
2562
3126
|
* Transfer delegated compressed tokens to another owner
|
|
@@ -2571,7 +3135,15 @@ declare function transfer(rpc: Rpc, payer: Signer, mint: PublicKey, amount: numb
|
|
|
2571
3135
|
*
|
|
2572
3136
|
* @return confirmed transaction signature
|
|
2573
3137
|
*/
|
|
2574
|
-
declare function transferDelegated(
|
|
3138
|
+
declare function transferDelegated(
|
|
3139
|
+
rpc: Rpc,
|
|
3140
|
+
payer: Signer,
|
|
3141
|
+
mint: PublicKey,
|
|
3142
|
+
amount: number | BN,
|
|
3143
|
+
owner: Signer,
|
|
3144
|
+
toAddress: PublicKey,
|
|
3145
|
+
confirmOptions?: ConfirmOptions,
|
|
3146
|
+
): Promise<TransactionSignature>;
|
|
2575
3147
|
|
|
2576
3148
|
/**
|
|
2577
3149
|
* Decompress delegated compressed tokens. Remaining compressed tokens are
|
|
@@ -2589,10 +3161,21 @@ declare function transferDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amo
|
|
|
2589
3161
|
*
|
|
2590
3162
|
* @return Signature of the confirmed transaction
|
|
2591
3163
|
*/
|
|
2592
|
-
declare function decompressDelegated(
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
3164
|
+
declare function decompressDelegated(
|
|
3165
|
+
rpc: Rpc,
|
|
3166
|
+
payer: Signer,
|
|
3167
|
+
mint: PublicKey,
|
|
3168
|
+
amount: number | BN,
|
|
3169
|
+
owner: Signer,
|
|
3170
|
+
toAddress: PublicKey,
|
|
3171
|
+
splInterfaceInfos?: SplInterfaceInfo[],
|
|
3172
|
+
confirmOptions?: ConfirmOptions,
|
|
3173
|
+
): Promise<TransactionSignature>;
|
|
3174
|
+
|
|
3175
|
+
declare const ERROR_NO_ACCOUNTS_FOUND =
|
|
3176
|
+
'Could not find accounts to select for transfer.';
|
|
3177
|
+
declare const ERROR_MIXED_TREE_TYPES =
|
|
3178
|
+
'Cannot select accounts from different tree types (V1/V2) in the same batch. Filter accounts by tree type first.';
|
|
2596
3179
|
/**
|
|
2597
3180
|
* Options for input account selection
|
|
2598
3181
|
*/
|
|
@@ -2607,7 +3190,9 @@ interface SelectInputAccountsOptions {
|
|
|
2607
3190
|
/**
|
|
2608
3191
|
* Groups accounts by tree type for separate processing
|
|
2609
3192
|
*/
|
|
2610
|
-
declare function groupAccountsByTreeType(
|
|
3193
|
+
declare function groupAccountsByTreeType(
|
|
3194
|
+
accounts: ParsedTokenAccount[],
|
|
3195
|
+
): Map<TreeType, ParsedTokenAccount[]>;
|
|
2611
3196
|
/**
|
|
2612
3197
|
* Result of selectAccountsByPreferredTreeType
|
|
2613
3198
|
*/
|
|
@@ -2632,7 +3217,10 @@ interface SelectedAccountsResult {
|
|
|
2632
3217
|
* @param requiredAmount Minimum amount needed (optional - if not provided, returns all from preferred type)
|
|
2633
3218
|
* @returns Selected accounts from a single tree type
|
|
2634
3219
|
*/
|
|
2635
|
-
declare function selectAccountsByPreferredTreeType(
|
|
3220
|
+
declare function selectAccountsByPreferredTreeType(
|
|
3221
|
+
accounts: ParsedTokenAccount[],
|
|
3222
|
+
requiredAmount?: BN,
|
|
3223
|
+
): SelectedAccountsResult;
|
|
2636
3224
|
/**
|
|
2637
3225
|
* Selects token accounts for approval, first trying to find an exact match, then falling back to minimum selection.
|
|
2638
3226
|
*
|
|
@@ -2651,11 +3239,16 @@ declare function selectAccountsByPreferredTreeType(accounts: ParsedTokenAccount[
|
|
|
2651
3239
|
* - totalLamports: Total lamports from selected accounts.
|
|
2652
3240
|
* - maxPossibleAmount: Max approvable amount given maxInputs.
|
|
2653
3241
|
*/
|
|
2654
|
-
declare function selectTokenAccountsForApprove(
|
|
3242
|
+
declare function selectTokenAccountsForApprove(
|
|
3243
|
+
accounts: ParsedTokenAccount[],
|
|
3244
|
+
approveAmount: BN,
|
|
3245
|
+
maxInputs?: number,
|
|
3246
|
+
options?: SelectInputAccountsOptions,
|
|
3247
|
+
): [
|
|
2655
3248
|
selectedAccounts: ParsedTokenAccount[],
|
|
2656
3249
|
total: BN,
|
|
2657
3250
|
totalLamports: BN | null,
|
|
2658
|
-
maxPossibleAmount: BN
|
|
3251
|
+
maxPossibleAmount: BN,
|
|
2659
3252
|
];
|
|
2660
3253
|
/**
|
|
2661
3254
|
* Selects the minimum number of compressed token accounts required for a
|
|
@@ -2669,7 +3262,12 @@ declare function selectTokenAccountsForApprove(accounts: ParsedTokenAccount[], a
|
|
|
2669
3262
|
*
|
|
2670
3263
|
* @returns Returns selected accounts and their totals.
|
|
2671
3264
|
*/
|
|
2672
|
-
declare function selectMinCompressedTokenAccountsForDecompression(
|
|
3265
|
+
declare function selectMinCompressedTokenAccountsForDecompression(
|
|
3266
|
+
accounts: ParsedTokenAccount[],
|
|
3267
|
+
amount: BN,
|
|
3268
|
+
maxInputs?: number,
|
|
3269
|
+
options?: SelectInputAccountsOptions,
|
|
3270
|
+
): {
|
|
2673
3271
|
selectedAccounts: ParsedTokenAccount[];
|
|
2674
3272
|
total: BN;
|
|
2675
3273
|
totalLamports: BN | null;
|
|
@@ -2693,22 +3291,31 @@ declare function selectMinCompressedTokenAccountsForDecompression(accounts: Pars
|
|
|
2693
3291
|
* maxPossibleAmount: BN
|
|
2694
3292
|
* ]
|
|
2695
3293
|
*/
|
|
2696
|
-
declare function selectMinCompressedTokenAccountsForTransfer(
|
|
3294
|
+
declare function selectMinCompressedTokenAccountsForTransfer(
|
|
3295
|
+
accounts: ParsedTokenAccount[],
|
|
3296
|
+
transferAmount: BN,
|
|
3297
|
+
maxInputs?: number,
|
|
3298
|
+
options?: SelectInputAccountsOptions,
|
|
3299
|
+
): [
|
|
2697
3300
|
selectedAccounts: ParsedTokenAccount[],
|
|
2698
3301
|
total: BN,
|
|
2699
3302
|
totalLamports: BN | null,
|
|
2700
|
-
maxPossibleAmount: BN
|
|
3303
|
+
maxPossibleAmount: BN,
|
|
2701
3304
|
];
|
|
2702
3305
|
/**
|
|
2703
3306
|
* Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
|
|
2704
3307
|
* returns partial amounts if insufficient accounts are found instead of
|
|
2705
3308
|
* throwing an error.
|
|
2706
3309
|
*/
|
|
2707
|
-
declare function selectMinCompressedTokenAccountsForTransferOrPartial(
|
|
3310
|
+
declare function selectMinCompressedTokenAccountsForTransferOrPartial(
|
|
3311
|
+
accounts: ParsedTokenAccount[],
|
|
3312
|
+
transferAmount: BN,
|
|
3313
|
+
maxInputs?: number,
|
|
3314
|
+
): [
|
|
2708
3315
|
selectedAccounts: ParsedTokenAccount[],
|
|
2709
3316
|
total: BN,
|
|
2710
3317
|
totalLamports: BN | null,
|
|
2711
|
-
maxPossibleAmount: BN
|
|
3318
|
+
maxPossibleAmount: BN,
|
|
2712
3319
|
];
|
|
2713
3320
|
/**
|
|
2714
3321
|
* Selects compressed token accounts for a transfer, ensuring one extra account
|
|
@@ -2751,22 +3358,31 @@ declare function selectMinCompressedTokenAccountsForTransferOrPartial(accounts:
|
|
|
2751
3358
|
* console.log(totalLamports!.toString()); // '15'
|
|
2752
3359
|
* console.log(maxPossibleAmount.toString()); // '150'
|
|
2753
3360
|
*/
|
|
2754
|
-
declare function selectSmartCompressedTokenAccountsForTransfer(
|
|
3361
|
+
declare function selectSmartCompressedTokenAccountsForTransfer(
|
|
3362
|
+
accounts: ParsedTokenAccount[],
|
|
3363
|
+
transferAmount: BN,
|
|
3364
|
+
maxInputs?: number,
|
|
3365
|
+
options?: SelectInputAccountsOptions,
|
|
3366
|
+
): [
|
|
2755
3367
|
selectedAccounts: ParsedTokenAccount[],
|
|
2756
3368
|
total: BN,
|
|
2757
3369
|
totalLamports: BN | null,
|
|
2758
|
-
maxPossibleAmount: BN
|
|
3370
|
+
maxPossibleAmount: BN,
|
|
2759
3371
|
];
|
|
2760
3372
|
/**
|
|
2761
3373
|
* Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
|
|
2762
3374
|
* returns partial amounts if insufficient accounts are found instead of
|
|
2763
3375
|
* throwing an error.
|
|
2764
3376
|
*/
|
|
2765
|
-
declare function selectSmartCompressedTokenAccountsForTransferOrPartial(
|
|
3377
|
+
declare function selectSmartCompressedTokenAccountsForTransferOrPartial(
|
|
3378
|
+
accounts: ParsedTokenAccount[],
|
|
3379
|
+
transferAmount: BN,
|
|
3380
|
+
maxInputs?: number,
|
|
3381
|
+
): [
|
|
2766
3382
|
selectedAccounts: ParsedTokenAccount[],
|
|
2767
3383
|
total: BN,
|
|
2768
3384
|
totalLamports: BN | null,
|
|
2769
|
-
maxPossibleAmount: BN
|
|
3385
|
+
maxPossibleAmount: BN,
|
|
2770
3386
|
];
|
|
2771
3387
|
|
|
2772
3388
|
type TokenTransferOutputData = {
|
|
@@ -2839,7 +3455,9 @@ type CompressSplTokenAccountInstructionData = {
|
|
|
2839
3455
|
remainingAmount: BN | null;
|
|
2840
3456
|
cpiContext: CompressedCpiContext | null;
|
|
2841
3457
|
};
|
|
2842
|
-
declare function isSingleSplInterfaceInfo(
|
|
3458
|
+
declare function isSingleSplInterfaceInfo(
|
|
3459
|
+
splInterfaceInfos: SplInterfaceInfo | SplInterfaceInfo[],
|
|
3460
|
+
): splInterfaceInfos is SplInterfaceInfo;
|
|
2843
3461
|
/**
|
|
2844
3462
|
* @deprecated Use {@link isSingleSplInterfaceInfo} instead.
|
|
2845
3463
|
*/
|
|
@@ -2950,7 +3568,9 @@ type PackCompressedTokenAccountsParams = {
|
|
|
2950
3568
|
/**
|
|
2951
3569
|
* Packs Compressed Token Accounts.
|
|
2952
3570
|
*/
|
|
2953
|
-
declare function packCompressedTokenAccounts(
|
|
3571
|
+
declare function packCompressedTokenAccounts(
|
|
3572
|
+
params: PackCompressedTokenAccountsParams,
|
|
3573
|
+
): {
|
|
2954
3574
|
inputTokenDataWithContext: InputTokenDataWithContext$1[];
|
|
2955
3575
|
remainingAccountMetas: AccountMeta[];
|
|
2956
3576
|
packedOutputTokenData: PackedTokenTransferOutputData[];
|
|
@@ -2963,7 +3583,10 @@ declare function packCompressedTokenAccounts(params: PackCompressedTokenAccounts
|
|
|
2963
3583
|
* @param mint The mint of the token pool
|
|
2964
3584
|
* @returns True if all input accounts belong to the same mint
|
|
2965
3585
|
*/
|
|
2966
|
-
declare function checkMint(
|
|
3586
|
+
declare function checkMint(
|
|
3587
|
+
compressedTokenAccounts: ParsedTokenAccount[],
|
|
3588
|
+
mint: PublicKey,
|
|
3589
|
+
): boolean;
|
|
2967
3590
|
|
|
2968
3591
|
type LightCompressedToken = {
|
|
2969
3592
|
version: '1.2.0';
|
|
@@ -2975,7 +3598,7 @@ type LightCompressedToken = {
|
|
|
2975
3598
|
'This instruction creates a token pool for a given mint. Every spl mint',
|
|
2976
3599
|
'can have one token pool. When a token is compressed the tokens are',
|
|
2977
3600
|
'transferrred to the token pool, and their compressed equivalent is',
|
|
2978
|
-
'minted into a Merkle tree.'
|
|
3601
|
+
'minted into a Merkle tree.',
|
|
2979
3602
|
];
|
|
2980
3603
|
accounts: [
|
|
2981
3604
|
{
|
|
@@ -3008,7 +3631,7 @@ type LightCompressedToken = {
|
|
|
3008
3631
|
name: 'cpiAuthorityPda';
|
|
3009
3632
|
isMut: false;
|
|
3010
3633
|
isSigner: false;
|
|
3011
|
-
}
|
|
3634
|
+
},
|
|
3012
3635
|
];
|
|
3013
3636
|
args: [];
|
|
3014
3637
|
},
|
|
@@ -3016,7 +3639,7 @@ type LightCompressedToken = {
|
|
|
3016
3639
|
name: 'addTokenPool';
|
|
3017
3640
|
docs: [
|
|
3018
3641
|
'This instruction creates an additional token pool for a given mint.',
|
|
3019
|
-
'The maximum number of token pools per mint is 5.'
|
|
3642
|
+
'The maximum number of token pools per mint is 5.',
|
|
3020
3643
|
];
|
|
3021
3644
|
accounts: [
|
|
3022
3645
|
{
|
|
@@ -3054,13 +3677,13 @@ type LightCompressedToken = {
|
|
|
3054
3677
|
name: 'cpiAuthorityPda';
|
|
3055
3678
|
isMut: false;
|
|
3056
3679
|
isSigner: false;
|
|
3057
|
-
}
|
|
3680
|
+
},
|
|
3058
3681
|
];
|
|
3059
3682
|
args: [
|
|
3060
3683
|
{
|
|
3061
3684
|
name: 'tokenPoolIndex';
|
|
3062
3685
|
type: 'u8';
|
|
3063
|
-
}
|
|
3686
|
+
},
|
|
3064
3687
|
];
|
|
3065
3688
|
},
|
|
3066
3689
|
{
|
|
@@ -3072,7 +3695,7 @@ type LightCompressedToken = {
|
|
|
3072
3695
|
'every amount and pubkey input pair. A constant amount of lamports can be',
|
|
3073
3696
|
'transferred to each output account to enable. A use case to add lamports',
|
|
3074
3697
|
'to a compressed token account is to prevent spam. This is the only way',
|
|
3075
|
-
'to add lamports to a compressed token account.'
|
|
3698
|
+
'to add lamports to a compressed token account.',
|
|
3076
3699
|
];
|
|
3077
3700
|
accounts: [
|
|
3078
3701
|
{
|
|
@@ -3152,7 +3775,7 @@ type LightCompressedToken = {
|
|
|
3152
3775
|
isMut: true;
|
|
3153
3776
|
isSigner: false;
|
|
3154
3777
|
isOptional: true;
|
|
3155
|
-
}
|
|
3778
|
+
},
|
|
3156
3779
|
];
|
|
3157
3780
|
args: [
|
|
3158
3781
|
{
|
|
@@ -3172,7 +3795,7 @@ type LightCompressedToken = {
|
|
|
3172
3795
|
type: {
|
|
3173
3796
|
option: 'u64';
|
|
3174
3797
|
};
|
|
3175
|
-
}
|
|
3798
|
+
},
|
|
3176
3799
|
];
|
|
3177
3800
|
},
|
|
3178
3801
|
{
|
|
@@ -3180,7 +3803,7 @@ type LightCompressedToken = {
|
|
|
3180
3803
|
docs: [
|
|
3181
3804
|
'Compresses the balance of an spl token account sub an optional remaining',
|
|
3182
3805
|
'amount. This instruction does not close the spl token account. To close',
|
|
3183
|
-
'the account bundle a close spl account instruction in your transaction.'
|
|
3806
|
+
'the account bundle a close spl account instruction in your transaction.',
|
|
3184
3807
|
];
|
|
3185
3808
|
accounts: [
|
|
3186
3809
|
{
|
|
@@ -3196,7 +3819,7 @@ type LightCompressedToken = {
|
|
|
3196
3819
|
docs: [
|
|
3197
3820
|
'Authority is verified through proof since both owner and delegate',
|
|
3198
3821
|
'are included in the token data hash, which is a public input to the',
|
|
3199
|
-
'validity proof.'
|
|
3822
|
+
'validity proof.',
|
|
3200
3823
|
];
|
|
3201
3824
|
},
|
|
3202
3825
|
{
|
|
@@ -3257,7 +3880,7 @@ type LightCompressedToken = {
|
|
|
3257
3880
|
name: 'systemProgram';
|
|
3258
3881
|
isMut: false;
|
|
3259
3882
|
isSigner: false;
|
|
3260
|
-
}
|
|
3883
|
+
},
|
|
3261
3884
|
];
|
|
3262
3885
|
args: [
|
|
3263
3886
|
{
|
|
@@ -3277,7 +3900,7 @@ type LightCompressedToken = {
|
|
|
3277
3900
|
defined: 'CompressedCpiContext';
|
|
3278
3901
|
};
|
|
3279
3902
|
};
|
|
3280
|
-
}
|
|
3903
|
+
},
|
|
3281
3904
|
];
|
|
3282
3905
|
},
|
|
3283
3906
|
{
|
|
@@ -3290,7 +3913,7 @@ type LightCompressedToken = {
|
|
|
3290
3913
|
'accounts specify less lamports than inputs the remaining lamports are',
|
|
3291
3914
|
'transferred to an output compressed account. Signer must be owner or',
|
|
3292
3915
|
'delegate. If a delegated token account is transferred the delegate is',
|
|
3293
|
-
'not preserved.'
|
|
3916
|
+
'not preserved.',
|
|
3294
3917
|
];
|
|
3295
3918
|
accounts: [
|
|
3296
3919
|
{
|
|
@@ -3306,7 +3929,7 @@ type LightCompressedToken = {
|
|
|
3306
3929
|
docs: [
|
|
3307
3930
|
'Authority is verified through proof since both owner and delegate',
|
|
3308
3931
|
'are included in the token data hash, which is a public input to the',
|
|
3309
|
-
'validity proof.'
|
|
3932
|
+
'validity proof.',
|
|
3310
3933
|
];
|
|
3311
3934
|
},
|
|
3312
3935
|
{
|
|
@@ -3367,13 +3990,13 @@ type LightCompressedToken = {
|
|
|
3367
3990
|
name: 'systemProgram';
|
|
3368
3991
|
isMut: false;
|
|
3369
3992
|
isSigner: false;
|
|
3370
|
-
}
|
|
3993
|
+
},
|
|
3371
3994
|
];
|
|
3372
3995
|
args: [
|
|
3373
3996
|
{
|
|
3374
3997
|
name: 'inputs';
|
|
3375
3998
|
type: 'bytes';
|
|
3376
|
-
}
|
|
3999
|
+
},
|
|
3377
4000
|
];
|
|
3378
4001
|
},
|
|
3379
4002
|
{
|
|
@@ -3384,7 +4007,7 @@ type LightCompressedToken = {
|
|
|
3384
4007
|
'be called by a delegate.',
|
|
3385
4008
|
'The instruction creates two output accounts:',
|
|
3386
4009
|
'1. one account with delegated amount',
|
|
3387
|
-
'2. one account with remaining(change) amount'
|
|
4010
|
+
'2. one account with remaining(change) amount',
|
|
3388
4011
|
];
|
|
3389
4012
|
accounts: [
|
|
3390
4013
|
{
|
|
@@ -3400,7 +4023,7 @@ type LightCompressedToken = {
|
|
|
3400
4023
|
docs: [
|
|
3401
4024
|
'Authority is verified through proof since both owner and delegate',
|
|
3402
4025
|
'are included in the token data hash, which is a public input to the',
|
|
3403
|
-
'validity proof.'
|
|
4026
|
+
'validity proof.',
|
|
3404
4027
|
];
|
|
3405
4028
|
},
|
|
3406
4029
|
{
|
|
@@ -3443,20 +4066,20 @@ type LightCompressedToken = {
|
|
|
3443
4066
|
name: 'systemProgram';
|
|
3444
4067
|
isMut: false;
|
|
3445
4068
|
isSigner: false;
|
|
3446
|
-
}
|
|
4069
|
+
},
|
|
3447
4070
|
];
|
|
3448
4071
|
args: [
|
|
3449
4072
|
{
|
|
3450
4073
|
name: 'inputs';
|
|
3451
4074
|
type: 'bytes';
|
|
3452
|
-
}
|
|
4075
|
+
},
|
|
3453
4076
|
];
|
|
3454
4077
|
},
|
|
3455
4078
|
{
|
|
3456
4079
|
name: 'revoke';
|
|
3457
4080
|
docs: [
|
|
3458
4081
|
'Revokes a delegation. The instruction merges all inputs into one output',
|
|
3459
|
-
'account. Cannot be called by a delegate. Delegates are not preserved.'
|
|
4082
|
+
'account. Cannot be called by a delegate. Delegates are not preserved.',
|
|
3460
4083
|
];
|
|
3461
4084
|
accounts: [
|
|
3462
4085
|
{
|
|
@@ -3472,7 +4095,7 @@ type LightCompressedToken = {
|
|
|
3472
4095
|
docs: [
|
|
3473
4096
|
'Authority is verified through proof since both owner and delegate',
|
|
3474
4097
|
'are included in the token data hash, which is a public input to the',
|
|
3475
|
-
'validity proof.'
|
|
4098
|
+
'validity proof.',
|
|
3476
4099
|
];
|
|
3477
4100
|
},
|
|
3478
4101
|
{
|
|
@@ -3515,20 +4138,20 @@ type LightCompressedToken = {
|
|
|
3515
4138
|
name: 'systemProgram';
|
|
3516
4139
|
isMut: false;
|
|
3517
4140
|
isSigner: false;
|
|
3518
|
-
}
|
|
4141
|
+
},
|
|
3519
4142
|
];
|
|
3520
4143
|
args: [
|
|
3521
4144
|
{
|
|
3522
4145
|
name: 'inputs';
|
|
3523
4146
|
type: 'bytes';
|
|
3524
|
-
}
|
|
4147
|
+
},
|
|
3525
4148
|
];
|
|
3526
4149
|
},
|
|
3527
4150
|
{
|
|
3528
4151
|
name: 'freeze';
|
|
3529
4152
|
docs: [
|
|
3530
4153
|
'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
|
|
3531
|
-
'many outputs as inputs. Balances and delegates are preserved.'
|
|
4154
|
+
'many outputs as inputs. Balances and delegates are preserved.',
|
|
3532
4155
|
];
|
|
3533
4156
|
accounts: [
|
|
3534
4157
|
{
|
|
@@ -3587,20 +4210,20 @@ type LightCompressedToken = {
|
|
|
3587
4210
|
name: 'mint';
|
|
3588
4211
|
isMut: false;
|
|
3589
4212
|
isSigner: false;
|
|
3590
|
-
}
|
|
4213
|
+
},
|
|
3591
4214
|
];
|
|
3592
4215
|
args: [
|
|
3593
4216
|
{
|
|
3594
4217
|
name: 'inputs';
|
|
3595
4218
|
type: 'bytes';
|
|
3596
|
-
}
|
|
4219
|
+
},
|
|
3597
4220
|
];
|
|
3598
4221
|
},
|
|
3599
4222
|
{
|
|
3600
4223
|
name: 'thaw';
|
|
3601
4224
|
docs: [
|
|
3602
4225
|
'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
|
|
3603
|
-
'as many outputs as inputs. Balances and delegates are preserved.'
|
|
4226
|
+
'as many outputs as inputs. Balances and delegates are preserved.',
|
|
3604
4227
|
];
|
|
3605
4228
|
accounts: [
|
|
3606
4229
|
{
|
|
@@ -3659,13 +4282,13 @@ type LightCompressedToken = {
|
|
|
3659
4282
|
name: 'mint';
|
|
3660
4283
|
isMut: false;
|
|
3661
4284
|
isSigner: false;
|
|
3662
|
-
}
|
|
4285
|
+
},
|
|
3663
4286
|
];
|
|
3664
4287
|
args: [
|
|
3665
4288
|
{
|
|
3666
4289
|
name: 'inputs';
|
|
3667
4290
|
type: 'bytes';
|
|
3668
|
-
}
|
|
4291
|
+
},
|
|
3669
4292
|
];
|
|
3670
4293
|
},
|
|
3671
4294
|
{
|
|
@@ -3673,7 +4296,7 @@ type LightCompressedToken = {
|
|
|
3673
4296
|
docs: [
|
|
3674
4297
|
'Burns compressed tokens and spl tokens from the pool account. Delegates',
|
|
3675
4298
|
'can burn tokens. The output compressed token account remains delegated.',
|
|
3676
|
-
'Creates one output compressed token account.'
|
|
4299
|
+
'Creates one output compressed token account.',
|
|
3677
4300
|
];
|
|
3678
4301
|
accounts: [
|
|
3679
4302
|
{
|
|
@@ -3689,7 +4312,7 @@ type LightCompressedToken = {
|
|
|
3689
4312
|
docs: [
|
|
3690
4313
|
'Authority is verified through proof since both owner and delegate',
|
|
3691
4314
|
'are included in the token data hash, which is a public input to the',
|
|
3692
|
-
'validity proof.'
|
|
4315
|
+
'validity proof.',
|
|
3693
4316
|
];
|
|
3694
4317
|
},
|
|
3695
4318
|
{
|
|
@@ -3746,13 +4369,13 @@ type LightCompressedToken = {
|
|
|
3746
4369
|
name: 'systemProgram';
|
|
3747
4370
|
isMut: false;
|
|
3748
4371
|
isSigner: false;
|
|
3749
|
-
}
|
|
4372
|
+
},
|
|
3750
4373
|
];
|
|
3751
4374
|
args: [
|
|
3752
4375
|
{
|
|
3753
4376
|
name: 'inputs';
|
|
3754
4377
|
type: 'bytes';
|
|
3755
|
-
}
|
|
4378
|
+
},
|
|
3756
4379
|
];
|
|
3757
4380
|
},
|
|
3758
4381
|
{
|
|
@@ -3760,7 +4383,7 @@ type LightCompressedToken = {
|
|
|
3760
4383
|
docs: [
|
|
3761
4384
|
'This function is a stub to allow Anchor to include the input types in',
|
|
3762
4385
|
'the IDL. It should not be included in production builds nor be called in',
|
|
3763
|
-
'practice.'
|
|
4386
|
+
'practice.',
|
|
3764
4387
|
];
|
|
3765
4388
|
accounts: [
|
|
3766
4389
|
{
|
|
@@ -3776,7 +4399,7 @@ type LightCompressedToken = {
|
|
|
3776
4399
|
docs: [
|
|
3777
4400
|
'Authority is verified through proof since both owner and delegate',
|
|
3778
4401
|
'are included in the token data hash, which is a public input to the',
|
|
3779
|
-
'validity proof.'
|
|
4402
|
+
'validity proof.',
|
|
3780
4403
|
];
|
|
3781
4404
|
},
|
|
3782
4405
|
{
|
|
@@ -3837,7 +4460,7 @@ type LightCompressedToken = {
|
|
|
3837
4460
|
name: 'systemProgram';
|
|
3838
4461
|
isMut: false;
|
|
3839
4462
|
isSigner: false;
|
|
3840
|
-
}
|
|
4463
|
+
},
|
|
3841
4464
|
];
|
|
3842
4465
|
args: [
|
|
3843
4466
|
{
|
|
@@ -3851,9 +4474,9 @@ type LightCompressedToken = {
|
|
|
3851
4474
|
type: {
|
|
3852
4475
|
defined: 'TokenData';
|
|
3853
4476
|
};
|
|
3854
|
-
}
|
|
4477
|
+
},
|
|
3855
4478
|
];
|
|
3856
|
-
}
|
|
4479
|
+
},
|
|
3857
4480
|
];
|
|
3858
4481
|
types: [
|
|
3859
4482
|
{
|
|
@@ -3866,7 +4489,7 @@ type LightCompressedToken = {
|
|
|
3866
4489
|
},
|
|
3867
4490
|
{
|
|
3868
4491
|
name: 'Frozen';
|
|
3869
|
-
}
|
|
4492
|
+
},
|
|
3870
4493
|
];
|
|
3871
4494
|
};
|
|
3872
4495
|
},
|
|
@@ -3898,7 +4521,7 @@ type LightCompressedToken = {
|
|
|
3898
4521
|
defined: 'CompressedAccountData';
|
|
3899
4522
|
};
|
|
3900
4523
|
};
|
|
3901
|
-
}
|
|
4524
|
+
},
|
|
3902
4525
|
];
|
|
3903
4526
|
};
|
|
3904
4527
|
},
|
|
@@ -3922,7 +4545,7 @@ type LightCompressedToken = {
|
|
|
3922
4545
|
type: {
|
|
3923
4546
|
array: ['u8', 32];
|
|
3924
4547
|
};
|
|
3925
|
-
}
|
|
4548
|
+
},
|
|
3926
4549
|
];
|
|
3927
4550
|
};
|
|
3928
4551
|
},
|
|
@@ -3935,7 +4558,7 @@ type LightCompressedToken = {
|
|
|
3935
4558
|
name: 'setContext';
|
|
3936
4559
|
docs: [
|
|
3937
4560
|
'Is set by the program that is invoking the CPI to signal that is should',
|
|
3938
|
-
'set the cpi context.'
|
|
4561
|
+
'set the cpi context.',
|
|
3939
4562
|
];
|
|
3940
4563
|
type: 'bool';
|
|
3941
4564
|
},
|
|
@@ -3943,17 +4566,17 @@ type LightCompressedToken = {
|
|
|
3943
4566
|
name: 'firstSetContext';
|
|
3944
4567
|
docs: [
|
|
3945
4568
|
'Is set to wipe the cpi context since someone could have set it before',
|
|
3946
|
-
'with unrelated data.'
|
|
4569
|
+
'with unrelated data.',
|
|
3947
4570
|
];
|
|
3948
4571
|
type: 'bool';
|
|
3949
4572
|
},
|
|
3950
4573
|
{
|
|
3951
4574
|
name: 'cpiContextAccountIndex';
|
|
3952
4575
|
docs: [
|
|
3953
|
-
'Index of cpi context account in remaining accounts.'
|
|
4576
|
+
'Index of cpi context account in remaining accounts.',
|
|
3954
4577
|
];
|
|
3955
4578
|
type: 'u8';
|
|
3956
|
-
}
|
|
4579
|
+
},
|
|
3957
4580
|
];
|
|
3958
4581
|
};
|
|
3959
4582
|
},
|
|
@@ -3979,7 +4602,7 @@ type LightCompressedToken = {
|
|
|
3979
4602
|
type: {
|
|
3980
4603
|
array: ['u8', 32];
|
|
3981
4604
|
};
|
|
3982
|
-
}
|
|
4605
|
+
},
|
|
3983
4606
|
];
|
|
3984
4607
|
};
|
|
3985
4608
|
},
|
|
@@ -4005,7 +4628,7 @@ type LightCompressedToken = {
|
|
|
4005
4628
|
docs: [
|
|
4006
4629
|
'Is required if the signer is delegate,',
|
|
4007
4630
|
'-> delegate is authority account,',
|
|
4008
|
-
'owner = Some(owner) is the owner of the token account.'
|
|
4631
|
+
'owner = Some(owner) is the owner of the token account.',
|
|
4009
4632
|
];
|
|
4010
4633
|
type: {
|
|
4011
4634
|
option: {
|
|
@@ -4052,7 +4675,7 @@ type LightCompressedToken = {
|
|
|
4052
4675
|
type: {
|
|
4053
4676
|
option: 'u8';
|
|
4054
4677
|
};
|
|
4055
|
-
}
|
|
4678
|
+
},
|
|
4056
4679
|
];
|
|
4057
4680
|
};
|
|
4058
4681
|
},
|
|
@@ -4092,7 +4715,7 @@ type LightCompressedToken = {
|
|
|
4092
4715
|
{
|
|
4093
4716
|
name: 'outputAccountMerkleTreeIndex';
|
|
4094
4717
|
type: 'u8';
|
|
4095
|
-
}
|
|
4718
|
+
},
|
|
4096
4719
|
];
|
|
4097
4720
|
};
|
|
4098
4721
|
},
|
|
@@ -4150,14 +4773,14 @@ type LightCompressedToken = {
|
|
|
4150
4773
|
type: {
|
|
4151
4774
|
option: 'u64';
|
|
4152
4775
|
};
|
|
4153
|
-
}
|
|
4776
|
+
},
|
|
4154
4777
|
];
|
|
4155
4778
|
};
|
|
4156
4779
|
},
|
|
4157
4780
|
{
|
|
4158
4781
|
name: 'DelegatedTransfer';
|
|
4159
4782
|
docs: [
|
|
4160
|
-
'Struct to provide the owner when the delegate is signer of the transaction.'
|
|
4783
|
+
'Struct to provide the owner when the delegate is signer of the transaction.',
|
|
4161
4784
|
];
|
|
4162
4785
|
type: {
|
|
4163
4786
|
kind: 'struct';
|
|
@@ -4172,12 +4795,12 @@ type LightCompressedToken = {
|
|
|
4172
4795
|
'Index of change compressed account in output compressed accounts. In',
|
|
4173
4796
|
"case that the delegate didn't spend the complete delegated compressed",
|
|
4174
4797
|
'account balance the change compressed account will be delegated to her',
|
|
4175
|
-
'as well.'
|
|
4798
|
+
'as well.',
|
|
4176
4799
|
];
|
|
4177
4800
|
type: {
|
|
4178
4801
|
option: 'u8';
|
|
4179
4802
|
};
|
|
4180
|
-
}
|
|
4803
|
+
},
|
|
4181
4804
|
];
|
|
4182
4805
|
};
|
|
4183
4806
|
},
|
|
@@ -4215,12 +4838,12 @@ type LightCompressedToken = {
|
|
|
4215
4838
|
{
|
|
4216
4839
|
name: 'tlv';
|
|
4217
4840
|
docs: [
|
|
4218
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
4841
|
+
'Placeholder for TokenExtension tlv data (unimplemented)',
|
|
4219
4842
|
];
|
|
4220
4843
|
type: {
|
|
4221
4844
|
option: 'bytes';
|
|
4222
4845
|
};
|
|
4223
|
-
}
|
|
4846
|
+
},
|
|
4224
4847
|
];
|
|
4225
4848
|
};
|
|
4226
4849
|
},
|
|
@@ -4276,7 +4899,7 @@ type LightCompressedToken = {
|
|
|
4276
4899
|
{
|
|
4277
4900
|
name: 'isCompress';
|
|
4278
4901
|
type: 'bool';
|
|
4279
|
-
}
|
|
4902
|
+
},
|
|
4280
4903
|
];
|
|
4281
4904
|
};
|
|
4282
4905
|
},
|
|
@@ -4340,7 +4963,7 @@ type LightCompressedToken = {
|
|
|
4340
4963
|
defined: 'CompressedCpiContext';
|
|
4341
4964
|
};
|
|
4342
4965
|
};
|
|
4343
|
-
}
|
|
4966
|
+
},
|
|
4344
4967
|
];
|
|
4345
4968
|
};
|
|
4346
4969
|
},
|
|
@@ -4356,7 +4979,7 @@ type LightCompressedToken = {
|
|
|
4356
4979
|
{
|
|
4357
4980
|
name: 'seq';
|
|
4358
4981
|
type: 'u64';
|
|
4359
|
-
}
|
|
4982
|
+
},
|
|
4360
4983
|
];
|
|
4361
4984
|
};
|
|
4362
4985
|
},
|
|
@@ -4382,7 +5005,7 @@ type LightCompressedToken = {
|
|
|
4382
5005
|
{
|
|
4383
5006
|
name: 'addressMerkleTreeRootIndex';
|
|
4384
5007
|
type: 'u16';
|
|
4385
|
-
}
|
|
5008
|
+
},
|
|
4386
5009
|
];
|
|
4387
5010
|
};
|
|
4388
5011
|
},
|
|
@@ -4400,7 +5023,7 @@ type LightCompressedToken = {
|
|
|
4400
5023
|
{
|
|
4401
5024
|
name: 'merkleTreeIndex';
|
|
4402
5025
|
type: 'u8';
|
|
4403
|
-
}
|
|
5026
|
+
},
|
|
4404
5027
|
];
|
|
4405
5028
|
};
|
|
4406
5029
|
},
|
|
@@ -4424,17 +5047,17 @@ type LightCompressedToken = {
|
|
|
4424
5047
|
{
|
|
4425
5048
|
name: 'rootIndex';
|
|
4426
5049
|
docs: [
|
|
4427
|
-
'Index of root used in inclusion validity proof.'
|
|
5050
|
+
'Index of root used in inclusion validity proof.',
|
|
4428
5051
|
];
|
|
4429
5052
|
type: 'u16';
|
|
4430
5053
|
},
|
|
4431
5054
|
{
|
|
4432
5055
|
name: 'readOnly';
|
|
4433
5056
|
docs: [
|
|
4434
|
-
'Placeholder to mark accounts read-only unimplemented set to false.'
|
|
5057
|
+
'Placeholder to mark accounts read-only unimplemented set to false.',
|
|
4435
5058
|
];
|
|
4436
5059
|
type: 'bool';
|
|
4437
|
-
}
|
|
5060
|
+
},
|
|
4438
5061
|
];
|
|
4439
5062
|
};
|
|
4440
5063
|
},
|
|
@@ -4458,7 +5081,7 @@ type LightCompressedToken = {
|
|
|
4458
5081
|
{
|
|
4459
5082
|
name: 'proveByIndex';
|
|
4460
5083
|
type: 'bool';
|
|
4461
|
-
}
|
|
5084
|
+
},
|
|
4462
5085
|
];
|
|
4463
5086
|
};
|
|
4464
5087
|
},
|
|
@@ -4488,12 +5111,12 @@ type LightCompressedToken = {
|
|
|
4488
5111
|
{
|
|
4489
5112
|
name: 'tlv';
|
|
4490
5113
|
docs: [
|
|
4491
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
5114
|
+
'Placeholder for TokenExtension tlv data (unimplemented)',
|
|
4492
5115
|
];
|
|
4493
5116
|
type: {
|
|
4494
5117
|
option: 'bytes';
|
|
4495
5118
|
};
|
|
4496
|
-
}
|
|
5119
|
+
},
|
|
4497
5120
|
];
|
|
4498
5121
|
};
|
|
4499
5122
|
},
|
|
@@ -4567,7 +5190,7 @@ type LightCompressedToken = {
|
|
|
4567
5190
|
type: {
|
|
4568
5191
|
option: 'bytes';
|
|
4569
5192
|
};
|
|
4570
|
-
}
|
|
5193
|
+
},
|
|
4571
5194
|
];
|
|
4572
5195
|
};
|
|
4573
5196
|
},
|
|
@@ -4585,7 +5208,7 @@ type LightCompressedToken = {
|
|
|
4585
5208
|
name: 'index';
|
|
4586
5209
|
docs: ['Index of compressed account hash in queue.'];
|
|
4587
5210
|
type: 'u16';
|
|
4588
|
-
}
|
|
5211
|
+
},
|
|
4589
5212
|
];
|
|
4590
5213
|
};
|
|
4591
5214
|
},
|
|
@@ -4613,7 +5236,7 @@ type LightCompressedToken = {
|
|
|
4613
5236
|
name: 'delegate';
|
|
4614
5237
|
docs: [
|
|
4615
5238
|
'If `delegate` is `Some` then `delegated_amount` represents',
|
|
4616
|
-
'the amount authorized by the delegate'
|
|
5239
|
+
'the amount authorized by the delegate',
|
|
4617
5240
|
];
|
|
4618
5241
|
type: {
|
|
4619
5242
|
option: 'publicKey';
|
|
@@ -4629,15 +5252,15 @@ type LightCompressedToken = {
|
|
|
4629
5252
|
{
|
|
4630
5253
|
name: 'tlv';
|
|
4631
5254
|
docs: [
|
|
4632
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
5255
|
+
'Placeholder for TokenExtension tlv data (unimplemented)',
|
|
4633
5256
|
];
|
|
4634
5257
|
type: {
|
|
4635
5258
|
option: 'bytes';
|
|
4636
5259
|
};
|
|
4637
|
-
}
|
|
5260
|
+
},
|
|
4638
5261
|
];
|
|
4639
5262
|
};
|
|
4640
|
-
}
|
|
5263
|
+
},
|
|
4641
5264
|
];
|
|
4642
5265
|
errors: [
|
|
4643
5266
|
{
|
|
@@ -4794,7 +5417,7 @@ type LightCompressedToken = {
|
|
|
4794
5417
|
{
|
|
4795
5418
|
code: 6032;
|
|
4796
5419
|
name: 'NoMatchingBumpFound';
|
|
4797
|
-
}
|
|
5420
|
+
},
|
|
4798
5421
|
];
|
|
4799
5422
|
};
|
|
4800
5423
|
declare const IDL: LightCompressedToken;
|
|
@@ -4805,14 +5428,30 @@ declare const CompressedTokenInstructionDataTransferLayout: Layout<unknown>;
|
|
|
4805
5428
|
declare const mintToLayout: Layout<unknown>;
|
|
4806
5429
|
declare const batchCompressLayout: Layout<unknown>;
|
|
4807
5430
|
declare const compressSplTokenAccountInstructionDataLayout: Layout<unknown>;
|
|
4808
|
-
declare function encodeMintToInstructionData(
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
declare function
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
declare function
|
|
4815
|
-
|
|
5431
|
+
declare function encodeMintToInstructionData(
|
|
5432
|
+
data: MintToInstructionData,
|
|
5433
|
+
): Buffer$1;
|
|
5434
|
+
declare function decodeMintToInstructionData(
|
|
5435
|
+
buffer: Buffer$1,
|
|
5436
|
+
): MintToInstructionData;
|
|
5437
|
+
declare function encodeBatchCompressInstructionData(
|
|
5438
|
+
data: BatchCompressInstructionData,
|
|
5439
|
+
): Buffer$1;
|
|
5440
|
+
declare function decodeBatchCompressInstructionData(
|
|
5441
|
+
buffer: Buffer$1,
|
|
5442
|
+
): BatchCompressInstructionData;
|
|
5443
|
+
declare function encodeCompressSplTokenAccountInstructionData(
|
|
5444
|
+
data: CompressSplTokenAccountInstructionData,
|
|
5445
|
+
): Buffer$1;
|
|
5446
|
+
declare function decodeCompressSplTokenAccountInstructionData(
|
|
5447
|
+
buffer: Buffer$1,
|
|
5448
|
+
): CompressSplTokenAccountInstructionData;
|
|
5449
|
+
declare function encodeTransferInstructionData(
|
|
5450
|
+
data: CompressedTokenInstructionDataTransfer,
|
|
5451
|
+
): Buffer$1;
|
|
5452
|
+
declare function decodeTransferInstructionData(
|
|
5453
|
+
buffer: Buffer$1,
|
|
5454
|
+
): CompressedTokenInstructionDataTransfer;
|
|
4816
5455
|
interface BaseAccountsLayoutParams {
|
|
4817
5456
|
feePayer: PublicKey;
|
|
4818
5457
|
authority: PublicKey;
|
|
@@ -4854,20 +5493,44 @@ type freezeAccountsLayoutParams = BaseAccountsLayoutParams & {
|
|
|
4854
5493
|
mint: PublicKey;
|
|
4855
5494
|
};
|
|
4856
5495
|
type thawAccountsLayoutParams = freezeAccountsLayoutParams;
|
|
4857
|
-
declare const createTokenPoolAccountsLayout: (
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
declare const
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
declare const
|
|
4864
|
-
|
|
5496
|
+
declare const createTokenPoolAccountsLayout: (
|
|
5497
|
+
accounts: createTokenPoolAccountsLayoutParams,
|
|
5498
|
+
) => AccountMeta[];
|
|
5499
|
+
declare const addTokenPoolAccountsLayout: (
|
|
5500
|
+
accounts: addTokenPoolAccountsLayoutParams,
|
|
5501
|
+
) => AccountMeta[];
|
|
5502
|
+
declare const mintToAccountsLayout: (
|
|
5503
|
+
accounts: mintToAccountsLayoutParams,
|
|
5504
|
+
) => AccountMeta[];
|
|
5505
|
+
declare const transferAccountsLayout: (
|
|
5506
|
+
accounts: transferAccountsLayoutParams,
|
|
5507
|
+
) => AccountMeta[];
|
|
5508
|
+
declare const approveAccountsLayout: (
|
|
5509
|
+
accounts: approveAccountsLayoutParams,
|
|
5510
|
+
) => AccountMeta[];
|
|
5511
|
+
declare const revokeAccountsLayout: (
|
|
5512
|
+
accounts: approveAccountsLayoutParams,
|
|
5513
|
+
) => AccountMeta[];
|
|
5514
|
+
declare const freezeAccountsLayout: (
|
|
5515
|
+
accounts: freezeAccountsLayoutParams,
|
|
5516
|
+
) => AccountMeta[];
|
|
5517
|
+
declare const thawAccountsLayout: (
|
|
5518
|
+
accounts: freezeAccountsLayoutParams,
|
|
5519
|
+
) => AccountMeta[];
|
|
4865
5520
|
declare const CompressedTokenInstructionDataApproveLayout: Layout<unknown>;
|
|
4866
5521
|
declare const CompressedTokenInstructionDataRevokeLayout: Layout<unknown>;
|
|
4867
|
-
declare function encodeApproveInstructionData(
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
declare function
|
|
5522
|
+
declare function encodeApproveInstructionData(
|
|
5523
|
+
data: CompressedTokenInstructionDataApprove,
|
|
5524
|
+
): Buffer$1;
|
|
5525
|
+
declare function decodeApproveInstructionData(
|
|
5526
|
+
buffer: Buffer$1,
|
|
5527
|
+
): CompressedTokenInstructionDataApprove;
|
|
5528
|
+
declare function encodeRevokeInstructionData(
|
|
5529
|
+
data: CompressedTokenInstructionDataRevoke,
|
|
5530
|
+
): Buffer$1;
|
|
5531
|
+
declare function decodeRevokeInstructionData(
|
|
5532
|
+
buffer: Buffer$1,
|
|
5533
|
+
): CompressedTokenInstructionDataRevoke;
|
|
4871
5534
|
|
|
4872
5535
|
type CompressParams = {
|
|
4873
5536
|
/**
|
|
@@ -4961,7 +5624,11 @@ type DecompressParams = {
|
|
|
4961
5624
|
/**
|
|
4962
5625
|
* Token pool(s)
|
|
4963
5626
|
*/
|
|
4964
|
-
tokenPoolInfos:
|
|
5627
|
+
tokenPoolInfos:
|
|
5628
|
+
| TokenPoolInfo
|
|
5629
|
+
| TokenPoolInfo[]
|
|
5630
|
+
| SplInterfaceInfo
|
|
5631
|
+
| SplInterfaceInfo[];
|
|
4965
5632
|
};
|
|
4966
5633
|
type TransferParams = {
|
|
4967
5634
|
/**
|
|
@@ -5246,12 +5913,17 @@ declare const validateSameTokenOwner: (accounts: ParsedTokenAccount[]) => void;
|
|
|
5246
5913
|
/**
|
|
5247
5914
|
* Parse compressed token accounts to get the mint, current owner and delegate.
|
|
5248
5915
|
*/
|
|
5249
|
-
declare const parseTokenData: (
|
|
5916
|
+
declare const parseTokenData: (
|
|
5917
|
+
compressedTokenAccounts: ParsedTokenAccount[],
|
|
5918
|
+
) => {
|
|
5250
5919
|
mint: PublicKey;
|
|
5251
5920
|
currentOwner: PublicKey;
|
|
5252
5921
|
delegate: PublicKey | null;
|
|
5253
5922
|
};
|
|
5254
|
-
declare const parseMaybeDelegatedTransfer: (
|
|
5923
|
+
declare const parseMaybeDelegatedTransfer: (
|
|
5924
|
+
inputs: ParsedTokenAccount[],
|
|
5925
|
+
outputs: TokenTransferOutputData[],
|
|
5926
|
+
) => {
|
|
5255
5927
|
delegatedTransfer: DelegatedTransfer | null;
|
|
5256
5928
|
authority: PublicKey;
|
|
5257
5929
|
};
|
|
@@ -5263,7 +5935,11 @@ declare const parseMaybeDelegatedTransfer: (inputs: ParsedTokenAccount[], output
|
|
|
5263
5935
|
* @returns Output token data for the transfer
|
|
5264
5936
|
* instruction
|
|
5265
5937
|
*/
|
|
5266
|
-
declare function createTransferOutputState(
|
|
5938
|
+
declare function createTransferOutputState(
|
|
5939
|
+
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
5940
|
+
toAddress: PublicKey,
|
|
5941
|
+
amount: number | BN,
|
|
5942
|
+
): TokenTransferOutputData[];
|
|
5267
5943
|
/**
|
|
5268
5944
|
* Create the output state for a compress transaction.
|
|
5269
5945
|
* @param inputCompressedTokenAccounts Input state
|
|
@@ -5271,7 +5947,10 @@ declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedT
|
|
|
5271
5947
|
* @returns Output token data for the compress
|
|
5272
5948
|
* instruction
|
|
5273
5949
|
*/
|
|
5274
|
-
declare function createDecompressOutputState(
|
|
5950
|
+
declare function createDecompressOutputState(
|
|
5951
|
+
inputCompressedTokenAccounts: ParsedTokenAccount[],
|
|
5952
|
+
amount: number | BN,
|
|
5953
|
+
): TokenTransferOutputData[];
|
|
5275
5954
|
declare class CompressedTokenProgram {
|
|
5276
5955
|
/**
|
|
5277
5956
|
* @internal
|
|
@@ -5309,11 +5988,17 @@ declare class CompressedTokenProgram {
|
|
|
5309
5988
|
*
|
|
5310
5989
|
* @returns The index and bump number.
|
|
5311
5990
|
*/
|
|
5312
|
-
static findSplInterfaceIndexAndBump(
|
|
5991
|
+
static findSplInterfaceIndexAndBump(
|
|
5992
|
+
poolPda: PublicKey,
|
|
5993
|
+
mint: PublicKey,
|
|
5994
|
+
): [number, number];
|
|
5313
5995
|
/**
|
|
5314
5996
|
* @deprecated Use {@link findSplInterfaceIndexAndBump} instead.
|
|
5315
5997
|
*/
|
|
5316
|
-
static findTokenPoolIndexAndBump(
|
|
5998
|
+
static findTokenPoolIndexAndBump(
|
|
5999
|
+
poolPda: PublicKey,
|
|
6000
|
+
mint: PublicKey,
|
|
6001
|
+
): [number, number];
|
|
5317
6002
|
/**
|
|
5318
6003
|
* Derive the SPL interface PDA with index.
|
|
5319
6004
|
*
|
|
@@ -5323,11 +6008,17 @@ declare class CompressedTokenProgram {
|
|
|
5323
6008
|
*
|
|
5324
6009
|
* @returns The SPL interface PDA and bump.
|
|
5325
6010
|
*/
|
|
5326
|
-
static deriveSplInterfacePdaWithIndex(
|
|
6011
|
+
static deriveSplInterfacePdaWithIndex(
|
|
6012
|
+
mint: PublicKey,
|
|
6013
|
+
index: number,
|
|
6014
|
+
): [PublicKey, number];
|
|
5327
6015
|
/**
|
|
5328
6016
|
* @deprecated Use {@link deriveSplInterfacePdaWithIndex} instead.
|
|
5329
6017
|
*/
|
|
5330
|
-
static deriveTokenPoolPdaWithIndex(
|
|
6018
|
+
static deriveTokenPoolPdaWithIndex(
|
|
6019
|
+
mint: PublicKey,
|
|
6020
|
+
index: number,
|
|
6021
|
+
): [PublicKey, number];
|
|
5331
6022
|
/** @internal */
|
|
5332
6023
|
static get deriveCpiAuthorityPda(): PublicKey;
|
|
5333
6024
|
/**
|
|
@@ -5348,7 +6039,16 @@ declare class CompressedTokenProgram {
|
|
|
5348
6039
|
* Note that `createSplInterfaceInstruction` must be executed after
|
|
5349
6040
|
* `initializeMintInstruction`.
|
|
5350
6041
|
*/
|
|
5351
|
-
static createMint({
|
|
6042
|
+
static createMint({
|
|
6043
|
+
feePayer,
|
|
6044
|
+
mint,
|
|
6045
|
+
authority,
|
|
6046
|
+
freezeAuthority,
|
|
6047
|
+
decimals,
|
|
6048
|
+
rentExemptBalance,
|
|
6049
|
+
tokenProgramId,
|
|
6050
|
+
mintSize,
|
|
6051
|
+
}: CreateMintParams): Promise<TransactionInstruction[]>;
|
|
5352
6052
|
/**
|
|
5353
6053
|
* Create SPL interface (omnibus account) for an existing SPL mint.
|
|
5354
6054
|
* For new mints, use `CompressedTokenProgram.createMint`.
|
|
@@ -5360,11 +6060,17 @@ declare class CompressedTokenProgram {
|
|
|
5360
6060
|
*
|
|
5361
6061
|
* @returns The createSplInterface instruction
|
|
5362
6062
|
*/
|
|
5363
|
-
static createSplInterface({
|
|
6063
|
+
static createSplInterface({
|
|
6064
|
+
feePayer,
|
|
6065
|
+
mint,
|
|
6066
|
+
tokenProgramId,
|
|
6067
|
+
}: CreateSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5364
6068
|
/**
|
|
5365
6069
|
* @deprecated Use {@link createSplInterface} instead.
|
|
5366
6070
|
*/
|
|
5367
|
-
static createTokenPool(
|
|
6071
|
+
static createTokenPool(
|
|
6072
|
+
params: CreateSplInterfaceParams,
|
|
6073
|
+
): Promise<TransactionInstruction>;
|
|
5368
6074
|
/**
|
|
5369
6075
|
* Add a token pool to an existing SPL mint. For new mints, use
|
|
5370
6076
|
* {@link createSplInterface}.
|
|
@@ -5377,7 +6083,12 @@ declare class CompressedTokenProgram {
|
|
|
5377
6083
|
*
|
|
5378
6084
|
* @returns The addTokenPool instruction
|
|
5379
6085
|
*/
|
|
5380
|
-
static addTokenPool({
|
|
6086
|
+
static addTokenPool({
|
|
6087
|
+
feePayer,
|
|
6088
|
+
mint,
|
|
6089
|
+
poolIndex,
|
|
6090
|
+
tokenProgramId,
|
|
6091
|
+
}: AddSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5381
6092
|
/**
|
|
5382
6093
|
* Construct mintTo instruction for compressed tokens
|
|
5383
6094
|
*
|
|
@@ -5391,7 +6102,15 @@ declare class CompressedTokenProgram {
|
|
|
5391
6102
|
*
|
|
5392
6103
|
* @returns The mintTo instruction
|
|
5393
6104
|
*/
|
|
5394
|
-
static mintTo({
|
|
6105
|
+
static mintTo({
|
|
6106
|
+
feePayer,
|
|
6107
|
+
mint,
|
|
6108
|
+
authority,
|
|
6109
|
+
toPubkey,
|
|
6110
|
+
amount,
|
|
6111
|
+
outputStateTreeInfo,
|
|
6112
|
+
tokenPoolInfo,
|
|
6113
|
+
}: MintToParams): Promise<TransactionInstruction>;
|
|
5395
6114
|
/**
|
|
5396
6115
|
* Mint tokens from registered SPL mint account to a compressed account
|
|
5397
6116
|
*
|
|
@@ -5407,7 +6126,16 @@ declare class CompressedTokenProgram {
|
|
|
5407
6126
|
*
|
|
5408
6127
|
* @returns The mintTo instruction
|
|
5409
6128
|
*/
|
|
5410
|
-
static approveAndMintTo({
|
|
6129
|
+
static approveAndMintTo({
|
|
6130
|
+
feePayer,
|
|
6131
|
+
mint,
|
|
6132
|
+
authority,
|
|
6133
|
+
authorityTokenAccount,
|
|
6134
|
+
toPubkey,
|
|
6135
|
+
amount,
|
|
6136
|
+
outputStateTreeInfo,
|
|
6137
|
+
tokenPoolInfo,
|
|
6138
|
+
}: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
|
|
5411
6139
|
/**
|
|
5412
6140
|
* Construct transfer instruction for compressed tokens.
|
|
5413
6141
|
*
|
|
@@ -5422,7 +6150,14 @@ declare class CompressedTokenProgram {
|
|
|
5422
6150
|
*
|
|
5423
6151
|
* @returns The transfer instruction
|
|
5424
6152
|
*/
|
|
5425
|
-
static transfer({
|
|
6153
|
+
static transfer({
|
|
6154
|
+
payer,
|
|
6155
|
+
inputCompressedTokenAccounts,
|
|
6156
|
+
toAddress,
|
|
6157
|
+
amount,
|
|
6158
|
+
recentValidityProof,
|
|
6159
|
+
recentInputStateRootIndices,
|
|
6160
|
+
}: TransferParams): Promise<TransactionInstruction>;
|
|
5426
6161
|
/**
|
|
5427
6162
|
* Create lookup table instructions for the token program's default
|
|
5428
6163
|
* accounts.
|
|
@@ -5435,7 +6170,13 @@ declare class CompressedTokenProgram {
|
|
|
5435
6170
|
*
|
|
5436
6171
|
* @returns [createInstruction, extendInstruction, option(extendInstruction2)]
|
|
5437
6172
|
*/
|
|
5438
|
-
static createTokenProgramLookupTable({
|
|
6173
|
+
static createTokenProgramLookupTable({
|
|
6174
|
+
payer,
|
|
6175
|
+
authority,
|
|
6176
|
+
mints,
|
|
6177
|
+
recentSlot,
|
|
6178
|
+
remainingAccounts,
|
|
6179
|
+
}: CreateTokenProgramLookupTableParams): Promise<{
|
|
5439
6180
|
instructions: TransactionInstruction[];
|
|
5440
6181
|
address: PublicKey;
|
|
5441
6182
|
}>;
|
|
@@ -5453,7 +6194,16 @@ declare class CompressedTokenProgram {
|
|
|
5453
6194
|
*
|
|
5454
6195
|
* @returns The compress instruction
|
|
5455
6196
|
*/
|
|
5456
|
-
static compress({
|
|
6197
|
+
static compress({
|
|
6198
|
+
payer,
|
|
6199
|
+
owner,
|
|
6200
|
+
source,
|
|
6201
|
+
toAddress,
|
|
6202
|
+
amount,
|
|
6203
|
+
mint,
|
|
6204
|
+
outputStateTreeInfo,
|
|
6205
|
+
tokenPoolInfo,
|
|
6206
|
+
}: CompressParams): Promise<TransactionInstruction>;
|
|
5457
6207
|
/**
|
|
5458
6208
|
* Construct decompress instruction
|
|
5459
6209
|
*
|
|
@@ -5468,7 +6218,15 @@ declare class CompressedTokenProgram {
|
|
|
5468
6218
|
*
|
|
5469
6219
|
* @returns The decompress instruction
|
|
5470
6220
|
*/
|
|
5471
|
-
static decompress({
|
|
6221
|
+
static decompress({
|
|
6222
|
+
payer,
|
|
6223
|
+
inputCompressedTokenAccounts,
|
|
6224
|
+
toAddress,
|
|
6225
|
+
amount,
|
|
6226
|
+
recentValidityProof,
|
|
6227
|
+
recentInputStateRootIndices,
|
|
6228
|
+
tokenPoolInfos,
|
|
6229
|
+
}: DecompressParams): Promise<TransactionInstruction>;
|
|
5472
6230
|
/**
|
|
5473
6231
|
* Create `mergeTokenAccounts` instruction.
|
|
5474
6232
|
*
|
|
@@ -5481,7 +6239,14 @@ declare class CompressedTokenProgram {
|
|
|
5481
6239
|
* @param recentInputStateRootIndices Recent state root indices.
|
|
5482
6240
|
* @returns instruction
|
|
5483
6241
|
*/
|
|
5484
|
-
static mergeTokenAccounts({
|
|
6242
|
+
static mergeTokenAccounts({
|
|
6243
|
+
payer,
|
|
6244
|
+
owner,
|
|
6245
|
+
inputCompressedTokenAccounts,
|
|
6246
|
+
mint,
|
|
6247
|
+
recentValidityProof,
|
|
6248
|
+
recentInputStateRootIndices,
|
|
6249
|
+
}: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
|
|
5485
6250
|
/**
|
|
5486
6251
|
* Create `compressSplTokenAccount` instruction
|
|
5487
6252
|
*
|
|
@@ -5495,7 +6260,15 @@ declare class CompressedTokenProgram {
|
|
|
5495
6260
|
*
|
|
5496
6261
|
* @returns instruction
|
|
5497
6262
|
*/
|
|
5498
|
-
static compressSplTokenAccount({
|
|
6263
|
+
static compressSplTokenAccount({
|
|
6264
|
+
feePayer,
|
|
6265
|
+
authority,
|
|
6266
|
+
tokenAccount,
|
|
6267
|
+
mint,
|
|
6268
|
+
remainingAmount,
|
|
6269
|
+
outputStateTreeInfo,
|
|
6270
|
+
tokenPoolInfo,
|
|
6271
|
+
}: CompressSplTokenAccountParams): Promise<TransactionInstruction>;
|
|
5499
6272
|
/**
|
|
5500
6273
|
* Get the program ID for a mint
|
|
5501
6274
|
*
|
|
@@ -5504,7 +6277,10 @@ declare class CompressedTokenProgram {
|
|
|
5504
6277
|
*
|
|
5505
6278
|
* @returns program ID
|
|
5506
6279
|
*/
|
|
5507
|
-
static getMintProgramId(
|
|
6280
|
+
static getMintProgramId(
|
|
6281
|
+
mint: PublicKey,
|
|
6282
|
+
connection: Connection,
|
|
6283
|
+
): Promise<PublicKey | undefined>;
|
|
5508
6284
|
/**
|
|
5509
6285
|
* Create `approve` instruction to delegate compressed tokens.
|
|
5510
6286
|
*
|
|
@@ -5517,7 +6293,14 @@ declare class CompressedTokenProgram {
|
|
|
5517
6293
|
*
|
|
5518
6294
|
* @returns instruction
|
|
5519
6295
|
*/
|
|
5520
|
-
static approve({
|
|
6296
|
+
static approve({
|
|
6297
|
+
payer,
|
|
6298
|
+
inputCompressedTokenAccounts,
|
|
6299
|
+
toAddress,
|
|
6300
|
+
amount,
|
|
6301
|
+
recentValidityProof,
|
|
6302
|
+
recentInputStateRootIndices,
|
|
6303
|
+
}: ApproveParams): Promise<TransactionInstruction>;
|
|
5521
6304
|
/**
|
|
5522
6305
|
* Create `revoke` instruction to revoke delegation of compressed tokens.
|
|
5523
6306
|
*
|
|
@@ -5528,7 +6311,12 @@ declare class CompressedTokenProgram {
|
|
|
5528
6311
|
*
|
|
5529
6312
|
* @returns instruction
|
|
5530
6313
|
*/
|
|
5531
|
-
static revoke({
|
|
6314
|
+
static revoke({
|
|
6315
|
+
payer,
|
|
6316
|
+
inputCompressedTokenAccounts,
|
|
6317
|
+
recentValidityProof,
|
|
6318
|
+
recentInputStateRootIndices,
|
|
6319
|
+
}: RevokeParams): Promise<TransactionInstruction>;
|
|
5532
6320
|
}
|
|
5533
6321
|
|
|
5534
6322
|
/**
|
|
@@ -5549,7 +6337,14 @@ declare class CompressedTokenProgram {
|
|
|
5549
6337
|
* @param programId Optional program ID (omit for unified behavior)
|
|
5550
6338
|
* @returns AccountInterface with aggregated balance from all sources
|
|
5551
6339
|
*/
|
|
5552
|
-
declare function getAtaInterface(
|
|
6340
|
+
declare function getAtaInterface(
|
|
6341
|
+
rpc: Rpc,
|
|
6342
|
+
ata: PublicKey,
|
|
6343
|
+
owner: PublicKey,
|
|
6344
|
+
mint: PublicKey,
|
|
6345
|
+
commitment?: Commitment,
|
|
6346
|
+
programId?: PublicKey,
|
|
6347
|
+
): Promise<AccountInterface>;
|
|
5553
6348
|
/**
|
|
5554
6349
|
* Derive the canonical token ATA for SPL/T22/c-token in the unified path.
|
|
5555
6350
|
*
|
|
@@ -5563,7 +6358,13 @@ declare function getAtaInterface(rpc: Rpc, ata: PublicKey, owner: PublicKey, min
|
|
|
5563
6358
|
* auto-detected.
|
|
5564
6359
|
* @returns Associated token address.
|
|
5565
6360
|
*/
|
|
5566
|
-
declare function getAssociatedTokenAddressInterface(
|
|
6361
|
+
declare function getAssociatedTokenAddressInterface(
|
|
6362
|
+
mint: PublicKey,
|
|
6363
|
+
owner: PublicKey,
|
|
6364
|
+
allowOwnerOffCurve?: boolean,
|
|
6365
|
+
programId?: PublicKey,
|
|
6366
|
+
associatedTokenProgramId?: PublicKey,
|
|
6367
|
+
): PublicKey;
|
|
5567
6368
|
/**
|
|
5568
6369
|
* Create instruction batches for loading ALL token balances into a c-token ATA.
|
|
5569
6370
|
*
|
|
@@ -5575,7 +6376,14 @@ declare function getAssociatedTokenAddressInterface(mint: PublicKey, owner: Publ
|
|
|
5575
6376
|
* @param options Optional interface options
|
|
5576
6377
|
* @returns Instruction batches - each inner array is one transaction
|
|
5577
6378
|
*/
|
|
5578
|
-
declare function createLoadAtaInstructions(
|
|
6379
|
+
declare function createLoadAtaInstructions(
|
|
6380
|
+
rpc: Rpc,
|
|
6381
|
+
ata: PublicKey,
|
|
6382
|
+
owner: PublicKey,
|
|
6383
|
+
mint: PublicKey,
|
|
6384
|
+
payer?: PublicKey,
|
|
6385
|
+
options?: InterfaceOptions,
|
|
6386
|
+
): Promise<TransactionInstruction[][]>;
|
|
5579
6387
|
/**
|
|
5580
6388
|
* Load all token balances into the c-token ATA.
|
|
5581
6389
|
*
|
|
@@ -5592,7 +6400,15 @@ declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: Publ
|
|
|
5592
6400
|
* @param interfaceOptions Optional interface options
|
|
5593
6401
|
* @returns Transaction signature, or null if ATA exists and nothing to load
|
|
5594
6402
|
*/
|
|
5595
|
-
declare function loadAta(
|
|
6403
|
+
declare function loadAta(
|
|
6404
|
+
rpc: Rpc,
|
|
6405
|
+
ata: PublicKey,
|
|
6406
|
+
owner: Signer,
|
|
6407
|
+
mint: PublicKey,
|
|
6408
|
+
payer?: Signer,
|
|
6409
|
+
confirmOptions?: ConfirmOptions,
|
|
6410
|
+
interfaceOptions?: InterfaceOptions,
|
|
6411
|
+
): Promise<string | null>;
|
|
5596
6412
|
/**
|
|
5597
6413
|
* Transfer tokens using the unified ata interface.
|
|
5598
6414
|
*
|
|
@@ -5609,7 +6425,17 @@ declare function loadAta(rpc: Rpc, ata: PublicKey, owner: Signer, mint: PublicKe
|
|
|
5609
6425
|
* @param options Optional interface options
|
|
5610
6426
|
* @returns Transaction signature
|
|
5611
6427
|
*/
|
|
5612
|
-
declare function transferInterface(
|
|
6428
|
+
declare function transferInterface(
|
|
6429
|
+
rpc: Rpc,
|
|
6430
|
+
payer: Signer,
|
|
6431
|
+
source: PublicKey,
|
|
6432
|
+
mint: PublicKey,
|
|
6433
|
+
destination: PublicKey,
|
|
6434
|
+
owner: Signer,
|
|
6435
|
+
amount: number | bigint | BN,
|
|
6436
|
+
confirmOptions?: ConfirmOptions,
|
|
6437
|
+
options?: InterfaceOptions,
|
|
6438
|
+
): Promise<string>;
|
|
5613
6439
|
/**
|
|
5614
6440
|
* Get or create c-token ATA with unified balance detection and auto-loading.
|
|
5615
6441
|
*
|
|
@@ -5638,7 +6464,15 @@ declare function transferInterface(rpc: Rpc, payer: Signer, source: PublicKey, m
|
|
|
5638
6464
|
* @param confirmOptions Optional confirm options
|
|
5639
6465
|
* @returns AccountInterface with unified balance and source breakdown
|
|
5640
6466
|
*/
|
|
5641
|
-
declare function getOrCreateAtaInterface(
|
|
6467
|
+
declare function getOrCreateAtaInterface(
|
|
6468
|
+
rpc: Rpc,
|
|
6469
|
+
payer: Signer,
|
|
6470
|
+
mint: PublicKey,
|
|
6471
|
+
owner: PublicKey | Signer,
|
|
6472
|
+
allowOwnerOffCurve?: boolean,
|
|
6473
|
+
commitment?: Commitment,
|
|
6474
|
+
confirmOptions?: ConfirmOptions,
|
|
6475
|
+
): Promise<AccountInterface>;
|
|
5642
6476
|
/**
|
|
5643
6477
|
* Create transfer instructions for a unified token transfer.
|
|
5644
6478
|
*
|
|
@@ -5649,7 +6483,15 @@ declare function getOrCreateAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKe
|
|
|
5649
6483
|
*
|
|
5650
6484
|
* @see createTransferInterfaceInstructions in v3/actions/transfer-interface.ts
|
|
5651
6485
|
*/
|
|
5652
|
-
declare function createTransferInterfaceInstructions(
|
|
6486
|
+
declare function createTransferInterfaceInstructions(
|
|
6487
|
+
rpc: Rpc,
|
|
6488
|
+
payer: PublicKey,
|
|
6489
|
+
mint: PublicKey,
|
|
6490
|
+
amount: number | bigint | BN,
|
|
6491
|
+
sender: PublicKey,
|
|
6492
|
+
recipient: PublicKey,
|
|
6493
|
+
options?: Omit<TransferOptions, 'wrap'>,
|
|
6494
|
+
): Promise<TransactionInstruction[][]>;
|
|
5653
6495
|
/**
|
|
5654
6496
|
* Build instruction batches for unwrapping c-tokens to SPL/T22.
|
|
5655
6497
|
*
|
|
@@ -5669,7 +6511,16 @@ declare function createTransferInterfaceInstructions(rpc: Rpc, payer: PublicKey,
|
|
|
5669
6511
|
* @param interfaceOptions Optional: interface options for load
|
|
5670
6512
|
* @returns Instruction batches - each inner array is one transaction
|
|
5671
6513
|
*/
|
|
5672
|
-
declare function createUnwrapInstructions(
|
|
6514
|
+
declare function createUnwrapInstructions(
|
|
6515
|
+
rpc: Rpc,
|
|
6516
|
+
destination: PublicKey,
|
|
6517
|
+
owner: PublicKey,
|
|
6518
|
+
mint: PublicKey,
|
|
6519
|
+
amount?: number | bigint | BN,
|
|
6520
|
+
payer?: PublicKey,
|
|
6521
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
6522
|
+
interfaceOptions?: InterfaceOptions,
|
|
6523
|
+
): Promise<TransactionInstruction[][]>;
|
|
5673
6524
|
/**
|
|
5674
6525
|
* Unwrap c-tokens to SPL tokens.
|
|
5675
6526
|
*
|
|
@@ -5686,6 +6537,252 @@ declare function createUnwrapInstructions(rpc: Rpc, destination: PublicKey, owne
|
|
|
5686
6537
|
* @param confirmOptions Confirm options
|
|
5687
6538
|
* @returns Transaction signature of the unwrap transaction
|
|
5688
6539
|
*/
|
|
5689
|
-
declare function unwrap(
|
|
5690
|
-
|
|
5691
|
-
|
|
6540
|
+
declare function unwrap(
|
|
6541
|
+
rpc: Rpc,
|
|
6542
|
+
payer: Signer,
|
|
6543
|
+
destination: PublicKey,
|
|
6544
|
+
owner: Signer,
|
|
6545
|
+
mint: PublicKey,
|
|
6546
|
+
amount?: number | bigint | BN,
|
|
6547
|
+
splInterfaceInfo?: SplInterfaceInfo,
|
|
6548
|
+
confirmOptions?: ConfirmOptions,
|
|
6549
|
+
): Promise<string>;
|
|
6550
|
+
|
|
6551
|
+
export {
|
|
6552
|
+
ADD_TOKEN_POOL_DISCRIMINATOR,
|
|
6553
|
+
APPROVE_DISCRIMINATOR,
|
|
6554
|
+
type AccountInterface,
|
|
6555
|
+
Action,
|
|
6556
|
+
type AddSplInterfaceParams,
|
|
6557
|
+
type AddTokenPoolParams,
|
|
6558
|
+
type ApproveAndMintToParams,
|
|
6559
|
+
type ApproveParams,
|
|
6560
|
+
BASE_RENT_PER_EPOCH,
|
|
6561
|
+
BATCH_COMPRESS_DISCRIMINATOR,
|
|
6562
|
+
type BaseMint,
|
|
6563
|
+
type BatchCompressInstructionData,
|
|
6564
|
+
COMPRESSED_MINT_SEED,
|
|
6565
|
+
COMPRESSIBLE_CTOKEN_ACCOUNT_SIZE,
|
|
6566
|
+
COMPRESSIBLE_CTOKEN_RENT_PER_EPOCH,
|
|
6567
|
+
COMPRESSION_COST,
|
|
6568
|
+
COMPRESSION_INCENTIVE,
|
|
6569
|
+
COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR,
|
|
6570
|
+
CPI_AUTHORITY_SEED,
|
|
6571
|
+
CREATE_TOKEN_POOL_DISCRIMINATOR,
|
|
6572
|
+
type CTokenConfig,
|
|
6573
|
+
type CompressParams,
|
|
6574
|
+
type CompressSplTokenAccountInstructionData,
|
|
6575
|
+
type CompressSplTokenAccountParams,
|
|
6576
|
+
type CompressedMint,
|
|
6577
|
+
type CompressedTokenInstructionDataApprove,
|
|
6578
|
+
CompressedTokenInstructionDataApproveLayout,
|
|
6579
|
+
type CompressedTokenInstructionDataRevoke,
|
|
6580
|
+
CompressedTokenInstructionDataRevokeLayout,
|
|
6581
|
+
type CompressedTokenInstructionDataTransfer,
|
|
6582
|
+
CompressedTokenInstructionDataTransferLayout,
|
|
6583
|
+
CompressedTokenProgram,
|
|
6584
|
+
type CompressibleAccountInput,
|
|
6585
|
+
type CompressibleConfig,
|
|
6586
|
+
type CompressibleLoadParams,
|
|
6587
|
+
CpiContextLayout,
|
|
6588
|
+
type CreateAssociatedCTokenAccountParams,
|
|
6589
|
+
type CreateMintParams,
|
|
6590
|
+
type CreateSplInterfaceParams,
|
|
6591
|
+
type CreateTokenPoolParams,
|
|
6592
|
+
type CreateTokenProgramLookupTableParams,
|
|
6593
|
+
DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR,
|
|
6594
|
+
DEFAULT_COMPRESSIBLE_CONFIG,
|
|
6595
|
+
DEFAULT_PREPAY_EPOCHS,
|
|
6596
|
+
DEFAULT_WRITE_TOP_UP,
|
|
6597
|
+
type DecompressParams,
|
|
6598
|
+
type DelegatedTransfer,
|
|
6599
|
+
DelegatedTransferLayout,
|
|
6600
|
+
ERROR_MIXED_TREE_TYPES,
|
|
6601
|
+
ERROR_NO_ACCOUNTS_FOUND,
|
|
6602
|
+
ExtensionType,
|
|
6603
|
+
IDL,
|
|
6604
|
+
type InputTokenDataWithContext,
|
|
6605
|
+
type InterfaceOptions,
|
|
6606
|
+
LIGHT_TOKEN_CONFIG,
|
|
6607
|
+
LIGHT_TOKEN_RENT_SPONSOR,
|
|
6608
|
+
type LightCompressedToken,
|
|
6609
|
+
type LoadResult,
|
|
6610
|
+
MAX_TOP_UP,
|
|
6611
|
+
MINT_TO_DISCRIMINATOR,
|
|
6612
|
+
type MergeTokenAccountsParams,
|
|
6613
|
+
type MintContext,
|
|
6614
|
+
type MintExtension,
|
|
6615
|
+
type MintInterface,
|
|
6616
|
+
type MintToInstructionData,
|
|
6617
|
+
type MintToParams,
|
|
6618
|
+
type OffChainTokenMetadata,
|
|
6619
|
+
type OffChainTokenMetadataJson,
|
|
6620
|
+
POOL_SEED,
|
|
6621
|
+
type PackCompressedTokenAccountsParams,
|
|
6622
|
+
type PackedCompressedAccount,
|
|
6623
|
+
type PackedTokenTransferOutputData,
|
|
6624
|
+
type ParsedAccountInfoInterface,
|
|
6625
|
+
RENT_PER_BYTE_PER_EPOCH,
|
|
6626
|
+
REVOKE_DISCRIMINATOR,
|
|
6627
|
+
type RevokeParams,
|
|
6628
|
+
SLOTS_PER_RENT_EPOCH,
|
|
6629
|
+
SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE,
|
|
6630
|
+
type SelectInputAccountsOptions,
|
|
6631
|
+
type SelectedAccountsResult,
|
|
6632
|
+
type SplInterfaceActivity,
|
|
6633
|
+
type SplInterfaceInfo,
|
|
6634
|
+
TOTAL_COMPRESSION_COST,
|
|
6635
|
+
TRANSFER_DISCRIMINATOR,
|
|
6636
|
+
type TokenAccountSource,
|
|
6637
|
+
type TokenData,
|
|
6638
|
+
TokenDataVersion,
|
|
6639
|
+
type TokenMetadata,
|
|
6640
|
+
type TokenMetadataInstructionData,
|
|
6641
|
+
type TokenPoolActivity,
|
|
6642
|
+
type TokenPoolInfo,
|
|
6643
|
+
type TokenTransferOutputData,
|
|
6644
|
+
type TransferOptions,
|
|
6645
|
+
type TransferParams,
|
|
6646
|
+
addSplInterfaces,
|
|
6647
|
+
addTokenPoolAccountsLayout,
|
|
6648
|
+
type addTokenPoolAccountsLayoutParams,
|
|
6649
|
+
addTokenPools,
|
|
6650
|
+
approve,
|
|
6651
|
+
approveAccountsLayout,
|
|
6652
|
+
type approveAccountsLayoutParams,
|
|
6653
|
+
approveAndMintTo,
|
|
6654
|
+
batchCompressLayout,
|
|
6655
|
+
calculateCompressibleLoadComputeUnits,
|
|
6656
|
+
calculateFeePayerCostAtCreation,
|
|
6657
|
+
checkMint,
|
|
6658
|
+
checkSplInterfaceInfo,
|
|
6659
|
+
checkTokenPoolInfo,
|
|
6660
|
+
compress,
|
|
6661
|
+
compressSplTokenAccount,
|
|
6662
|
+
compressSplTokenAccountInstructionDataLayout,
|
|
6663
|
+
convertTokenDataToAccount,
|
|
6664
|
+
createAssociatedCTokenAccountIdempotentInstruction,
|
|
6665
|
+
createAssociatedCTokenAccountInstruction,
|
|
6666
|
+
createAssociatedTokenAccountInterfaceIdempotentInstruction,
|
|
6667
|
+
createAssociatedTokenAccountInterfaceInstruction,
|
|
6668
|
+
createAtaInterface,
|
|
6669
|
+
createAtaInterfaceIdempotent,
|
|
6670
|
+
createAtaInterfaceIdempotentInstruction,
|
|
6671
|
+
createDecompressInterfaceInstruction,
|
|
6672
|
+
createDecompressOutputState,
|
|
6673
|
+
createLightTokenTransferInstruction,
|
|
6674
|
+
createLoadAccountsParams,
|
|
6675
|
+
createLoadAtaInstructions,
|
|
6676
|
+
createLoadAtaInstructionsFromInterface,
|
|
6677
|
+
createMint,
|
|
6678
|
+
createMintInstruction,
|
|
6679
|
+
createMintInterface,
|
|
6680
|
+
createMintToCompressedInstruction,
|
|
6681
|
+
createMintToInstruction,
|
|
6682
|
+
createMintToInterfaceInstruction,
|
|
6683
|
+
createRemoveMetadataKeyInstruction,
|
|
6684
|
+
createSplInterface,
|
|
6685
|
+
createTokenMetadata,
|
|
6686
|
+
createTokenPool,
|
|
6687
|
+
createTokenPoolAccountsLayout,
|
|
6688
|
+
type createTokenPoolAccountsLayoutParams,
|
|
6689
|
+
createTokenProgramLookupTable,
|
|
6690
|
+
createTransferInterfaceInstructions,
|
|
6691
|
+
createTransferOutputState,
|
|
6692
|
+
createUnwrapInstruction,
|
|
6693
|
+
createUnwrapInstructions,
|
|
6694
|
+
createUpdateFreezeAuthorityInstruction,
|
|
6695
|
+
createUpdateMetadataAuthorityInstruction,
|
|
6696
|
+
createUpdateMetadataFieldInstruction,
|
|
6697
|
+
createUpdateMintAuthorityInstruction,
|
|
6698
|
+
createWrapInstruction,
|
|
6699
|
+
decodeApproveInstructionData,
|
|
6700
|
+
decodeBatchCompressInstructionData,
|
|
6701
|
+
decodeCompressSplTokenAccountInstructionData,
|
|
6702
|
+
decodeMintToInstructionData,
|
|
6703
|
+
decodeRevokeInstructionData,
|
|
6704
|
+
decodeTokenMetadata,
|
|
6705
|
+
decodeTransferInstructionData,
|
|
6706
|
+
decompress,
|
|
6707
|
+
decompressDelegated,
|
|
6708
|
+
decompressInterface,
|
|
6709
|
+
deriveCMintAddress,
|
|
6710
|
+
deriveSplInterfaceInfo,
|
|
6711
|
+
deriveTokenPoolInfo,
|
|
6712
|
+
deserializeMint,
|
|
6713
|
+
encodeApproveInstructionData,
|
|
6714
|
+
encodeBatchCompressInstructionData,
|
|
6715
|
+
encodeCompressSplTokenAccountInstructionData,
|
|
6716
|
+
encodeMintToInstructionData,
|
|
6717
|
+
encodeRevokeInstructionData,
|
|
6718
|
+
encodeTokenMetadata,
|
|
6719
|
+
encodeTransferInstructionData,
|
|
6720
|
+
extractTokenMetadata,
|
|
6721
|
+
findMintAddress,
|
|
6722
|
+
freezeAccountsLayout,
|
|
6723
|
+
type freezeAccountsLayoutParams,
|
|
6724
|
+
getAccountInterface,
|
|
6725
|
+
getAssociatedCTokenAddress,
|
|
6726
|
+
getAssociatedCTokenAddressAndBump,
|
|
6727
|
+
getAssociatedTokenAddressInterface,
|
|
6728
|
+
getAtaInterface,
|
|
6729
|
+
getMintInterface,
|
|
6730
|
+
getOrCreateAtaInterface,
|
|
6731
|
+
getSplInterfaceInfos,
|
|
6732
|
+
getTokenPoolInfos,
|
|
6733
|
+
groupAccountsByTreeType,
|
|
6734
|
+
isSingleSplInterfaceInfo,
|
|
6735
|
+
isSingleTokenPoolInfo,
|
|
6736
|
+
loadAta,
|
|
6737
|
+
mergeTokenAccounts,
|
|
6738
|
+
mintTo,
|
|
6739
|
+
mintToAccountsLayout,
|
|
6740
|
+
type mintToAccountsLayoutParams,
|
|
6741
|
+
mintTo$1 as mintToCToken,
|
|
6742
|
+
mintToCompressed,
|
|
6743
|
+
mintToInterface,
|
|
6744
|
+
mintToLayout,
|
|
6745
|
+
packCompressedTokenAccounts,
|
|
6746
|
+
parseCTokenCold,
|
|
6747
|
+
parseCTokenHot,
|
|
6748
|
+
parseMaybeDelegatedTransfer,
|
|
6749
|
+
parseTokenData,
|
|
6750
|
+
removeMetadataKey,
|
|
6751
|
+
rentPerEpoch,
|
|
6752
|
+
revoke,
|
|
6753
|
+
revokeAccountsLayout,
|
|
6754
|
+
type revokeAccountsLayoutParams,
|
|
6755
|
+
selectAccountsByPreferredTreeType,
|
|
6756
|
+
selectMinCompressedTokenAccountsForDecompression,
|
|
6757
|
+
selectMinCompressedTokenAccountsForTransfer,
|
|
6758
|
+
selectMinCompressedTokenAccountsForTransferOrPartial,
|
|
6759
|
+
selectSmartCompressedTokenAccountsForTransfer,
|
|
6760
|
+
selectSmartCompressedTokenAccountsForTransferOrPartial,
|
|
6761
|
+
selectSplInterfaceInfo,
|
|
6762
|
+
selectSplInterfaceInfosForDecompression,
|
|
6763
|
+
selectTokenAccountsForApprove,
|
|
6764
|
+
selectTokenPoolInfo,
|
|
6765
|
+
selectTokenPoolInfosForDecompression,
|
|
6766
|
+
serializeMint,
|
|
6767
|
+
sliceLast,
|
|
6768
|
+
sumUpTokenAmount,
|
|
6769
|
+
thawAccountsLayout,
|
|
6770
|
+
type thawAccountsLayoutParams,
|
|
6771
|
+
toAccountInfo,
|
|
6772
|
+
toOffChainMetadataJson,
|
|
6773
|
+
toTokenPoolInfo,
|
|
6774
|
+
transfer,
|
|
6775
|
+
transferAccountsLayout,
|
|
6776
|
+
type transferAccountsLayoutParams,
|
|
6777
|
+
transferDelegated,
|
|
6778
|
+
transferInterface,
|
|
6779
|
+
unpackMintData,
|
|
6780
|
+
unpackMintInterface,
|
|
6781
|
+
unwrap,
|
|
6782
|
+
updateFreezeAuthority,
|
|
6783
|
+
updateMetadataAuthority,
|
|
6784
|
+
updateMetadataField,
|
|
6785
|
+
updateMintAuthority,
|
|
6786
|
+
validateSameTokenOwner,
|
|
6787
|
+
wrap,
|
|
6788
|
+
};
|