@lightprotocol/stateless.js 0.23.0-beta.4 → 0.23.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/browser/actions/compress.d.ts +2 -14
- package/dist/cjs/browser/actions/create-account.d.ts +3 -25
- package/dist/cjs/browser/actions/decompress.d.ts +2 -13
- package/dist/cjs/browser/actions/transfer.d.ts +2 -14
- package/dist/cjs/browser/constants.d.ts +35 -67
- package/dist/cjs/browser/errors.d.ts +49 -40
- package/dist/cjs/browser/index.cjs +1 -11151
- package/dist/cjs/browser/programs/system/idl.d.ts +44 -44
- package/dist/cjs/browser/programs/system/layout.d.ts +26 -50
- package/dist/cjs/browser/programs/system/pack.d.ts +7 -36
- package/dist/cjs/browser/programs/system/program.d.ts +9 -56
- package/dist/cjs/browser/programs/system/select-compressed-accounts.d.ts +1 -4
- package/dist/cjs/browser/rpc-interface.d.ts +2246 -2938
- package/dist/cjs/browser/rpc.d.ts +39 -198
- package/dist/cjs/browser/state/BN254.d.ts +1 -4
- package/dist/cjs/browser/state/bn.d.ts +1 -5
- package/dist/cjs/browser/state/compressed-account.d.ts +14 -42
- package/dist/cjs/browser/state/types.d.ts +2 -5
- package/dist/cjs/browser/test-helpers/merkle-tree/indexed-array.d.ts +4 -18
- package/dist/cjs/browser/test-helpers/merkle-tree/merkle-tree.d.ts +6 -19
- package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +3 -12
- package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +5 -22
- package/dist/cjs/browser/test-helpers/test-rpc/get-parsed-events.d.ts +4 -14
- package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +35 -155
- package/dist/cjs/browser/test-helpers/test-utils.d.ts +1 -5
- package/dist/cjs/browser/utils/address.d.ts +6 -26
- package/dist/cjs/browser/utils/airdrop.d.ts +2 -14
- package/dist/cjs/browser/utils/calculate-compute-unit-price.d.ts +1 -4
- package/dist/cjs/browser/utils/conversion.d.ts +4 -12
- package/dist/cjs/browser/utils/dedupe-signer.d.ts +1 -4
- package/dist/cjs/browser/utils/get-state-tree-infos.d.ts +5 -20
- package/dist/cjs/browser/utils/instruction.d.ts +7 -24
- package/dist/cjs/browser/utils/pack-decompress.d.ts +4 -9
- package/dist/cjs/browser/utils/pipe.d.ts +1 -4
- package/dist/cjs/browser/utils/send-and-confirm.d.ts +11 -42
- package/dist/cjs/browser/utils/state-tree-lookup-table.d.ts +3 -23
- package/dist/cjs/browser/utils/validation.d.ts +6 -24
- package/dist/cjs/node/actions/compress.d.ts +2 -14
- package/dist/cjs/node/actions/create-account.d.ts +3 -25
- package/dist/cjs/node/actions/decompress.d.ts +2 -13
- package/dist/cjs/node/actions/transfer.d.ts +2 -14
- package/dist/cjs/node/constants.d.ts +35 -67
- package/dist/cjs/node/errors.d.ts +49 -40
- package/dist/cjs/node/index.cjs +1 -9853
- package/dist/cjs/node/programs/system/idl.d.ts +44 -44
- package/dist/cjs/node/programs/system/layout.d.ts +26 -50
- package/dist/cjs/node/programs/system/pack.d.ts +7 -36
- package/dist/cjs/node/programs/system/program.d.ts +9 -56
- package/dist/cjs/node/programs/system/select-compressed-accounts.d.ts +1 -4
- package/dist/cjs/node/rpc-interface.d.ts +2246 -2938
- package/dist/cjs/node/rpc.d.ts +39 -198
- package/dist/cjs/node/state/BN254.d.ts +1 -4
- package/dist/cjs/node/state/bn.d.ts +1 -5
- package/dist/cjs/node/state/compressed-account.d.ts +14 -42
- package/dist/cjs/node/state/types.d.ts +2 -5
- package/dist/cjs/node/test-helpers/merkle-tree/indexed-array.d.ts +4 -18
- package/dist/cjs/node/test-helpers/merkle-tree/merkle-tree.d.ts +6 -19
- package/dist/cjs/node/test-helpers/test-rpc/get-compressed-accounts.d.ts +3 -12
- package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +5 -22
- package/dist/cjs/node/test-helpers/test-rpc/get-parsed-events.d.ts +4 -14
- package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +35 -155
- package/dist/cjs/node/test-helpers/test-utils.d.ts +1 -5
- package/dist/cjs/node/utils/address.d.ts +6 -26
- package/dist/cjs/node/utils/airdrop.d.ts +2 -14
- package/dist/cjs/node/utils/calculate-compute-unit-price.d.ts +1 -4
- package/dist/cjs/node/utils/conversion.d.ts +4 -12
- package/dist/cjs/node/utils/dedupe-signer.d.ts +1 -4
- package/dist/cjs/node/utils/get-state-tree-infos.d.ts +5 -20
- package/dist/cjs/node/utils/instruction.d.ts +7 -24
- package/dist/cjs/node/utils/pack-decompress.d.ts +4 -9
- package/dist/cjs/node/utils/pipe.d.ts +1 -4
- package/dist/cjs/node/utils/send-and-confirm.d.ts +11 -42
- package/dist/cjs/node/utils/state-tree-lookup-table.d.ts +3 -23
- package/dist/cjs/node/utils/validation.d.ts +6 -24
- package/dist/es/browser/actions/compress.d.ts +2 -14
- package/dist/es/browser/actions/create-account.d.ts +3 -25
- package/dist/es/browser/actions/decompress.d.ts +2 -13
- package/dist/es/browser/actions/transfer.d.ts +2 -14
- package/dist/es/browser/constants.d.ts +35 -67
- package/dist/es/browser/errors.d.ts +49 -40
- package/dist/es/browser/index.js +1 -11159
- package/dist/es/browser/programs/system/idl.d.ts +44 -44
- package/dist/es/browser/programs/system/layout.d.ts +26 -50
- package/dist/es/browser/programs/system/pack.d.ts +7 -36
- package/dist/es/browser/programs/system/program.d.ts +9 -56
- package/dist/es/browser/programs/system/select-compressed-accounts.d.ts +1 -4
- package/dist/es/browser/rpc-interface.d.ts +2246 -2938
- package/dist/es/browser/rpc.d.ts +39 -198
- package/dist/es/browser/state/BN254.d.ts +1 -4
- package/dist/es/browser/state/bn.d.ts +1 -5
- package/dist/es/browser/state/compressed-account.d.ts +14 -42
- package/dist/es/browser/state/types.d.ts +2 -5
- package/dist/es/browser/test-helpers/merkle-tree/indexed-array.d.ts +4 -18
- package/dist/es/browser/test-helpers/merkle-tree/merkle-tree.d.ts +6 -19
- package/dist/es/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +3 -12
- package/dist/es/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +5 -22
- package/dist/es/browser/test-helpers/test-rpc/get-parsed-events.d.ts +4 -14
- package/dist/es/browser/test-helpers/test-rpc/test-rpc.d.ts +35 -155
- package/dist/es/browser/test-helpers/test-utils.d.ts +1 -5
- package/dist/es/browser/utils/address.d.ts +6 -26
- package/dist/es/browser/utils/airdrop.d.ts +2 -14
- package/dist/es/browser/utils/calculate-compute-unit-price.d.ts +1 -4
- package/dist/es/browser/utils/conversion.d.ts +4 -12
- package/dist/es/browser/utils/dedupe-signer.d.ts +1 -4
- package/dist/es/browser/utils/get-state-tree-infos.d.ts +5 -20
- package/dist/es/browser/utils/instruction.d.ts +7 -24
- package/dist/es/browser/utils/pack-decompress.d.ts +4 -9
- package/dist/es/browser/utils/pipe.d.ts +1 -4
- package/dist/es/browser/utils/send-and-confirm.d.ts +11 -42
- package/dist/es/browser/utils/state-tree-lookup-table.d.ts +3 -23
- package/dist/es/browser/utils/validation.d.ts +6 -24
- package/dist/types/index.d.ts +2546 -4139
- package/package.json +1 -1
|
@@ -2,15 +2,6 @@ import { PublicKey } from '@solana/web3.js';
|
|
|
2
2
|
import BN from 'bn.js';
|
|
3
3
|
import { Rpc } from '../../rpc';
|
|
4
4
|
import { CompressedAccountWithMerkleContext } from '../../state';
|
|
5
|
-
export declare function getCompressedAccountsByOwnerTest(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
): Promise<CompressedAccountWithMerkleContext[]>;
|
|
9
|
-
export declare function getCompressedAccountByHashTest(
|
|
10
|
-
rpc: Rpc,
|
|
11
|
-
hash: BN,
|
|
12
|
-
): Promise<CompressedAccountWithMerkleContext | undefined>;
|
|
13
|
-
export declare function getMultipleCompressedAccountsByHashTest(
|
|
14
|
-
rpc: Rpc,
|
|
15
|
-
hashes: BN[],
|
|
16
|
-
): Promise<CompressedAccountWithMerkleContext[]>;
|
|
5
|
+
export declare function getCompressedAccountsByOwnerTest(rpc: Rpc, owner: PublicKey): Promise<CompressedAccountWithMerkleContext[]>;
|
|
6
|
+
export declare function getCompressedAccountByHashTest(rpc: Rpc, hash: BN): Promise<CompressedAccountWithMerkleContext | undefined>;
|
|
7
|
+
export declare function getMultipleCompressedAccountsByHashTest(rpc: Rpc, hashes: BN[]): Promise<CompressedAccountWithMerkleContext[]>;
|
|
@@ -20,10 +20,7 @@ export type EventWithParsedTokenTlvData = {
|
|
|
20
20
|
* @param compressedAccount - The compressed account
|
|
21
21
|
* @returns The parsed token data
|
|
22
22
|
*/
|
|
23
|
-
export declare function parseTokenLayoutWithIdl(
|
|
24
|
-
compressedAccount: CompressedAccountLegacy,
|
|
25
|
-
programId?: PublicKey,
|
|
26
|
-
): TokenData | null;
|
|
23
|
+
export declare function parseTokenLayoutWithIdl(compressedAccount: CompressedAccountLegacy, programId?: PublicKey): TokenData | null;
|
|
27
24
|
/**
|
|
28
25
|
* Retrieves all compressed token accounts for a given mint and owner.
|
|
29
26
|
*
|
|
@@ -33,23 +30,9 @@ export declare function parseTokenLayoutWithIdl(
|
|
|
33
30
|
* @param owner PublicKey of the token owner
|
|
34
31
|
* @param mint PublicKey of the token mint
|
|
35
32
|
*/
|
|
36
|
-
export declare function getCompressedTokenAccounts(
|
|
37
|
-
events: PublicTransactionEvent[],
|
|
38
|
-
rpc: Rpc,
|
|
39
|
-
): Promise<ParsedTokenAccount[]>;
|
|
33
|
+
export declare function getCompressedTokenAccounts(events: PublicTransactionEvent[], rpc: Rpc): Promise<ParsedTokenAccount[]>;
|
|
40
34
|
/** @internal */
|
|
41
|
-
export declare function getCompressedTokenAccountsByOwnerTest(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
mint: PublicKey,
|
|
45
|
-
): Promise<WithCursor<ParsedTokenAccount[]>>;
|
|
46
|
-
export declare function getCompressedTokenAccountsByDelegateTest(
|
|
47
|
-
rpc: Rpc,
|
|
48
|
-
delegate: PublicKey,
|
|
49
|
-
mint: PublicKey,
|
|
50
|
-
): Promise<WithCursor<ParsedTokenAccount[]>>;
|
|
51
|
-
export declare function getCompressedTokenAccountByHashTest(
|
|
52
|
-
rpc: Rpc,
|
|
53
|
-
hash: BN,
|
|
54
|
-
): Promise<ParsedTokenAccount>;
|
|
35
|
+
export declare function getCompressedTokenAccountsByOwnerTest(rpc: Rpc, owner: PublicKey, mint: PublicKey): Promise<WithCursor<ParsedTokenAccount[]>>;
|
|
36
|
+
export declare function getCompressedTokenAccountsByDelegateTest(rpc: Rpc, delegate: PublicKey, mint: PublicKey): Promise<WithCursor<ParsedTokenAccount[]>>;
|
|
37
|
+
export declare function getCompressedTokenAccountByHashTest(rpc: Rpc, hash: BN): Promise<ParsedTokenAccount>;
|
|
55
38
|
export {};
|
|
@@ -8,18 +8,8 @@ type Deserializer<T> = (data: Buffer, tx: ParsedTransactionWithMeta) => T;
|
|
|
8
8
|
* Returns newest first.
|
|
9
9
|
*
|
|
10
10
|
* */
|
|
11
|
-
export declare function getParsedEvents(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare
|
|
15
|
-
indexerEventsTransactions: (ParsedTransactionWithMeta | null)[],
|
|
16
|
-
deserializeFn: Deserializer<T>,
|
|
17
|
-
) => NonNullable<T>[];
|
|
18
|
-
export declare const parsePublicTransactionEventWithIdl: (
|
|
19
|
-
data: Buffer,
|
|
20
|
-
) => PublicTransactionEvent | null;
|
|
21
|
-
export declare function parseLightTransaction(
|
|
22
|
-
dataVec: Uint8Array[],
|
|
23
|
-
accountKeys: PublicKey[][],
|
|
24
|
-
): PublicTransactionEvent | null | undefined;
|
|
11
|
+
export declare function getParsedEvents(rpc: Rpc): Promise<PublicTransactionEvent[]>;
|
|
12
|
+
export declare const parseEvents: <T>(indexerEventsTransactions: (ParsedTransactionWithMeta | null)[], deserializeFn: Deserializer<T>) => NonNullable<T>[];
|
|
13
|
+
export declare const parsePublicTransactionEventWithIdl: (data: Buffer) => PublicTransactionEvent | null;
|
|
14
|
+
export declare function parseLightTransaction(dataVec: Uint8Array[], accountKeys: PublicKey[][]): PublicTransactionEvent | null | undefined;
|
|
25
15
|
export {};
|
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
import { Connection, ConnectionConfig, PublicKey } from '@solana/web3.js';
|
|
2
2
|
import BN from 'bn.js';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
CompressedTransaction,
|
|
7
|
-
GetCompressedAccountsByOwnerConfig,
|
|
8
|
-
PaginatedOptions,
|
|
9
|
-
HashWithTree,
|
|
10
|
-
LatestNonVotingSignatures,
|
|
11
|
-
LatestNonVotingSignaturesPaginated,
|
|
12
|
-
SignatureWithMetadata,
|
|
13
|
-
WithContext,
|
|
14
|
-
WithCursor,
|
|
15
|
-
} from '../../rpc-interface';
|
|
16
|
-
import {
|
|
17
|
-
ValidityProofWithContext,
|
|
18
|
-
CompressionApiInterface,
|
|
19
|
-
GetCompressedTokenAccountsByOwnerOrDelegateOptions,
|
|
20
|
-
ParsedTokenAccount,
|
|
21
|
-
TokenBalance,
|
|
22
|
-
} from '../../rpc-interface';
|
|
23
|
-
import {
|
|
24
|
-
BN254,
|
|
25
|
-
CompressedAccountWithMerkleContext,
|
|
26
|
-
MerkleContextWithMerkleProof,
|
|
27
|
-
} from '../../state';
|
|
3
|
+
import { AddressWithTree, CompressedMintTokenHolders, CompressedTransaction, GetCompressedAccountsByOwnerConfig, PaginatedOptions, HashWithTree, LatestNonVotingSignatures, LatestNonVotingSignaturesPaginated, SignatureWithMetadata, WithContext, WithCursor } from '../../rpc-interface';
|
|
4
|
+
import { ValidityProofWithContext, CompressionApiInterface, GetCompressedTokenAccountsByOwnerOrDelegateOptions, ParsedTokenAccount, TokenBalance } from '../../rpc-interface';
|
|
5
|
+
import { BN254, CompressedAccountWithMerkleContext, MerkleContextWithMerkleProof } from '../../state';
|
|
28
6
|
import { MerkleContextWithNewAddressProof } from '../../rpc';
|
|
29
7
|
import { TreeInfo } from '../../state/types';
|
|
30
8
|
export interface TestRpcConfig {
|
|
@@ -59,14 +37,7 @@ export interface LightWasm {
|
|
|
59
37
|
* @param depth Depth of the merkle tree.
|
|
60
38
|
* @param log Log proof generation time.
|
|
61
39
|
*/
|
|
62
|
-
export declare function getTestRpc(
|
|
63
|
-
lightWasm: LightWasm,
|
|
64
|
-
endpoint?: string,
|
|
65
|
-
compressionApiEndpoint?: string,
|
|
66
|
-
proverEndpoint?: string,
|
|
67
|
-
depth?: number,
|
|
68
|
-
log?: boolean,
|
|
69
|
-
): Promise<TestRpc>;
|
|
40
|
+
export declare function getTestRpc(lightWasm: LightWasm, endpoint?: string, compressionApiEndpoint?: string, proverEndpoint?: string, depth?: number, log?: boolean): Promise<TestRpc>;
|
|
70
41
|
/**
|
|
71
42
|
* Mock RPC for unit tests that simulates the ZK Compression RPC interface.
|
|
72
43
|
* Parses events and builds merkletree on-demand. It does not persist state.
|
|
@@ -76,10 +47,7 @@ export declare function getTestRpc(
|
|
|
76
47
|
* For advanced testing use `Rpc` class which uses photon:
|
|
77
48
|
* https://github.com/helius-labs/photon
|
|
78
49
|
*/
|
|
79
|
-
export declare class TestRpc
|
|
80
|
-
extends Connection
|
|
81
|
-
implements CompressionApiInterface
|
|
82
|
-
{
|
|
50
|
+
export declare class TestRpc extends Connection implements CompressionApiInterface {
|
|
83
51
|
compressionApiEndpoint: string;
|
|
84
52
|
proverEndpoint: string;
|
|
85
53
|
lightWasm: LightWasm;
|
|
@@ -101,14 +69,7 @@ export declare class TestRpc
|
|
|
101
69
|
* @param connectionConfig Optional connection config
|
|
102
70
|
* @param testRpcConfig Config for the mock rpc
|
|
103
71
|
*/
|
|
104
|
-
constructor(
|
|
105
|
-
endpoint: string,
|
|
106
|
-
hasher: LightWasm,
|
|
107
|
-
compressionApiEndpoint: string,
|
|
108
|
-
proverEndpoint: string,
|
|
109
|
-
connectionConfig?: ConnectionConfig,
|
|
110
|
-
testRpcConfig?: TestRpcConfig,
|
|
111
|
-
);
|
|
72
|
+
constructor(endpoint: string, hasher: LightWasm, compressionApiEndpoint: string, proverEndpoint: string, connectionConfig?: ConnectionConfig, testRpcConfig?: TestRpcConfig);
|
|
112
73
|
/**
|
|
113
74
|
* @deprecated Use {@link getStateTreeInfos} instead
|
|
114
75
|
*/
|
|
@@ -129,10 +90,7 @@ export declare class TestRpc
|
|
|
129
90
|
/**
|
|
130
91
|
* Fetch the compressed account for the specified account hash
|
|
131
92
|
*/
|
|
132
|
-
getCompressedAccount(
|
|
133
|
-
address?: BN254,
|
|
134
|
-
hash?: BN254,
|
|
135
|
-
): Promise<CompressedAccountWithMerkleContext | null>;
|
|
93
|
+
getCompressedAccount(address?: BN254, hash?: BN254): Promise<CompressedAccountWithMerkleContext | null>;
|
|
136
94
|
/**
|
|
137
95
|
* Fetch the compressed balance for the specified account hash
|
|
138
96
|
*/
|
|
@@ -145,16 +103,12 @@ export declare class TestRpc
|
|
|
145
103
|
* Fetch the latest merkle proof for the specified account hash from the
|
|
146
104
|
* cluster
|
|
147
105
|
*/
|
|
148
|
-
getCompressedAccountProof(
|
|
149
|
-
hash: BN254,
|
|
150
|
-
): Promise<MerkleContextWithMerkleProof>;
|
|
106
|
+
getCompressedAccountProof(hash: BN254): Promise<MerkleContextWithMerkleProof>;
|
|
151
107
|
/**
|
|
152
108
|
* Fetch all the account info for multiple compressed accounts specified by
|
|
153
109
|
* an array of account hashes
|
|
154
110
|
*/
|
|
155
|
-
getMultipleCompressedAccounts(
|
|
156
|
-
hashes: BN254[],
|
|
157
|
-
): Promise<CompressedAccountWithMerkleContext[]>;
|
|
111
|
+
getMultipleCompressedAccounts(hashes: BN254[]): Promise<CompressedAccountWithMerkleContext[]>;
|
|
158
112
|
/**
|
|
159
113
|
* Ensure that the Compression Indexer has already indexed the transaction
|
|
160
114
|
*/
|
|
@@ -163,47 +117,31 @@ export declare class TestRpc
|
|
|
163
117
|
* Fetch the latest merkle proofs for multiple compressed accounts specified
|
|
164
118
|
* by an array account hashes
|
|
165
119
|
*/
|
|
166
|
-
getMultipleCompressedAccountProofs(
|
|
167
|
-
hashes: BN254[],
|
|
168
|
-
): Promise<MerkleContextWithMerkleProof[]>;
|
|
120
|
+
getMultipleCompressedAccountProofs(hashes: BN254[]): Promise<MerkleContextWithMerkleProof[]>;
|
|
169
121
|
/**
|
|
170
122
|
* Fetch all the compressed accounts owned by the specified public key.
|
|
171
123
|
* Owner can be a program or user account
|
|
172
124
|
*/
|
|
173
|
-
getCompressedAccountsByOwner(
|
|
174
|
-
owner: PublicKey,
|
|
175
|
-
_config?: GetCompressedAccountsByOwnerConfig,
|
|
176
|
-
): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
|
|
125
|
+
getCompressedAccountsByOwner(owner: PublicKey, _config?: GetCompressedAccountsByOwnerConfig): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
|
|
177
126
|
/**
|
|
178
127
|
* Fetch the latest compression signatures on the cluster. Results are
|
|
179
128
|
* paginated.
|
|
180
129
|
*/
|
|
181
|
-
getLatestCompressionSignatures(
|
|
182
|
-
_cursor?: string,
|
|
183
|
-
_limit?: number,
|
|
184
|
-
): Promise<LatestNonVotingSignaturesPaginated>;
|
|
130
|
+
getLatestCompressionSignatures(_cursor?: string, _limit?: number): Promise<LatestNonVotingSignaturesPaginated>;
|
|
185
131
|
/**
|
|
186
132
|
* Fetch the latest non-voting signatures on the cluster. Results are
|
|
187
133
|
* not paginated.
|
|
188
134
|
*/
|
|
189
|
-
getLatestNonVotingSignatures(
|
|
190
|
-
_limit?: number,
|
|
191
|
-
): Promise<LatestNonVotingSignatures>;
|
|
135
|
+
getLatestNonVotingSignatures(_limit?: number): Promise<LatestNonVotingSignatures>;
|
|
192
136
|
/**
|
|
193
137
|
* Fetch all the compressed token accounts owned by the specified public
|
|
194
138
|
* key. Owner can be a program or user account
|
|
195
139
|
*/
|
|
196
|
-
getCompressedTokenAccountsByOwner(
|
|
197
|
-
owner: PublicKey,
|
|
198
|
-
options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
|
|
199
|
-
): Promise<WithCursor<ParsedTokenAccount[]>>;
|
|
140
|
+
getCompressedTokenAccountsByOwner(owner: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
|
|
200
141
|
/**
|
|
201
142
|
* Fetch all the compressed accounts delegated to the specified public key.
|
|
202
143
|
*/
|
|
203
|
-
getCompressedTokenAccountsByDelegate(
|
|
204
|
-
delegate: PublicKey,
|
|
205
|
-
options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
|
|
206
|
-
): Promise<WithCursor<ParsedTokenAccount[]>>;
|
|
144
|
+
getCompressedTokenAccountsByDelegate(delegate: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
|
|
207
145
|
/**
|
|
208
146
|
* Fetch the compressed token balance for the specified account hash
|
|
209
147
|
*/
|
|
@@ -215,25 +153,15 @@ export declare class TestRpc
|
|
|
215
153
|
* Fetch all the compressed token balances owned by the specified public
|
|
216
154
|
* key. Can filter by mint.
|
|
217
155
|
*/
|
|
218
|
-
getCompressedTokenBalancesByOwner(
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
WithCursor<
|
|
223
|
-
{
|
|
224
|
-
balance: BN;
|
|
225
|
-
mint: PublicKey;
|
|
226
|
-
}[]
|
|
227
|
-
>
|
|
228
|
-
>;
|
|
156
|
+
getCompressedTokenBalancesByOwner(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<{
|
|
157
|
+
balance: BN;
|
|
158
|
+
mint: PublicKey;
|
|
159
|
+
}[]>>;
|
|
229
160
|
/**
|
|
230
161
|
* Fetch all the compressed token balances owned by the specified public
|
|
231
162
|
* key. Can filter by mint. Uses context.
|
|
232
163
|
*/
|
|
233
|
-
getCompressedTokenBalancesByOwnerV2(
|
|
234
|
-
publicKey: PublicKey,
|
|
235
|
-
options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
|
|
236
|
-
): Promise<WithContext<WithCursor<TokenBalance[]>>>;
|
|
164
|
+
getCompressedTokenBalancesByOwnerV2(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithContext<WithCursor<TokenBalance[]>>>;
|
|
237
165
|
/**
|
|
238
166
|
* Returns confirmed signatures for transactions involving the specified
|
|
239
167
|
* account hash forward in time from genesis to the most recent confirmed
|
|
@@ -241,16 +169,12 @@ export declare class TestRpc
|
|
|
241
169
|
*
|
|
242
170
|
* @param hash queried account hash
|
|
243
171
|
*/
|
|
244
|
-
getCompressionSignaturesForAccount(
|
|
245
|
-
_hash: BN254,
|
|
246
|
-
): Promise<SignatureWithMetadata[]>;
|
|
172
|
+
getCompressionSignaturesForAccount(_hash: BN254): Promise<SignatureWithMetadata[]>;
|
|
247
173
|
/**
|
|
248
174
|
* Fetch a confirmed or finalized transaction from the cluster. Return with
|
|
249
175
|
* CompressionInfo
|
|
250
176
|
*/
|
|
251
|
-
getTransactionWithCompressionInfo(
|
|
252
|
-
_signature: string,
|
|
253
|
-
): Promise<CompressedTransaction>;
|
|
177
|
+
getTransactionWithCompressionInfo(_signature: string): Promise<CompressedTransaction>;
|
|
254
178
|
/**
|
|
255
179
|
* Returns confirmed signatures for transactions involving the specified
|
|
256
180
|
* address forward in time from genesis to the most recent confirmed
|
|
@@ -258,10 +182,7 @@ export declare class TestRpc
|
|
|
258
182
|
*
|
|
259
183
|
* @param address queried compressed account address
|
|
260
184
|
*/
|
|
261
|
-
getCompressionSignaturesForAddress(
|
|
262
|
-
_address: PublicKey,
|
|
263
|
-
_options?: PaginatedOptions,
|
|
264
|
-
): Promise<WithCursor<SignatureWithMetadata[]>>;
|
|
185
|
+
getCompressionSignaturesForAddress(_address: PublicKey, _options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
|
|
265
186
|
/**
|
|
266
187
|
* Returns confirmed signatures for compression transactions involving the
|
|
267
188
|
* specified account owner forward in time from genesis to the
|
|
@@ -269,19 +190,13 @@ export declare class TestRpc
|
|
|
269
190
|
*
|
|
270
191
|
* @param owner queried owner public key
|
|
271
192
|
*/
|
|
272
|
-
getCompressionSignaturesForOwner(
|
|
273
|
-
_owner: PublicKey,
|
|
274
|
-
_options?: PaginatedOptions,
|
|
275
|
-
): Promise<WithCursor<SignatureWithMetadata[]>>;
|
|
193
|
+
getCompressionSignaturesForOwner(_owner: PublicKey, _options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
|
|
276
194
|
/**
|
|
277
195
|
* Returns confirmed signatures for compression transactions involving the
|
|
278
196
|
* specified token account owner forward in time from genesis to the most
|
|
279
197
|
* recent confirmed block
|
|
280
198
|
*/
|
|
281
|
-
getCompressionSignaturesForTokenOwner(
|
|
282
|
-
_owner: PublicKey,
|
|
283
|
-
_options?: PaginatedOptions,
|
|
284
|
-
): Promise<WithCursor<SignatureWithMetadata[]>>;
|
|
199
|
+
getCompressionSignaturesForTokenOwner(_owner: PublicKey, _options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
|
|
285
200
|
/**
|
|
286
201
|
* Fetch the current indexer health status
|
|
287
202
|
*/
|
|
@@ -298,21 +213,13 @@ export declare class TestRpc
|
|
|
298
213
|
* @param addresses Array of BN254 new addresses
|
|
299
214
|
* @returns Array of validity proofs for new addresses
|
|
300
215
|
*/
|
|
301
|
-
getMultipleNewAddressProofs(
|
|
302
|
-
|
|
303
|
-
): Promise<MerkleContextWithNewAddressProof[]>;
|
|
304
|
-
getCompressedMintTokenHolders(
|
|
305
|
-
_mint: PublicKey,
|
|
306
|
-
_options?: PaginatedOptions,
|
|
307
|
-
): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
|
|
216
|
+
getMultipleNewAddressProofs(addresses: BN254[]): Promise<MerkleContextWithNewAddressProof[]>;
|
|
217
|
+
getCompressedMintTokenHolders(_mint: PublicKey, _options?: PaginatedOptions): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
|
|
308
218
|
/**
|
|
309
219
|
* @deprecated This method is not available for TestRpc. Please use
|
|
310
220
|
* {@link getValidityProof} instead.
|
|
311
221
|
*/
|
|
312
|
-
getValidityProofAndRpcContext(
|
|
313
|
-
hashes?: HashWithTree[],
|
|
314
|
-
newAddresses?: AddressWithTree[],
|
|
315
|
-
): Promise<WithContext<ValidityProofWithContext>>;
|
|
222
|
+
getValidityProofAndRpcContext(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<WithContext<ValidityProofWithContext>>;
|
|
316
223
|
/**
|
|
317
224
|
* Fetch the latest validity proof for (1) compressed accounts specified by
|
|
318
225
|
* an array of account hashes. (2) new unique addresses specified by an
|
|
@@ -327,39 +234,12 @@ export declare class TestRpc
|
|
|
327
234
|
* @param newAddresses Array of BN254 new addresses.
|
|
328
235
|
* @returns validity proof with context
|
|
329
236
|
*/
|
|
330
|
-
getValidityProof(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
): Promise<
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
): Promise<ValidityProofWithContext>;
|
|
338
|
-
getValidityProofV2(
|
|
339
|
-
accountMerkleContexts?: any[],
|
|
340
|
-
newAddresses?: any[],
|
|
341
|
-
derivationMode?: any,
|
|
342
|
-
): Promise<ValidityProofWithContext>;
|
|
343
|
-
getAccountInfoInterface(
|
|
344
|
-
_address: PublicKey,
|
|
345
|
-
_programId: PublicKey,
|
|
346
|
-
_addressSpaceInfo: any,
|
|
347
|
-
): Promise<any>;
|
|
348
|
-
getSignaturesForAddressInterface(
|
|
349
|
-
_address: PublicKey,
|
|
350
|
-
_options?: any,
|
|
351
|
-
_compressedOptions?: PaginatedOptions,
|
|
352
|
-
): Promise<any>;
|
|
353
|
-
getSignaturesForOwnerInterface(
|
|
354
|
-
_owner: PublicKey,
|
|
355
|
-
_options?: any,
|
|
356
|
-
_compressedOptions?: PaginatedOptions,
|
|
357
|
-
): Promise<any>;
|
|
358
|
-
getTokenAccountBalanceInterface(
|
|
359
|
-
_address: PublicKey,
|
|
360
|
-
_owner: PublicKey,
|
|
361
|
-
_mint: PublicKey,
|
|
362
|
-
_commitment?: any,
|
|
363
|
-
): Promise<any>;
|
|
237
|
+
getValidityProof(hashes?: BN254[], newAddresses?: BN254[]): Promise<ValidityProofWithContext>;
|
|
238
|
+
getValidityProofV0(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<ValidityProofWithContext>;
|
|
239
|
+
getValidityProofV2(accountMerkleContexts?: any[], newAddresses?: any[], derivationMode?: any): Promise<ValidityProofWithContext>;
|
|
240
|
+
getAccountInfoInterface(_address: PublicKey, _programId: PublicKey, _addressSpaceInfo: any): Promise<any>;
|
|
241
|
+
getSignaturesForAddressInterface(_address: PublicKey, _options?: any, _compressedOptions?: PaginatedOptions): Promise<any>;
|
|
242
|
+
getSignaturesForOwnerInterface(_owner: PublicKey, _options?: any, _compressedOptions?: PaginatedOptions): Promise<any>;
|
|
243
|
+
getTokenAccountBalanceInterface(_address: PublicKey, _owner: PublicKey, _mint: PublicKey, _commitment?: any): Promise<any>;
|
|
364
244
|
getBalanceInterface(_address: PublicKey, _commitment?: any): Promise<any>;
|
|
365
245
|
}
|
|
@@ -20,11 +20,7 @@ export declare function deepEqual(ref: any, val: any): boolean;
|
|
|
20
20
|
* @param counter counter to use for generating the keypair.
|
|
21
21
|
* If undefined or >255, generates random keypair.
|
|
22
22
|
*/
|
|
23
|
-
export declare function newAccountWithLamports(
|
|
24
|
-
rpc: Rpc,
|
|
25
|
-
lamports?: number,
|
|
26
|
-
counter?: number | undefined,
|
|
27
|
-
): Promise<Signer>;
|
|
23
|
+
export declare function newAccountWithLamports(rpc: Rpc, lamports?: number, counter?: number | undefined): Promise<Signer>;
|
|
28
24
|
export declare function getConnection(): Connection;
|
|
29
25
|
/**
|
|
30
26
|
* For use in tests.
|
|
@@ -3,18 +3,12 @@ import { PublicKey } from '@solana/web3.js';
|
|
|
3
3
|
* @deprecated Use deriveAddressSeed (no programId param) for V2.
|
|
4
4
|
* V1 seed derivation includes programId in hash.
|
|
5
5
|
*/
|
|
6
|
-
export declare function deriveAddressSeedLegacy(
|
|
7
|
-
seeds: Uint8Array[],
|
|
8
|
-
programId: PublicKey,
|
|
9
|
-
): Uint8Array;
|
|
6
|
+
export declare function deriveAddressSeedLegacy(seeds: Uint8Array[], programId: PublicKey): Uint8Array;
|
|
10
7
|
/**
|
|
11
8
|
* @deprecated Use deriveAddress with programId param for V2.
|
|
12
9
|
* V1 address derivation doesn't include programId.
|
|
13
10
|
*/
|
|
14
|
-
export declare function deriveAddressLegacy(
|
|
15
|
-
seed: Uint8Array,
|
|
16
|
-
addressMerkleTreePubkey?: PublicKey,
|
|
17
|
-
): PublicKey;
|
|
11
|
+
export declare function deriveAddressLegacy(seed: Uint8Array, addressMerkleTreePubkey?: PublicKey): PublicKey;
|
|
18
12
|
/**
|
|
19
13
|
* Explicit V2 address seed derivation - always uses V2 behavior regardless of feature flag.
|
|
20
14
|
* Use this when you explicitly want V2 derivation (e.g., in tests).
|
|
@@ -30,19 +24,12 @@ export declare function deriveAddressSeedV2(seeds: Uint8Array[]): Uint8Array;
|
|
|
30
24
|
* @param programId (V1 only) Program ID - required in V1 mode, must be omitted in V2 mode
|
|
31
25
|
* @returns 32-byte address seed
|
|
32
26
|
*/
|
|
33
|
-
export declare function deriveAddressSeed(
|
|
34
|
-
seeds: Uint8Array[],
|
|
35
|
-
programId?: PublicKey,
|
|
36
|
-
): Uint8Array;
|
|
27
|
+
export declare function deriveAddressSeed(seeds: Uint8Array[], programId?: PublicKey): Uint8Array;
|
|
37
28
|
/**
|
|
38
29
|
* Explicit V2 address derivation - always uses V2 behavior regardless of feature flag.
|
|
39
30
|
* Use this when you explicitly want V2 derivation (e.g., in tests).
|
|
40
31
|
*/
|
|
41
|
-
export declare function deriveAddressV2(
|
|
42
|
-
addressSeed: Uint8Array,
|
|
43
|
-
addressMerkleTreePubkey: PublicKey,
|
|
44
|
-
programId: PublicKey,
|
|
45
|
-
): PublicKey;
|
|
32
|
+
export declare function deriveAddressV2(addressSeed: Uint8Array, addressMerkleTreePubkey: PublicKey, programId: PublicKey): PublicKey;
|
|
46
33
|
/**
|
|
47
34
|
* Derive an address for a compressed account.
|
|
48
35
|
*
|
|
@@ -54,11 +41,7 @@ export declare function deriveAddressV2(
|
|
|
54
41
|
* @param programId (V2 only) Program ID - required in V2 mode, must be omitted in V1 mode
|
|
55
42
|
* @returns Derived address
|
|
56
43
|
*/
|
|
57
|
-
export declare function deriveAddress(
|
|
58
|
-
addressSeed: Uint8Array,
|
|
59
|
-
addressMerkleTreePubkey: PublicKey,
|
|
60
|
-
programId?: PublicKey,
|
|
61
|
-
): PublicKey;
|
|
44
|
+
export declare function deriveAddress(addressSeed: Uint8Array, addressMerkleTreePubkey: PublicKey, programId?: PublicKey): PublicKey;
|
|
62
45
|
export interface NewAddressParams {
|
|
63
46
|
/**
|
|
64
47
|
* Seed for the compressed account. Must be seed used to derive
|
|
@@ -106,10 +89,7 @@ export interface NewAddressParamsPacked {
|
|
|
106
89
|
* @param remainingAccounts Remaining accounts
|
|
107
90
|
* @returns Packed new address params
|
|
108
91
|
*/
|
|
109
|
-
export declare function packNewAddressParams(
|
|
110
|
-
newAddressParams: NewAddressParams[],
|
|
111
|
-
remainingAccounts: PublicKey[],
|
|
112
|
-
): {
|
|
92
|
+
export declare function packNewAddressParams(newAddressParams: NewAddressParams[], remainingAccounts: PublicKey[]): {
|
|
113
93
|
newAddressParamsPacked: NewAddressParamsPacked[];
|
|
114
94
|
remainingAccounts: PublicKey[];
|
|
115
95
|
};
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import { Commitment, Connection, PublicKey } from '@solana/web3.js';
|
|
2
|
-
export declare function airdropSol({
|
|
3
|
-
connection,
|
|
4
|
-
lamports,
|
|
5
|
-
recipientPublicKey,
|
|
6
|
-
}: {
|
|
2
|
+
export declare function airdropSol({ connection, lamports, recipientPublicKey, }: {
|
|
7
3
|
connection: Connection;
|
|
8
4
|
lamports: number;
|
|
9
5
|
recipientPublicKey: PublicKey;
|
|
10
6
|
}): Promise<string>;
|
|
11
|
-
export declare function confirmTransaction(
|
|
12
|
-
connection: Connection,
|
|
13
|
-
signature: string,
|
|
14
|
-
confirmation?: Commitment,
|
|
15
|
-
): Promise<
|
|
16
|
-
import('@solana/web3.js').RpcResponseAndContext<
|
|
17
|
-
import('@solana/web3.js').SignatureResult
|
|
18
|
-
>
|
|
19
|
-
>;
|
|
7
|
+
export declare function confirmTransaction(connection: Connection, signature: string, confirmation?: Commitment): Promise<import("@solana/web3.js").RpcResponseAndContext<import("@solana/web3.js").SignatureResult>>;
|
|
@@ -4,7 +4,4 @@
|
|
|
4
4
|
* @returns microLamports per compute unit (use in
|
|
5
5
|
* {@link https://github.com/solana-foundation/solana-web3.js/blob/maintenance/v1.x/src/programs/compute-budget.ts#L218})
|
|
6
6
|
*/
|
|
7
|
-
export declare function calculateComputeUnitPrice(
|
|
8
|
-
targetLamports: number,
|
|
9
|
-
computeUnits: number,
|
|
10
|
-
): number;
|
|
7
|
+
export declare function calculateComputeUnitPrice(targetLamports: number, computeUnits: number): number;
|
|
@@ -20,12 +20,8 @@ export declare const toCamelCase: (object: any) => any;
|
|
|
20
20
|
*
|
|
21
21
|
* @deprecated Use `hashvToBn254FieldSizeBe` instead.
|
|
22
22
|
*/
|
|
23
|
-
export declare function hashToBn254FieldSizeBe(
|
|
24
|
-
|
|
25
|
-
): [Buffer, number] | null;
|
|
26
|
-
export declare function hashvToBn254FieldSizeBeU8Array(
|
|
27
|
-
bytes: Uint8Array[],
|
|
28
|
-
): Uint8Array;
|
|
23
|
+
export declare function hashToBn254FieldSizeBe(bytes: Buffer): [Buffer, number] | null;
|
|
24
|
+
export declare function hashvToBn254FieldSizeBeU8Array(bytes: Uint8Array[]): Uint8Array;
|
|
29
25
|
/**
|
|
30
26
|
* Hash the provided `bytes` with Keccak256 and ensure that the result fits in
|
|
31
27
|
* the BN254 prime field by truncating the resulting hash to 31 bytes.
|
|
@@ -34,11 +30,7 @@ export declare function hashvToBn254FieldSizeBeU8Array(
|
|
|
34
30
|
*
|
|
35
31
|
* @returns Hash digest
|
|
36
32
|
*/
|
|
37
|
-
export declare function hashvToBn254FieldSizeBe(
|
|
38
|
-
bytes: Uint8Array[],
|
|
39
|
-
): Uint8Array;
|
|
33
|
+
export declare function hashvToBn254FieldSizeBe(bytes: Uint8Array[]): Uint8Array;
|
|
40
34
|
/** Mutates array in place */
|
|
41
35
|
export declare function pushUniqueItems<T>(items: T[], map: T[]): void;
|
|
42
|
-
export declare function convertInvokeCpiWithReadOnlyToInvoke(
|
|
43
|
-
data: any,
|
|
44
|
-
): InstructionDataInvoke;
|
|
36
|
+
export declare function convertInvokeCpiWithReadOnlyToInvoke(data: any): InstructionDataInvoke;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { Signer } from '@solana/web3.js';
|
|
2
2
|
/** @internal remove signer from signers if part of signers */
|
|
3
|
-
export declare function dedupeSigner(
|
|
4
|
-
signer: Signer,
|
|
5
|
-
signers: Signer[],
|
|
6
|
-
): Signer[];
|
|
3
|
+
export declare function dedupeSigner(signer: Signer, signers: Signer[]): Signer[];
|
|
@@ -15,20 +15,12 @@ export declare function getOutputQueue(merkleContext: MerkleContext): PublicKey;
|
|
|
15
15
|
* @param merkleContext The merkle context to get the output tree info from
|
|
16
16
|
* @returns The output tree info
|
|
17
17
|
*/
|
|
18
|
-
export declare function getOutputTreeInfo(
|
|
19
|
-
merkleContext: MerkleContext,
|
|
20
|
-
): TreeInfo;
|
|
18
|
+
export declare function getOutputTreeInfo(merkleContext: MerkleContext): TreeInfo;
|
|
21
19
|
/**
|
|
22
20
|
* @deprecated use {@link getTreeInfoByPubkey} instead
|
|
23
21
|
*/
|
|
24
|
-
export declare function getStateTreeInfoByPubkey(
|
|
25
|
-
|
|
26
|
-
treeOrQueue: PublicKey,
|
|
27
|
-
): TreeInfo;
|
|
28
|
-
export declare function getTreeInfoByPubkey(
|
|
29
|
-
treeInfos: TreeInfo[],
|
|
30
|
-
treeOrQueue: PublicKey,
|
|
31
|
-
): TreeInfo;
|
|
22
|
+
export declare function getStateTreeInfoByPubkey(treeInfos: TreeInfo[], treeOrQueue: PublicKey): TreeInfo;
|
|
23
|
+
export declare function getTreeInfoByPubkey(treeInfos: TreeInfo[], treeOrQueue: PublicKey): TreeInfo;
|
|
32
24
|
/**
|
|
33
25
|
* @deprecated use {@link selectStateTreeInfo} instead.
|
|
34
26
|
*
|
|
@@ -56,11 +48,7 @@ export declare function pickRandomTreeAndQueue(infos: TreeInfo[]): {
|
|
|
56
48
|
*
|
|
57
49
|
* @returns A pseudo-randomly selected tree info
|
|
58
50
|
*/
|
|
59
|
-
export declare function selectStateTreeInfo(
|
|
60
|
-
infos: TreeInfo[],
|
|
61
|
-
treeType?: TreeType,
|
|
62
|
-
useMaxConcurrency?: boolean,
|
|
63
|
-
): TreeInfo;
|
|
51
|
+
export declare function selectStateTreeInfo(infos: TreeInfo[], treeType?: TreeType, useMaxConcurrency?: boolean): TreeInfo;
|
|
64
52
|
/**
|
|
65
53
|
* Get active state tree infos from LUTs.
|
|
66
54
|
*
|
|
@@ -69,10 +57,7 @@ export declare function selectStateTreeInfo(
|
|
|
69
57
|
*
|
|
70
58
|
* @returns The active state tree infos
|
|
71
59
|
*/
|
|
72
|
-
export declare function getAllStateTreeInfos({
|
|
73
|
-
connection,
|
|
74
|
-
stateTreeLUTPairs,
|
|
75
|
-
}: {
|
|
60
|
+
export declare function getAllStateTreeInfos({ connection, stateTreeLUTPairs, }: {
|
|
76
61
|
connection: Connection;
|
|
77
62
|
stateTreeLUTPairs: StateTreeLUTPair[];
|
|
78
63
|
}): Promise<TreeInfo[]>;
|
|
@@ -8,15 +8,11 @@ export declare class PackedAccounts {
|
|
|
8
8
|
* Create PackedAccounts with system accounts pre-added.
|
|
9
9
|
* Auto-selects V1 or V2 account layout based on featureFlags.
|
|
10
10
|
*/
|
|
11
|
-
static newWithSystemAccounts(
|
|
12
|
-
config: SystemAccountMetaConfig,
|
|
13
|
-
): PackedAccounts;
|
|
11
|
+
static newWithSystemAccounts(config: SystemAccountMetaConfig): PackedAccounts;
|
|
14
12
|
/**
|
|
15
13
|
* @deprecated Use newWithSystemAccounts - it auto-selects V2 when appropriate.
|
|
16
14
|
*/
|
|
17
|
-
static newWithSystemAccountsV2(
|
|
18
|
-
config: SystemAccountMetaConfig,
|
|
19
|
-
): PackedAccounts;
|
|
15
|
+
static newWithSystemAccountsV2(config: SystemAccountMetaConfig): PackedAccounts;
|
|
20
16
|
addPreAccountsSigner(pubkey: PublicKey): void;
|
|
21
17
|
addPreAccountsSignerMut(pubkey: PublicKey): void;
|
|
22
18
|
addPreAccountsMeta(accountMeta: AccountMeta): void;
|
|
@@ -30,11 +26,7 @@ export declare class PackedAccounts {
|
|
|
30
26
|
addSystemAccountsV2(config: SystemAccountMetaConfig): void;
|
|
31
27
|
insertOrGet(pubkey: PublicKey): number;
|
|
32
28
|
insertOrGetReadOnly(pubkey: PublicKey): number;
|
|
33
|
-
insertOrGetConfig(
|
|
34
|
-
pubkey: PublicKey,
|
|
35
|
-
isSigner: boolean,
|
|
36
|
-
isWritable: boolean,
|
|
37
|
-
): number;
|
|
29
|
+
insertOrGetConfig(pubkey: PublicKey, isSigner: boolean, isWritable: boolean): number;
|
|
38
30
|
private hashSetAccountsToMetas;
|
|
39
31
|
private getOffsets;
|
|
40
32
|
toAccountMetas(): {
|
|
@@ -50,23 +42,14 @@ export declare class SystemAccountMetaConfig {
|
|
|
50
42
|
solPoolPda?: PublicKey;
|
|
51
43
|
private constructor();
|
|
52
44
|
static new(selfProgram: PublicKey): SystemAccountMetaConfig;
|
|
53
|
-
static newWithCpiContext(
|
|
54
|
-
selfProgram: PublicKey,
|
|
55
|
-
cpiContext: PublicKey,
|
|
56
|
-
): SystemAccountMetaConfig;
|
|
45
|
+
static newWithCpiContext(selfProgram: PublicKey, cpiContext: PublicKey): SystemAccountMetaConfig;
|
|
57
46
|
}
|
|
58
47
|
/**
|
|
59
48
|
* @deprecated V1 system account layout. Use getLightSystemAccountMetas which auto-selects.
|
|
60
49
|
*/
|
|
61
|
-
export declare function getLightSystemAccountMetasLegacy(
|
|
62
|
-
config: SystemAccountMetaConfig,
|
|
63
|
-
): AccountMeta[];
|
|
50
|
+
export declare function getLightSystemAccountMetasLegacy(config: SystemAccountMetaConfig): AccountMeta[];
|
|
64
51
|
/**
|
|
65
52
|
* Get Light system account metas. Auto-selects V1 or V2 layout based on featureFlags.
|
|
66
53
|
*/
|
|
67
|
-
export declare function getLightSystemAccountMetas(
|
|
68
|
-
|
|
69
|
-
): AccountMeta[];
|
|
70
|
-
export declare function getLightSystemAccountMetasV2(
|
|
71
|
-
config: SystemAccountMetaConfig,
|
|
72
|
-
): AccountMeta[];
|
|
54
|
+
export declare function getLightSystemAccountMetas(config: SystemAccountMetaConfig): AccountMeta[];
|
|
55
|
+
export declare function getLightSystemAccountMetasV2(config: SystemAccountMetaConfig): AccountMeta[];
|