@lightprotocol/stateless.js 0.21.0 → 0.22.0
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 -2
- package/dist/cjs/browser/actions/create-account.d.ts +3 -3
- package/dist/cjs/browser/actions/transfer.d.ts +1 -2
- package/dist/cjs/browser/constants.d.ts +26 -3
- package/dist/cjs/browser/index.cjs +1 -1
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/browser/index.d.ts +0 -2
- package/dist/cjs/browser/programs/index.d.ts +0 -1
- package/dist/cjs/browser/{idl.d.ts → programs/system/idl.d.ts} +5 -27
- package/dist/cjs/browser/programs/system/index.d.ts +5 -0
- package/dist/cjs/{node/programs → browser/programs/system}/layout.d.ts +10 -1
- package/dist/cjs/{node/instruction/pack-compressed-accounts.d.ts → browser/programs/system/pack.d.ts} +28 -3
- package/dist/cjs/browser/programs/{system.d.ts → system/program.d.ts} +13 -28
- package/dist/cjs/browser/programs/system/select-compressed-accounts.d.ts +10 -0
- package/dist/cjs/browser/rpc-interface.d.ts +1553 -11
- package/dist/cjs/browser/rpc.d.ts +14 -34
- package/dist/cjs/browser/state/compressed-account.d.ts +140 -6
- package/dist/cjs/browser/state/types.d.ts +265 -26
- package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +1 -10
- package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +2 -2
- package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +14 -38
- package/dist/cjs/browser/utils/calculate-compute-unit-price.d.ts +1 -1
- package/dist/cjs/browser/utils/conversion.d.ts +2 -0
- package/dist/cjs/browser/utils/get-state-tree-infos.d.ts +16 -9
- package/dist/cjs/browser/utils/index.d.ts +1 -2
- package/dist/cjs/browser/utils/send-and-confirm.d.ts +1 -1
- package/dist/cjs/browser/utils/validation.d.ts +2 -2
- package/dist/cjs/node/actions/compress.d.ts +2 -2
- package/dist/cjs/node/actions/create-account.d.ts +3 -3
- package/dist/cjs/node/actions/transfer.d.ts +1 -2
- package/dist/cjs/node/constants.d.ts +26 -3
- package/dist/cjs/node/index.cjs +1 -1
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/node/index.d.ts +0 -2
- package/dist/cjs/node/programs/index.d.ts +0 -1
- package/dist/cjs/node/{idl.d.ts → programs/system/idl.d.ts} +5 -27
- package/dist/cjs/node/programs/system/index.d.ts +5 -0
- package/dist/cjs/{browser/programs → node/programs/system}/layout.d.ts +10 -1
- package/dist/cjs/{browser/instruction/pack-compressed-accounts.d.ts → node/programs/system/pack.d.ts} +28 -3
- package/dist/cjs/node/programs/{system.d.ts → system/program.d.ts} +13 -28
- package/dist/cjs/node/programs/system/select-compressed-accounts.d.ts +10 -0
- package/dist/cjs/node/rpc-interface.d.ts +1553 -11
- package/dist/cjs/node/rpc.d.ts +14 -34
- package/dist/cjs/node/state/compressed-account.d.ts +140 -6
- package/dist/cjs/node/state/types.d.ts +265 -26
- package/dist/cjs/node/test-helpers/test-rpc/get-compressed-accounts.d.ts +1 -10
- package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +2 -2
- package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +14 -38
- package/dist/cjs/node/utils/calculate-compute-unit-price.d.ts +1 -1
- package/dist/cjs/node/utils/conversion.d.ts +2 -0
- package/dist/cjs/node/utils/get-state-tree-infos.d.ts +16 -9
- package/dist/cjs/node/utils/index.d.ts +1 -2
- package/dist/cjs/node/utils/send-and-confirm.d.ts +1 -1
- package/dist/cjs/node/utils/validation.d.ts +2 -2
- package/dist/types/index.d.ts +2784 -877
- package/package.json +13 -6
- package/dist/cjs/browser/instruction/index.d.ts +0 -1
- package/dist/cjs/node/instruction/index.d.ts +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
|
-
import { PublicKey, Connection, Commitment, Keypair, Signer,
|
|
2
|
+
import { PublicKey, Connection, Commitment, Keypair, Signer, TransactionInstruction, AddressLookupTableAccount, VersionedTransaction, ConfirmOptions, TransactionSignature, RpcResponseAndContext, SignatureResult, DataSlice, MemcmpFilter, ConnectionConfig, ParsedTransactionWithMeta, AccountMeta } from '@solana/web3.js';
|
|
3
3
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
4
4
|
import { Struct } from 'superstruct';
|
|
5
5
|
import BN from 'bn.js';
|
|
@@ -94,7 +94,7 @@ declare function confirmTransaction(connection: Connection, signature: string, c
|
|
|
94
94
|
* @param targetLamports - Target priority fee in lamports
|
|
95
95
|
* @param computeUnits - Expected compute units used by the transaction
|
|
96
96
|
* @returns microLamports per compute unit (use in
|
|
97
|
-
*
|
|
97
|
+
* {@link https://github.com/solana-foundation/solana-web3.js/blob/maintenance/v1.x/src/programs/compute-budget.ts#L218})
|
|
98
98
|
*/
|
|
99
99
|
declare function calculateComputeUnitPrice(targetLamports: number, computeUnits: number): number;
|
|
100
100
|
|
|
@@ -128,163 +128,11 @@ declare function hashToBn254FieldSizeBe(bytes: Buffer$1): [Buffer$1, number] | n
|
|
|
128
128
|
declare function hashvToBn254FieldSizeBe(bytes: Uint8Array[]): Uint8Array;
|
|
129
129
|
/** Mutates array in place */
|
|
130
130
|
declare function pushUniqueItems<T>(items: T[], map: T[]): void;
|
|
131
|
+
declare function convertInvokeCpiWithReadOnlyToInvoke(data: any): InstructionDataInvoke;
|
|
131
132
|
|
|
132
133
|
/** @internal remove signer from signers if part of signers */
|
|
133
134
|
declare function dedupeSigner(signer: Signer, signers: Signer[]): Signer[];
|
|
134
135
|
|
|
135
|
-
declare const FIELD_SIZE: BN;
|
|
136
|
-
declare const HIGHEST_ADDRESS_PLUS_ONE: BN;
|
|
137
|
-
declare const COMPUTE_BUDGET_PATTERN: number[];
|
|
138
|
-
declare const INVOKE_DISCRIMINATOR: Buffer$1;
|
|
139
|
-
declare const INVOKE_CPI_DISCRIMINATOR: Buffer$1;
|
|
140
|
-
declare const INSERT_INTO_QUEUES_DISCRIMINATOR: Buffer$1;
|
|
141
|
-
declare const noopProgram = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
|
|
142
|
-
declare const lightProgram = "SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7";
|
|
143
|
-
declare const accountCompressionProgram = "compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq";
|
|
144
|
-
declare const getRegisteredProgramPda: () => PublicKey;
|
|
145
|
-
declare const getAccountCompressionAuthority: () => PublicKey;
|
|
146
|
-
declare const defaultStaticAccounts: () => PublicKey[];
|
|
147
|
-
declare const defaultStaticAccountsStruct: () => {
|
|
148
|
-
registeredProgramPda: PublicKey;
|
|
149
|
-
noopProgram: PublicKey;
|
|
150
|
-
accountCompressionProgram: PublicKey;
|
|
151
|
-
accountCompressionAuthority: PublicKey;
|
|
152
|
-
cpiSignatureAccount: null;
|
|
153
|
-
};
|
|
154
|
-
type StateTreeLUTPair = {
|
|
155
|
-
stateTreeLookupTable: PublicKey;
|
|
156
|
-
nullifyLookupTable: PublicKey;
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* Returns the Default Public State Tree LUTs for Devnet and Mainnet-Beta.
|
|
160
|
-
*/
|
|
161
|
-
declare const defaultStateTreeLookupTables: () => {
|
|
162
|
-
mainnet: StateTreeLUTPair[];
|
|
163
|
-
devnet: StateTreeLUTPair[];
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* @internal
|
|
167
|
-
*/
|
|
168
|
-
declare const isLocalTest: (url: string) => boolean;
|
|
169
|
-
/**
|
|
170
|
-
* @internal
|
|
171
|
-
*/
|
|
172
|
-
declare const localTestActiveStateTreeInfo: () => StateTreeInfo[];
|
|
173
|
-
declare const getDefaultAddressTreeInfo: () => {
|
|
174
|
-
tree: PublicKey;
|
|
175
|
-
queue: PublicKey;
|
|
176
|
-
cpiContext: null;
|
|
177
|
-
treeType: TreeType;
|
|
178
|
-
nextTreeInfo: null;
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* @deprecated use {@link rpc.getStateTreeInfos} and {@link selectStateTreeInfo} instead.
|
|
182
|
-
* for address trees, use {@link getDefaultAddressTreeInfo} instead.
|
|
183
|
-
* Use only with Localnet testing.
|
|
184
|
-
* For public networks, fetch via {@link defaultStateTreeLookupTables} and {@link getAllStateTreeInfos}.
|
|
185
|
-
*/
|
|
186
|
-
declare const defaultTestStateTreeAccounts: () => {
|
|
187
|
-
nullifierQueue: PublicKey;
|
|
188
|
-
merkleTree: PublicKey;
|
|
189
|
-
merkleTreeHeight: number;
|
|
190
|
-
addressTree: PublicKey;
|
|
191
|
-
addressQueue: PublicKey;
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* @internal testing only
|
|
195
|
-
*/
|
|
196
|
-
declare const defaultTestStateTreeAccounts2: () => {
|
|
197
|
-
nullifierQueue2: PublicKey;
|
|
198
|
-
merkleTree2: PublicKey;
|
|
199
|
-
};
|
|
200
|
-
declare const COMPRESSED_TOKEN_PROGRAM_ID: PublicKey;
|
|
201
|
-
declare const stateTreeLookupTableMainnet = "7i86eQs3GSqHjN47WdWLTCGMW6gde1q96G2EVnUyK2st";
|
|
202
|
-
declare const nullifiedStateTreeLookupTableMainnet = "H9QD4u1fG7KmkAzn2tDXhheushxFe1EcrjGGyEFXeMqT";
|
|
203
|
-
declare const stateTreeLookupTableDevnet = "Dk9mNkbiZXJZ4By8DfSP6HEE4ojZzRvucwpawLeuwq8q";
|
|
204
|
-
declare const nullifiedStateTreeLookupTableDevnet = "AXbHzp1NgjLvpfnD6JRTTovXZ7APUCdtWZFCRr5tCxse";
|
|
205
|
-
declare const nullifierQueuePubkey = "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148";
|
|
206
|
-
declare const cpiContextPubkey = "cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fonubE4";
|
|
207
|
-
declare const merkletreePubkey = "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT";
|
|
208
|
-
declare const addressTree = "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2";
|
|
209
|
-
declare const addressQueue = "aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F";
|
|
210
|
-
declare const merkleTree2Pubkey = "smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho";
|
|
211
|
-
declare const nullifierQueue2Pubkey = "nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X";
|
|
212
|
-
declare const cpiContext2Pubkey = "cpi2cdhkH5roePvcudTgUL8ppEBfTay1desGh8G8QxK";
|
|
213
|
-
declare const confirmConfig: ConfirmOptions;
|
|
214
|
-
declare const DEFAULT_MERKLE_TREE_HEIGHT = 26;
|
|
215
|
-
declare const DEFAULT_MERKLE_TREE_ROOTS = 2800;
|
|
216
|
-
/** Threshold (per asset) at which new in-UTXOs get merged, in order to reduce UTXO pool size */
|
|
217
|
-
declare const UTXO_MERGE_THRESHOLD = 20;
|
|
218
|
-
declare const UTXO_MERGE_MAXIMUM = 10;
|
|
219
|
-
/**
|
|
220
|
-
* Treshold after which the currently used transaction Merkle tree is switched
|
|
221
|
-
* to the next one
|
|
222
|
-
*/
|
|
223
|
-
declare const TRANSACTION_MERKLE_TREE_ROLLOVER_THRESHOLD: BN;
|
|
224
|
-
/**
|
|
225
|
-
* Fee to provide continous funding for the state Merkle tree.
|
|
226
|
-
* Once the state Merkle tree is at 95% capacity the accumulated fees
|
|
227
|
-
* will be used to fund the next state Merkle tree with the same parameters.
|
|
228
|
-
*
|
|
229
|
-
* Is charged per output compressed account.
|
|
230
|
-
*/
|
|
231
|
-
declare const STATE_MERKLE_TREE_ROLLOVER_FEE: BN;
|
|
232
|
-
/**
|
|
233
|
-
* Fee to provide continous funding for the address queue and address Merkle tree.
|
|
234
|
-
* Once the address Merkle tree is at 95% capacity the accumulated fees
|
|
235
|
-
* will be used to fund the next address queue and address tree with the same parameters.
|
|
236
|
-
*
|
|
237
|
-
* Is charged per newly created address.
|
|
238
|
-
*/
|
|
239
|
-
declare const ADDRESS_QUEUE_ROLLOVER_FEE: BN;
|
|
240
|
-
/**
|
|
241
|
-
* Is charged if the transaction nullifies at least one compressed account.
|
|
242
|
-
*/
|
|
243
|
-
declare const STATE_MERKLE_TREE_NETWORK_FEE: BN;
|
|
244
|
-
/**
|
|
245
|
-
* Is charged if the transaction creates at least one address.
|
|
246
|
-
*/
|
|
247
|
-
declare const ADDRESS_TREE_NETWORK_FEE: BN;
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* @deprecated use {@link selectStateTreeInfo} instead.
|
|
251
|
-
*
|
|
252
|
-
* Get a random tree and queue from a set of provided state tree infos.
|
|
253
|
-
*
|
|
254
|
-
* @param infos Set of state tree infos
|
|
255
|
-
* @returns A random tree and queue
|
|
256
|
-
*/
|
|
257
|
-
declare function pickRandomTreeAndQueue(infos: StateTreeInfo[]): {
|
|
258
|
-
tree: PublicKey;
|
|
259
|
-
queue: PublicKey;
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* Get a pseudo-random active state tree info from the set of provided state
|
|
263
|
-
* tree infos.
|
|
264
|
-
*
|
|
265
|
-
* Using this mitigates write lock contention on state trees.
|
|
266
|
-
*
|
|
267
|
-
* @param infos Set of state tree infos
|
|
268
|
-
* @param treeType The type of tree. Defaults to `TreeType.StateV1`
|
|
269
|
-
* @param useMaxConcurrency If true, return all infos. If false, return at
|
|
270
|
-
* most {@link MAX_HOTSPOTS}. Defaults to `false`.
|
|
271
|
-
*
|
|
272
|
-
* @returns A pseudo-randomly selected tree info
|
|
273
|
-
*/
|
|
274
|
-
declare function selectStateTreeInfo(infos: StateTreeInfo[], treeType?: TreeType, useMaxConcurrency?: boolean): StateTreeInfo;
|
|
275
|
-
/**
|
|
276
|
-
* Get active state tree infos from LUTs.
|
|
277
|
-
*
|
|
278
|
-
* @param connection The connection to the cluster
|
|
279
|
-
* @param stateTreeLUTPairs The state tree lookup table pairs
|
|
280
|
-
*
|
|
281
|
-
* @returns The active state tree infos
|
|
282
|
-
*/
|
|
283
|
-
declare function getAllStateTreeInfos({ connection, stateTreeLUTPairs, }: {
|
|
284
|
-
connection: Connection;
|
|
285
|
-
stateTreeLUTPairs: StateTreeLUTPair[];
|
|
286
|
-
}): Promise<StateTreeInfo[]>;
|
|
287
|
-
|
|
288
136
|
interface GnarkProofJson {
|
|
289
137
|
ar: string[];
|
|
290
138
|
bs: string[][];
|
|
@@ -341,7 +189,7 @@ declare function sendAndConfirmTx(rpc: Rpc, tx: VersionedTransaction, confirmOpt
|
|
|
341
189
|
* @param blockHashCtx blockhash context for confirmation
|
|
342
190
|
* @return SignatureResult
|
|
343
191
|
*/
|
|
344
|
-
declare function confirmTx(rpc: Rpc, txId: string, confirmOptions?: ConfirmOptions,
|
|
192
|
+
declare function confirmTx(rpc: Rpc, txId: string, confirmOptions?: ConfirmOptions, _blockHashCtx?: {
|
|
345
193
|
blockhash: string;
|
|
346
194
|
lastValidBlockHeight: number;
|
|
347
195
|
}): Promise<RpcResponseAndContext<SignatureResult>>;
|
|
@@ -360,6 +208,13 @@ declare function buildAndSignTx(instructions: TransactionInstruction[], payer: S
|
|
|
360
208
|
|
|
361
209
|
declare function sleep(ms: number): Promise<void>;
|
|
362
210
|
|
|
211
|
+
declare const validateSufficientBalance: (balance: BN) => void;
|
|
212
|
+
declare const validateSameOwner: (compressedAccounts: CompressedAccountLegacy[] | CompressedAccountWithMerkleContext[]) => void;
|
|
213
|
+
declare const validateNumbersForProof: (hashesLength: number, newAddressesLength: number) => void;
|
|
214
|
+
declare const validateNumbersForInclusionProof: (hashesLength: number) => void;
|
|
215
|
+
declare const validateNumbersForNonInclusionProof: (newAddressesLength: number) => void;
|
|
216
|
+
declare const validateNumbers: (length: number, allowedNumbers: number[], type: string) => void;
|
|
217
|
+
|
|
363
218
|
/**
|
|
364
219
|
* Create two lookup tables storing all public state tree and queue addresses
|
|
365
220
|
* returns lookup table addresses and txId
|
|
@@ -428,111 +283,320 @@ declare function nullifyLookupTable({ connection, fullStateTreeAddress, nullifyL
|
|
|
428
283
|
txId: string;
|
|
429
284
|
}>;
|
|
430
285
|
|
|
431
|
-
declare
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
declare const validateNumbersForInclusionProof: (hashesLength: number) => void;
|
|
435
|
-
declare const validateNumbersForNonInclusionProof: (newAddressesLength: number) => void;
|
|
436
|
-
declare const validateNumbers: (length: number, allowedNumbers: number[], type: string) => void;
|
|
437
|
-
|
|
438
|
-
declare enum TreeType {
|
|
439
|
-
/**
|
|
440
|
-
* v1 state merkle tree
|
|
441
|
-
*/
|
|
442
|
-
StateV1 = 1,
|
|
443
|
-
/**
|
|
444
|
-
* v1 address merkle tree
|
|
445
|
-
*/
|
|
446
|
-
AddressV1 = 2,
|
|
447
|
-
/**
|
|
448
|
-
* v2 state merkle tree
|
|
449
|
-
*/
|
|
450
|
-
StateV2 = 3,
|
|
451
|
-
/**
|
|
452
|
-
* v2 address merkle tree
|
|
453
|
-
*/
|
|
454
|
-
AddressV2 = 4
|
|
286
|
+
declare enum VERSION {
|
|
287
|
+
V1 = "V1",
|
|
288
|
+
V2 = "V2"
|
|
455
289
|
}
|
|
456
290
|
/**
|
|
457
|
-
|
|
458
|
-
*
|
|
459
|
-
*
|
|
291
|
+
/**
|
|
292
|
+
* @internal
|
|
293
|
+
* Feature flags. Only use if you know what you are doing.
|
|
460
294
|
*/
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
cpiContext: PublicKey | null;
|
|
465
|
-
treeType: TreeType;
|
|
295
|
+
declare const featureFlags: {
|
|
296
|
+
version: VERSION;
|
|
297
|
+
isV2: () => boolean;
|
|
466
298
|
};
|
|
467
299
|
/**
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
* Onchain Accounts are subject to Solana's write-lock limits.
|
|
472
|
-
*
|
|
473
|
-
* To load balance transactions, use {@link selectStateTreeInfo} to
|
|
474
|
-
* select a random tree from a range of active trees.
|
|
475
|
-
*
|
|
476
|
-
* Example:
|
|
477
|
-
* ```typescript
|
|
478
|
-
* const infos = await rpc.getStateTreeInfos();
|
|
479
|
-
* const info = selectStateTreeInfo(infos);
|
|
480
|
-
* const ix = await CompressedTokenProgram.compress({
|
|
481
|
-
* // ...
|
|
482
|
-
* outputStateTreeInfo: info
|
|
483
|
-
* });
|
|
484
|
-
* ```
|
|
300
|
+
* Returns the correct endpoint name for the current API version. E.g.
|
|
301
|
+
* versionedEndpoint('getCompressedAccount') -> 'getCompressedAccount' (V1)
|
|
302
|
+
* or 'getCompressedAccountV2' (V2)
|
|
485
303
|
*/
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
304
|
+
declare const versionedEndpoint: (base: string) => string;
|
|
305
|
+
declare const FIELD_SIZE: BN;
|
|
306
|
+
declare const HIGHEST_ADDRESS_PLUS_ONE: BN;
|
|
307
|
+
declare const COMPUTE_BUDGET_PATTERN: number[];
|
|
308
|
+
declare const INVOKE_DISCRIMINATOR: Buffer$1;
|
|
309
|
+
declare const INVOKE_CPI_DISCRIMINATOR: Buffer$1;
|
|
310
|
+
declare const INVOKE_CPI_WITH_READ_ONLY_DISCRIMINATOR: Buffer$1;
|
|
311
|
+
declare const INVOKE_CPI_WITH_ACCOUNT_INFO_DISCRIMINATOR: Buffer$1;
|
|
312
|
+
declare const INSERT_INTO_QUEUES_DISCRIMINATOR: Buffer$1;
|
|
313
|
+
declare const noopProgram = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
|
|
314
|
+
declare const lightSystemProgram = "SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7";
|
|
315
|
+
declare const accountCompressionProgram = "compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq";
|
|
316
|
+
declare const getRegisteredProgramPda: () => PublicKey;
|
|
317
|
+
declare const getAccountCompressionAuthority: () => PublicKey;
|
|
318
|
+
declare const defaultStaticAccounts: () => PublicKey[];
|
|
319
|
+
declare const defaultStaticAccountsStruct: () => {
|
|
320
|
+
registeredProgramPda: PublicKey;
|
|
321
|
+
noopProgram: PublicKey;
|
|
322
|
+
accountCompressionProgram: PublicKey;
|
|
323
|
+
accountCompressionAuthority: PublicKey;
|
|
324
|
+
cpiSignatureAccount: null;
|
|
325
|
+
};
|
|
326
|
+
type StateTreeLUTPair = {
|
|
327
|
+
stateTreeLookupTable: PublicKey;
|
|
328
|
+
nullifyLookupTable: PublicKey;
|
|
507
329
|
};
|
|
508
330
|
/**
|
|
509
|
-
*
|
|
510
|
-
* stores PDAs in address trees.
|
|
331
|
+
* Returns the Default Public State Tree LUTs for Devnet and Mainnet-Beta.
|
|
511
332
|
*/
|
|
512
|
-
|
|
513
|
-
|
|
333
|
+
declare const defaultStateTreeLookupTables: () => {
|
|
334
|
+
mainnet: StateTreeLUTPair[];
|
|
335
|
+
devnet: StateTreeLUTPair[];
|
|
514
336
|
};
|
|
515
|
-
interface PackedCompressedAccountWithMerkleContext {
|
|
516
|
-
compressedAccount: CompressedAccount;
|
|
517
|
-
merkleContext: PackedMerkleContext;
|
|
518
|
-
rootIndex: number;
|
|
519
|
-
readOnly: boolean;
|
|
520
|
-
}
|
|
521
|
-
interface PackedMerkleContext {
|
|
522
|
-
merkleTreePubkeyIndex: number;
|
|
523
|
-
nullifierQueuePubkeyIndex: number;
|
|
524
|
-
leafIndex: number;
|
|
525
|
-
queueIndex: null | QueueIndex;
|
|
526
|
-
}
|
|
527
|
-
interface QueueIndex {
|
|
528
|
-
queueId: number;
|
|
529
|
-
index: number;
|
|
530
|
-
}
|
|
531
337
|
/**
|
|
532
|
-
*
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
338
|
+
* @internal
|
|
339
|
+
*/
|
|
340
|
+
declare const isLocalTest: (url: string) => boolean;
|
|
341
|
+
/**
|
|
342
|
+
* @internal
|
|
343
|
+
*/
|
|
344
|
+
declare const localTestActiveStateTreeInfos: () => TreeInfo[];
|
|
345
|
+
declare const getDefaultAddressTreeInfo: () => {
|
|
346
|
+
tree: PublicKey;
|
|
347
|
+
queue: PublicKey;
|
|
348
|
+
cpiContext: null;
|
|
349
|
+
treeType: TreeType;
|
|
350
|
+
nextTreeInfo: null;
|
|
351
|
+
};
|
|
352
|
+
/**
|
|
353
|
+
* @deprecated use {@link rpc.getStateTreeInfos} and {@link selectStateTreeInfo} instead.
|
|
354
|
+
* for address trees, use {@link getDefaultAddressTreeInfo} instead.
|
|
355
|
+
* Use only with Localnet testing.
|
|
356
|
+
* For public networks, fetch via {@link defaultStateTreeLookupTables} and {@link getAllStateTreeInfos}.
|
|
357
|
+
*/
|
|
358
|
+
declare const defaultTestStateTreeAccounts: () => {
|
|
359
|
+
nullifierQueue: PublicKey;
|
|
360
|
+
merkleTree: PublicKey;
|
|
361
|
+
merkleTreeHeight: number;
|
|
362
|
+
addressTree: PublicKey;
|
|
363
|
+
addressQueue: PublicKey;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* @internal testing only
|
|
367
|
+
*/
|
|
368
|
+
declare const defaultTestStateTreeAccounts2: () => {
|
|
369
|
+
nullifierQueue2: PublicKey;
|
|
370
|
+
merkleTree2: PublicKey;
|
|
371
|
+
};
|
|
372
|
+
declare const COMPRESSED_TOKEN_PROGRAM_ID: PublicKey;
|
|
373
|
+
declare const stateTreeLookupTableMainnet = "7i86eQs3GSqHjN47WdWLTCGMW6gde1q96G2EVnUyK2st";
|
|
374
|
+
declare const nullifiedStateTreeLookupTableMainnet = "H9QD4u1fG7KmkAzn2tDXhheushxFe1EcrjGGyEFXeMqT";
|
|
375
|
+
declare const stateTreeLookupTableDevnet = "Dk9mNkbiZXJZ4By8DfSP6HEE4ojZzRvucwpawLeuwq8q";
|
|
376
|
+
declare const nullifiedStateTreeLookupTableDevnet = "AXbHzp1NgjLvpfnD6JRTTovXZ7APUCdtWZFCRr5tCxse";
|
|
377
|
+
declare const nullifierQueuePubkey = "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148";
|
|
378
|
+
declare const cpiContextPubkey = "cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fonubE4";
|
|
379
|
+
declare const merkletreePubkey = "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT";
|
|
380
|
+
declare const addressTree = "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2";
|
|
381
|
+
declare const addressQueue = "aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F";
|
|
382
|
+
declare const merkleTree2Pubkey = "smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho";
|
|
383
|
+
declare const nullifierQueue2Pubkey = "nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X";
|
|
384
|
+
declare const cpiContext2Pubkey = "cpi2cdhkH5roePvcudTgUL8ppEBfTay1desGh8G8QxK";
|
|
385
|
+
declare const batchMerkleTree = "HLKs5NJ8FXkJg8BrzJt56adFYYuwg5etzDtBbQYTsixu";
|
|
386
|
+
declare const batchQueue = "6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU";
|
|
387
|
+
declare const confirmConfig: ConfirmOptions;
|
|
388
|
+
declare const DEFAULT_MERKLE_TREE_HEIGHT = 26;
|
|
389
|
+
declare const DEFAULT_MERKLE_TREE_ROOTS = 2800;
|
|
390
|
+
/** Threshold (per asset) at which new in-UTXOs get merged, in order to reduce UTXO pool size */
|
|
391
|
+
declare const UTXO_MERGE_THRESHOLD = 20;
|
|
392
|
+
declare const UTXO_MERGE_MAXIMUM = 10;
|
|
393
|
+
/**
|
|
394
|
+
* Treshold after which the currently used transaction Merkle tree is switched
|
|
395
|
+
* to the next one
|
|
396
|
+
*/
|
|
397
|
+
declare const TRANSACTION_MERKLE_TREE_ROLLOVER_THRESHOLD: BN;
|
|
398
|
+
/**
|
|
399
|
+
* Fee to provide continous funding for the state Merkle tree.
|
|
400
|
+
* Once the state Merkle tree is at 95% capacity the accumulated fees
|
|
401
|
+
* will be used to fund the next state Merkle tree with the same parameters.
|
|
402
|
+
*
|
|
403
|
+
* Is charged per output compressed account.
|
|
404
|
+
*/
|
|
405
|
+
declare const STATE_MERKLE_TREE_ROLLOVER_FEE: BN;
|
|
406
|
+
/**
|
|
407
|
+
* Fee to provide continous funding for the address queue and address Merkle tree.
|
|
408
|
+
* Once the address Merkle tree is at 95% capacity the accumulated fees
|
|
409
|
+
* will be used to fund the next address queue and address tree with the same parameters.
|
|
410
|
+
*
|
|
411
|
+
* Is charged per newly created address.
|
|
412
|
+
*/
|
|
413
|
+
declare const ADDRESS_QUEUE_ROLLOVER_FEE: BN;
|
|
414
|
+
/**
|
|
415
|
+
* Is charged if the transaction nullifies at least one compressed account.
|
|
416
|
+
*/
|
|
417
|
+
declare const STATE_MERKLE_TREE_NETWORK_FEE: BN;
|
|
418
|
+
/**
|
|
419
|
+
* Is charged if the transaction creates at least one address.
|
|
420
|
+
*/
|
|
421
|
+
declare const ADDRESS_TREE_NETWORK_FEE: BN;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* @deprecated use {@link getTreeInfoByPubkey} instead
|
|
425
|
+
*/
|
|
426
|
+
declare function getStateTreeInfoByPubkey(treeInfos: TreeInfo[], treeOrQueue: PublicKey): TreeInfo;
|
|
427
|
+
declare function getTreeInfoByPubkey(treeInfos: TreeInfo[], treeOrQueue: PublicKey): TreeInfo;
|
|
428
|
+
/**
|
|
429
|
+
* @deprecated use {@link selectStateTreeInfo} instead.
|
|
430
|
+
*
|
|
431
|
+
* Get a random tree and queue from a set of provided state tree infos.
|
|
432
|
+
*
|
|
433
|
+
* @param infos Set of state tree infos
|
|
434
|
+
* @returns A random tree and queue
|
|
435
|
+
*/
|
|
436
|
+
declare function pickRandomTreeAndQueue(infos: TreeInfo[]): {
|
|
437
|
+
tree: PublicKey;
|
|
438
|
+
queue: PublicKey;
|
|
439
|
+
};
|
|
440
|
+
/**
|
|
441
|
+
* Select a pseudo-random active state tree info from the set of provided state
|
|
442
|
+
* tree infos.
|
|
443
|
+
*
|
|
444
|
+
* Using this reduces write-lock contention on state trees.
|
|
445
|
+
*
|
|
446
|
+
* @param infos Set of state tree infos
|
|
447
|
+
*
|
|
448
|
+
* @param treeType Optional: Only use if you know what you are
|
|
449
|
+
* doing. The type of tree.
|
|
450
|
+
* @param useMaxConcurrency Optional: Only use if you know what you are
|
|
451
|
+
* doing. If true, select from all infos.
|
|
452
|
+
*
|
|
453
|
+
* @returns A pseudo-randomly selected tree info
|
|
454
|
+
*/
|
|
455
|
+
declare function selectStateTreeInfo(infos: TreeInfo[], treeType?: TreeType, useMaxConcurrency?: boolean): TreeInfo;
|
|
456
|
+
/**
|
|
457
|
+
* Get active state tree infos from LUTs.
|
|
458
|
+
*
|
|
459
|
+
* @param connection The connection to the cluster
|
|
460
|
+
* @param stateTreeLUTPairs The state tree lookup table pairs
|
|
461
|
+
*
|
|
462
|
+
* @returns The active state tree infos
|
|
463
|
+
*/
|
|
464
|
+
declare function getAllStateTreeInfos({ connection, stateTreeLUTPairs, }: {
|
|
465
|
+
connection: Connection;
|
|
466
|
+
stateTreeLUTPairs: StateTreeLUTPair[];
|
|
467
|
+
}): Promise<TreeInfo[]>;
|
|
468
|
+
|
|
469
|
+
declare enum TreeType {
|
|
470
|
+
/**
|
|
471
|
+
* v1 state merkle tree
|
|
472
|
+
*/
|
|
473
|
+
StateV1 = 1,
|
|
474
|
+
/**
|
|
475
|
+
* v1 address merkle tree
|
|
476
|
+
*/
|
|
477
|
+
AddressV1 = 2,
|
|
478
|
+
/**
|
|
479
|
+
* v2 state merkle tree
|
|
480
|
+
*/
|
|
481
|
+
StateV2 = 3,
|
|
482
|
+
/**
|
|
483
|
+
* v2 address merkle tree
|
|
484
|
+
*/
|
|
485
|
+
AddressV2 = 4
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* @deprecated Use {@link TreeInfo} instead.
|
|
489
|
+
*
|
|
490
|
+
* A bundle of active trees for a given tree type.
|
|
491
|
+
*/
|
|
492
|
+
type ActiveTreeBundle = {
|
|
493
|
+
/**
|
|
494
|
+
* Tree.
|
|
495
|
+
*/
|
|
496
|
+
tree: PublicKey;
|
|
497
|
+
/**
|
|
498
|
+
* Queue.
|
|
499
|
+
*/
|
|
500
|
+
queue: PublicKey | null;
|
|
501
|
+
/**
|
|
502
|
+
* CPI context.
|
|
503
|
+
*/
|
|
504
|
+
cpiContext: PublicKey | null;
|
|
505
|
+
/**
|
|
506
|
+
* Tree type.
|
|
507
|
+
*/
|
|
508
|
+
treeType: TreeType;
|
|
509
|
+
};
|
|
510
|
+
/**
|
|
511
|
+
* @deprecated Use {@link TreeInfo} instead.
|
|
512
|
+
*
|
|
513
|
+
* State tree info, versioned via {@link TreeType}. The protocol
|
|
514
|
+
* stores compressed accounts in state trees.
|
|
515
|
+
*/
|
|
516
|
+
type StateTreeInfo = TreeInfo;
|
|
517
|
+
/**
|
|
518
|
+
* Tree info, versioned via {@link TreeType}. The protocol
|
|
519
|
+
* stores compressed accounts in state trees, and PDAs in address trees.
|
|
520
|
+
*
|
|
521
|
+
* Onchain Accounts are subject to Solana's write-lock limits.
|
|
522
|
+
*
|
|
523
|
+
* To load balance transactions, use {@link selectStateTreeInfo} to
|
|
524
|
+
* randomly select a tree from a range of active trees.
|
|
525
|
+
*
|
|
526
|
+
* Example:
|
|
527
|
+
* ```typescript
|
|
528
|
+
* const infos = await rpc.getStateTreeInfos();
|
|
529
|
+
* const info = selectStateTreeInfo(infos);
|
|
530
|
+
* const ix = await CompressedTokenProgram.compress({
|
|
531
|
+
* // ...
|
|
532
|
+
* outputStateTreeInfo: info
|
|
533
|
+
* });
|
|
534
|
+
* ```
|
|
535
|
+
*/
|
|
536
|
+
type TreeInfo = {
|
|
537
|
+
/**
|
|
538
|
+
* Pubkey of the tree account.
|
|
539
|
+
*/
|
|
540
|
+
tree: PublicKey;
|
|
541
|
+
/**
|
|
542
|
+
* Pubkey of the queue account associated with the tree.
|
|
543
|
+
*/
|
|
544
|
+
queue: PublicKey;
|
|
545
|
+
/**
|
|
546
|
+
* The type of tree. One of {@link TreeType}.
|
|
547
|
+
*/
|
|
548
|
+
treeType: TreeType;
|
|
549
|
+
/**
|
|
550
|
+
* Optional compressed cpi context account.
|
|
551
|
+
*/
|
|
552
|
+
cpiContext?: PublicKey;
|
|
553
|
+
/**
|
|
554
|
+
* Next tree info. Is `some` if the next tree should be used for the next
|
|
555
|
+
* state transition.
|
|
556
|
+
*/
|
|
557
|
+
nextTreeInfo: TreeInfo | null;
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* @deprecated Use {@link TreeInfo} instead.
|
|
561
|
+
*
|
|
562
|
+
* Address tree info, versioned via {@link TreeType}. The protocol
|
|
563
|
+
* stores PDAs in address trees.
|
|
564
|
+
*/
|
|
565
|
+
type AddressTreeInfo = Omit<StateTreeInfo, 'cpiContext' | 'nextTreeInfo'> & {
|
|
566
|
+
/**
|
|
567
|
+
* Next tree info.
|
|
568
|
+
*/
|
|
569
|
+
nextTreeInfo: AddressTreeInfo | null;
|
|
570
|
+
};
|
|
571
|
+
/**
|
|
572
|
+
* Packed merkle context.
|
|
573
|
+
*/
|
|
574
|
+
interface PackedMerkleContextLegacy {
|
|
575
|
+
/**
|
|
576
|
+
* Merkle tree pubkey index.
|
|
577
|
+
*/
|
|
578
|
+
merkleTreePubkeyIndex: number;
|
|
579
|
+
/**
|
|
580
|
+
* Queue pubkey index in remaining accounts.
|
|
581
|
+
*/
|
|
582
|
+
queuePubkeyIndex: number;
|
|
583
|
+
/**
|
|
584
|
+
* Leaf index.
|
|
585
|
+
*/
|
|
586
|
+
leafIndex: number;
|
|
587
|
+
/**
|
|
588
|
+
* Whether to prove by index or validity proof.
|
|
589
|
+
*/
|
|
590
|
+
proveByIndex: boolean;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* @deprecated Use {@link CompressedAccount} instead.
|
|
594
|
+
*
|
|
595
|
+
* Describe the generic compressed account details applicable to every
|
|
596
|
+
* compressed account.
|
|
597
|
+
*
|
|
598
|
+
* */
|
|
599
|
+
interface CompressedAccountLegacy {
|
|
536
600
|
/**
|
|
537
601
|
* Public key of program or user owning the account.
|
|
538
602
|
*/
|
|
@@ -551,64 +615,217 @@ interface CompressedAccount {
|
|
|
551
615
|
data: CompressedAccountData | null;
|
|
552
616
|
}
|
|
553
617
|
/**
|
|
618
|
+
* @deprecated Use {@link CompressedAccountMeta} instead.
|
|
619
|
+
*
|
|
554
620
|
* Describe the generic compressed account details applicable to every
|
|
555
621
|
* compressed account.
|
|
556
622
|
*/
|
|
557
623
|
interface OutputCompressedAccountWithPackedContext {
|
|
558
|
-
compressedAccount:
|
|
624
|
+
compressedAccount: CompressedAccountLegacy;
|
|
559
625
|
merkleTreeIndex: number;
|
|
560
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* Compressed account-related proof metadata.
|
|
629
|
+
*/
|
|
630
|
+
type AccountProofInput = {
|
|
631
|
+
hash: BN;
|
|
632
|
+
treeInfo: TreeInfo;
|
|
633
|
+
leafIndex: number;
|
|
634
|
+
rootIndex: number;
|
|
635
|
+
proveByIndex: boolean;
|
|
636
|
+
};
|
|
637
|
+
/**
|
|
638
|
+
* New address proof metadata.
|
|
639
|
+
*/
|
|
640
|
+
type NewAddressProofInput = {
|
|
641
|
+
treeInfo: TreeInfo;
|
|
642
|
+
address: number[];
|
|
643
|
+
rootIndex: number;
|
|
644
|
+
root: BN;
|
|
645
|
+
};
|
|
646
|
+
/**
|
|
647
|
+
* Describes compressed account data.
|
|
648
|
+
*/
|
|
561
649
|
interface CompressedAccountData {
|
|
650
|
+
/**
|
|
651
|
+
* 8 bytes.
|
|
652
|
+
*/
|
|
562
653
|
discriminator: number[];
|
|
654
|
+
/**
|
|
655
|
+
* Data.
|
|
656
|
+
*/
|
|
563
657
|
data: Buffer$1;
|
|
658
|
+
/**
|
|
659
|
+
* 32 bytes.
|
|
660
|
+
*/
|
|
564
661
|
dataHash: number[];
|
|
565
662
|
}
|
|
663
|
+
/**
|
|
664
|
+
* Merkle tree sequence number.
|
|
665
|
+
*/
|
|
566
666
|
interface MerkleTreeSequenceNumber {
|
|
667
|
+
/**
|
|
668
|
+
* Public key.
|
|
669
|
+
*/
|
|
567
670
|
pubkey: PublicKey;
|
|
671
|
+
/**
|
|
672
|
+
* Sequence number.
|
|
673
|
+
*/
|
|
568
674
|
seq: BN;
|
|
569
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* Public transaction event.
|
|
678
|
+
*/
|
|
570
679
|
interface PublicTransactionEvent {
|
|
680
|
+
/**
|
|
681
|
+
* Input compressed account hashes.
|
|
682
|
+
*/
|
|
571
683
|
inputCompressedAccountHashes: number[][];
|
|
684
|
+
/**
|
|
685
|
+
* Output compressed account hashes.
|
|
686
|
+
*/
|
|
572
687
|
outputCompressedAccountHashes: number[][];
|
|
573
|
-
|
|
688
|
+
/**
|
|
689
|
+
* Output compressed accounts.
|
|
690
|
+
*/
|
|
691
|
+
outputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
|
|
692
|
+
/**
|
|
693
|
+
* Output leaf indices.
|
|
694
|
+
*/
|
|
574
695
|
outputLeafIndices: number[];
|
|
696
|
+
/**
|
|
697
|
+
* Sequence numbers.
|
|
698
|
+
*/
|
|
575
699
|
sequenceNumbers: MerkleTreeSequenceNumber[];
|
|
700
|
+
/**
|
|
701
|
+
* Relay fee. Default is null.
|
|
702
|
+
*/
|
|
576
703
|
relayFee: BN | null;
|
|
704
|
+
/**
|
|
705
|
+
* Whether it's a compress or decompress instruction.
|
|
706
|
+
*/
|
|
577
707
|
isCompress: boolean;
|
|
708
|
+
/**
|
|
709
|
+
* If some, it's either a compress or decompress instruction.
|
|
710
|
+
*/
|
|
578
711
|
compressOrDecompressLamports: BN | null;
|
|
712
|
+
/**
|
|
713
|
+
* Public keys.
|
|
714
|
+
*/
|
|
579
715
|
pubkeyArray: PublicKey[];
|
|
716
|
+
/**
|
|
717
|
+
* Message. Default is null.
|
|
718
|
+
*/
|
|
580
719
|
message: Uint8Array | null;
|
|
581
720
|
}
|
|
721
|
+
/**
|
|
722
|
+
* Instruction data for invoke.
|
|
723
|
+
*/
|
|
582
724
|
interface InstructionDataInvoke {
|
|
725
|
+
/**
|
|
726
|
+
* Validity proof.
|
|
727
|
+
*/
|
|
583
728
|
proof: ValidityProof | null;
|
|
729
|
+
/**
|
|
730
|
+
* Input compressed accounts with merkle context.
|
|
731
|
+
*/
|
|
584
732
|
inputCompressedAccountsWithMerkleContext: PackedCompressedAccountWithMerkleContext[];
|
|
733
|
+
/**
|
|
734
|
+
* Output compressed accounts.
|
|
735
|
+
*/
|
|
585
736
|
outputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
|
|
737
|
+
/**
|
|
738
|
+
* Relay fee. Default is null.
|
|
739
|
+
*/
|
|
586
740
|
relayFee: BN | null;
|
|
741
|
+
/**
|
|
742
|
+
* Params for creating new addresses.
|
|
743
|
+
*/
|
|
587
744
|
newAddressParams: NewAddressParamsPacked[];
|
|
745
|
+
/**
|
|
746
|
+
* If some, it's either a compress or decompress instruction.
|
|
747
|
+
*/
|
|
588
748
|
compressOrDecompressLamports: BN | null;
|
|
749
|
+
/**
|
|
750
|
+
* Whether it's a compress or decompress instruction.
|
|
751
|
+
*/
|
|
589
752
|
isCompress: boolean;
|
|
590
753
|
}
|
|
754
|
+
/**
|
|
755
|
+
* Instruction data for invoking a CPI.
|
|
756
|
+
*/
|
|
591
757
|
interface InstructionDataInvokeCpi {
|
|
758
|
+
/**
|
|
759
|
+
* Validity proof.
|
|
760
|
+
*/
|
|
592
761
|
proof: ValidityProof | null;
|
|
762
|
+
/**
|
|
763
|
+
* Input compressed accounts with merkle context.
|
|
764
|
+
*/
|
|
593
765
|
inputCompressedAccountsWithMerkleContext: PackedCompressedAccountWithMerkleContext[];
|
|
766
|
+
/**
|
|
767
|
+
* Output compressed accounts.
|
|
768
|
+
*/
|
|
594
769
|
outputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
|
|
770
|
+
/**
|
|
771
|
+
* Relay fee. Default is null.
|
|
772
|
+
*/
|
|
595
773
|
relayFee: BN | null;
|
|
774
|
+
/**
|
|
775
|
+
* Params for creating new addresses.
|
|
776
|
+
*/
|
|
596
777
|
newAddressParams: NewAddressParamsPacked[];
|
|
778
|
+
/**
|
|
779
|
+
* If some, it's either a compress or decompress instruction.
|
|
780
|
+
*/
|
|
597
781
|
compressOrDecompressLamports: BN | null;
|
|
782
|
+
/**
|
|
783
|
+
* If `compressOrDecompressLamports` is some, whether it's a compress or
|
|
784
|
+
* decompress instruction.
|
|
785
|
+
*/
|
|
598
786
|
isCompress: boolean;
|
|
787
|
+
/**
|
|
788
|
+
* Optional compressed CPI context.
|
|
789
|
+
*/
|
|
599
790
|
compressedCpiContext: CompressedCpiContext | null;
|
|
600
791
|
}
|
|
792
|
+
/**
|
|
793
|
+
* Compressed CPI context.
|
|
794
|
+
*
|
|
795
|
+
* Use if you want to use a single {@link ValidityProof} to update two
|
|
796
|
+
* compressed accounts owned by separate programs.
|
|
797
|
+
*/
|
|
601
798
|
interface CompressedCpiContext {
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
799
|
+
/**
|
|
800
|
+
* Is set by the program that is invoking the CPI to signal that it should
|
|
801
|
+
* set the cpi context.
|
|
802
|
+
*/
|
|
803
|
+
setContext: boolean;
|
|
804
|
+
/**
|
|
805
|
+
* Is set to wipe the cpi context since someone could have set it before
|
|
806
|
+
* with unrelated data.
|
|
807
|
+
*/
|
|
808
|
+
firstSetContext: boolean;
|
|
809
|
+
/**
|
|
810
|
+
* Index of cpi context account in remaining accounts.
|
|
811
|
+
*/
|
|
812
|
+
cpiContextAccountIndex: number;
|
|
605
813
|
}
|
|
606
814
|
/**
|
|
607
815
|
* @deprecated Use {@link ValidityProof} instead.
|
|
608
816
|
*/
|
|
609
817
|
interface CompressedProof {
|
|
818
|
+
/**
|
|
819
|
+
* 32 bytes.
|
|
820
|
+
*/
|
|
610
821
|
a: number[];
|
|
822
|
+
/**
|
|
823
|
+
* 64 bytes.
|
|
824
|
+
*/
|
|
611
825
|
b: number[];
|
|
826
|
+
/**
|
|
827
|
+
* 32 bytes.
|
|
828
|
+
*/
|
|
612
829
|
c: number[];
|
|
613
830
|
}
|
|
614
831
|
/**
|
|
@@ -617,38 +834,124 @@ interface CompressedProof {
|
|
|
617
834
|
* You can request proofs via `rpc.getValidityProof` or
|
|
618
835
|
* `rpc.getValidityProofV0`.
|
|
619
836
|
*
|
|
620
|
-
* One proof
|
|
621
|
-
*
|
|
837
|
+
* One proof can prove the existence of N compressed accounts or the uniqueness
|
|
838
|
+
* of N PDAs.
|
|
622
839
|
*/
|
|
623
840
|
interface ValidityProof {
|
|
841
|
+
/**
|
|
842
|
+
* 32 bytes.
|
|
843
|
+
*/
|
|
624
844
|
a: number[];
|
|
845
|
+
/**
|
|
846
|
+
* 64 bytes.
|
|
847
|
+
*/
|
|
625
848
|
b: number[];
|
|
849
|
+
/**
|
|
850
|
+
* 32 bytes.
|
|
851
|
+
*/
|
|
626
852
|
c: number[];
|
|
627
853
|
}
|
|
854
|
+
/**
|
|
855
|
+
* Packed token data for input compressed accounts.
|
|
856
|
+
*/
|
|
628
857
|
interface InputTokenDataWithContext {
|
|
858
|
+
/**
|
|
859
|
+
* Amount of tokens.
|
|
860
|
+
*/
|
|
629
861
|
amount: BN;
|
|
862
|
+
/**
|
|
863
|
+
* Delegate index.
|
|
864
|
+
*/
|
|
630
865
|
delegateIndex: number | null;
|
|
631
|
-
|
|
866
|
+
/**
|
|
867
|
+
* Merkle context.
|
|
868
|
+
*/
|
|
869
|
+
merkleContext: PackedMerkleContextLegacy;
|
|
870
|
+
/**
|
|
871
|
+
* Root index.
|
|
872
|
+
*/
|
|
632
873
|
rootIndex: number;
|
|
874
|
+
/**
|
|
875
|
+
* Lamports.
|
|
876
|
+
*/
|
|
633
877
|
lamports: BN | null;
|
|
878
|
+
/**
|
|
879
|
+
* Tlv.
|
|
880
|
+
*/
|
|
634
881
|
tlv: Buffer$1 | null;
|
|
635
882
|
}
|
|
883
|
+
/**
|
|
884
|
+
* Token data.
|
|
885
|
+
*/
|
|
636
886
|
type TokenData$1 = {
|
|
887
|
+
/**
|
|
888
|
+
* The mint associated with this account.
|
|
889
|
+
*/
|
|
637
890
|
mint: PublicKey;
|
|
891
|
+
/**
|
|
892
|
+
* The owner of this account.
|
|
893
|
+
*/
|
|
638
894
|
owner: PublicKey;
|
|
895
|
+
/**
|
|
896
|
+
* The amount of tokens this account holds.
|
|
897
|
+
*/
|
|
639
898
|
amount: BN;
|
|
899
|
+
/**
|
|
900
|
+
* If `delegate` is `Some` then `delegated_amount` represents the amount
|
|
901
|
+
* authorized by the delegate.
|
|
902
|
+
*/
|
|
640
903
|
delegate: PublicKey | null;
|
|
904
|
+
/**
|
|
905
|
+
* The account's state.
|
|
906
|
+
*/
|
|
641
907
|
state: number;
|
|
908
|
+
/**
|
|
909
|
+
* Token extension tlv.
|
|
910
|
+
*/
|
|
642
911
|
tlv: Buffer$1 | null;
|
|
643
912
|
};
|
|
644
913
|
|
|
914
|
+
/**
|
|
915
|
+
* @deprecated use {@link CompressedAccount} instead
|
|
916
|
+
*/
|
|
645
917
|
type CompressedAccountWithMerkleContext = CompressedAccount & MerkleContext & {
|
|
646
918
|
readOnly: boolean;
|
|
647
919
|
};
|
|
920
|
+
/**
|
|
921
|
+
* @deprecated use {@link CompressedAccount} instead
|
|
922
|
+
*/
|
|
923
|
+
type CompressedAccountWithMerkleContextLegacy = CompressedAccount & MerkleContext;
|
|
924
|
+
/**
|
|
925
|
+
* Compressed account + metadata about the state tree in which the account is
|
|
926
|
+
* stored.
|
|
927
|
+
*/
|
|
928
|
+
type CompressedAccount = {
|
|
929
|
+
/**
|
|
930
|
+
* Public key of program or user owning the account.
|
|
931
|
+
*/
|
|
932
|
+
owner: PublicKey;
|
|
933
|
+
/**
|
|
934
|
+
* Lamports attached to the account.
|
|
935
|
+
*/
|
|
936
|
+
lamports: BN;
|
|
937
|
+
/**
|
|
938
|
+
* Optional unique account ID that is persistent across transactions.
|
|
939
|
+
*/
|
|
940
|
+
address: number[] | null;
|
|
941
|
+
/**
|
|
942
|
+
* Optional data attached to the account.
|
|
943
|
+
*/
|
|
944
|
+
data: CompressedAccountData | null;
|
|
945
|
+
} & MerkleContext & {
|
|
946
|
+
/**
|
|
947
|
+
* Read only.
|
|
948
|
+
*/
|
|
949
|
+
readOnly: boolean;
|
|
950
|
+
};
|
|
648
951
|
/**
|
|
649
952
|
* @deprecated use {@link MerkleContext} instead.
|
|
650
953
|
*
|
|
651
|
-
* Legacy MerkleContext
|
|
954
|
+
* Legacy MerkleContext.
|
|
652
955
|
*/
|
|
653
956
|
type MerkleContextLegacy = {
|
|
654
957
|
/**
|
|
@@ -675,7 +978,7 @@ type MerkleContext = {
|
|
|
675
978
|
/**
|
|
676
979
|
* Tree info
|
|
677
980
|
*/
|
|
678
|
-
treeInfo:
|
|
981
|
+
treeInfo: TreeInfo;
|
|
679
982
|
/**
|
|
680
983
|
* Poseidon hash of the account. Stored as leaf in state tree
|
|
681
984
|
*/
|
|
@@ -706,9 +1009,109 @@ type MerkleContextWithMerkleProof = MerkleContext & {
|
|
|
706
1009
|
*/
|
|
707
1010
|
root: BN254;
|
|
708
1011
|
};
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
1012
|
+
/**
|
|
1013
|
+
* Packed compressed account and state tree info.
|
|
1014
|
+
*/
|
|
1015
|
+
type PackedStateTreeInfo = {
|
|
1016
|
+
/**
|
|
1017
|
+
* Recent valid root index.
|
|
1018
|
+
*/
|
|
1019
|
+
rootIndex: number;
|
|
1020
|
+
/**
|
|
1021
|
+
* Whether the account can be proven by index or by merkle proof
|
|
1022
|
+
*/
|
|
1023
|
+
proveByIndex: boolean;
|
|
1024
|
+
/**
|
|
1025
|
+
* Index of the merkle tree in which the account is stored.
|
|
1026
|
+
*/
|
|
1027
|
+
merkleTreePubkeyIndex: number;
|
|
1028
|
+
/**
|
|
1029
|
+
* Index of the queue in which the account is stored.
|
|
1030
|
+
*/
|
|
1031
|
+
queuePubkeyIndex: number;
|
|
1032
|
+
/**
|
|
1033
|
+
* Index of the leaf in the state tree.
|
|
1034
|
+
*/
|
|
1035
|
+
leafIndex: number;
|
|
1036
|
+
};
|
|
1037
|
+
/**
|
|
1038
|
+
* Packed tree info for a new program-derived address (PDA).
|
|
1039
|
+
*/
|
|
1040
|
+
type PackedAddressTreeInfo = {
|
|
1041
|
+
/**
|
|
1042
|
+
* Index of the merkle tree in which the account is stored.
|
|
1043
|
+
*/
|
|
1044
|
+
addressMerkleTreePubkeyIndex: number;
|
|
1045
|
+
/**
|
|
1046
|
+
* Index of the queue in which the account is stored.
|
|
1047
|
+
*/
|
|
1048
|
+
addressQueuePubkeyIndex: number;
|
|
1049
|
+
/**
|
|
1050
|
+
* Recent valid root index.
|
|
1051
|
+
*/
|
|
1052
|
+
rootIndex: number;
|
|
1053
|
+
};
|
|
1054
|
+
/**
|
|
1055
|
+
* Compressed account meta in instruction.
|
|
1056
|
+
*
|
|
1057
|
+
*/
|
|
1058
|
+
type CompressedAccountMeta = {
|
|
1059
|
+
/**
|
|
1060
|
+
* Packed Tree info.
|
|
1061
|
+
*/
|
|
1062
|
+
treeInfo: PackedStateTreeInfo;
|
|
1063
|
+
/**
|
|
1064
|
+
* Address.
|
|
1065
|
+
*/
|
|
1066
|
+
address: number[] | null;
|
|
1067
|
+
/**
|
|
1068
|
+
* Lamports.
|
|
1069
|
+
*/
|
|
1070
|
+
lamports: BN | null;
|
|
1071
|
+
/**
|
|
1072
|
+
* index of state tree in which the new account state is stored.
|
|
1073
|
+
*/
|
|
1074
|
+
outputStateTreeIndex: number;
|
|
1075
|
+
};
|
|
1076
|
+
/**
|
|
1077
|
+
* Create an output compressed account meta for a new account.
|
|
1078
|
+
* Client-side only.
|
|
1079
|
+
*/
|
|
1080
|
+
declare const createCompressedAccountMeta: (treeInfo: PackedStateTreeInfo, outputStateTreeIndex: number, address?: number[], lamports?: BN) => CompressedAccountMeta;
|
|
1081
|
+
/**
|
|
1082
|
+
* @deprecated Use {@link PackedStateTreeInfo} instead.
|
|
1083
|
+
* Packed compressed account with merkle context.
|
|
1084
|
+
*/
|
|
1085
|
+
interface PackedCompressedAccountWithMerkleContext {
|
|
1086
|
+
/**
|
|
1087
|
+
* Compressed account.
|
|
1088
|
+
*/
|
|
1089
|
+
compressedAccount: CompressedAccountLegacy;
|
|
1090
|
+
/**
|
|
1091
|
+
* Merkle context.
|
|
1092
|
+
*/
|
|
1093
|
+
merkleContext: PackedMerkleContextLegacy;
|
|
1094
|
+
/**
|
|
1095
|
+
* Root index.
|
|
1096
|
+
*/
|
|
1097
|
+
rootIndex: number;
|
|
1098
|
+
/**
|
|
1099
|
+
* Read only.
|
|
1100
|
+
*/
|
|
1101
|
+
readOnly: boolean;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* @deprecated use {@link createCompressedAccountMeta} instead.
|
|
1105
|
+
*/
|
|
1106
|
+
declare const createCompressedAccountLegacy: (owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccountLegacy;
|
|
1107
|
+
/**
|
|
1108
|
+
* @deprecated.
|
|
1109
|
+
*/
|
|
1110
|
+
declare const createCompressedAccountWithMerkleContextLegacy: (merkleContext: MerkleContext, owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccountWithMerkleContext;
|
|
1111
|
+
/**
|
|
1112
|
+
* @deprecated use {@link createCompressedAccountMeta} instead.
|
|
1113
|
+
*/
|
|
1114
|
+
declare const createMerkleContextLegacy: (treeInfo: TreeInfo, hash: BN254, leafIndex: number, proveByIndex?: boolean) => MerkleContext;
|
|
712
1115
|
|
|
713
1116
|
interface LatestNonVotingSignatures {
|
|
714
1117
|
context: {
|
|
@@ -762,7 +1165,7 @@ interface HashWithTreeInfo {
|
|
|
762
1165
|
/**
|
|
763
1166
|
* State tree info.
|
|
764
1167
|
*/
|
|
765
|
-
stateTreeInfo:
|
|
1168
|
+
stateTreeInfo: TreeInfo;
|
|
766
1169
|
}
|
|
767
1170
|
interface HashWithTree {
|
|
768
1171
|
hash: BN254;
|
|
@@ -833,7 +1236,7 @@ type ValidityProofWithContext = {
|
|
|
833
1236
|
/**
|
|
834
1237
|
* Validity proof.
|
|
835
1238
|
*/
|
|
836
|
-
compressedProof: ValidityProof;
|
|
1239
|
+
compressedProof: ValidityProof | null;
|
|
837
1240
|
/**
|
|
838
1241
|
* Roots.
|
|
839
1242
|
*/
|
|
@@ -853,7 +1256,11 @@ type ValidityProofWithContext = {
|
|
|
853
1256
|
/**
|
|
854
1257
|
* Tree infos.
|
|
855
1258
|
*/
|
|
856
|
-
treeInfos:
|
|
1259
|
+
treeInfos: TreeInfo[];
|
|
1260
|
+
/**
|
|
1261
|
+
* Whether to prove by indices.
|
|
1262
|
+
*/
|
|
1263
|
+
proveByIndices: boolean[];
|
|
857
1264
|
};
|
|
858
1265
|
/**
|
|
859
1266
|
* @deprecated use {@link ValidityProofWithContext} instead
|
|
@@ -936,26 +1343,71 @@ declare function jsonRpcResultAndContext<T, U>(value: Struct<T, U>): Struct<RpcR
|
|
|
936
1343
|
* @internal
|
|
937
1344
|
*/
|
|
938
1345
|
declare const CompressedAccountResult: Struct<{
|
|
1346
|
+
owner: PublicKey;
|
|
939
1347
|
lamports: BN;
|
|
940
|
-
|
|
1348
|
+
address: number[] | null;
|
|
941
1349
|
data: {
|
|
942
1350
|
data: string;
|
|
943
|
-
dataHash: BN;
|
|
944
1351
|
discriminator: BN;
|
|
1352
|
+
dataHash: BN;
|
|
945
1353
|
} | null;
|
|
946
|
-
|
|
1354
|
+
leafIndex: number;
|
|
1355
|
+
seq: BN | null;
|
|
1356
|
+
tree: PublicKey;
|
|
947
1357
|
hash: BN;
|
|
1358
|
+
slotCreated: BN;
|
|
1359
|
+
}, {
|
|
1360
|
+
address: Struct<number[] | null, null>;
|
|
1361
|
+
hash: Struct<BN, null>;
|
|
1362
|
+
data: Struct<{
|
|
1363
|
+
data: string;
|
|
1364
|
+
discriminator: BN;
|
|
1365
|
+
dataHash: BN;
|
|
1366
|
+
} | null, {
|
|
1367
|
+
data: Struct<string, null>;
|
|
1368
|
+
dataHash: Struct<BN, null>;
|
|
1369
|
+
discriminator: Struct<BN, null>;
|
|
1370
|
+
}>;
|
|
1371
|
+
lamports: Struct<BN, null>;
|
|
1372
|
+
owner: Struct<PublicKey, null>;
|
|
1373
|
+
leafIndex: Struct<number, null>;
|
|
1374
|
+
tree: Struct<PublicKey, null>;
|
|
1375
|
+
seq: Struct<BN | null, null>;
|
|
1376
|
+
slotCreated: Struct<BN, null>;
|
|
1377
|
+
}>;
|
|
1378
|
+
declare const CompressedAccountResultV2: Struct<{
|
|
948
1379
|
owner: PublicKey;
|
|
1380
|
+
lamports: BN;
|
|
1381
|
+
address: number[] | null;
|
|
1382
|
+
data: {
|
|
1383
|
+
data: string;
|
|
1384
|
+
discriminator: BN;
|
|
1385
|
+
dataHash: BN;
|
|
1386
|
+
} | null;
|
|
1387
|
+
merkleContext: {
|
|
1388
|
+
cpiContext: PublicKey | null;
|
|
1389
|
+
tree: PublicKey;
|
|
1390
|
+
queue: PublicKey;
|
|
1391
|
+
treeType: number;
|
|
1392
|
+
nextTreeContext?: {
|
|
1393
|
+
cpiContext: PublicKey | null;
|
|
1394
|
+
tree: PublicKey;
|
|
1395
|
+
queue: PublicKey;
|
|
1396
|
+
treeType: number;
|
|
1397
|
+
} | null | undefined;
|
|
1398
|
+
};
|
|
949
1399
|
leafIndex: number;
|
|
1400
|
+
proveByIndex: boolean;
|
|
950
1401
|
seq: BN | null;
|
|
1402
|
+
hash: BN;
|
|
951
1403
|
slotCreated: BN;
|
|
952
1404
|
}, {
|
|
953
1405
|
address: Struct<number[] | null, null>;
|
|
954
1406
|
hash: Struct<BN, null>;
|
|
955
1407
|
data: Struct<{
|
|
956
1408
|
data: string;
|
|
957
|
-
dataHash: BN;
|
|
958
1409
|
discriminator: BN;
|
|
1410
|
+
dataHash: BN;
|
|
959
1411
|
} | null, {
|
|
960
1412
|
data: Struct<string, null>;
|
|
961
1413
|
dataHash: Struct<BN, null>;
|
|
@@ -964,9 +1416,37 @@ declare const CompressedAccountResult: Struct<{
|
|
|
964
1416
|
lamports: Struct<BN, null>;
|
|
965
1417
|
owner: Struct<PublicKey, null>;
|
|
966
1418
|
leafIndex: Struct<number, null>;
|
|
967
|
-
tree: Struct<PublicKey, null>;
|
|
968
1419
|
seq: Struct<BN | null, null>;
|
|
969
1420
|
slotCreated: Struct<BN, null>;
|
|
1421
|
+
merkleContext: Struct<{
|
|
1422
|
+
cpiContext: PublicKey | null;
|
|
1423
|
+
tree: PublicKey;
|
|
1424
|
+
queue: PublicKey;
|
|
1425
|
+
treeType: number;
|
|
1426
|
+
nextTreeContext?: {
|
|
1427
|
+
cpiContext: PublicKey | null;
|
|
1428
|
+
tree: PublicKey;
|
|
1429
|
+
queue: PublicKey;
|
|
1430
|
+
treeType: number;
|
|
1431
|
+
} | null | undefined;
|
|
1432
|
+
}, {
|
|
1433
|
+
treeType: Struct<number, null>;
|
|
1434
|
+
tree: Struct<PublicKey, null>;
|
|
1435
|
+
queue: Struct<PublicKey, null>;
|
|
1436
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
1437
|
+
nextTreeContext: Struct<{
|
|
1438
|
+
cpiContext: PublicKey | null;
|
|
1439
|
+
tree: PublicKey;
|
|
1440
|
+
queue: PublicKey;
|
|
1441
|
+
treeType: number;
|
|
1442
|
+
} | null | undefined, {
|
|
1443
|
+
treeType: Struct<number, null>;
|
|
1444
|
+
tree: Struct<PublicKey, null>;
|
|
1445
|
+
queue: Struct<PublicKey, null>;
|
|
1446
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
1447
|
+
}>;
|
|
1448
|
+
}>;
|
|
1449
|
+
proveByIndex: Struct<boolean, null>;
|
|
970
1450
|
}>;
|
|
971
1451
|
declare const TokenDataResult: Struct<{
|
|
972
1452
|
owner: PublicKey;
|
|
@@ -993,19 +1473,19 @@ declare const CompressedTokenAccountResult: Struct<{
|
|
|
993
1473
|
state: string;
|
|
994
1474
|
};
|
|
995
1475
|
account: {
|
|
1476
|
+
owner: PublicKey;
|
|
996
1477
|
lamports: BN;
|
|
997
|
-
|
|
1478
|
+
address: number[] | null;
|
|
998
1479
|
data: {
|
|
999
1480
|
data: string;
|
|
1000
|
-
dataHash: BN;
|
|
1001
1481
|
discriminator: BN;
|
|
1482
|
+
dataHash: BN;
|
|
1002
1483
|
} | null;
|
|
1003
|
-
address: number[] | null;
|
|
1004
|
-
hash: BN;
|
|
1005
|
-
owner: PublicKey;
|
|
1006
1484
|
leafIndex: number;
|
|
1007
1485
|
seq: BN | null;
|
|
1008
|
-
|
|
1486
|
+
tree: PublicKey;
|
|
1487
|
+
hash: BN;
|
|
1488
|
+
slotCreated: BN;
|
|
1009
1489
|
};
|
|
1010
1490
|
}, {
|
|
1011
1491
|
tokenData: Struct<{
|
|
@@ -1022,26 +1502,124 @@ declare const CompressedTokenAccountResult: Struct<{
|
|
|
1022
1502
|
state: Struct<string, null>;
|
|
1023
1503
|
}>;
|
|
1024
1504
|
account: Struct<{
|
|
1505
|
+
owner: PublicKey;
|
|
1025
1506
|
lamports: BN;
|
|
1026
|
-
|
|
1507
|
+
address: number[] | null;
|
|
1027
1508
|
data: {
|
|
1028
1509
|
data: string;
|
|
1029
|
-
dataHash: BN;
|
|
1030
1510
|
discriminator: BN;
|
|
1511
|
+
dataHash: BN;
|
|
1031
1512
|
} | null;
|
|
1513
|
+
leafIndex: number;
|
|
1514
|
+
seq: BN | null;
|
|
1515
|
+
tree: PublicKey;
|
|
1516
|
+
hash: BN;
|
|
1517
|
+
slotCreated: BN;
|
|
1518
|
+
}, {
|
|
1519
|
+
address: Struct<number[] | null, null>;
|
|
1520
|
+
hash: Struct<BN, null>;
|
|
1521
|
+
data: Struct<{
|
|
1522
|
+
data: string;
|
|
1523
|
+
discriminator: BN;
|
|
1524
|
+
dataHash: BN;
|
|
1525
|
+
} | null, {
|
|
1526
|
+
data: Struct<string, null>;
|
|
1527
|
+
dataHash: Struct<BN, null>;
|
|
1528
|
+
discriminator: Struct<BN, null>;
|
|
1529
|
+
}>;
|
|
1530
|
+
lamports: Struct<BN, null>;
|
|
1531
|
+
owner: Struct<PublicKey, null>;
|
|
1532
|
+
leafIndex: Struct<number, null>;
|
|
1533
|
+
tree: Struct<PublicKey, null>;
|
|
1534
|
+
seq: Struct<BN | null, null>;
|
|
1535
|
+
slotCreated: Struct<BN, null>;
|
|
1536
|
+
}>;
|
|
1537
|
+
}>;
|
|
1538
|
+
/**
|
|
1539
|
+
* @internal
|
|
1540
|
+
*/
|
|
1541
|
+
declare const CompressedTokenAccountResultV2: Struct<{
|
|
1542
|
+
tokenData: {
|
|
1543
|
+
owner: PublicKey;
|
|
1544
|
+
mint: PublicKey;
|
|
1545
|
+
amount: BN;
|
|
1546
|
+
delegate: PublicKey | null;
|
|
1547
|
+
state: string;
|
|
1548
|
+
};
|
|
1549
|
+
account: {
|
|
1550
|
+
owner: PublicKey;
|
|
1551
|
+
lamports: BN;
|
|
1032
1552
|
address: number[] | null;
|
|
1553
|
+
data: {
|
|
1554
|
+
data: string;
|
|
1555
|
+
discriminator: BN;
|
|
1556
|
+
dataHash: BN;
|
|
1557
|
+
} | null;
|
|
1558
|
+
merkleContext: {
|
|
1559
|
+
cpiContext: PublicKey | null;
|
|
1560
|
+
tree: PublicKey;
|
|
1561
|
+
queue: PublicKey;
|
|
1562
|
+
treeType: number;
|
|
1563
|
+
nextTreeContext?: {
|
|
1564
|
+
cpiContext: PublicKey | null;
|
|
1565
|
+
tree: PublicKey;
|
|
1566
|
+
queue: PublicKey;
|
|
1567
|
+
treeType: number;
|
|
1568
|
+
} | null | undefined;
|
|
1569
|
+
};
|
|
1570
|
+
leafIndex: number;
|
|
1571
|
+
proveByIndex: boolean;
|
|
1572
|
+
seq: BN | null;
|
|
1033
1573
|
hash: BN;
|
|
1574
|
+
slotCreated: BN;
|
|
1575
|
+
};
|
|
1576
|
+
}, {
|
|
1577
|
+
tokenData: Struct<{
|
|
1578
|
+
owner: PublicKey;
|
|
1579
|
+
mint: PublicKey;
|
|
1580
|
+
amount: BN;
|
|
1581
|
+
delegate: PublicKey | null;
|
|
1582
|
+
state: string;
|
|
1583
|
+
}, {
|
|
1584
|
+
mint: Struct<PublicKey, null>;
|
|
1585
|
+
owner: Struct<PublicKey, null>;
|
|
1586
|
+
amount: Struct<BN, null>;
|
|
1587
|
+
delegate: Struct<PublicKey | null, null>;
|
|
1588
|
+
state: Struct<string, null>;
|
|
1589
|
+
}>;
|
|
1590
|
+
account: Struct<{
|
|
1034
1591
|
owner: PublicKey;
|
|
1592
|
+
lamports: BN;
|
|
1593
|
+
address: number[] | null;
|
|
1594
|
+
data: {
|
|
1595
|
+
data: string;
|
|
1596
|
+
discriminator: BN;
|
|
1597
|
+
dataHash: BN;
|
|
1598
|
+
} | null;
|
|
1599
|
+
merkleContext: {
|
|
1600
|
+
cpiContext: PublicKey | null;
|
|
1601
|
+
tree: PublicKey;
|
|
1602
|
+
queue: PublicKey;
|
|
1603
|
+
treeType: number;
|
|
1604
|
+
nextTreeContext?: {
|
|
1605
|
+
cpiContext: PublicKey | null;
|
|
1606
|
+
tree: PublicKey;
|
|
1607
|
+
queue: PublicKey;
|
|
1608
|
+
treeType: number;
|
|
1609
|
+
} | null | undefined;
|
|
1610
|
+
};
|
|
1035
1611
|
leafIndex: number;
|
|
1612
|
+
proveByIndex: boolean;
|
|
1036
1613
|
seq: BN | null;
|
|
1614
|
+
hash: BN;
|
|
1037
1615
|
slotCreated: BN;
|
|
1038
1616
|
}, {
|
|
1039
1617
|
address: Struct<number[] | null, null>;
|
|
1040
1618
|
hash: Struct<BN, null>;
|
|
1041
1619
|
data: Struct<{
|
|
1042
1620
|
data: string;
|
|
1043
|
-
dataHash: BN;
|
|
1044
1621
|
discriminator: BN;
|
|
1622
|
+
dataHash: BN;
|
|
1045
1623
|
} | null, {
|
|
1046
1624
|
data: Struct<string, null>;
|
|
1047
1625
|
dataHash: Struct<BN, null>;
|
|
@@ -1050,9 +1628,37 @@ declare const CompressedTokenAccountResult: Struct<{
|
|
|
1050
1628
|
lamports: Struct<BN, null>;
|
|
1051
1629
|
owner: Struct<PublicKey, null>;
|
|
1052
1630
|
leafIndex: Struct<number, null>;
|
|
1053
|
-
tree: Struct<PublicKey, null>;
|
|
1054
1631
|
seq: Struct<BN | null, null>;
|
|
1055
1632
|
slotCreated: Struct<BN, null>;
|
|
1633
|
+
merkleContext: Struct<{
|
|
1634
|
+
cpiContext: PublicKey | null;
|
|
1635
|
+
tree: PublicKey;
|
|
1636
|
+
queue: PublicKey;
|
|
1637
|
+
treeType: number;
|
|
1638
|
+
nextTreeContext?: {
|
|
1639
|
+
cpiContext: PublicKey | null;
|
|
1640
|
+
tree: PublicKey;
|
|
1641
|
+
queue: PublicKey;
|
|
1642
|
+
treeType: number;
|
|
1643
|
+
} | null | undefined;
|
|
1644
|
+
}, {
|
|
1645
|
+
treeType: Struct<number, null>;
|
|
1646
|
+
tree: Struct<PublicKey, null>;
|
|
1647
|
+
queue: Struct<PublicKey, null>;
|
|
1648
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
1649
|
+
nextTreeContext: Struct<{
|
|
1650
|
+
cpiContext: PublicKey | null;
|
|
1651
|
+
tree: PublicKey;
|
|
1652
|
+
queue: PublicKey;
|
|
1653
|
+
treeType: number;
|
|
1654
|
+
} | null | undefined, {
|
|
1655
|
+
treeType: Struct<number, null>;
|
|
1656
|
+
tree: Struct<PublicKey, null>;
|
|
1657
|
+
queue: Struct<PublicKey, null>;
|
|
1658
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
1659
|
+
}>;
|
|
1660
|
+
}>;
|
|
1661
|
+
proveByIndex: Struct<boolean, null>;
|
|
1056
1662
|
}>;
|
|
1057
1663
|
}>;
|
|
1058
1664
|
/**
|
|
@@ -1060,56 +1666,56 @@ declare const CompressedTokenAccountResult: Struct<{
|
|
|
1060
1666
|
*/
|
|
1061
1667
|
declare const MultipleCompressedAccountsResult: Struct<{
|
|
1062
1668
|
items: {
|
|
1669
|
+
owner: PublicKey;
|
|
1063
1670
|
lamports: BN;
|
|
1064
|
-
|
|
1671
|
+
address: number[] | null;
|
|
1065
1672
|
data: {
|
|
1066
1673
|
data: string;
|
|
1067
|
-
dataHash: BN;
|
|
1068
1674
|
discriminator: BN;
|
|
1675
|
+
dataHash: BN;
|
|
1069
1676
|
} | null;
|
|
1070
|
-
address: number[] | null;
|
|
1071
|
-
hash: BN;
|
|
1072
|
-
owner: PublicKey;
|
|
1073
1677
|
leafIndex: number;
|
|
1074
1678
|
seq: BN | null;
|
|
1679
|
+
tree: PublicKey;
|
|
1680
|
+
hash: BN;
|
|
1075
1681
|
slotCreated: BN;
|
|
1076
1682
|
}[];
|
|
1077
1683
|
}, {
|
|
1078
1684
|
items: Struct<{
|
|
1685
|
+
owner: PublicKey;
|
|
1079
1686
|
lamports: BN;
|
|
1080
|
-
|
|
1687
|
+
address: number[] | null;
|
|
1081
1688
|
data: {
|
|
1082
1689
|
data: string;
|
|
1083
|
-
dataHash: BN;
|
|
1084
1690
|
discriminator: BN;
|
|
1691
|
+
dataHash: BN;
|
|
1085
1692
|
} | null;
|
|
1086
|
-
address: number[] | null;
|
|
1087
|
-
hash: BN;
|
|
1088
|
-
owner: PublicKey;
|
|
1089
1693
|
leafIndex: number;
|
|
1090
1694
|
seq: BN | null;
|
|
1695
|
+
tree: PublicKey;
|
|
1696
|
+
hash: BN;
|
|
1091
1697
|
slotCreated: BN;
|
|
1092
1698
|
}[], Struct<{
|
|
1699
|
+
owner: PublicKey;
|
|
1093
1700
|
lamports: BN;
|
|
1094
|
-
|
|
1701
|
+
address: number[] | null;
|
|
1095
1702
|
data: {
|
|
1096
1703
|
data: string;
|
|
1097
|
-
dataHash: BN;
|
|
1098
1704
|
discriminator: BN;
|
|
1705
|
+
dataHash: BN;
|
|
1099
1706
|
} | null;
|
|
1100
|
-
address: number[] | null;
|
|
1101
|
-
hash: BN;
|
|
1102
|
-
owner: PublicKey;
|
|
1103
1707
|
leafIndex: number;
|
|
1104
1708
|
seq: BN | null;
|
|
1709
|
+
tree: PublicKey;
|
|
1710
|
+
hash: BN;
|
|
1105
1711
|
slotCreated: BN;
|
|
1106
1712
|
}, {
|
|
1107
1713
|
address: Struct<number[] | null, null>;
|
|
1108
1714
|
hash: Struct<BN, null>;
|
|
1109
1715
|
data: Struct<{
|
|
1110
1716
|
data: string;
|
|
1111
|
-
dataHash: BN;
|
|
1112
1717
|
discriminator: BN;
|
|
1718
|
+
dataHash: BN;
|
|
1113
1719
|
} | null, {
|
|
1114
1720
|
data: Struct<string, null>;
|
|
1115
1721
|
dataHash: Struct<BN, null>;
|
|
@@ -1126,59 +1732,191 @@ declare const MultipleCompressedAccountsResult: Struct<{
|
|
|
1126
1732
|
/**
|
|
1127
1733
|
* @internal
|
|
1128
1734
|
*/
|
|
1129
|
-
declare const
|
|
1735
|
+
declare const MultipleCompressedAccountsResultV2: Struct<{
|
|
1130
1736
|
items: {
|
|
1737
|
+
owner: PublicKey;
|
|
1131
1738
|
lamports: BN;
|
|
1132
|
-
|
|
1739
|
+
address: number[] | null;
|
|
1133
1740
|
data: {
|
|
1134
1741
|
data: string;
|
|
1742
|
+
discriminator: BN;
|
|
1135
1743
|
dataHash: BN;
|
|
1744
|
+
} | null;
|
|
1745
|
+
merkleContext: {
|
|
1746
|
+
cpiContext: PublicKey | null;
|
|
1747
|
+
tree: PublicKey;
|
|
1748
|
+
queue: PublicKey;
|
|
1749
|
+
treeType: number;
|
|
1750
|
+
nextTreeContext?: {
|
|
1751
|
+
cpiContext: PublicKey | null;
|
|
1752
|
+
tree: PublicKey;
|
|
1753
|
+
queue: PublicKey;
|
|
1754
|
+
treeType: number;
|
|
1755
|
+
} | null | undefined;
|
|
1756
|
+
};
|
|
1757
|
+
leafIndex: number;
|
|
1758
|
+
proveByIndex: boolean;
|
|
1759
|
+
seq: BN | null;
|
|
1760
|
+
hash: BN;
|
|
1761
|
+
slotCreated: BN;
|
|
1762
|
+
}[];
|
|
1763
|
+
}, {
|
|
1764
|
+
items: Struct<{
|
|
1765
|
+
owner: PublicKey;
|
|
1766
|
+
lamports: BN;
|
|
1767
|
+
address: number[] | null;
|
|
1768
|
+
data: {
|
|
1769
|
+
data: string;
|
|
1136
1770
|
discriminator: BN;
|
|
1771
|
+
dataHash: BN;
|
|
1137
1772
|
} | null;
|
|
1773
|
+
merkleContext: {
|
|
1774
|
+
cpiContext: PublicKey | null;
|
|
1775
|
+
tree: PublicKey;
|
|
1776
|
+
queue: PublicKey;
|
|
1777
|
+
treeType: number;
|
|
1778
|
+
nextTreeContext?: {
|
|
1779
|
+
cpiContext: PublicKey | null;
|
|
1780
|
+
tree: PublicKey;
|
|
1781
|
+
queue: PublicKey;
|
|
1782
|
+
treeType: number;
|
|
1783
|
+
} | null | undefined;
|
|
1784
|
+
};
|
|
1785
|
+
leafIndex: number;
|
|
1786
|
+
proveByIndex: boolean;
|
|
1787
|
+
seq: BN | null;
|
|
1788
|
+
hash: BN;
|
|
1789
|
+
slotCreated: BN;
|
|
1790
|
+
}[], Struct<{
|
|
1791
|
+
owner: PublicKey;
|
|
1792
|
+
lamports: BN;
|
|
1138
1793
|
address: number[] | null;
|
|
1794
|
+
data: {
|
|
1795
|
+
data: string;
|
|
1796
|
+
discriminator: BN;
|
|
1797
|
+
dataHash: BN;
|
|
1798
|
+
} | null;
|
|
1799
|
+
merkleContext: {
|
|
1800
|
+
cpiContext: PublicKey | null;
|
|
1801
|
+
tree: PublicKey;
|
|
1802
|
+
queue: PublicKey;
|
|
1803
|
+
treeType: number;
|
|
1804
|
+
nextTreeContext?: {
|
|
1805
|
+
cpiContext: PublicKey | null;
|
|
1806
|
+
tree: PublicKey;
|
|
1807
|
+
queue: PublicKey;
|
|
1808
|
+
treeType: number;
|
|
1809
|
+
} | null | undefined;
|
|
1810
|
+
};
|
|
1811
|
+
leafIndex: number;
|
|
1812
|
+
proveByIndex: boolean;
|
|
1813
|
+
seq: BN | null;
|
|
1139
1814
|
hash: BN;
|
|
1815
|
+
slotCreated: BN;
|
|
1816
|
+
}, {
|
|
1817
|
+
address: Struct<number[] | null, null>;
|
|
1818
|
+
hash: Struct<BN, null>;
|
|
1819
|
+
data: Struct<{
|
|
1820
|
+
data: string;
|
|
1821
|
+
discriminator: BN;
|
|
1822
|
+
dataHash: BN;
|
|
1823
|
+
} | null, {
|
|
1824
|
+
data: Struct<string, null>;
|
|
1825
|
+
dataHash: Struct<BN, null>;
|
|
1826
|
+
discriminator: Struct<BN, null>;
|
|
1827
|
+
}>;
|
|
1828
|
+
lamports: Struct<BN, null>;
|
|
1829
|
+
owner: Struct<PublicKey, null>;
|
|
1830
|
+
leafIndex: Struct<number, null>;
|
|
1831
|
+
seq: Struct<BN | null, null>;
|
|
1832
|
+
slotCreated: Struct<BN, null>;
|
|
1833
|
+
merkleContext: Struct<{
|
|
1834
|
+
cpiContext: PublicKey | null;
|
|
1835
|
+
tree: PublicKey;
|
|
1836
|
+
queue: PublicKey;
|
|
1837
|
+
treeType: number;
|
|
1838
|
+
nextTreeContext?: {
|
|
1839
|
+
cpiContext: PublicKey | null;
|
|
1840
|
+
tree: PublicKey;
|
|
1841
|
+
queue: PublicKey;
|
|
1842
|
+
treeType: number;
|
|
1843
|
+
} | null | undefined;
|
|
1844
|
+
}, {
|
|
1845
|
+
treeType: Struct<number, null>;
|
|
1846
|
+
tree: Struct<PublicKey, null>;
|
|
1847
|
+
queue: Struct<PublicKey, null>;
|
|
1848
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
1849
|
+
nextTreeContext: Struct<{
|
|
1850
|
+
cpiContext: PublicKey | null;
|
|
1851
|
+
tree: PublicKey;
|
|
1852
|
+
queue: PublicKey;
|
|
1853
|
+
treeType: number;
|
|
1854
|
+
} | null | undefined, {
|
|
1855
|
+
treeType: Struct<number, null>;
|
|
1856
|
+
tree: Struct<PublicKey, null>;
|
|
1857
|
+
queue: Struct<PublicKey, null>;
|
|
1858
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
1859
|
+
}>;
|
|
1860
|
+
}>;
|
|
1861
|
+
proveByIndex: Struct<boolean, null>;
|
|
1862
|
+
}>>;
|
|
1863
|
+
}>;
|
|
1864
|
+
/**
|
|
1865
|
+
* @internal
|
|
1866
|
+
*/
|
|
1867
|
+
declare const CompressedAccountsByOwnerResult: Struct<{
|
|
1868
|
+
items: {
|
|
1140
1869
|
owner: PublicKey;
|
|
1870
|
+
lamports: BN;
|
|
1871
|
+
address: number[] | null;
|
|
1872
|
+
data: {
|
|
1873
|
+
data: string;
|
|
1874
|
+
discriminator: BN;
|
|
1875
|
+
dataHash: BN;
|
|
1876
|
+
} | null;
|
|
1141
1877
|
leafIndex: number;
|
|
1142
1878
|
seq: BN | null;
|
|
1879
|
+
tree: PublicKey;
|
|
1880
|
+
hash: BN;
|
|
1143
1881
|
slotCreated: BN;
|
|
1144
1882
|
}[];
|
|
1145
1883
|
cursor: string | null;
|
|
1146
1884
|
}, {
|
|
1147
1885
|
items: Struct<{
|
|
1886
|
+
owner: PublicKey;
|
|
1148
1887
|
lamports: BN;
|
|
1149
|
-
|
|
1888
|
+
address: number[] | null;
|
|
1150
1889
|
data: {
|
|
1151
1890
|
data: string;
|
|
1152
|
-
dataHash: BN;
|
|
1153
1891
|
discriminator: BN;
|
|
1892
|
+
dataHash: BN;
|
|
1154
1893
|
} | null;
|
|
1155
|
-
address: number[] | null;
|
|
1156
|
-
hash: BN;
|
|
1157
|
-
owner: PublicKey;
|
|
1158
1894
|
leafIndex: number;
|
|
1159
1895
|
seq: BN | null;
|
|
1896
|
+
tree: PublicKey;
|
|
1897
|
+
hash: BN;
|
|
1160
1898
|
slotCreated: BN;
|
|
1161
1899
|
}[], Struct<{
|
|
1900
|
+
owner: PublicKey;
|
|
1162
1901
|
lamports: BN;
|
|
1163
|
-
|
|
1902
|
+
address: number[] | null;
|
|
1164
1903
|
data: {
|
|
1165
1904
|
data: string;
|
|
1166
|
-
dataHash: BN;
|
|
1167
1905
|
discriminator: BN;
|
|
1906
|
+
dataHash: BN;
|
|
1168
1907
|
} | null;
|
|
1169
|
-
address: number[] | null;
|
|
1170
|
-
hash: BN;
|
|
1171
|
-
owner: PublicKey;
|
|
1172
1908
|
leafIndex: number;
|
|
1173
1909
|
seq: BN | null;
|
|
1910
|
+
tree: PublicKey;
|
|
1911
|
+
hash: BN;
|
|
1174
1912
|
slotCreated: BN;
|
|
1175
1913
|
}, {
|
|
1176
1914
|
address: Struct<number[] | null, null>;
|
|
1177
1915
|
hash: Struct<BN, null>;
|
|
1178
1916
|
data: Struct<{
|
|
1179
1917
|
data: string;
|
|
1180
|
-
dataHash: BN;
|
|
1181
1918
|
discriminator: BN;
|
|
1919
|
+
dataHash: BN;
|
|
1182
1920
|
} | null, {
|
|
1183
1921
|
data: Struct<string, null>;
|
|
1184
1922
|
dataHash: Struct<BN, null>;
|
|
@@ -1196,28 +1934,162 @@ declare const CompressedAccountsByOwnerResult: Struct<{
|
|
|
1196
1934
|
/**
|
|
1197
1935
|
* @internal
|
|
1198
1936
|
*/
|
|
1199
|
-
declare const
|
|
1937
|
+
declare const CompressedAccountsByOwnerResultV2: Struct<{
|
|
1200
1938
|
items: {
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1939
|
+
owner: PublicKey;
|
|
1940
|
+
lamports: BN;
|
|
1941
|
+
address: number[] | null;
|
|
1942
|
+
data: {
|
|
1943
|
+
data: string;
|
|
1944
|
+
discriminator: BN;
|
|
1945
|
+
dataHash: BN;
|
|
1946
|
+
} | null;
|
|
1947
|
+
merkleContext: {
|
|
1948
|
+
cpiContext: PublicKey | null;
|
|
1210
1949
|
tree: PublicKey;
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1950
|
+
queue: PublicKey;
|
|
1951
|
+
treeType: number;
|
|
1952
|
+
nextTreeContext?: {
|
|
1953
|
+
cpiContext: PublicKey | null;
|
|
1954
|
+
tree: PublicKey;
|
|
1955
|
+
queue: PublicKey;
|
|
1956
|
+
treeType: number;
|
|
1957
|
+
} | null | undefined;
|
|
1958
|
+
};
|
|
1959
|
+
leafIndex: number;
|
|
1960
|
+
proveByIndex: boolean;
|
|
1961
|
+
seq: BN | null;
|
|
1962
|
+
hash: BN;
|
|
1963
|
+
slotCreated: BN;
|
|
1964
|
+
}[];
|
|
1965
|
+
cursor: string | null;
|
|
1966
|
+
}, {
|
|
1967
|
+
items: Struct<{
|
|
1968
|
+
owner: PublicKey;
|
|
1969
|
+
lamports: BN;
|
|
1970
|
+
address: number[] | null;
|
|
1971
|
+
data: {
|
|
1972
|
+
data: string;
|
|
1973
|
+
discriminator: BN;
|
|
1974
|
+
dataHash: BN;
|
|
1975
|
+
} | null;
|
|
1976
|
+
merkleContext: {
|
|
1977
|
+
cpiContext: PublicKey | null;
|
|
1978
|
+
tree: PublicKey;
|
|
1979
|
+
queue: PublicKey;
|
|
1980
|
+
treeType: number;
|
|
1981
|
+
nextTreeContext?: {
|
|
1982
|
+
cpiContext: PublicKey | null;
|
|
1983
|
+
tree: PublicKey;
|
|
1984
|
+
queue: PublicKey;
|
|
1985
|
+
treeType: number;
|
|
1986
|
+
} | null | undefined;
|
|
1987
|
+
};
|
|
1988
|
+
leafIndex: number;
|
|
1989
|
+
proveByIndex: boolean;
|
|
1990
|
+
seq: BN | null;
|
|
1991
|
+
hash: BN;
|
|
1992
|
+
slotCreated: BN;
|
|
1993
|
+
}[], Struct<{
|
|
1994
|
+
owner: PublicKey;
|
|
1995
|
+
lamports: BN;
|
|
1996
|
+
address: number[] | null;
|
|
1997
|
+
data: {
|
|
1998
|
+
data: string;
|
|
1999
|
+
discriminator: BN;
|
|
2000
|
+
dataHash: BN;
|
|
2001
|
+
} | null;
|
|
2002
|
+
merkleContext: {
|
|
2003
|
+
cpiContext: PublicKey | null;
|
|
2004
|
+
tree: PublicKey;
|
|
2005
|
+
queue: PublicKey;
|
|
2006
|
+
treeType: number;
|
|
2007
|
+
nextTreeContext?: {
|
|
2008
|
+
cpiContext: PublicKey | null;
|
|
2009
|
+
tree: PublicKey;
|
|
2010
|
+
queue: PublicKey;
|
|
2011
|
+
treeType: number;
|
|
2012
|
+
} | null | undefined;
|
|
2013
|
+
};
|
|
2014
|
+
leafIndex: number;
|
|
2015
|
+
proveByIndex: boolean;
|
|
2016
|
+
seq: BN | null;
|
|
2017
|
+
hash: BN;
|
|
2018
|
+
slotCreated: BN;
|
|
2019
|
+
}, {
|
|
2020
|
+
address: Struct<number[] | null, null>;
|
|
2021
|
+
hash: Struct<BN, null>;
|
|
2022
|
+
data: Struct<{
|
|
2023
|
+
data: string;
|
|
2024
|
+
discriminator: BN;
|
|
2025
|
+
dataHash: BN;
|
|
2026
|
+
} | null, {
|
|
2027
|
+
data: Struct<string, null>;
|
|
2028
|
+
dataHash: Struct<BN, null>;
|
|
2029
|
+
discriminator: Struct<BN, null>;
|
|
2030
|
+
}>;
|
|
2031
|
+
lamports: Struct<BN, null>;
|
|
2032
|
+
owner: Struct<PublicKey, null>;
|
|
2033
|
+
leafIndex: Struct<number, null>;
|
|
2034
|
+
seq: Struct<BN | null, null>;
|
|
2035
|
+
slotCreated: Struct<BN, null>;
|
|
2036
|
+
merkleContext: Struct<{
|
|
2037
|
+
cpiContext: PublicKey | null;
|
|
2038
|
+
tree: PublicKey;
|
|
2039
|
+
queue: PublicKey;
|
|
2040
|
+
treeType: number;
|
|
2041
|
+
nextTreeContext?: {
|
|
2042
|
+
cpiContext: PublicKey | null;
|
|
2043
|
+
tree: PublicKey;
|
|
2044
|
+
queue: PublicKey;
|
|
2045
|
+
treeType: number;
|
|
2046
|
+
} | null | undefined;
|
|
2047
|
+
}, {
|
|
2048
|
+
treeType: Struct<number, null>;
|
|
2049
|
+
tree: Struct<PublicKey, null>;
|
|
2050
|
+
queue: Struct<PublicKey, null>;
|
|
2051
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2052
|
+
nextTreeContext: Struct<{
|
|
2053
|
+
cpiContext: PublicKey | null;
|
|
2054
|
+
tree: PublicKey;
|
|
2055
|
+
queue: PublicKey;
|
|
2056
|
+
treeType: number;
|
|
2057
|
+
} | null | undefined, {
|
|
2058
|
+
treeType: Struct<number, null>;
|
|
2059
|
+
tree: Struct<PublicKey, null>;
|
|
2060
|
+
queue: Struct<PublicKey, null>;
|
|
2061
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2062
|
+
}>;
|
|
2063
|
+
}>;
|
|
2064
|
+
proveByIndex: Struct<boolean, null>;
|
|
2065
|
+
}>>;
|
|
2066
|
+
cursor: Struct<string | null, null>;
|
|
2067
|
+
}>;
|
|
2068
|
+
/**
|
|
2069
|
+
* @internal
|
|
2070
|
+
*/
|
|
2071
|
+
declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
|
|
2072
|
+
items: {
|
|
2073
|
+
tokenData: {
|
|
2074
|
+
owner: PublicKey;
|
|
2075
|
+
mint: PublicKey;
|
|
2076
|
+
amount: BN;
|
|
2077
|
+
delegate: PublicKey | null;
|
|
2078
|
+
state: string;
|
|
2079
|
+
};
|
|
2080
|
+
account: {
|
|
1218
2081
|
owner: PublicKey;
|
|
2082
|
+
lamports: BN;
|
|
2083
|
+
address: number[] | null;
|
|
2084
|
+
data: {
|
|
2085
|
+
data: string;
|
|
2086
|
+
discriminator: BN;
|
|
2087
|
+
dataHash: BN;
|
|
2088
|
+
} | null;
|
|
1219
2089
|
leafIndex: number;
|
|
1220
2090
|
seq: BN | null;
|
|
2091
|
+
tree: PublicKey;
|
|
2092
|
+
hash: BN;
|
|
1221
2093
|
slotCreated: BN;
|
|
1222
2094
|
};
|
|
1223
2095
|
}[];
|
|
@@ -1232,18 +2104,18 @@ declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
|
|
|
1232
2104
|
state: string;
|
|
1233
2105
|
};
|
|
1234
2106
|
account: {
|
|
2107
|
+
owner: PublicKey;
|
|
1235
2108
|
lamports: BN;
|
|
1236
|
-
|
|
2109
|
+
address: number[] | null;
|
|
1237
2110
|
data: {
|
|
1238
2111
|
data: string;
|
|
1239
|
-
dataHash: BN;
|
|
1240
2112
|
discriminator: BN;
|
|
2113
|
+
dataHash: BN;
|
|
1241
2114
|
} | null;
|
|
1242
|
-
address: number[] | null;
|
|
1243
|
-
hash: BN;
|
|
1244
|
-
owner: PublicKey;
|
|
1245
2115
|
leafIndex: number;
|
|
1246
2116
|
seq: BN | null;
|
|
2117
|
+
tree: PublicKey;
|
|
2118
|
+
hash: BN;
|
|
1247
2119
|
slotCreated: BN;
|
|
1248
2120
|
};
|
|
1249
2121
|
}[], Struct<{
|
|
@@ -1255,18 +2127,18 @@ declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
|
|
|
1255
2127
|
state: string;
|
|
1256
2128
|
};
|
|
1257
2129
|
account: {
|
|
2130
|
+
owner: PublicKey;
|
|
1258
2131
|
lamports: BN;
|
|
1259
|
-
|
|
2132
|
+
address: number[] | null;
|
|
1260
2133
|
data: {
|
|
1261
2134
|
data: string;
|
|
1262
|
-
dataHash: BN;
|
|
1263
2135
|
discriminator: BN;
|
|
2136
|
+
dataHash: BN;
|
|
1264
2137
|
} | null;
|
|
1265
|
-
address: number[] | null;
|
|
1266
|
-
hash: BN;
|
|
1267
|
-
owner: PublicKey;
|
|
1268
2138
|
leafIndex: number;
|
|
1269
2139
|
seq: BN | null;
|
|
2140
|
+
tree: PublicKey;
|
|
2141
|
+
hash: BN;
|
|
1270
2142
|
slotCreated: BN;
|
|
1271
2143
|
};
|
|
1272
2144
|
}, {
|
|
@@ -1284,26 +2156,200 @@ declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
|
|
|
1284
2156
|
state: Struct<string, null>;
|
|
1285
2157
|
}>;
|
|
1286
2158
|
account: Struct<{
|
|
2159
|
+
owner: PublicKey;
|
|
1287
2160
|
lamports: BN;
|
|
2161
|
+
address: number[] | null;
|
|
2162
|
+
data: {
|
|
2163
|
+
data: string;
|
|
2164
|
+
discriminator: BN;
|
|
2165
|
+
dataHash: BN;
|
|
2166
|
+
} | null;
|
|
2167
|
+
leafIndex: number;
|
|
2168
|
+
seq: BN | null;
|
|
1288
2169
|
tree: PublicKey;
|
|
2170
|
+
hash: BN;
|
|
2171
|
+
slotCreated: BN;
|
|
2172
|
+
}, {
|
|
2173
|
+
address: Struct<number[] | null, null>;
|
|
2174
|
+
hash: Struct<BN, null>;
|
|
2175
|
+
data: Struct<{
|
|
2176
|
+
data: string;
|
|
2177
|
+
discriminator: BN;
|
|
2178
|
+
dataHash: BN;
|
|
2179
|
+
} | null, {
|
|
2180
|
+
data: Struct<string, null>;
|
|
2181
|
+
dataHash: Struct<BN, null>;
|
|
2182
|
+
discriminator: Struct<BN, null>;
|
|
2183
|
+
}>;
|
|
2184
|
+
lamports: Struct<BN, null>;
|
|
2185
|
+
owner: Struct<PublicKey, null>;
|
|
2186
|
+
leafIndex: Struct<number, null>;
|
|
2187
|
+
tree: Struct<PublicKey, null>;
|
|
2188
|
+
seq: Struct<BN | null, null>;
|
|
2189
|
+
slotCreated: Struct<BN, null>;
|
|
2190
|
+
}>;
|
|
2191
|
+
}>>;
|
|
2192
|
+
cursor: Struct<string | null, null>;
|
|
2193
|
+
}>;
|
|
2194
|
+
/**
|
|
2195
|
+
* @internal
|
|
2196
|
+
*/
|
|
2197
|
+
declare const CompressedTokenAccountsByOwnerOrDelegateResultV2: Struct<{
|
|
2198
|
+
items: {
|
|
2199
|
+
tokenData: {
|
|
2200
|
+
owner: PublicKey;
|
|
2201
|
+
mint: PublicKey;
|
|
2202
|
+
amount: BN;
|
|
2203
|
+
delegate: PublicKey | null;
|
|
2204
|
+
state: string;
|
|
2205
|
+
};
|
|
2206
|
+
account: {
|
|
2207
|
+
owner: PublicKey;
|
|
2208
|
+
lamports: BN;
|
|
2209
|
+
address: number[] | null;
|
|
1289
2210
|
data: {
|
|
1290
2211
|
data: string;
|
|
2212
|
+
discriminator: BN;
|
|
1291
2213
|
dataHash: BN;
|
|
2214
|
+
} | null;
|
|
2215
|
+
merkleContext: {
|
|
2216
|
+
cpiContext: PublicKey | null;
|
|
2217
|
+
tree: PublicKey;
|
|
2218
|
+
queue: PublicKey;
|
|
2219
|
+
treeType: number;
|
|
2220
|
+
nextTreeContext?: {
|
|
2221
|
+
cpiContext: PublicKey | null;
|
|
2222
|
+
tree: PublicKey;
|
|
2223
|
+
queue: PublicKey;
|
|
2224
|
+
treeType: number;
|
|
2225
|
+
} | null | undefined;
|
|
2226
|
+
};
|
|
2227
|
+
leafIndex: number;
|
|
2228
|
+
proveByIndex: boolean;
|
|
2229
|
+
seq: BN | null;
|
|
2230
|
+
hash: BN;
|
|
2231
|
+
slotCreated: BN;
|
|
2232
|
+
};
|
|
2233
|
+
}[];
|
|
2234
|
+
cursor: string | null;
|
|
2235
|
+
}, {
|
|
2236
|
+
items: Struct<{
|
|
2237
|
+
tokenData: {
|
|
2238
|
+
owner: PublicKey;
|
|
2239
|
+
mint: PublicKey;
|
|
2240
|
+
amount: BN;
|
|
2241
|
+
delegate: PublicKey | null;
|
|
2242
|
+
state: string;
|
|
2243
|
+
};
|
|
2244
|
+
account: {
|
|
2245
|
+
owner: PublicKey;
|
|
2246
|
+
lamports: BN;
|
|
2247
|
+
address: number[] | null;
|
|
2248
|
+
data: {
|
|
2249
|
+
data: string;
|
|
1292
2250
|
discriminator: BN;
|
|
2251
|
+
dataHash: BN;
|
|
1293
2252
|
} | null;
|
|
2253
|
+
merkleContext: {
|
|
2254
|
+
cpiContext: PublicKey | null;
|
|
2255
|
+
tree: PublicKey;
|
|
2256
|
+
queue: PublicKey;
|
|
2257
|
+
treeType: number;
|
|
2258
|
+
nextTreeContext?: {
|
|
2259
|
+
cpiContext: PublicKey | null;
|
|
2260
|
+
tree: PublicKey;
|
|
2261
|
+
queue: PublicKey;
|
|
2262
|
+
treeType: number;
|
|
2263
|
+
} | null | undefined;
|
|
2264
|
+
};
|
|
2265
|
+
leafIndex: number;
|
|
2266
|
+
proveByIndex: boolean;
|
|
2267
|
+
seq: BN | null;
|
|
2268
|
+
hash: BN;
|
|
2269
|
+
slotCreated: BN;
|
|
2270
|
+
};
|
|
2271
|
+
}[], Struct<{
|
|
2272
|
+
tokenData: {
|
|
2273
|
+
owner: PublicKey;
|
|
2274
|
+
mint: PublicKey;
|
|
2275
|
+
amount: BN;
|
|
2276
|
+
delegate: PublicKey | null;
|
|
2277
|
+
state: string;
|
|
2278
|
+
};
|
|
2279
|
+
account: {
|
|
2280
|
+
owner: PublicKey;
|
|
2281
|
+
lamports: BN;
|
|
1294
2282
|
address: number[] | null;
|
|
2283
|
+
data: {
|
|
2284
|
+
data: string;
|
|
2285
|
+
discriminator: BN;
|
|
2286
|
+
dataHash: BN;
|
|
2287
|
+
} | null;
|
|
2288
|
+
merkleContext: {
|
|
2289
|
+
cpiContext: PublicKey | null;
|
|
2290
|
+
tree: PublicKey;
|
|
2291
|
+
queue: PublicKey;
|
|
2292
|
+
treeType: number;
|
|
2293
|
+
nextTreeContext?: {
|
|
2294
|
+
cpiContext: PublicKey | null;
|
|
2295
|
+
tree: PublicKey;
|
|
2296
|
+
queue: PublicKey;
|
|
2297
|
+
treeType: number;
|
|
2298
|
+
} | null | undefined;
|
|
2299
|
+
};
|
|
2300
|
+
leafIndex: number;
|
|
2301
|
+
proveByIndex: boolean;
|
|
2302
|
+
seq: BN | null;
|
|
1295
2303
|
hash: BN;
|
|
2304
|
+
slotCreated: BN;
|
|
2305
|
+
};
|
|
2306
|
+
}, {
|
|
2307
|
+
tokenData: Struct<{
|
|
2308
|
+
owner: PublicKey;
|
|
2309
|
+
mint: PublicKey;
|
|
2310
|
+
amount: BN;
|
|
2311
|
+
delegate: PublicKey | null;
|
|
2312
|
+
state: string;
|
|
2313
|
+
}, {
|
|
2314
|
+
mint: Struct<PublicKey, null>;
|
|
2315
|
+
owner: Struct<PublicKey, null>;
|
|
2316
|
+
amount: Struct<BN, null>;
|
|
2317
|
+
delegate: Struct<PublicKey | null, null>;
|
|
2318
|
+
state: Struct<string, null>;
|
|
2319
|
+
}>;
|
|
2320
|
+
account: Struct<{
|
|
1296
2321
|
owner: PublicKey;
|
|
2322
|
+
lamports: BN;
|
|
2323
|
+
address: number[] | null;
|
|
2324
|
+
data: {
|
|
2325
|
+
data: string;
|
|
2326
|
+
discriminator: BN;
|
|
2327
|
+
dataHash: BN;
|
|
2328
|
+
} | null;
|
|
2329
|
+
merkleContext: {
|
|
2330
|
+
cpiContext: PublicKey | null;
|
|
2331
|
+
tree: PublicKey;
|
|
2332
|
+
queue: PublicKey;
|
|
2333
|
+
treeType: number;
|
|
2334
|
+
nextTreeContext?: {
|
|
2335
|
+
cpiContext: PublicKey | null;
|
|
2336
|
+
tree: PublicKey;
|
|
2337
|
+
queue: PublicKey;
|
|
2338
|
+
treeType: number;
|
|
2339
|
+
} | null | undefined;
|
|
2340
|
+
};
|
|
1297
2341
|
leafIndex: number;
|
|
2342
|
+
proveByIndex: boolean;
|
|
1298
2343
|
seq: BN | null;
|
|
2344
|
+
hash: BN;
|
|
1299
2345
|
slotCreated: BN;
|
|
1300
2346
|
}, {
|
|
1301
2347
|
address: Struct<number[] | null, null>;
|
|
1302
2348
|
hash: Struct<BN, null>;
|
|
1303
2349
|
data: Struct<{
|
|
1304
2350
|
data: string;
|
|
1305
|
-
dataHash: BN;
|
|
1306
2351
|
discriminator: BN;
|
|
2352
|
+
dataHash: BN;
|
|
1307
2353
|
} | null, {
|
|
1308
2354
|
data: Struct<string, null>;
|
|
1309
2355
|
dataHash: Struct<BN, null>;
|
|
@@ -1312,9 +2358,37 @@ declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
|
|
|
1312
2358
|
lamports: Struct<BN, null>;
|
|
1313
2359
|
owner: Struct<PublicKey, null>;
|
|
1314
2360
|
leafIndex: Struct<number, null>;
|
|
1315
|
-
tree: Struct<PublicKey, null>;
|
|
1316
2361
|
seq: Struct<BN | null, null>;
|
|
1317
2362
|
slotCreated: Struct<BN, null>;
|
|
2363
|
+
merkleContext: Struct<{
|
|
2364
|
+
cpiContext: PublicKey | null;
|
|
2365
|
+
tree: PublicKey;
|
|
2366
|
+
queue: PublicKey;
|
|
2367
|
+
treeType: number;
|
|
2368
|
+
nextTreeContext?: {
|
|
2369
|
+
cpiContext: PublicKey | null;
|
|
2370
|
+
tree: PublicKey;
|
|
2371
|
+
queue: PublicKey;
|
|
2372
|
+
treeType: number;
|
|
2373
|
+
} | null | undefined;
|
|
2374
|
+
}, {
|
|
2375
|
+
treeType: Struct<number, null>;
|
|
2376
|
+
tree: Struct<PublicKey, null>;
|
|
2377
|
+
queue: Struct<PublicKey, null>;
|
|
2378
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2379
|
+
nextTreeContext: Struct<{
|
|
2380
|
+
cpiContext: PublicKey | null;
|
|
2381
|
+
tree: PublicKey;
|
|
2382
|
+
queue: PublicKey;
|
|
2383
|
+
treeType: number;
|
|
2384
|
+
} | null | undefined, {
|
|
2385
|
+
treeType: Struct<number, null>;
|
|
2386
|
+
tree: Struct<PublicKey, null>;
|
|
2387
|
+
queue: Struct<PublicKey, null>;
|
|
2388
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2389
|
+
}>;
|
|
2390
|
+
}>;
|
|
2391
|
+
proveByIndex: Struct<boolean, null>;
|
|
1318
2392
|
}>;
|
|
1319
2393
|
}>>;
|
|
1320
2394
|
cursor: Struct<string | null, null>;
|
|
@@ -1384,12 +2458,12 @@ declare const LatestNonVotingSignaturesResultPaginated: Struct<{
|
|
|
1384
2458
|
/**
|
|
1385
2459
|
* @internal
|
|
1386
2460
|
*/
|
|
1387
|
-
declare const
|
|
2461
|
+
declare const MerkleProofResult: Struct<{
|
|
2462
|
+
proof: BN[];
|
|
2463
|
+
leafIndex: number;
|
|
1388
2464
|
root: BN;
|
|
1389
2465
|
hash: BN;
|
|
1390
|
-
leafIndex: number;
|
|
1391
2466
|
merkleTree: PublicKey;
|
|
1392
|
-
proof: BN[];
|
|
1393
2467
|
rootSeq: number;
|
|
1394
2468
|
}, {
|
|
1395
2469
|
hash: Struct<BN, null>;
|
|
@@ -1402,11 +2476,69 @@ declare const MerkeProofResult: Struct<{
|
|
|
1402
2476
|
/**
|
|
1403
2477
|
* @internal
|
|
1404
2478
|
*/
|
|
1405
|
-
declare const
|
|
1406
|
-
|
|
2479
|
+
declare const MerkleProofResultV2: Struct<{
|
|
2480
|
+
proof: BN[];
|
|
2481
|
+
leafIndex: number;
|
|
2482
|
+
proveByIndex: boolean;
|
|
2483
|
+
root: BN;
|
|
2484
|
+
hash: BN;
|
|
2485
|
+
rootSeq: number;
|
|
2486
|
+
treeContext: {
|
|
2487
|
+
cpiContext: PublicKey | null;
|
|
2488
|
+
tree: PublicKey;
|
|
2489
|
+
queue: PublicKey;
|
|
2490
|
+
treeType: number;
|
|
2491
|
+
nextTreeContext?: {
|
|
2492
|
+
cpiContext: PublicKey | null;
|
|
2493
|
+
tree: PublicKey;
|
|
2494
|
+
queue: PublicKey;
|
|
2495
|
+
treeType: number;
|
|
2496
|
+
} | null | undefined;
|
|
2497
|
+
};
|
|
2498
|
+
}, {
|
|
2499
|
+
hash: Struct<BN, null>;
|
|
2500
|
+
leafIndex: Struct<number, null>;
|
|
2501
|
+
proof: Struct<BN[], Struct<BN, null>>;
|
|
2502
|
+
root: Struct<BN, null>;
|
|
2503
|
+
rootSeq: Struct<number, null>;
|
|
2504
|
+
proveByIndex: Struct<boolean, null>;
|
|
2505
|
+
treeContext: Struct<{
|
|
2506
|
+
cpiContext: PublicKey | null;
|
|
2507
|
+
tree: PublicKey;
|
|
2508
|
+
queue: PublicKey;
|
|
2509
|
+
treeType: number;
|
|
2510
|
+
nextTreeContext?: {
|
|
2511
|
+
cpiContext: PublicKey | null;
|
|
2512
|
+
tree: PublicKey;
|
|
2513
|
+
queue: PublicKey;
|
|
2514
|
+
treeType: number;
|
|
2515
|
+
} | null | undefined;
|
|
2516
|
+
}, {
|
|
2517
|
+
treeType: Struct<number, null>;
|
|
2518
|
+
tree: Struct<PublicKey, null>;
|
|
2519
|
+
queue: Struct<PublicKey, null>;
|
|
2520
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2521
|
+
nextTreeContext: Struct<{
|
|
2522
|
+
cpiContext: PublicKey | null;
|
|
2523
|
+
tree: PublicKey;
|
|
2524
|
+
queue: PublicKey;
|
|
2525
|
+
treeType: number;
|
|
2526
|
+
} | null | undefined, {
|
|
2527
|
+
treeType: Struct<number, null>;
|
|
2528
|
+
tree: Struct<PublicKey, null>;
|
|
2529
|
+
queue: Struct<PublicKey, null>;
|
|
2530
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2531
|
+
}>;
|
|
2532
|
+
}>;
|
|
2533
|
+
}>;
|
|
2534
|
+
/**
|
|
2535
|
+
* @internal
|
|
2536
|
+
*/
|
|
2537
|
+
declare const NewAddressProofResult: Struct<{
|
|
2538
|
+
proof: BN[];
|
|
1407
2539
|
address: BN;
|
|
2540
|
+
root: BN;
|
|
1408
2541
|
merkleTree: PublicKey;
|
|
1409
|
-
proof: BN[];
|
|
1410
2542
|
rootSeq: number;
|
|
1411
2543
|
nextIndex: number;
|
|
1412
2544
|
lowerRangeAddress: BN;
|
|
@@ -1423,6 +2555,16 @@ declare const NewAddressProofResult: Struct<{
|
|
|
1423
2555
|
higherRangeAddress: Struct<BN, null>;
|
|
1424
2556
|
lowElementLeafIndex: Struct<number, null>;
|
|
1425
2557
|
}>;
|
|
2558
|
+
/**
|
|
2559
|
+
* @internal
|
|
2560
|
+
*/
|
|
2561
|
+
declare const RootIndexResultV2: Struct<{
|
|
2562
|
+
rootIndex: number;
|
|
2563
|
+
proveByIndex: boolean;
|
|
2564
|
+
}, {
|
|
2565
|
+
rootIndex: Struct<number, null>;
|
|
2566
|
+
proveByIndex: Struct<boolean, null>;
|
|
2567
|
+
}>;
|
|
1426
2568
|
/**
|
|
1427
2569
|
* @internal
|
|
1428
2570
|
*/
|
|
@@ -1453,22 +2595,222 @@ declare const ValidityProofResult: Struct<{
|
|
|
1453
2595
|
roots: Struct<BN[], Struct<BN, null>>;
|
|
1454
2596
|
merkleTrees: Struct<PublicKey[], Struct<PublicKey, null>>;
|
|
1455
2597
|
}>;
|
|
2598
|
+
declare const ValidityProofResultV2: Struct<{
|
|
2599
|
+
compressedProof: {
|
|
2600
|
+
a: number[];
|
|
2601
|
+
b: number[];
|
|
2602
|
+
c: number[];
|
|
2603
|
+
} | null;
|
|
2604
|
+
accounts: {
|
|
2605
|
+
merkleContext: {
|
|
2606
|
+
cpiContext: PublicKey | null;
|
|
2607
|
+
tree: PublicKey;
|
|
2608
|
+
queue: PublicKey;
|
|
2609
|
+
treeType: number;
|
|
2610
|
+
nextTreeContext?: {
|
|
2611
|
+
cpiContext: PublicKey | null;
|
|
2612
|
+
tree: PublicKey;
|
|
2613
|
+
queue: PublicKey;
|
|
2614
|
+
treeType: number;
|
|
2615
|
+
} | null | undefined;
|
|
2616
|
+
};
|
|
2617
|
+
rootIndex: {
|
|
2618
|
+
rootIndex: number;
|
|
2619
|
+
proveByIndex: boolean;
|
|
2620
|
+
};
|
|
2621
|
+
leafIndex: number;
|
|
2622
|
+
root: BN;
|
|
2623
|
+
hash: BN;
|
|
2624
|
+
}[];
|
|
2625
|
+
addresses: {
|
|
2626
|
+
address: BN;
|
|
2627
|
+
merkleContext: {
|
|
2628
|
+
cpiContext: PublicKey | null;
|
|
2629
|
+
tree: PublicKey;
|
|
2630
|
+
queue: PublicKey;
|
|
2631
|
+
treeType: number;
|
|
2632
|
+
nextTreeContext?: {
|
|
2633
|
+
cpiContext: PublicKey | null;
|
|
2634
|
+
tree: PublicKey;
|
|
2635
|
+
queue: PublicKey;
|
|
2636
|
+
treeType: number;
|
|
2637
|
+
} | null | undefined;
|
|
2638
|
+
};
|
|
2639
|
+
rootIndex: number;
|
|
2640
|
+
root: BN;
|
|
2641
|
+
}[];
|
|
2642
|
+
}, {
|
|
2643
|
+
compressedProof: Struct<{
|
|
2644
|
+
a: number[];
|
|
2645
|
+
b: number[];
|
|
2646
|
+
c: number[];
|
|
2647
|
+
} | null, {
|
|
2648
|
+
a: Struct<number[], Struct<number, null>>;
|
|
2649
|
+
b: Struct<number[], Struct<number, null>>;
|
|
2650
|
+
c: Struct<number[], Struct<number, null>>;
|
|
2651
|
+
}>;
|
|
2652
|
+
accounts: Struct<{
|
|
2653
|
+
merkleContext: {
|
|
2654
|
+
cpiContext: PublicKey | null;
|
|
2655
|
+
tree: PublicKey;
|
|
2656
|
+
queue: PublicKey;
|
|
2657
|
+
treeType: number;
|
|
2658
|
+
nextTreeContext?: {
|
|
2659
|
+
cpiContext: PublicKey | null;
|
|
2660
|
+
tree: PublicKey;
|
|
2661
|
+
queue: PublicKey;
|
|
2662
|
+
treeType: number;
|
|
2663
|
+
} | null | undefined;
|
|
2664
|
+
};
|
|
2665
|
+
rootIndex: {
|
|
2666
|
+
rootIndex: number;
|
|
2667
|
+
proveByIndex: boolean;
|
|
2668
|
+
};
|
|
2669
|
+
leafIndex: number;
|
|
2670
|
+
root: BN;
|
|
2671
|
+
hash: BN;
|
|
2672
|
+
}[], Struct<{
|
|
2673
|
+
merkleContext: {
|
|
2674
|
+
cpiContext: PublicKey | null;
|
|
2675
|
+
tree: PublicKey;
|
|
2676
|
+
queue: PublicKey;
|
|
2677
|
+
treeType: number;
|
|
2678
|
+
nextTreeContext?: {
|
|
2679
|
+
cpiContext: PublicKey | null;
|
|
2680
|
+
tree: PublicKey;
|
|
2681
|
+
queue: PublicKey;
|
|
2682
|
+
treeType: number;
|
|
2683
|
+
} | null | undefined;
|
|
2684
|
+
};
|
|
2685
|
+
rootIndex: {
|
|
2686
|
+
rootIndex: number;
|
|
2687
|
+
proveByIndex: boolean;
|
|
2688
|
+
};
|
|
2689
|
+
leafIndex: number;
|
|
2690
|
+
root: BN;
|
|
2691
|
+
hash: BN;
|
|
2692
|
+
}, {
|
|
2693
|
+
hash: Struct<BN, null>;
|
|
2694
|
+
root: Struct<BN, null>;
|
|
2695
|
+
rootIndex: Struct<{
|
|
2696
|
+
rootIndex: number;
|
|
2697
|
+
proveByIndex: boolean;
|
|
2698
|
+
}, {
|
|
2699
|
+
rootIndex: Struct<number, null>;
|
|
2700
|
+
proveByIndex: Struct<boolean, null>;
|
|
2701
|
+
}>;
|
|
2702
|
+
merkleContext: Struct<{
|
|
2703
|
+
cpiContext: PublicKey | null;
|
|
2704
|
+
tree: PublicKey;
|
|
2705
|
+
queue: PublicKey;
|
|
2706
|
+
treeType: number;
|
|
2707
|
+
nextTreeContext?: {
|
|
2708
|
+
cpiContext: PublicKey | null;
|
|
2709
|
+
tree: PublicKey;
|
|
2710
|
+
queue: PublicKey;
|
|
2711
|
+
treeType: number;
|
|
2712
|
+
} | null | undefined;
|
|
2713
|
+
}, {
|
|
2714
|
+
treeType: Struct<number, null>;
|
|
2715
|
+
tree: Struct<PublicKey, null>;
|
|
2716
|
+
queue: Struct<PublicKey, null>;
|
|
2717
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2718
|
+
nextTreeContext: Struct<{
|
|
2719
|
+
cpiContext: PublicKey | null;
|
|
2720
|
+
tree: PublicKey;
|
|
2721
|
+
queue: PublicKey;
|
|
2722
|
+
treeType: number;
|
|
2723
|
+
} | null | undefined, {
|
|
2724
|
+
treeType: Struct<number, null>;
|
|
2725
|
+
tree: Struct<PublicKey, null>;
|
|
2726
|
+
queue: Struct<PublicKey, null>;
|
|
2727
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2728
|
+
}>;
|
|
2729
|
+
}>;
|
|
2730
|
+
leafIndex: Struct<number, null>;
|
|
2731
|
+
}>>;
|
|
2732
|
+
addresses: Struct<{
|
|
2733
|
+
address: BN;
|
|
2734
|
+
merkleContext: {
|
|
2735
|
+
cpiContext: PublicKey | null;
|
|
2736
|
+
tree: PublicKey;
|
|
2737
|
+
queue: PublicKey;
|
|
2738
|
+
treeType: number;
|
|
2739
|
+
nextTreeContext?: {
|
|
2740
|
+
cpiContext: PublicKey | null;
|
|
2741
|
+
tree: PublicKey;
|
|
2742
|
+
queue: PublicKey;
|
|
2743
|
+
treeType: number;
|
|
2744
|
+
} | null | undefined;
|
|
2745
|
+
};
|
|
2746
|
+
rootIndex: number;
|
|
2747
|
+
root: BN;
|
|
2748
|
+
}[], Struct<{
|
|
2749
|
+
address: BN;
|
|
2750
|
+
merkleContext: {
|
|
2751
|
+
cpiContext: PublicKey | null;
|
|
2752
|
+
tree: PublicKey;
|
|
2753
|
+
queue: PublicKey;
|
|
2754
|
+
treeType: number;
|
|
2755
|
+
nextTreeContext?: {
|
|
2756
|
+
cpiContext: PublicKey | null;
|
|
2757
|
+
tree: PublicKey;
|
|
2758
|
+
queue: PublicKey;
|
|
2759
|
+
treeType: number;
|
|
2760
|
+
} | null | undefined;
|
|
2761
|
+
};
|
|
2762
|
+
rootIndex: number;
|
|
2763
|
+
root: BN;
|
|
2764
|
+
}, {
|
|
2765
|
+
address: Struct<BN, null>;
|
|
2766
|
+
root: Struct<BN, null>;
|
|
2767
|
+
rootIndex: Struct<number, null>;
|
|
2768
|
+
merkleContext: Struct<{
|
|
2769
|
+
cpiContext: PublicKey | null;
|
|
2770
|
+
tree: PublicKey;
|
|
2771
|
+
queue: PublicKey;
|
|
2772
|
+
treeType: number;
|
|
2773
|
+
nextTreeContext?: {
|
|
2774
|
+
cpiContext: PublicKey | null;
|
|
2775
|
+
tree: PublicKey;
|
|
2776
|
+
queue: PublicKey;
|
|
2777
|
+
treeType: number;
|
|
2778
|
+
} | null | undefined;
|
|
2779
|
+
}, {
|
|
2780
|
+
treeType: Struct<number, null>;
|
|
2781
|
+
tree: Struct<PublicKey, null>;
|
|
2782
|
+
queue: Struct<PublicKey, null>;
|
|
2783
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2784
|
+
nextTreeContext: Struct<{
|
|
2785
|
+
cpiContext: PublicKey | null;
|
|
2786
|
+
tree: PublicKey;
|
|
2787
|
+
queue: PublicKey;
|
|
2788
|
+
treeType: number;
|
|
2789
|
+
} | null | undefined, {
|
|
2790
|
+
treeType: Struct<number, null>;
|
|
2791
|
+
tree: Struct<PublicKey, null>;
|
|
2792
|
+
queue: Struct<PublicKey, null>;
|
|
2793
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2794
|
+
}>;
|
|
2795
|
+
}>;
|
|
2796
|
+
}>>;
|
|
2797
|
+
}>;
|
|
1456
2798
|
/**
|
|
1457
2799
|
* @internal
|
|
1458
2800
|
*/
|
|
1459
2801
|
declare const MultipleMerkleProofsResult: Struct<{
|
|
2802
|
+
proof: BN[];
|
|
2803
|
+
leafIndex: number;
|
|
1460
2804
|
root: BN;
|
|
1461
2805
|
hash: BN;
|
|
1462
|
-
leafIndex: number;
|
|
1463
2806
|
merkleTree: PublicKey;
|
|
1464
|
-
proof: BN[];
|
|
1465
2807
|
rootSeq: number;
|
|
1466
2808
|
}[], Struct<{
|
|
2809
|
+
proof: BN[];
|
|
2810
|
+
leafIndex: number;
|
|
1467
2811
|
root: BN;
|
|
1468
2812
|
hash: BN;
|
|
1469
|
-
leafIndex: number;
|
|
1470
2813
|
merkleTree: PublicKey;
|
|
1471
|
-
proof: BN[];
|
|
1472
2814
|
rootSeq: number;
|
|
1473
2815
|
}, {
|
|
1474
2816
|
hash: Struct<BN, null>;
|
|
@@ -1478,6 +2820,83 @@ declare const MultipleMerkleProofsResult: Struct<{
|
|
|
1478
2820
|
rootSeq: Struct<number, null>;
|
|
1479
2821
|
root: Struct<BN, null>;
|
|
1480
2822
|
}>>;
|
|
2823
|
+
/**
|
|
2824
|
+
* @internal
|
|
2825
|
+
*/
|
|
2826
|
+
declare const MultipleMerkleProofsResultV2: Struct<{
|
|
2827
|
+
proof: BN[];
|
|
2828
|
+
leafIndex: number;
|
|
2829
|
+
proveByIndex: boolean;
|
|
2830
|
+
root: BN;
|
|
2831
|
+
hash: BN;
|
|
2832
|
+
rootSeq: number;
|
|
2833
|
+
treeContext: {
|
|
2834
|
+
cpiContext: PublicKey | null;
|
|
2835
|
+
tree: PublicKey;
|
|
2836
|
+
queue: PublicKey;
|
|
2837
|
+
treeType: number;
|
|
2838
|
+
nextTreeContext?: {
|
|
2839
|
+
cpiContext: PublicKey | null;
|
|
2840
|
+
tree: PublicKey;
|
|
2841
|
+
queue: PublicKey;
|
|
2842
|
+
treeType: number;
|
|
2843
|
+
} | null | undefined;
|
|
2844
|
+
};
|
|
2845
|
+
}[], Struct<{
|
|
2846
|
+
proof: BN[];
|
|
2847
|
+
leafIndex: number;
|
|
2848
|
+
proveByIndex: boolean;
|
|
2849
|
+
root: BN;
|
|
2850
|
+
hash: BN;
|
|
2851
|
+
rootSeq: number;
|
|
2852
|
+
treeContext: {
|
|
2853
|
+
cpiContext: PublicKey | null;
|
|
2854
|
+
tree: PublicKey;
|
|
2855
|
+
queue: PublicKey;
|
|
2856
|
+
treeType: number;
|
|
2857
|
+
nextTreeContext?: {
|
|
2858
|
+
cpiContext: PublicKey | null;
|
|
2859
|
+
tree: PublicKey;
|
|
2860
|
+
queue: PublicKey;
|
|
2861
|
+
treeType: number;
|
|
2862
|
+
} | null | undefined;
|
|
2863
|
+
};
|
|
2864
|
+
}, {
|
|
2865
|
+
hash: Struct<BN, null>;
|
|
2866
|
+
leafIndex: Struct<number, null>;
|
|
2867
|
+
proof: Struct<BN[], Struct<BN, null>>;
|
|
2868
|
+
root: Struct<BN, null>;
|
|
2869
|
+
rootSeq: Struct<number, null>;
|
|
2870
|
+
proveByIndex: Struct<boolean, null>;
|
|
2871
|
+
treeContext: Struct<{
|
|
2872
|
+
cpiContext: PublicKey | null;
|
|
2873
|
+
tree: PublicKey;
|
|
2874
|
+
queue: PublicKey;
|
|
2875
|
+
treeType: number;
|
|
2876
|
+
nextTreeContext?: {
|
|
2877
|
+
cpiContext: PublicKey | null;
|
|
2878
|
+
tree: PublicKey;
|
|
2879
|
+
queue: PublicKey;
|
|
2880
|
+
treeType: number;
|
|
2881
|
+
} | null | undefined;
|
|
2882
|
+
}, {
|
|
2883
|
+
treeType: Struct<number, null>;
|
|
2884
|
+
tree: Struct<PublicKey, null>;
|
|
2885
|
+
queue: Struct<PublicKey, null>;
|
|
2886
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2887
|
+
nextTreeContext: Struct<{
|
|
2888
|
+
cpiContext: PublicKey | null;
|
|
2889
|
+
tree: PublicKey;
|
|
2890
|
+
queue: PublicKey;
|
|
2891
|
+
treeType: number;
|
|
2892
|
+
} | null | undefined, {
|
|
2893
|
+
treeType: Struct<number, null>;
|
|
2894
|
+
tree: Struct<PublicKey, null>;
|
|
2895
|
+
queue: Struct<PublicKey, null>;
|
|
2896
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
2897
|
+
}>;
|
|
2898
|
+
}>;
|
|
2899
|
+
}>>;
|
|
1481
2900
|
/**
|
|
1482
2901
|
* @internal
|
|
1483
2902
|
*/
|
|
@@ -1552,9 +2971,9 @@ declare const CompressedMintTokenHoldersResult: Struct<{
|
|
|
1552
2971
|
}>>;
|
|
1553
2972
|
}>;
|
|
1554
2973
|
declare const AccountProofResult: Struct<{
|
|
2974
|
+
proof: number[][];
|
|
1555
2975
|
root: number[];
|
|
1556
2976
|
hash: number[];
|
|
1557
|
-
proof: number[][];
|
|
1558
2977
|
}, {
|
|
1559
2978
|
hash: Struct<number[], Struct<number, null>>;
|
|
1560
2979
|
root: Struct<number[], Struct<number, null>>;
|
|
@@ -1605,22 +3024,25 @@ declare const SignatureListWithCursorResult: Struct<{
|
|
|
1605
3024
|
}>>;
|
|
1606
3025
|
cursor: Struct<string | null, null>;
|
|
1607
3026
|
}>;
|
|
3027
|
+
/**
|
|
3028
|
+
* @internal
|
|
3029
|
+
*/
|
|
1608
3030
|
declare const CompressedTransactionResult: Struct<{
|
|
1609
3031
|
compressionInfo: {
|
|
1610
3032
|
closedAccounts: {
|
|
1611
3033
|
account: {
|
|
3034
|
+
owner: PublicKey;
|
|
1612
3035
|
lamports: BN;
|
|
1613
|
-
|
|
3036
|
+
address: number[] | null;
|
|
1614
3037
|
data: {
|
|
1615
3038
|
data: string;
|
|
1616
|
-
dataHash: BN;
|
|
1617
3039
|
discriminator: BN;
|
|
3040
|
+
dataHash: BN;
|
|
1618
3041
|
} | null;
|
|
1619
|
-
address: number[] | null;
|
|
1620
|
-
hash: BN;
|
|
1621
|
-
owner: PublicKey;
|
|
1622
3042
|
leafIndex: number;
|
|
1623
3043
|
seq: BN | null;
|
|
3044
|
+
tree: PublicKey;
|
|
3045
|
+
hash: BN;
|
|
1624
3046
|
slotCreated: BN;
|
|
1625
3047
|
};
|
|
1626
3048
|
optionalTokenData: {
|
|
@@ -1633,18 +3055,18 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1633
3055
|
}[];
|
|
1634
3056
|
openedAccounts: {
|
|
1635
3057
|
account: {
|
|
3058
|
+
owner: PublicKey;
|
|
1636
3059
|
lamports: BN;
|
|
1637
|
-
|
|
3060
|
+
address: number[] | null;
|
|
1638
3061
|
data: {
|
|
1639
3062
|
data: string;
|
|
1640
|
-
dataHash: BN;
|
|
1641
3063
|
discriminator: BN;
|
|
3064
|
+
dataHash: BN;
|
|
1642
3065
|
} | null;
|
|
1643
|
-
address: number[] | null;
|
|
1644
|
-
hash: BN;
|
|
1645
|
-
owner: PublicKey;
|
|
1646
3066
|
leafIndex: number;
|
|
1647
3067
|
seq: BN | null;
|
|
3068
|
+
tree: PublicKey;
|
|
3069
|
+
hash: BN;
|
|
1648
3070
|
slotCreated: BN;
|
|
1649
3071
|
};
|
|
1650
3072
|
optionalTokenData: {
|
|
@@ -1661,18 +3083,18 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1661
3083
|
compressionInfo: Struct<{
|
|
1662
3084
|
closedAccounts: {
|
|
1663
3085
|
account: {
|
|
3086
|
+
owner: PublicKey;
|
|
1664
3087
|
lamports: BN;
|
|
1665
|
-
|
|
3088
|
+
address: number[] | null;
|
|
1666
3089
|
data: {
|
|
1667
3090
|
data: string;
|
|
1668
|
-
dataHash: BN;
|
|
1669
3091
|
discriminator: BN;
|
|
3092
|
+
dataHash: BN;
|
|
1670
3093
|
} | null;
|
|
1671
|
-
address: number[] | null;
|
|
1672
|
-
hash: BN;
|
|
1673
|
-
owner: PublicKey;
|
|
1674
3094
|
leafIndex: number;
|
|
1675
3095
|
seq: BN | null;
|
|
3096
|
+
tree: PublicKey;
|
|
3097
|
+
hash: BN;
|
|
1676
3098
|
slotCreated: BN;
|
|
1677
3099
|
};
|
|
1678
3100
|
optionalTokenData: {
|
|
@@ -1685,18 +3107,18 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1685
3107
|
}[];
|
|
1686
3108
|
openedAccounts: {
|
|
1687
3109
|
account: {
|
|
3110
|
+
owner: PublicKey;
|
|
1688
3111
|
lamports: BN;
|
|
1689
|
-
|
|
3112
|
+
address: number[] | null;
|
|
1690
3113
|
data: {
|
|
1691
3114
|
data: string;
|
|
1692
|
-
dataHash: BN;
|
|
1693
3115
|
discriminator: BN;
|
|
3116
|
+
dataHash: BN;
|
|
1694
3117
|
} | null;
|
|
1695
|
-
address: number[] | null;
|
|
1696
|
-
hash: BN;
|
|
1697
|
-
owner: PublicKey;
|
|
1698
3118
|
leafIndex: number;
|
|
1699
3119
|
seq: BN | null;
|
|
3120
|
+
tree: PublicKey;
|
|
3121
|
+
hash: BN;
|
|
1700
3122
|
slotCreated: BN;
|
|
1701
3123
|
};
|
|
1702
3124
|
optionalTokenData: {
|
|
@@ -1710,18 +3132,18 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1710
3132
|
}, {
|
|
1711
3133
|
closedAccounts: Struct<{
|
|
1712
3134
|
account: {
|
|
3135
|
+
owner: PublicKey;
|
|
1713
3136
|
lamports: BN;
|
|
1714
|
-
|
|
3137
|
+
address: number[] | null;
|
|
1715
3138
|
data: {
|
|
1716
3139
|
data: string;
|
|
1717
|
-
dataHash: BN;
|
|
1718
3140
|
discriminator: BN;
|
|
3141
|
+
dataHash: BN;
|
|
1719
3142
|
} | null;
|
|
1720
|
-
address: number[] | null;
|
|
1721
|
-
hash: BN;
|
|
1722
|
-
owner: PublicKey;
|
|
1723
3143
|
leafIndex: number;
|
|
1724
3144
|
seq: BN | null;
|
|
3145
|
+
tree: PublicKey;
|
|
3146
|
+
hash: BN;
|
|
1725
3147
|
slotCreated: BN;
|
|
1726
3148
|
};
|
|
1727
3149
|
optionalTokenData: {
|
|
@@ -1733,18 +3155,18 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1733
3155
|
} | null;
|
|
1734
3156
|
}[], Struct<{
|
|
1735
3157
|
account: {
|
|
3158
|
+
owner: PublicKey;
|
|
1736
3159
|
lamports: BN;
|
|
1737
|
-
|
|
3160
|
+
address: number[] | null;
|
|
1738
3161
|
data: {
|
|
1739
3162
|
data: string;
|
|
1740
|
-
dataHash: BN;
|
|
1741
3163
|
discriminator: BN;
|
|
3164
|
+
dataHash: BN;
|
|
1742
3165
|
} | null;
|
|
1743
|
-
address: number[] | null;
|
|
1744
|
-
hash: BN;
|
|
1745
|
-
owner: PublicKey;
|
|
1746
3166
|
leafIndex: number;
|
|
1747
3167
|
seq: BN | null;
|
|
3168
|
+
tree: PublicKey;
|
|
3169
|
+
hash: BN;
|
|
1748
3170
|
slotCreated: BN;
|
|
1749
3171
|
};
|
|
1750
3172
|
optionalTokenData: {
|
|
@@ -1756,26 +3178,26 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1756
3178
|
} | null;
|
|
1757
3179
|
}, {
|
|
1758
3180
|
account: Struct<{
|
|
3181
|
+
owner: PublicKey;
|
|
1759
3182
|
lamports: BN;
|
|
1760
|
-
|
|
3183
|
+
address: number[] | null;
|
|
1761
3184
|
data: {
|
|
1762
3185
|
data: string;
|
|
1763
|
-
dataHash: BN;
|
|
1764
3186
|
discriminator: BN;
|
|
3187
|
+
dataHash: BN;
|
|
1765
3188
|
} | null;
|
|
1766
|
-
address: number[] | null;
|
|
1767
|
-
hash: BN;
|
|
1768
|
-
owner: PublicKey;
|
|
1769
3189
|
leafIndex: number;
|
|
1770
3190
|
seq: BN | null;
|
|
3191
|
+
tree: PublicKey;
|
|
3192
|
+
hash: BN;
|
|
1771
3193
|
slotCreated: BN;
|
|
1772
3194
|
}, {
|
|
1773
3195
|
address: Struct<number[] | null, null>;
|
|
1774
3196
|
hash: Struct<BN, null>;
|
|
1775
3197
|
data: Struct<{
|
|
1776
3198
|
data: string;
|
|
1777
|
-
dataHash: BN;
|
|
1778
3199
|
discriminator: BN;
|
|
3200
|
+
dataHash: BN;
|
|
1779
3201
|
} | null, {
|
|
1780
3202
|
data: Struct<string, null>;
|
|
1781
3203
|
dataHash: Struct<BN, null>;
|
|
@@ -1804,18 +3226,18 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1804
3226
|
}>>;
|
|
1805
3227
|
openedAccounts: Struct<{
|
|
1806
3228
|
account: {
|
|
3229
|
+
owner: PublicKey;
|
|
1807
3230
|
lamports: BN;
|
|
1808
|
-
|
|
3231
|
+
address: number[] | null;
|
|
1809
3232
|
data: {
|
|
1810
3233
|
data: string;
|
|
1811
|
-
dataHash: BN;
|
|
1812
3234
|
discriminator: BN;
|
|
3235
|
+
dataHash: BN;
|
|
1813
3236
|
} | null;
|
|
1814
|
-
address: number[] | null;
|
|
1815
|
-
hash: BN;
|
|
1816
|
-
owner: PublicKey;
|
|
1817
3237
|
leafIndex: number;
|
|
1818
3238
|
seq: BN | null;
|
|
3239
|
+
tree: PublicKey;
|
|
3240
|
+
hash: BN;
|
|
1819
3241
|
slotCreated: BN;
|
|
1820
3242
|
};
|
|
1821
3243
|
optionalTokenData: {
|
|
@@ -1827,18 +3249,18 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1827
3249
|
} | null;
|
|
1828
3250
|
}[], Struct<{
|
|
1829
3251
|
account: {
|
|
3252
|
+
owner: PublicKey;
|
|
1830
3253
|
lamports: BN;
|
|
1831
|
-
|
|
3254
|
+
address: number[] | null;
|
|
1832
3255
|
data: {
|
|
1833
3256
|
data: string;
|
|
1834
|
-
dataHash: BN;
|
|
1835
3257
|
discriminator: BN;
|
|
3258
|
+
dataHash: BN;
|
|
1836
3259
|
} | null;
|
|
1837
|
-
address: number[] | null;
|
|
1838
|
-
hash: BN;
|
|
1839
|
-
owner: PublicKey;
|
|
1840
3260
|
leafIndex: number;
|
|
1841
3261
|
seq: BN | null;
|
|
3262
|
+
tree: PublicKey;
|
|
3263
|
+
hash: BN;
|
|
1842
3264
|
slotCreated: BN;
|
|
1843
3265
|
};
|
|
1844
3266
|
optionalTokenData: {
|
|
@@ -1850,26 +3272,521 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1850
3272
|
} | null;
|
|
1851
3273
|
}, {
|
|
1852
3274
|
account: Struct<{
|
|
3275
|
+
owner: PublicKey;
|
|
1853
3276
|
lamports: BN;
|
|
1854
|
-
|
|
3277
|
+
address: number[] | null;
|
|
1855
3278
|
data: {
|
|
1856
3279
|
data: string;
|
|
1857
|
-
dataHash: BN;
|
|
1858
3280
|
discriminator: BN;
|
|
3281
|
+
dataHash: BN;
|
|
1859
3282
|
} | null;
|
|
3283
|
+
leafIndex: number;
|
|
3284
|
+
seq: BN | null;
|
|
3285
|
+
tree: PublicKey;
|
|
3286
|
+
hash: BN;
|
|
3287
|
+
slotCreated: BN;
|
|
3288
|
+
}, {
|
|
3289
|
+
address: Struct<number[] | null, null>;
|
|
3290
|
+
hash: Struct<BN, null>;
|
|
3291
|
+
data: Struct<{
|
|
3292
|
+
data: string;
|
|
3293
|
+
discriminator: BN;
|
|
3294
|
+
dataHash: BN;
|
|
3295
|
+
} | null, {
|
|
3296
|
+
data: Struct<string, null>;
|
|
3297
|
+
dataHash: Struct<BN, null>;
|
|
3298
|
+
discriminator: Struct<BN, null>;
|
|
3299
|
+
}>;
|
|
3300
|
+
lamports: Struct<BN, null>;
|
|
3301
|
+
owner: Struct<PublicKey, null>;
|
|
3302
|
+
leafIndex: Struct<number, null>;
|
|
3303
|
+
tree: Struct<PublicKey, null>;
|
|
3304
|
+
seq: Struct<BN | null, null>;
|
|
3305
|
+
slotCreated: Struct<BN, null>;
|
|
3306
|
+
}>;
|
|
3307
|
+
optionalTokenData: Struct<{
|
|
3308
|
+
owner: PublicKey;
|
|
3309
|
+
mint: PublicKey;
|
|
3310
|
+
amount: BN;
|
|
3311
|
+
delegate: PublicKey | null;
|
|
3312
|
+
state: string;
|
|
3313
|
+
} | null, {
|
|
3314
|
+
mint: Struct<PublicKey, null>;
|
|
3315
|
+
owner: Struct<PublicKey, null>;
|
|
3316
|
+
amount: Struct<BN, null>;
|
|
3317
|
+
delegate: Struct<PublicKey | null, null>;
|
|
3318
|
+
state: Struct<string, null>;
|
|
3319
|
+
}>;
|
|
3320
|
+
}>>;
|
|
3321
|
+
}>;
|
|
3322
|
+
transaction: Struct<any, null>;
|
|
3323
|
+
}>;
|
|
3324
|
+
/**
|
|
3325
|
+
* @internal
|
|
3326
|
+
*/
|
|
3327
|
+
declare const CompressedTransactionResultV2: Struct<{
|
|
3328
|
+
compressionInfo: {
|
|
3329
|
+
closedAccounts: {
|
|
3330
|
+
account: {
|
|
3331
|
+
account: {
|
|
3332
|
+
owner: PublicKey;
|
|
3333
|
+
lamports: BN;
|
|
3334
|
+
address: number[] | null;
|
|
3335
|
+
data: {
|
|
3336
|
+
data: string;
|
|
3337
|
+
discriminator: BN;
|
|
3338
|
+
dataHash: BN;
|
|
3339
|
+
} | null;
|
|
3340
|
+
merkleContext: {
|
|
3341
|
+
cpiContext: PublicKey | null;
|
|
3342
|
+
tree: PublicKey;
|
|
3343
|
+
queue: PublicKey;
|
|
3344
|
+
treeType: number;
|
|
3345
|
+
nextTreeContext?: {
|
|
3346
|
+
cpiContext: PublicKey | null;
|
|
3347
|
+
tree: PublicKey;
|
|
3348
|
+
queue: PublicKey;
|
|
3349
|
+
treeType: number;
|
|
3350
|
+
} | null | undefined;
|
|
3351
|
+
};
|
|
3352
|
+
leafIndex: number;
|
|
3353
|
+
proveByIndex: boolean;
|
|
3354
|
+
seq: BN | null;
|
|
3355
|
+
hash: BN;
|
|
3356
|
+
slotCreated: BN;
|
|
3357
|
+
};
|
|
3358
|
+
txHash: BN;
|
|
3359
|
+
nullifier: BN;
|
|
3360
|
+
};
|
|
3361
|
+
optionalTokenData: {
|
|
3362
|
+
owner: PublicKey;
|
|
3363
|
+
mint: PublicKey;
|
|
3364
|
+
amount: BN;
|
|
3365
|
+
delegate: PublicKey | null;
|
|
3366
|
+
state: string;
|
|
3367
|
+
} | null;
|
|
3368
|
+
}[];
|
|
3369
|
+
openedAccounts: {
|
|
3370
|
+
account: {
|
|
3371
|
+
owner: PublicKey;
|
|
3372
|
+
lamports: BN;
|
|
3373
|
+
address: number[] | null;
|
|
3374
|
+
data: {
|
|
3375
|
+
data: string;
|
|
3376
|
+
discriminator: BN;
|
|
3377
|
+
dataHash: BN;
|
|
3378
|
+
} | null;
|
|
3379
|
+
merkleContext: {
|
|
3380
|
+
cpiContext: PublicKey | null;
|
|
3381
|
+
tree: PublicKey;
|
|
3382
|
+
queue: PublicKey;
|
|
3383
|
+
treeType: number;
|
|
3384
|
+
nextTreeContext?: {
|
|
3385
|
+
cpiContext: PublicKey | null;
|
|
3386
|
+
tree: PublicKey;
|
|
3387
|
+
queue: PublicKey;
|
|
3388
|
+
treeType: number;
|
|
3389
|
+
} | null | undefined;
|
|
3390
|
+
};
|
|
3391
|
+
leafIndex: number;
|
|
3392
|
+
proveByIndex: boolean;
|
|
3393
|
+
seq: BN | null;
|
|
3394
|
+
hash: BN;
|
|
3395
|
+
slotCreated: BN;
|
|
3396
|
+
};
|
|
3397
|
+
optionalTokenData: {
|
|
3398
|
+
owner: PublicKey;
|
|
3399
|
+
mint: PublicKey;
|
|
3400
|
+
amount: BN;
|
|
3401
|
+
delegate: PublicKey | null;
|
|
3402
|
+
state: string;
|
|
3403
|
+
} | null;
|
|
3404
|
+
}[];
|
|
3405
|
+
};
|
|
3406
|
+
transaction?: any;
|
|
3407
|
+
}, {
|
|
3408
|
+
compressionInfo: Struct<{
|
|
3409
|
+
closedAccounts: {
|
|
3410
|
+
account: {
|
|
3411
|
+
account: {
|
|
3412
|
+
owner: PublicKey;
|
|
3413
|
+
lamports: BN;
|
|
3414
|
+
address: number[] | null;
|
|
3415
|
+
data: {
|
|
3416
|
+
data: string;
|
|
3417
|
+
discriminator: BN;
|
|
3418
|
+
dataHash: BN;
|
|
3419
|
+
} | null;
|
|
3420
|
+
merkleContext: {
|
|
3421
|
+
cpiContext: PublicKey | null;
|
|
3422
|
+
tree: PublicKey;
|
|
3423
|
+
queue: PublicKey;
|
|
3424
|
+
treeType: number;
|
|
3425
|
+
nextTreeContext?: {
|
|
3426
|
+
cpiContext: PublicKey | null;
|
|
3427
|
+
tree: PublicKey;
|
|
3428
|
+
queue: PublicKey;
|
|
3429
|
+
treeType: number;
|
|
3430
|
+
} | null | undefined;
|
|
3431
|
+
};
|
|
3432
|
+
leafIndex: number;
|
|
3433
|
+
proveByIndex: boolean;
|
|
3434
|
+
seq: BN | null;
|
|
3435
|
+
hash: BN;
|
|
3436
|
+
slotCreated: BN;
|
|
3437
|
+
};
|
|
3438
|
+
txHash: BN;
|
|
3439
|
+
nullifier: BN;
|
|
3440
|
+
};
|
|
3441
|
+
optionalTokenData: {
|
|
3442
|
+
owner: PublicKey;
|
|
3443
|
+
mint: PublicKey;
|
|
3444
|
+
amount: BN;
|
|
3445
|
+
delegate: PublicKey | null;
|
|
3446
|
+
state: string;
|
|
3447
|
+
} | null;
|
|
3448
|
+
}[];
|
|
3449
|
+
openedAccounts: {
|
|
3450
|
+
account: {
|
|
3451
|
+
owner: PublicKey;
|
|
3452
|
+
lamports: BN;
|
|
3453
|
+
address: number[] | null;
|
|
3454
|
+
data: {
|
|
3455
|
+
data: string;
|
|
3456
|
+
discriminator: BN;
|
|
3457
|
+
dataHash: BN;
|
|
3458
|
+
} | null;
|
|
3459
|
+
merkleContext: {
|
|
3460
|
+
cpiContext: PublicKey | null;
|
|
3461
|
+
tree: PublicKey;
|
|
3462
|
+
queue: PublicKey;
|
|
3463
|
+
treeType: number;
|
|
3464
|
+
nextTreeContext?: {
|
|
3465
|
+
cpiContext: PublicKey | null;
|
|
3466
|
+
tree: PublicKey;
|
|
3467
|
+
queue: PublicKey;
|
|
3468
|
+
treeType: number;
|
|
3469
|
+
} | null | undefined;
|
|
3470
|
+
};
|
|
3471
|
+
leafIndex: number;
|
|
3472
|
+
proveByIndex: boolean;
|
|
3473
|
+
seq: BN | null;
|
|
3474
|
+
hash: BN;
|
|
3475
|
+
slotCreated: BN;
|
|
3476
|
+
};
|
|
3477
|
+
optionalTokenData: {
|
|
3478
|
+
owner: PublicKey;
|
|
3479
|
+
mint: PublicKey;
|
|
3480
|
+
amount: BN;
|
|
3481
|
+
delegate: PublicKey | null;
|
|
3482
|
+
state: string;
|
|
3483
|
+
} | null;
|
|
3484
|
+
}[];
|
|
3485
|
+
}, {
|
|
3486
|
+
closedAccounts: Struct<{
|
|
3487
|
+
account: {
|
|
3488
|
+
account: {
|
|
3489
|
+
owner: PublicKey;
|
|
3490
|
+
lamports: BN;
|
|
3491
|
+
address: number[] | null;
|
|
3492
|
+
data: {
|
|
3493
|
+
data: string;
|
|
3494
|
+
discriminator: BN;
|
|
3495
|
+
dataHash: BN;
|
|
3496
|
+
} | null;
|
|
3497
|
+
merkleContext: {
|
|
3498
|
+
cpiContext: PublicKey | null;
|
|
3499
|
+
tree: PublicKey;
|
|
3500
|
+
queue: PublicKey;
|
|
3501
|
+
treeType: number;
|
|
3502
|
+
nextTreeContext?: {
|
|
3503
|
+
cpiContext: PublicKey | null;
|
|
3504
|
+
tree: PublicKey;
|
|
3505
|
+
queue: PublicKey;
|
|
3506
|
+
treeType: number;
|
|
3507
|
+
} | null | undefined;
|
|
3508
|
+
};
|
|
3509
|
+
leafIndex: number;
|
|
3510
|
+
proveByIndex: boolean;
|
|
3511
|
+
seq: BN | null;
|
|
3512
|
+
hash: BN;
|
|
3513
|
+
slotCreated: BN;
|
|
3514
|
+
};
|
|
3515
|
+
txHash: BN;
|
|
3516
|
+
nullifier: BN;
|
|
3517
|
+
};
|
|
3518
|
+
optionalTokenData: {
|
|
3519
|
+
owner: PublicKey;
|
|
3520
|
+
mint: PublicKey;
|
|
3521
|
+
amount: BN;
|
|
3522
|
+
delegate: PublicKey | null;
|
|
3523
|
+
state: string;
|
|
3524
|
+
} | null;
|
|
3525
|
+
}[], Struct<{
|
|
3526
|
+
account: {
|
|
3527
|
+
account: {
|
|
3528
|
+
owner: PublicKey;
|
|
3529
|
+
lamports: BN;
|
|
3530
|
+
address: number[] | null;
|
|
3531
|
+
data: {
|
|
3532
|
+
data: string;
|
|
3533
|
+
discriminator: BN;
|
|
3534
|
+
dataHash: BN;
|
|
3535
|
+
} | null;
|
|
3536
|
+
merkleContext: {
|
|
3537
|
+
cpiContext: PublicKey | null;
|
|
3538
|
+
tree: PublicKey;
|
|
3539
|
+
queue: PublicKey;
|
|
3540
|
+
treeType: number;
|
|
3541
|
+
nextTreeContext?: {
|
|
3542
|
+
cpiContext: PublicKey | null;
|
|
3543
|
+
tree: PublicKey;
|
|
3544
|
+
queue: PublicKey;
|
|
3545
|
+
treeType: number;
|
|
3546
|
+
} | null | undefined;
|
|
3547
|
+
};
|
|
3548
|
+
leafIndex: number;
|
|
3549
|
+
proveByIndex: boolean;
|
|
3550
|
+
seq: BN | null;
|
|
3551
|
+
hash: BN;
|
|
3552
|
+
slotCreated: BN;
|
|
3553
|
+
};
|
|
3554
|
+
txHash: BN;
|
|
3555
|
+
nullifier: BN;
|
|
3556
|
+
};
|
|
3557
|
+
optionalTokenData: {
|
|
3558
|
+
owner: PublicKey;
|
|
3559
|
+
mint: PublicKey;
|
|
3560
|
+
amount: BN;
|
|
3561
|
+
delegate: PublicKey | null;
|
|
3562
|
+
state: string;
|
|
3563
|
+
} | null;
|
|
3564
|
+
}, {
|
|
3565
|
+
account: Struct<{
|
|
3566
|
+
account: {
|
|
3567
|
+
owner: PublicKey;
|
|
3568
|
+
lamports: BN;
|
|
3569
|
+
address: number[] | null;
|
|
3570
|
+
data: {
|
|
3571
|
+
data: string;
|
|
3572
|
+
discriminator: BN;
|
|
3573
|
+
dataHash: BN;
|
|
3574
|
+
} | null;
|
|
3575
|
+
merkleContext: {
|
|
3576
|
+
cpiContext: PublicKey | null;
|
|
3577
|
+
tree: PublicKey;
|
|
3578
|
+
queue: PublicKey;
|
|
3579
|
+
treeType: number;
|
|
3580
|
+
nextTreeContext?: {
|
|
3581
|
+
cpiContext: PublicKey | null;
|
|
3582
|
+
tree: PublicKey;
|
|
3583
|
+
queue: PublicKey;
|
|
3584
|
+
treeType: number;
|
|
3585
|
+
} | null | undefined;
|
|
3586
|
+
};
|
|
3587
|
+
leafIndex: number;
|
|
3588
|
+
proveByIndex: boolean;
|
|
3589
|
+
seq: BN | null;
|
|
3590
|
+
hash: BN;
|
|
3591
|
+
slotCreated: BN;
|
|
3592
|
+
};
|
|
3593
|
+
txHash: BN;
|
|
3594
|
+
nullifier: BN;
|
|
3595
|
+
}, {
|
|
3596
|
+
account: Struct<{
|
|
3597
|
+
owner: PublicKey;
|
|
3598
|
+
lamports: BN;
|
|
3599
|
+
address: number[] | null;
|
|
3600
|
+
data: {
|
|
3601
|
+
data: string;
|
|
3602
|
+
discriminator: BN;
|
|
3603
|
+
dataHash: BN;
|
|
3604
|
+
} | null;
|
|
3605
|
+
merkleContext: {
|
|
3606
|
+
cpiContext: PublicKey | null;
|
|
3607
|
+
tree: PublicKey;
|
|
3608
|
+
queue: PublicKey;
|
|
3609
|
+
treeType: number;
|
|
3610
|
+
nextTreeContext?: {
|
|
3611
|
+
cpiContext: PublicKey | null;
|
|
3612
|
+
tree: PublicKey;
|
|
3613
|
+
queue: PublicKey;
|
|
3614
|
+
treeType: number;
|
|
3615
|
+
} | null | undefined;
|
|
3616
|
+
};
|
|
3617
|
+
leafIndex: number;
|
|
3618
|
+
proveByIndex: boolean;
|
|
3619
|
+
seq: BN | null;
|
|
3620
|
+
hash: BN;
|
|
3621
|
+
slotCreated: BN;
|
|
3622
|
+
}, {
|
|
3623
|
+
address: Struct<number[] | null, null>;
|
|
3624
|
+
hash: Struct<BN, null>;
|
|
3625
|
+
data: Struct<{
|
|
3626
|
+
data: string;
|
|
3627
|
+
discriminator: BN;
|
|
3628
|
+
dataHash: BN;
|
|
3629
|
+
} | null, {
|
|
3630
|
+
data: Struct<string, null>;
|
|
3631
|
+
dataHash: Struct<BN, null>;
|
|
3632
|
+
discriminator: Struct<BN, null>;
|
|
3633
|
+
}>;
|
|
3634
|
+
lamports: Struct<BN, null>;
|
|
3635
|
+
owner: Struct<PublicKey, null>;
|
|
3636
|
+
leafIndex: Struct<number, null>;
|
|
3637
|
+
seq: Struct<BN | null, null>;
|
|
3638
|
+
slotCreated: Struct<BN, null>;
|
|
3639
|
+
merkleContext: Struct<{
|
|
3640
|
+
cpiContext: PublicKey | null;
|
|
3641
|
+
tree: PublicKey;
|
|
3642
|
+
queue: PublicKey;
|
|
3643
|
+
treeType: number;
|
|
3644
|
+
nextTreeContext?: {
|
|
3645
|
+
cpiContext: PublicKey | null;
|
|
3646
|
+
tree: PublicKey;
|
|
3647
|
+
queue: PublicKey;
|
|
3648
|
+
treeType: number;
|
|
3649
|
+
} | null | undefined;
|
|
3650
|
+
}, {
|
|
3651
|
+
treeType: Struct<number, null>;
|
|
3652
|
+
tree: Struct<PublicKey, null>;
|
|
3653
|
+
queue: Struct<PublicKey, null>;
|
|
3654
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
3655
|
+
nextTreeContext: Struct<{
|
|
3656
|
+
cpiContext: PublicKey | null;
|
|
3657
|
+
tree: PublicKey;
|
|
3658
|
+
queue: PublicKey;
|
|
3659
|
+
treeType: number;
|
|
3660
|
+
} | null | undefined, {
|
|
3661
|
+
treeType: Struct<number, null>;
|
|
3662
|
+
tree: Struct<PublicKey, null>;
|
|
3663
|
+
queue: Struct<PublicKey, null>;
|
|
3664
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
3665
|
+
}>;
|
|
3666
|
+
}>;
|
|
3667
|
+
proveByIndex: Struct<boolean, null>;
|
|
3668
|
+
}>;
|
|
3669
|
+
txHash: Struct<BN, null>;
|
|
3670
|
+
nullifier: Struct<BN, null>;
|
|
3671
|
+
}>;
|
|
3672
|
+
optionalTokenData: Struct<{
|
|
3673
|
+
owner: PublicKey;
|
|
3674
|
+
mint: PublicKey;
|
|
3675
|
+
amount: BN;
|
|
3676
|
+
delegate: PublicKey | null;
|
|
3677
|
+
state: string;
|
|
3678
|
+
} | null, {
|
|
3679
|
+
mint: Struct<PublicKey, null>;
|
|
3680
|
+
owner: Struct<PublicKey, null>;
|
|
3681
|
+
amount: Struct<BN, null>;
|
|
3682
|
+
delegate: Struct<PublicKey | null, null>;
|
|
3683
|
+
state: Struct<string, null>;
|
|
3684
|
+
}>;
|
|
3685
|
+
}>>;
|
|
3686
|
+
openedAccounts: Struct<{
|
|
3687
|
+
account: {
|
|
3688
|
+
owner: PublicKey;
|
|
3689
|
+
lamports: BN;
|
|
3690
|
+
address: number[] | null;
|
|
3691
|
+
data: {
|
|
3692
|
+
data: string;
|
|
3693
|
+
discriminator: BN;
|
|
3694
|
+
dataHash: BN;
|
|
3695
|
+
} | null;
|
|
3696
|
+
merkleContext: {
|
|
3697
|
+
cpiContext: PublicKey | null;
|
|
3698
|
+
tree: PublicKey;
|
|
3699
|
+
queue: PublicKey;
|
|
3700
|
+
treeType: number;
|
|
3701
|
+
nextTreeContext?: {
|
|
3702
|
+
cpiContext: PublicKey | null;
|
|
3703
|
+
tree: PublicKey;
|
|
3704
|
+
queue: PublicKey;
|
|
3705
|
+
treeType: number;
|
|
3706
|
+
} | null | undefined;
|
|
3707
|
+
};
|
|
3708
|
+
leafIndex: number;
|
|
3709
|
+
proveByIndex: boolean;
|
|
3710
|
+
seq: BN | null;
|
|
3711
|
+
hash: BN;
|
|
3712
|
+
slotCreated: BN;
|
|
3713
|
+
};
|
|
3714
|
+
optionalTokenData: {
|
|
3715
|
+
owner: PublicKey;
|
|
3716
|
+
mint: PublicKey;
|
|
3717
|
+
amount: BN;
|
|
3718
|
+
delegate: PublicKey | null;
|
|
3719
|
+
state: string;
|
|
3720
|
+
} | null;
|
|
3721
|
+
}[], Struct<{
|
|
3722
|
+
account: {
|
|
3723
|
+
owner: PublicKey;
|
|
3724
|
+
lamports: BN;
|
|
1860
3725
|
address: number[] | null;
|
|
3726
|
+
data: {
|
|
3727
|
+
data: string;
|
|
3728
|
+
discriminator: BN;
|
|
3729
|
+
dataHash: BN;
|
|
3730
|
+
} | null;
|
|
3731
|
+
merkleContext: {
|
|
3732
|
+
cpiContext: PublicKey | null;
|
|
3733
|
+
tree: PublicKey;
|
|
3734
|
+
queue: PublicKey;
|
|
3735
|
+
treeType: number;
|
|
3736
|
+
nextTreeContext?: {
|
|
3737
|
+
cpiContext: PublicKey | null;
|
|
3738
|
+
tree: PublicKey;
|
|
3739
|
+
queue: PublicKey;
|
|
3740
|
+
treeType: number;
|
|
3741
|
+
} | null | undefined;
|
|
3742
|
+
};
|
|
3743
|
+
leafIndex: number;
|
|
3744
|
+
proveByIndex: boolean;
|
|
3745
|
+
seq: BN | null;
|
|
1861
3746
|
hash: BN;
|
|
3747
|
+
slotCreated: BN;
|
|
3748
|
+
};
|
|
3749
|
+
optionalTokenData: {
|
|
3750
|
+
owner: PublicKey;
|
|
3751
|
+
mint: PublicKey;
|
|
3752
|
+
amount: BN;
|
|
3753
|
+
delegate: PublicKey | null;
|
|
3754
|
+
state: string;
|
|
3755
|
+
} | null;
|
|
3756
|
+
}, {
|
|
3757
|
+
account: Struct<{
|
|
1862
3758
|
owner: PublicKey;
|
|
3759
|
+
lamports: BN;
|
|
3760
|
+
address: number[] | null;
|
|
3761
|
+
data: {
|
|
3762
|
+
data: string;
|
|
3763
|
+
discriminator: BN;
|
|
3764
|
+
dataHash: BN;
|
|
3765
|
+
} | null;
|
|
3766
|
+
merkleContext: {
|
|
3767
|
+
cpiContext: PublicKey | null;
|
|
3768
|
+
tree: PublicKey;
|
|
3769
|
+
queue: PublicKey;
|
|
3770
|
+
treeType: number;
|
|
3771
|
+
nextTreeContext?: {
|
|
3772
|
+
cpiContext: PublicKey | null;
|
|
3773
|
+
tree: PublicKey;
|
|
3774
|
+
queue: PublicKey;
|
|
3775
|
+
treeType: number;
|
|
3776
|
+
} | null | undefined;
|
|
3777
|
+
};
|
|
1863
3778
|
leafIndex: number;
|
|
3779
|
+
proveByIndex: boolean;
|
|
1864
3780
|
seq: BN | null;
|
|
3781
|
+
hash: BN;
|
|
1865
3782
|
slotCreated: BN;
|
|
1866
3783
|
}, {
|
|
1867
3784
|
address: Struct<number[] | null, null>;
|
|
1868
3785
|
hash: Struct<BN, null>;
|
|
1869
3786
|
data: Struct<{
|
|
1870
3787
|
data: string;
|
|
1871
|
-
dataHash: BN;
|
|
1872
3788
|
discriminator: BN;
|
|
3789
|
+
dataHash: BN;
|
|
1873
3790
|
} | null, {
|
|
1874
3791
|
data: Struct<string, null>;
|
|
1875
3792
|
dataHash: Struct<BN, null>;
|
|
@@ -1878,9 +3795,37 @@ declare const CompressedTransactionResult: Struct<{
|
|
|
1878
3795
|
lamports: Struct<BN, null>;
|
|
1879
3796
|
owner: Struct<PublicKey, null>;
|
|
1880
3797
|
leafIndex: Struct<number, null>;
|
|
1881
|
-
tree: Struct<PublicKey, null>;
|
|
1882
3798
|
seq: Struct<BN | null, null>;
|
|
1883
3799
|
slotCreated: Struct<BN, null>;
|
|
3800
|
+
merkleContext: Struct<{
|
|
3801
|
+
cpiContext: PublicKey | null;
|
|
3802
|
+
tree: PublicKey;
|
|
3803
|
+
queue: PublicKey;
|
|
3804
|
+
treeType: number;
|
|
3805
|
+
nextTreeContext?: {
|
|
3806
|
+
cpiContext: PublicKey | null;
|
|
3807
|
+
tree: PublicKey;
|
|
3808
|
+
queue: PublicKey;
|
|
3809
|
+
treeType: number;
|
|
3810
|
+
} | null | undefined;
|
|
3811
|
+
}, {
|
|
3812
|
+
treeType: Struct<number, null>;
|
|
3813
|
+
tree: Struct<PublicKey, null>;
|
|
3814
|
+
queue: Struct<PublicKey, null>;
|
|
3815
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
3816
|
+
nextTreeContext: Struct<{
|
|
3817
|
+
cpiContext: PublicKey | null;
|
|
3818
|
+
tree: PublicKey;
|
|
3819
|
+
queue: PublicKey;
|
|
3820
|
+
treeType: number;
|
|
3821
|
+
} | null | undefined, {
|
|
3822
|
+
treeType: Struct<number, null>;
|
|
3823
|
+
tree: Struct<PublicKey, null>;
|
|
3824
|
+
queue: Struct<PublicKey, null>;
|
|
3825
|
+
cpiContext: Struct<PublicKey | null, null>;
|
|
3826
|
+
}>;
|
|
3827
|
+
}>;
|
|
3828
|
+
proveByIndex: Struct<boolean, null>;
|
|
1884
3829
|
}>;
|
|
1885
3830
|
optionalTokenData: Struct<{
|
|
1886
3831
|
owner: PublicKey;
|
|
@@ -1945,15 +3890,6 @@ type RpcResultError = {
|
|
|
1945
3890
|
type RpcResult<T> = RpcResultSuccess<T> | RpcResultError;
|
|
1946
3891
|
|
|
1947
3892
|
interface TestRpcConfig {
|
|
1948
|
-
/**
|
|
1949
|
-
* Address of the state tree to index. Default: public default test state
|
|
1950
|
-
* tree.
|
|
1951
|
-
*/
|
|
1952
|
-
merkleTreeAddress?: PublicKey;
|
|
1953
|
-
/**
|
|
1954
|
-
* Nullifier queue associated with merkleTreeAddress
|
|
1955
|
-
*/
|
|
1956
|
-
nullifierQueueAddress?: PublicKey;
|
|
1957
3893
|
/**
|
|
1958
3894
|
* Depth of state tree. Defaults to the public default test state tree depth
|
|
1959
3895
|
*/
|
|
@@ -1962,15 +3898,6 @@ interface TestRpcConfig {
|
|
|
1962
3898
|
* Log proof generation time
|
|
1963
3899
|
*/
|
|
1964
3900
|
log?: boolean;
|
|
1965
|
-
/**
|
|
1966
|
-
* Address of the address tree to index. Default: public default test
|
|
1967
|
-
* address tree.
|
|
1968
|
-
*/
|
|
1969
|
-
addressTreeAddress?: PublicKey;
|
|
1970
|
-
/**
|
|
1971
|
-
* Address queue associated with addressTreeAddress
|
|
1972
|
-
*/
|
|
1973
|
-
addressQueueAddress?: PublicKey;
|
|
1974
3901
|
}
|
|
1975
3902
|
type ClientSubscriptionId = number;
|
|
1976
3903
|
interface LightWasm {
|
|
@@ -1996,13 +3923,13 @@ interface LightWasm {
|
|
|
1996
3923
|
*/
|
|
1997
3924
|
declare function getTestRpc(lightWasm: LightWasm, endpoint?: string, compressionApiEndpoint?: string, proverEndpoint?: string, depth?: number, log?: boolean): Promise<TestRpc>;
|
|
1998
3925
|
/**
|
|
1999
|
-
*
|
|
2000
|
-
*
|
|
3926
|
+
* Mock RPC for unit tests that simulates the ZK Compression RPC interface.
|
|
3927
|
+
* Parses events and builds merkletree on-demand. It does not persist state.
|
|
2001
3928
|
* Constraints:
|
|
2002
|
-
* - Can only index 1 merkletree
|
|
2003
3929
|
* - Can only index up to 1000 transactions
|
|
2004
3930
|
*
|
|
2005
|
-
* For advanced testing use photon:
|
|
3931
|
+
* For advanced testing use `Rpc` class which uses photon:
|
|
3932
|
+
* https://github.com/helius-labs/photon
|
|
2006
3933
|
*/
|
|
2007
3934
|
declare class TestRpc extends Connection implements CompressionApiInterface {
|
|
2008
3935
|
compressionApiEndpoint: string;
|
|
@@ -2010,9 +3937,9 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
|
|
|
2010
3937
|
lightWasm: LightWasm;
|
|
2011
3938
|
depth: number;
|
|
2012
3939
|
log: boolean;
|
|
2013
|
-
allStateTreeInfos:
|
|
3940
|
+
allStateTreeInfos: TreeInfo[] | null;
|
|
2014
3941
|
lastStateTreeFetchTime: number | null;
|
|
2015
|
-
fetchPromise: Promise<
|
|
3942
|
+
fetchPromise: Promise<TreeInfo[]> | null;
|
|
2016
3943
|
CACHE_TTL: number;
|
|
2017
3944
|
/**
|
|
2018
3945
|
* Establish a Compression-compatible JSON RPC mock-connection
|
|
@@ -2027,6 +3954,10 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
|
|
|
2027
3954
|
* @param testRpcConfig Config for the mock rpc
|
|
2028
3955
|
*/
|
|
2029
3956
|
constructor(endpoint: string, hasher: LightWasm, compressionApiEndpoint: string, proverEndpoint: string, connectionConfig?: ConnectionConfig, testRpcConfig?: TestRpcConfig);
|
|
3957
|
+
/**
|
|
3958
|
+
* @deprecated Use {@link getStateTreeInfos} instead
|
|
3959
|
+
*/
|
|
3960
|
+
getCachedActiveStateTreeInfo(): Promise<void>;
|
|
2030
3961
|
/**
|
|
2031
3962
|
* @deprecated Use {@link getStateTreeInfos} instead
|
|
2032
3963
|
*/
|
|
@@ -2034,8 +3965,8 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
|
|
|
2034
3965
|
/**
|
|
2035
3966
|
* Returns local test state trees.
|
|
2036
3967
|
*/
|
|
2037
|
-
getStateTreeInfos(): Promise<
|
|
2038
|
-
doFetch(): Promise<
|
|
3968
|
+
getStateTreeInfos(): Promise<TreeInfo[]>;
|
|
3969
|
+
doFetch(): Promise<TreeInfo[]>;
|
|
2039
3970
|
/**
|
|
2040
3971
|
* Fetch the compressed account for the specified account hash
|
|
2041
3972
|
*/
|
|
@@ -2123,7 +4054,7 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
|
|
|
2123
4054
|
* Fetch a confirmed or finalized transaction from the cluster. Return with
|
|
2124
4055
|
* CompressionInfo
|
|
2125
4056
|
*/
|
|
2126
|
-
getTransactionWithCompressionInfo(_signature: string): Promise<CompressedTransaction
|
|
4057
|
+
getTransactionWithCompressionInfo(_signature: string): Promise<CompressedTransaction>;
|
|
2127
4058
|
/**
|
|
2128
4059
|
* Returns confirmed signatures for transactions involving the specified
|
|
2129
4060
|
* address forward in time from genesis to the most recent confirmed
|
|
@@ -2164,16 +4095,6 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
|
|
|
2164
4095
|
*/
|
|
2165
4096
|
getMultipleNewAddressProofs(addresses: BN254[]): Promise<MerkleContextWithNewAddressProof[]>;
|
|
2166
4097
|
getCompressedMintTokenHolders(_mint: PublicKey, _options?: PaginatedOptions): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
|
|
2167
|
-
/**
|
|
2168
|
-
* Advanced usage of getValidityProof: fetches ZKP directly from a custom
|
|
2169
|
-
* non-rpcprover. Note: This uses the proverEndpoint specified in the
|
|
2170
|
-
* constructor. For normal usage, please use {@link getValidityProof}
|
|
2171
|
-
* instead.
|
|
2172
|
-
*
|
|
2173
|
-
* Note: Use RPC class for forested trees. TestRpc is only for custom
|
|
2174
|
-
* testing purposes.
|
|
2175
|
-
*/
|
|
2176
|
-
getValidityProofDirect(hashes?: BN254[], newAddresses?: BN254[]): Promise<ValidityProofWithContext>;
|
|
2177
4098
|
/**
|
|
2178
4099
|
* @deprecated This method is not available for TestRpc. Please use
|
|
2179
4100
|
* {@link getValidityProof} instead.
|
|
@@ -2402,7 +4323,7 @@ type EventWithParsedTokenTlvData = {
|
|
|
2402
4323
|
* @param compressedAccount - The compressed account
|
|
2403
4324
|
* @returns The parsed token data
|
|
2404
4325
|
*/
|
|
2405
|
-
declare function parseTokenLayoutWithIdl(compressedAccount:
|
|
4326
|
+
declare function parseTokenLayoutWithIdl(compressedAccount: CompressedAccountLegacy, programId?: PublicKey): TokenData | null;
|
|
2406
4327
|
/**
|
|
2407
4328
|
* Retrieves all compressed token accounts for a given mint and owner.
|
|
2408
4329
|
*
|
|
@@ -2478,7 +4399,7 @@ declare function wrapBigNumbersAsStrings(text: string): string;
|
|
|
2478
4399
|
/** @internal */
|
|
2479
4400
|
declare const rpcRequest: (rpcEndpoint: string, method: string, params?: any, convertToCamelCase?: boolean, debug?: boolean) => Promise<any>;
|
|
2480
4401
|
/** @internal */
|
|
2481
|
-
declare const proverRequest: (proverEndpoint: string, method: "inclusion" | "new-address" | "combined", params?: any, log?: boolean,
|
|
4402
|
+
declare const proverRequest: (proverEndpoint: string, method: "inclusion" | "new-address" | "combined", params?: any, log?: boolean, _publicInputHash?: BN | undefined) => Promise<ValidityProof>;
|
|
2482
4403
|
type NonInclusionMerkleProofInputs = {
|
|
2483
4404
|
root: BN;
|
|
2484
4405
|
value: BN;
|
|
@@ -2511,25 +4432,25 @@ type NonInclusionJsonStruct = {
|
|
|
2511
4432
|
declare function convertMerkleProofsWithContextToHex(merkleProofsWithContext: MerkleContextWithMerkleProof[]): HexInputsForProver[];
|
|
2512
4433
|
declare function convertNonInclusionMerkleProofInputsToHex(nonInclusionMerkleProofInputs: MerkleContextWithNewAddressProof[]): NonInclusionJsonStruct[];
|
|
2513
4434
|
declare function getPublicInputHash(accountProofs: MerkleContextWithMerkleProof[], accountHashes: BN254[], newAddressProofs: MerkleContextWithNewAddressProof[], lightWasm: LightWasm): BN;
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
* @param queue - The queue to get the tree for
|
|
2519
|
-
* @returns The tree for the given queue, or undefined if not found
|
|
2520
|
-
*/
|
|
2521
|
-
declare function getTreeForQueue(info: StateTreeInfo[], queue: PublicKey): PublicKey;
|
|
4435
|
+
interface NullifierMetadata {
|
|
4436
|
+
nullifier: BN254;
|
|
4437
|
+
txHash: BN254;
|
|
4438
|
+
}
|
|
2522
4439
|
/**
|
|
2523
4440
|
*
|
|
2524
4441
|
*/
|
|
2525
4442
|
declare class Rpc extends Connection implements CompressionApiInterface {
|
|
2526
4443
|
compressionApiEndpoint: string;
|
|
2527
4444
|
proverEndpoint: string;
|
|
2528
|
-
allStateTreeInfos:
|
|
4445
|
+
allStateTreeInfos: TreeInfo[] | null;
|
|
2529
4446
|
lastStateTreeFetchTime: number | null;
|
|
2530
4447
|
CACHE_TTL: number;
|
|
2531
|
-
fetchPromise: Promise<
|
|
4448
|
+
fetchPromise: Promise<TreeInfo[]> | null;
|
|
2532
4449
|
constructor(endpoint: string, compressionApiEndpoint: string, proverEndpoint: string, config?: ConnectionConfig);
|
|
4450
|
+
/**
|
|
4451
|
+
* @deprecated Use {@link getStateTreeInfos} instead
|
|
4452
|
+
*/
|
|
4453
|
+
getCachedActiveStateTreeInfo(): Promise<void>;
|
|
2533
4454
|
/**
|
|
2534
4455
|
* @deprecated Use {@link getStateTreeInfos} instead
|
|
2535
4456
|
*/
|
|
@@ -2538,11 +4459,11 @@ declare class Rpc extends Connection implements CompressionApiInterface {
|
|
|
2538
4459
|
* Get a list of all state tree infos. If not already cached, fetches from
|
|
2539
4460
|
* the cluster.
|
|
2540
4461
|
*/
|
|
2541
|
-
getStateTreeInfos(): Promise<
|
|
4462
|
+
getStateTreeInfos(): Promise<TreeInfo[]>;
|
|
2542
4463
|
/**
|
|
2543
4464
|
* @internal
|
|
2544
4465
|
*/
|
|
2545
|
-
doFetch(): Promise<
|
|
4466
|
+
doFetch(): Promise<TreeInfo[]>;
|
|
2546
4467
|
/**
|
|
2547
4468
|
* Fetch the compressed account for the specified account address or hash
|
|
2548
4469
|
*/
|
|
@@ -2671,26 +4592,6 @@ declare class Rpc extends Connection implements CompressionApiInterface {
|
|
|
2671
4592
|
* @returns Array of validity proofs for new addresses
|
|
2672
4593
|
*/
|
|
2673
4594
|
getMultipleNewAddressProofs(addresses: BN254[]): Promise<MerkleContextWithNewAddressProof[]>;
|
|
2674
|
-
/**
|
|
2675
|
-
* Advanced usage of getValidityProof: fetches ZKP directly from a custom
|
|
2676
|
-
* non-rpcprover. Note: This uses the proverEndpoint specified in the
|
|
2677
|
-
* constructor. For normal usage, please use {@link getValidityProof}
|
|
2678
|
-
* instead.
|
|
2679
|
-
*
|
|
2680
|
-
* Fetch the latest validity proof for (1) compressed accounts specified by
|
|
2681
|
-
* an array of account hashes. (2) new unique addresses specified by an
|
|
2682
|
-
* array of addresses.
|
|
2683
|
-
*
|
|
2684
|
-
* Validity proofs prove the presence of compressed accounts in state trees
|
|
2685
|
-
* and the non-existence of addresses in address trees, respectively. They
|
|
2686
|
-
* enable verification without recomputing the merkle proof path, thus
|
|
2687
|
-
* lowering verification and data costs.
|
|
2688
|
-
*
|
|
2689
|
-
* @param hashes Array of BN254 hashes.
|
|
2690
|
-
* @param newAddresses Array of BN254 new addresses.
|
|
2691
|
-
* @returns validity proof with context
|
|
2692
|
-
*/
|
|
2693
|
-
getValidityProofDirect(hashes?: BN254[], newAddresses?: BN254[]): Promise<ValidityProofWithContext>;
|
|
2694
4595
|
/**
|
|
2695
4596
|
* @deprecated use {@link getValidityProofV0} instead.
|
|
2696
4597
|
*
|
|
@@ -2755,7 +4656,7 @@ declare class Rpc extends Connection implements CompressionApiInterface {
|
|
|
2755
4656
|
*
|
|
2756
4657
|
* @return Transaction signature
|
|
2757
4658
|
*/
|
|
2758
|
-
declare function compress(rpc: Rpc, payer: Signer, lamports: number | BN, toAddress: PublicKey, outputStateTreeInfo?:
|
|
4659
|
+
declare function compress(rpc: Rpc, payer: Signer, lamports: number | BN, toAddress: PublicKey, outputStateTreeInfo?: TreeInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2759
4660
|
|
|
2760
4661
|
/**
|
|
2761
4662
|
* Create compressed account with address
|
|
@@ -2772,7 +4673,7 @@ declare function compress(rpc: Rpc, payer: Signer, lamports: number | BN, toAddr
|
|
|
2772
4673
|
*
|
|
2773
4674
|
* @return Transaction signature
|
|
2774
4675
|
*/
|
|
2775
|
-
declare function createAccount(rpc: Rpc, payer: Signer, seeds: Uint8Array[], programId: PublicKey, addressTreeInfo?: AddressTreeInfo, outputStateTreeInfo?:
|
|
4676
|
+
declare function createAccount(rpc: Rpc, payer: Signer, seeds: Uint8Array[], programId: PublicKey, addressTreeInfo?: AddressTreeInfo, outputStateTreeInfo?: TreeInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2776
4677
|
/**
|
|
2777
4678
|
* Create compressed account with address and lamports
|
|
2778
4679
|
*
|
|
@@ -2790,7 +4691,7 @@ declare function createAccount(rpc: Rpc, payer: Signer, seeds: Uint8Array[], pro
|
|
|
2790
4691
|
*
|
|
2791
4692
|
* @return Transaction signature
|
|
2792
4693
|
*/
|
|
2793
|
-
declare function createAccountWithLamports(rpc: Rpc, payer: Signer, seeds: Uint8Array[], lamports: number | BN, programId: PublicKey, addressTreeInfo?: AddressTreeInfo, outputStateTreeInfo?:
|
|
4694
|
+
declare function createAccountWithLamports(rpc: Rpc, payer: Signer, seeds: Uint8Array[], lamports: number | BN, programId: PublicKey, addressTreeInfo?: AddressTreeInfo, outputStateTreeInfo?: TreeInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2794
4695
|
|
|
2795
4696
|
/**
|
|
2796
4697
|
* Decompress lamports into a solana account
|
|
@@ -2817,381 +4718,9 @@ declare function decompress(rpc: Rpc, payer: Signer, lamports: number | BN, reci
|
|
|
2817
4718
|
*
|
|
2818
4719
|
* @return Signature of the confirmed transaction
|
|
2819
4720
|
*/
|
|
2820
|
-
declare function transfer(rpc: Rpc, payer: Signer, lamports: number | BN, owner: Signer, toAddress: PublicKey,
|
|
4721
|
+
declare function transfer(rpc: Rpc, payer: Signer, lamports: number | BN, owner: Signer, toAddress: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2821
4722
|
|
|
2822
|
-
|
|
2823
|
-
* @internal Finds the index of a PublicKey in an array, or adds it if not
|
|
2824
|
-
* present
|
|
2825
|
-
* */
|
|
2826
|
-
declare function getIndexOrAdd(accountsArray: PublicKey[], key: PublicKey): number;
|
|
2827
|
-
/**
|
|
2828
|
-
* @internal
|
|
2829
|
-
* Pads output state trees with the 0th state tree of the input state.
|
|
2830
|
-
*
|
|
2831
|
-
* @param outputStateMerkleTrees Optional output state trees
|
|
2832
|
-
* to be inserted into the
|
|
2833
|
-
* output state. Defaults to
|
|
2834
|
-
* the 0th state tree of the
|
|
2835
|
-
* input state. Gets padded to
|
|
2836
|
-
* the length of
|
|
2837
|
-
* outputCompressedAccounts.
|
|
2838
|
-
* @param numberOfOutputCompressedAccounts The number of output
|
|
2839
|
-
* compressed accounts.
|
|
2840
|
-
*
|
|
2841
|
-
* @returns Padded output state trees.
|
|
2842
|
-
*/
|
|
2843
|
-
declare function padOutputStateMerkleTrees(outputStateMerkleTrees: PublicKey, numberOfOutputCompressedAccounts: number): PublicKey[];
|
|
2844
|
-
declare function toAccountMetas(remainingAccounts: PublicKey[]): AccountMeta[];
|
|
2845
|
-
/**
|
|
2846
|
-
* Packs Compressed Accounts.
|
|
2847
|
-
*
|
|
2848
|
-
* Replaces PublicKey with index pointer to remaining accounts.
|
|
2849
|
-
*
|
|
2850
|
-
*
|
|
2851
|
-
* @param inputCompressedAccounts Ix input state to be consumed
|
|
2852
|
-
* @param inputStateRootIndices The recent state root indices of the
|
|
2853
|
-
* input state. The expiry is tied to
|
|
2854
|
-
* the proof.
|
|
2855
|
-
* @param outputCompressedAccounts Ix output state to be created
|
|
2856
|
-
* @param outputStateTreeInfo The output state tree info. Gets
|
|
2857
|
-
* padded to the length of
|
|
2858
|
-
* outputCompressedAccounts.
|
|
2859
|
-
*
|
|
2860
|
-
* @param remainingAccounts Optional existing array of accounts
|
|
2861
|
-
* to append to.
|
|
2862
|
-
**/
|
|
2863
|
-
declare function packCompressedAccounts(inputCompressedAccounts: CompressedAccountWithMerkleContext[], inputStateRootIndices: number[], outputCompressedAccounts: CompressedAccount[], outputStateTreeInfo?: StateTreeInfo, remainingAccounts?: PublicKey[]): {
|
|
2864
|
-
packedInputCompressedAccounts: PackedCompressedAccountWithMerkleContext[];
|
|
2865
|
-
packedOutputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
|
|
2866
|
-
remainingAccounts: PublicKey[];
|
|
2867
|
-
};
|
|
2868
|
-
|
|
2869
|
-
declare const sumUpLamports: (accounts: CompressedAccountWithMerkleContext[]) => BN;
|
|
2870
|
-
/**
|
|
2871
|
-
* Create compressed account system transaction params
|
|
2872
|
-
*/
|
|
2873
|
-
type CreateAccountWithSeedParams = {
|
|
2874
|
-
/**
|
|
2875
|
-
* The payer of the transaction.
|
|
2876
|
-
*/
|
|
2877
|
-
payer: PublicKey;
|
|
2878
|
-
/**
|
|
2879
|
-
* Address params for the new compressed account.
|
|
2880
|
-
*/
|
|
2881
|
-
newAddressParams: NewAddressParams;
|
|
2882
|
-
/**
|
|
2883
|
-
* Address of the new compressed account
|
|
2884
|
-
*/
|
|
2885
|
-
newAddress: number[];
|
|
2886
|
-
/**
|
|
2887
|
-
* Recent validity proof proving that there's no existing compressed account
|
|
2888
|
-
* registered with newAccountAddress
|
|
2889
|
-
*/
|
|
2890
|
-
recentValidityProof: ValidityProof;
|
|
2891
|
-
/**
|
|
2892
|
-
* State tree pubkey. Defaults to a public state tree if unspecified.
|
|
2893
|
-
*/
|
|
2894
|
-
outputStateTreeInfo?: StateTreeInfo;
|
|
2895
|
-
/**
|
|
2896
|
-
* Public key of the program to assign as the owner of the created account.
|
|
2897
|
-
*/
|
|
2898
|
-
programId?: PublicKey;
|
|
2899
|
-
/**
|
|
2900
|
-
* Optional input accounts to transfer lamports from into the new compressed
|
|
2901
|
-
* account.
|
|
2902
|
-
*/
|
|
2903
|
-
inputCompressedAccounts?: CompressedAccountWithMerkleContext[];
|
|
2904
|
-
/**
|
|
2905
|
-
* Optional input state root indices of 'inputCompressedAccounts'. The
|
|
2906
|
-
* expiry is tied to the 'recentValidityProof'.
|
|
2907
|
-
*/
|
|
2908
|
-
inputStateRootIndices?: number[];
|
|
2909
|
-
/**
|
|
2910
|
-
* Optional lamports to transfer into the new compressed account.
|
|
2911
|
-
*/
|
|
2912
|
-
lamports?: number | BN;
|
|
2913
|
-
};
|
|
2914
|
-
/**
|
|
2915
|
-
* Defines the parameters for the transfer method
|
|
2916
|
-
*/
|
|
2917
|
-
type TransferParams = {
|
|
2918
|
-
/**
|
|
2919
|
-
* The payer of the transaction.
|
|
2920
|
-
*/
|
|
2921
|
-
payer: PublicKey;
|
|
2922
|
-
/**
|
|
2923
|
-
* The input state to be consumed.
|
|
2924
|
-
*/
|
|
2925
|
-
inputCompressedAccounts: CompressedAccountWithMerkleContext[];
|
|
2926
|
-
/**
|
|
2927
|
-
* Recipient address.
|
|
2928
|
-
*/
|
|
2929
|
-
toAddress: PublicKey;
|
|
2930
|
-
/**
|
|
2931
|
-
* Amount of lamports to transfer.
|
|
2932
|
-
*/
|
|
2933
|
-
lamports: number | BN;
|
|
2934
|
-
/**
|
|
2935
|
-
* The recent state root indices of the input state. The expiry is tied to
|
|
2936
|
-
* the proof.
|
|
2937
|
-
*
|
|
2938
|
-
* TODO: Add support for passing recent-values after instruction creation.
|
|
2939
|
-
*/
|
|
2940
|
-
recentInputStateRootIndices: number[];
|
|
2941
|
-
/**
|
|
2942
|
-
* The recent validity proof for state inclusion of the input state. It
|
|
2943
|
-
* expires after n slots.
|
|
2944
|
-
*/
|
|
2945
|
-
recentValidityProof: ValidityProof;
|
|
2946
|
-
};
|
|
2947
|
-
/**
|
|
2948
|
-
* Defines the parameters for the transfer method
|
|
2949
|
-
*/
|
|
2950
|
-
type CompressParams = {
|
|
2951
|
-
/**
|
|
2952
|
-
* The payer of the transaction.
|
|
2953
|
-
*/
|
|
2954
|
-
payer: PublicKey;
|
|
2955
|
-
/**
|
|
2956
|
-
* address that the lamports are attached to. also defaults to the recipient owner
|
|
2957
|
-
*/
|
|
2958
|
-
toAddress: PublicKey;
|
|
2959
|
-
/**
|
|
2960
|
-
* amount of lamports to compress.
|
|
2961
|
-
*/
|
|
2962
|
-
lamports: number | BN;
|
|
2963
|
-
/**
|
|
2964
|
-
* The state tree that the tx output should be inserted into. Defaults to a
|
|
2965
|
-
* public state tree if unspecified.
|
|
2966
|
-
*/
|
|
2967
|
-
outputStateTreeInfo: StateTreeInfo;
|
|
2968
|
-
};
|
|
2969
|
-
/**
|
|
2970
|
-
* Defines the parameters for the transfer method
|
|
2971
|
-
*/
|
|
2972
|
-
type DecompressParams = {
|
|
2973
|
-
/**
|
|
2974
|
-
* The payer of the transaction.
|
|
2975
|
-
*/
|
|
2976
|
-
payer: PublicKey;
|
|
2977
|
-
/**
|
|
2978
|
-
* The input state to be consumed.
|
|
2979
|
-
*/
|
|
2980
|
-
inputCompressedAccounts: CompressedAccountWithMerkleContext[];
|
|
2981
|
-
/**
|
|
2982
|
-
* Recipient address of uncompressed lamports
|
|
2983
|
-
*/
|
|
2984
|
-
toAddress: PublicKey;
|
|
2985
|
-
/**
|
|
2986
|
-
* amount of lamports to decompress.
|
|
2987
|
-
*/
|
|
2988
|
-
lamports: number | BN;
|
|
2989
|
-
/**
|
|
2990
|
-
* The recent state root indices of the input state. The expiry is tied to
|
|
2991
|
-
* the proof.
|
|
2992
|
-
*
|
|
2993
|
-
* TODO: Add support for passing recent-values after instruction creation.
|
|
2994
|
-
*/
|
|
2995
|
-
recentInputStateRootIndices: number[];
|
|
2996
|
-
/**
|
|
2997
|
-
* The recent validity proof for state inclusion of the input state. It
|
|
2998
|
-
* expires after n slots.
|
|
2999
|
-
*/
|
|
3000
|
-
recentValidityProof: ValidityProof;
|
|
3001
|
-
};
|
|
3002
|
-
declare class LightSystemProgram$1 {
|
|
3003
|
-
/**
|
|
3004
|
-
* @internal
|
|
3005
|
-
*/
|
|
3006
|
-
constructor();
|
|
3007
|
-
/**
|
|
3008
|
-
* The LightSystemProgram program ID.
|
|
3009
|
-
*/
|
|
3010
|
-
static programId: PublicKey;
|
|
3011
|
-
/**
|
|
3012
|
-
* @internal
|
|
3013
|
-
* Cwct1kQLwJm8Z3HetLu8m4SXkhD6FZ5fXbJQCxTxPnGY
|
|
3014
|
-
*
|
|
3015
|
-
*/
|
|
3016
|
-
static deriveCompressedSolPda(): PublicKey;
|
|
3017
|
-
static createTransferOutputState(inputCompressedAccounts: CompressedAccountWithMerkleContext[], toAddress: PublicKey, lamports: number | BN): CompressedAccount[];
|
|
3018
|
-
static createDecompressOutputState(inputCompressedAccounts: CompressedAccountWithMerkleContext[], lamports: number | BN): CompressedAccount[];
|
|
3019
|
-
/**
|
|
3020
|
-
* No data by default
|
|
3021
|
-
*/
|
|
3022
|
-
static createNewAddressOutputState(address: number[], owner: PublicKey, lamports?: BN | number, inputCompressedAccounts?: CompressedAccountWithMerkleContext[]): CompressedAccount[];
|
|
3023
|
-
/**
|
|
3024
|
-
* Creates instruction to create compressed account with PDA.
|
|
3025
|
-
* Cannot write data.
|
|
3026
|
-
*
|
|
3027
|
-
* TODO: support transfer of lamports to the new account.
|
|
3028
|
-
*/
|
|
3029
|
-
static createAccount({ payer, newAddressParams, newAddress, recentValidityProof, outputStateTreeInfo, inputCompressedAccounts, inputStateRootIndices, lamports, }: CreateAccountWithSeedParams): Promise<TransactionInstruction>;
|
|
3030
|
-
/**
|
|
3031
|
-
* Creates a transaction instruction that transfers compressed lamports from
|
|
3032
|
-
* one owner to another.
|
|
3033
|
-
*/
|
|
3034
|
-
static transfer({ payer, inputCompressedAccounts, toAddress, lamports, recentInputStateRootIndices, recentValidityProof, }: TransferParams): Promise<TransactionInstruction>;
|
|
3035
|
-
/**
|
|
3036
|
-
* Creates a transaction instruction that transfers compressed lamports from
|
|
3037
|
-
* one owner to another.
|
|
3038
|
-
*/
|
|
3039
|
-
static compress({ payer, toAddress, lamports, outputStateTreeInfo, }: CompressParams): Promise<TransactionInstruction>;
|
|
3040
|
-
/**
|
|
3041
|
-
* Creates a transaction instruction that transfers compressed lamports from
|
|
3042
|
-
* one owner to another.
|
|
3043
|
-
*/
|
|
3044
|
-
static decompress({ payer, inputCompressedAccounts, toAddress, lamports, recentInputStateRootIndices, recentValidityProof, }: DecompressParams): Promise<TransactionInstruction>;
|
|
3045
|
-
}
|
|
3046
|
-
/**
|
|
3047
|
-
* Selects the minimal number of compressed SOL accounts for a transfer.
|
|
3048
|
-
*
|
|
3049
|
-
* 1. Sorts the accounts by amount in descending order
|
|
3050
|
-
* 2. Accumulates the amount until it is greater than or equal to the transfer
|
|
3051
|
-
* amount
|
|
3052
|
-
*/
|
|
3053
|
-
declare function selectMinCompressedSolAccountsForTransfer(accounts: CompressedAccountWithMerkleContext[], transferLamports: BN | number): [selectedAccounts: CompressedAccountWithMerkleContext[], total: BN];
|
|
3054
|
-
|
|
3055
|
-
declare const CompressedAccountLayout: buffer_layout.Layout<unknown>;
|
|
3056
|
-
declare const MerkleContextLayout: buffer_layout.Layout<unknown>;
|
|
3057
|
-
declare const NewAddressParamsLayout: buffer_layout.Layout<unknown>;
|
|
3058
|
-
declare const InstructionDataInvokeLayout: Layout<InstructionDataInvoke>;
|
|
3059
|
-
declare function encodeInstructionDataInvoke(data: InstructionDataInvoke): Buffer$1;
|
|
3060
|
-
declare const InstructionDataInvokeCpiLayout: Layout<InstructionDataInvokeCpi>;
|
|
3061
|
-
declare function decodeInstructionDataInvoke(buffer: Buffer$1): InstructionDataInvoke;
|
|
3062
|
-
declare function decodeInstructionDataInvokeCpi(buffer: Buffer$1): InstructionDataInvokeCpi;
|
|
3063
|
-
type invokeAccountsLayoutParams = {
|
|
3064
|
-
/**
|
|
3065
|
-
* Fee payer.
|
|
3066
|
-
*/
|
|
3067
|
-
feePayer: PublicKey;
|
|
3068
|
-
/**
|
|
3069
|
-
* Authority.
|
|
3070
|
-
*/
|
|
3071
|
-
authority: PublicKey;
|
|
3072
|
-
/**
|
|
3073
|
-
* The registered program pda
|
|
3074
|
-
*/
|
|
3075
|
-
registeredProgramPda: PublicKey;
|
|
3076
|
-
/**
|
|
3077
|
-
* Noop program.
|
|
3078
|
-
*/
|
|
3079
|
-
noopProgram: PublicKey;
|
|
3080
|
-
/**
|
|
3081
|
-
* Account compression authority.
|
|
3082
|
-
*/
|
|
3083
|
-
accountCompressionAuthority: PublicKey;
|
|
3084
|
-
/**
|
|
3085
|
-
* Account compression program.
|
|
3086
|
-
*/
|
|
3087
|
-
accountCompressionProgram: PublicKey;
|
|
3088
|
-
/**
|
|
3089
|
-
* Solana pool pda. Some() if compression or decompression is done.
|
|
3090
|
-
*/
|
|
3091
|
-
solPoolPda: PublicKey | null;
|
|
3092
|
-
/**
|
|
3093
|
-
* Decompression recipient.
|
|
3094
|
-
*/
|
|
3095
|
-
decompressionRecipient: PublicKey | null;
|
|
3096
|
-
/**
|
|
3097
|
-
* Solana system program.
|
|
3098
|
-
*/
|
|
3099
|
-
systemProgram: PublicKey;
|
|
3100
|
-
};
|
|
3101
|
-
declare const invokeAccountsLayout: (accounts: invokeAccountsLayoutParams) => AccountMeta[];
|
|
3102
|
-
declare const PublicTransactionEventLayout: Layout<PublicTransactionEvent>;
|
|
3103
|
-
declare function encodePublicTransactionEvent(data: PublicTransactionEvent): Buffer$1;
|
|
3104
|
-
declare function decodePublicTransactionEvent(buffer: Buffer$1): PublicTransactionEvent;
|
|
3105
|
-
declare const AppendNullifyCreateAddressInputsMetaLayout: buffer_layout.Layout<unknown>;
|
|
3106
|
-
declare const AppendLeavesInputLayout: buffer_layout.Layout<unknown>;
|
|
3107
|
-
declare const InsertNullifierInputLayout: buffer_layout.Layout<unknown>;
|
|
3108
|
-
declare const InsertAddressInputLayout: buffer_layout.Layout<unknown>;
|
|
3109
|
-
declare const MerkleTreeSequenceNumberLayout: buffer_layout.Layout<unknown>;
|
|
3110
|
-
declare function deserializeAppendNullifyCreateAddressInputsIndexer(buffer: Buffer$1): {
|
|
3111
|
-
meta: unknown;
|
|
3112
|
-
leaves: unknown[];
|
|
3113
|
-
nullifiers: unknown[];
|
|
3114
|
-
addresses: unknown[];
|
|
3115
|
-
sequence_numbers: unknown[];
|
|
3116
|
-
output_leaf_indices: number[];
|
|
3117
|
-
};
|
|
3118
|
-
declare function convertToPublicTransactionEvent(decoded: any, remainingAccounts: PublicKey[], invokeData: InstructionDataInvoke): PublicTransactionEvent;
|
|
3119
|
-
|
|
3120
|
-
declare enum UtxoErrorCode {
|
|
3121
|
-
NEGATIVE_LAMPORTS = "NEGATIVE_LAMPORTS",
|
|
3122
|
-
NOT_U64 = "NOT_U64",
|
|
3123
|
-
BLINDING_EXCEEDS_FIELD_SIZE = "BLINDING_EXCEEDS_FIELD_SIZE"
|
|
3124
|
-
}
|
|
3125
|
-
declare enum SelectInUtxosErrorCode {
|
|
3126
|
-
FAILED_TO_FIND_UTXO_COMBINATION = "FAILED_TO_FIND_UTXO_COMBINATION",
|
|
3127
|
-
INVALID_NUMBER_OF_IN_UTXOS = "INVALID_NUMBER_OF_IN_UTXOS"
|
|
3128
|
-
}
|
|
3129
|
-
declare enum CreateUtxoErrorCode {
|
|
3130
|
-
OWNER_UNDEFINED = "OWNER_UNDEFINED",
|
|
3131
|
-
INVALID_OUTPUT_UTXO_LENGTH = "INVALID_OUTPUT_UTXO_LENGTH",
|
|
3132
|
-
UTXO_DATA_UNDEFINED = "UTXO_DATA_UNDEFINED"
|
|
3133
|
-
}
|
|
3134
|
-
declare enum RpcErrorCode {
|
|
3135
|
-
CONNECTION_UNDEFINED = "CONNECTION_UNDEFINED",
|
|
3136
|
-
RPC_PUBKEY_UNDEFINED = "RPC_PUBKEY_UNDEFINED",
|
|
3137
|
-
RPC_METHOD_NOT_IMPLEMENTED = "RPC_METHOD_NOT_IMPLEMENTED",
|
|
3138
|
-
RPC_INVALID = "RPC_INVALID"
|
|
3139
|
-
}
|
|
3140
|
-
declare enum LookupTableErrorCode {
|
|
3141
|
-
LOOK_UP_TABLE_UNDEFINED = "LOOK_UP_TABLE_UNDEFINED",
|
|
3142
|
-
LOOK_UP_TABLE_NOT_INITIALIZED = "LOOK_UP_TABLE_NOT_INITIALIZED"
|
|
3143
|
-
}
|
|
3144
|
-
declare enum HashErrorCode {
|
|
3145
|
-
NO_POSEIDON_HASHER_PROVIDED = "NO_POSEIDON_HASHER_PROVIDED"
|
|
3146
|
-
}
|
|
3147
|
-
declare enum ProofErrorCode {
|
|
3148
|
-
INVALID_PROOF = "INVALID_PROOF",
|
|
3149
|
-
PROOF_INPUT_UNDEFINED = "PROOF_INPUT_UNDEFINED",
|
|
3150
|
-
PROOF_GENERATION_FAILED = "PROOF_GENERATION_FAILED"
|
|
3151
|
-
}
|
|
3152
|
-
declare enum MerkleTreeErrorCode {
|
|
3153
|
-
MERKLE_TREE_NOT_INITIALIZED = "MERKLE_TREE_NOT_INITIALIZED",
|
|
3154
|
-
SOL_MERKLE_TREE_UNDEFINED = "SOL_MERKLE_TREE_UNDEFINED",
|
|
3155
|
-
MERKLE_TREE_UNDEFINED = "MERKLE_TREE_UNDEFINED",
|
|
3156
|
-
INPUT_UTXO_NOT_INSERTED_IN_MERKLE_TREE = "INPUT_UTXO_NOT_INSERTED_IN_MERKLE_TREE",
|
|
3157
|
-
MERKLE_TREE_INDEX_UNDEFINED = "MERKLE_TREE_INDEX_UNDEFINED",
|
|
3158
|
-
MERKLE_TREE_SET_SPACE_UNDEFINED = "MERKLE_TREE_SET_SPACE_UNDEFINED"
|
|
3159
|
-
}
|
|
3160
|
-
declare enum UtilsErrorCode {
|
|
3161
|
-
ACCOUNT_NAME_UNDEFINED_IN_IDL = "ACCOUNT_NAME_UNDEFINED_IN_IDL",
|
|
3162
|
-
PROPERTY_UNDEFINED = "PROPERTY_UNDEFINED",
|
|
3163
|
-
LOOK_UP_TABLE_CREATION_FAILED = "LOOK_UP_TABLE_CREATION_FAILED",
|
|
3164
|
-
UNSUPPORTED_ARCHITECTURE = "UNSUPPORTED_ARCHITECTURE",
|
|
3165
|
-
UNSUPPORTED_PLATFORM = "UNSUPPORTED_PLATFORM",
|
|
3166
|
-
ACCOUNTS_UNDEFINED = "ACCOUNTS_UNDEFINED",
|
|
3167
|
-
INVALID_NUMBER = "INVALID_NUMBER"
|
|
3168
|
-
}
|
|
3169
|
-
declare class MetaError extends Error {
|
|
3170
|
-
code: string;
|
|
3171
|
-
functionName: string;
|
|
3172
|
-
codeMessage?: string;
|
|
3173
|
-
constructor(code: string, functionName: string, codeMessage?: string);
|
|
3174
|
-
}
|
|
3175
|
-
declare class UtxoError extends MetaError {
|
|
3176
|
-
}
|
|
3177
|
-
declare class SelectInUtxosError extends MetaError {
|
|
3178
|
-
}
|
|
3179
|
-
declare class CreateUtxoError extends MetaError {
|
|
3180
|
-
}
|
|
3181
|
-
declare class RpcError extends MetaError {
|
|
3182
|
-
}
|
|
3183
|
-
declare class LookupTableError extends MetaError {
|
|
3184
|
-
}
|
|
3185
|
-
declare class HashError extends MetaError {
|
|
3186
|
-
}
|
|
3187
|
-
declare class ProofError extends MetaError {
|
|
3188
|
-
}
|
|
3189
|
-
declare class MerkleTreeError extends MetaError {
|
|
3190
|
-
}
|
|
3191
|
-
declare class UtilsError extends MetaError {
|
|
3192
|
-
}
|
|
3193
|
-
|
|
3194
|
-
type LightSystemProgram = {
|
|
4723
|
+
type LightSystemProgram$1 = {
|
|
3195
4724
|
version: '1.2.0';
|
|
3196
4725
|
name: 'light_system_program';
|
|
3197
4726
|
constants: [
|
|
@@ -3891,7 +5420,7 @@ type LightSystemProgram = {
|
|
|
3891
5420
|
type: 'u8';
|
|
3892
5421
|
},
|
|
3893
5422
|
{
|
|
3894
|
-
name: '
|
|
5423
|
+
name: 'queuePubkeyIndex';
|
|
3895
5424
|
type: 'u8';
|
|
3896
5425
|
},
|
|
3897
5426
|
{
|
|
@@ -3899,30 +5428,8 @@ type LightSystemProgram = {
|
|
|
3899
5428
|
type: 'u32';
|
|
3900
5429
|
},
|
|
3901
5430
|
{
|
|
3902
|
-
name: '
|
|
3903
|
-
type:
|
|
3904
|
-
option: {
|
|
3905
|
-
defined: 'QueueIndex';
|
|
3906
|
-
};
|
|
3907
|
-
};
|
|
3908
|
-
}
|
|
3909
|
-
];
|
|
3910
|
-
};
|
|
3911
|
-
},
|
|
3912
|
-
{
|
|
3913
|
-
name: 'QueueIndex';
|
|
3914
|
-
type: {
|
|
3915
|
-
kind: 'struct';
|
|
3916
|
-
fields: [
|
|
3917
|
-
{
|
|
3918
|
-
name: 'queueId';
|
|
3919
|
-
docs: ['Id of queue in queue account.'];
|
|
3920
|
-
type: 'u8';
|
|
3921
|
-
},
|
|
3922
|
-
{
|
|
3923
|
-
name: 'index';
|
|
3924
|
-
docs: ['Index of compressed account hash in queue.'];
|
|
3925
|
-
type: 'u16';
|
|
5431
|
+
name: 'proveByIndex';
|
|
5432
|
+
type: 'bool';
|
|
3926
5433
|
}
|
|
3927
5434
|
];
|
|
3928
5435
|
};
|
|
@@ -4066,8 +5573,8 @@ type LightSystemProgram = {
|
|
|
4066
5573
|
},
|
|
4067
5574
|
{
|
|
4068
5575
|
code: 6009;
|
|
4069
|
-
name: '
|
|
4070
|
-
msg: '
|
|
5576
|
+
name: 'DecompressLamportsUndefinedForCompressSol';
|
|
5577
|
+
msg: 'DecompressLamportsUndefinedForCompressSol';
|
|
4071
5578
|
},
|
|
4072
5579
|
{
|
|
4073
5580
|
code: 6010;
|
|
@@ -4209,6 +5716,406 @@ type LightSystemProgram = {
|
|
|
4209
5716
|
}
|
|
4210
5717
|
];
|
|
4211
5718
|
};
|
|
4212
|
-
declare const IDL: LightSystemProgram;
|
|
5719
|
+
declare const IDL: LightSystemProgram$1;
|
|
5720
|
+
|
|
5721
|
+
declare const CompressedAccountLayout: buffer_layout.Layout<unknown>;
|
|
5722
|
+
declare const MerkleContextLayout: buffer_layout.Layout<unknown>;
|
|
5723
|
+
declare const NewAddressParamsLayout: buffer_layout.Layout<unknown>;
|
|
5724
|
+
declare const InstructionDataInvokeLayout: Layout<InstructionDataInvoke>;
|
|
5725
|
+
declare function encodeInstructionDataInvoke(data: InstructionDataInvoke): Buffer$1;
|
|
5726
|
+
declare const InstructionDataInvokeCpiLayout: Layout<InstructionDataInvokeCpi>;
|
|
5727
|
+
declare const CompressedProofLayout: buffer_layout.Layout<unknown>;
|
|
5728
|
+
declare const CompressedCpiContextLayout: buffer_layout.Layout<unknown>;
|
|
5729
|
+
declare const NewAddressParamsAssignedPackedLayout: buffer_layout.Layout<unknown>;
|
|
5730
|
+
declare const PackedMerkleContextLayout: buffer_layout.Layout<unknown>;
|
|
5731
|
+
declare const InAccountLayout: buffer_layout.Layout<unknown>;
|
|
5732
|
+
declare const PackedReadOnlyAddressLayout: buffer_layout.Layout<unknown>;
|
|
5733
|
+
declare const PackedReadOnlyCompressedAccountLayout: buffer_layout.Layout<unknown>;
|
|
5734
|
+
declare const InstructionDataInvokeCpiWithReadOnlyLayout: buffer_layout.Layout<unknown>;
|
|
5735
|
+
declare function decodeInstructionDataInvokeCpiWithReadOnly(buffer: Buffer$1): unknown;
|
|
5736
|
+
declare function decodeInstructionDataInvoke(buffer: Buffer$1): InstructionDataInvoke;
|
|
5737
|
+
declare function decodeInstructionDataInvokeCpi(buffer: Buffer$1): InstructionDataInvokeCpi;
|
|
5738
|
+
type invokeAccountsLayoutParams = {
|
|
5739
|
+
/**
|
|
5740
|
+
* Fee payer.
|
|
5741
|
+
*/
|
|
5742
|
+
feePayer: PublicKey;
|
|
5743
|
+
/**
|
|
5744
|
+
* Authority.
|
|
5745
|
+
*/
|
|
5746
|
+
authority: PublicKey;
|
|
5747
|
+
/**
|
|
5748
|
+
* The registered program pda
|
|
5749
|
+
*/
|
|
5750
|
+
registeredProgramPda: PublicKey;
|
|
5751
|
+
/**
|
|
5752
|
+
* Noop program.
|
|
5753
|
+
*/
|
|
5754
|
+
noopProgram: PublicKey;
|
|
5755
|
+
/**
|
|
5756
|
+
* Account compression authority.
|
|
5757
|
+
*/
|
|
5758
|
+
accountCompressionAuthority: PublicKey;
|
|
5759
|
+
/**
|
|
5760
|
+
* Account compression program.
|
|
5761
|
+
*/
|
|
5762
|
+
accountCompressionProgram: PublicKey;
|
|
5763
|
+
/**
|
|
5764
|
+
* Solana pool pda. Some() if compression or decompression is done.
|
|
5765
|
+
*/
|
|
5766
|
+
solPoolPda: PublicKey | null;
|
|
5767
|
+
/**
|
|
5768
|
+
* Decompression recipient.
|
|
5769
|
+
*/
|
|
5770
|
+
decompressionRecipient: PublicKey | null;
|
|
5771
|
+
/**
|
|
5772
|
+
* Solana system program.
|
|
5773
|
+
*/
|
|
5774
|
+
systemProgram: PublicKey;
|
|
5775
|
+
};
|
|
5776
|
+
declare const invokeAccountsLayout: (accounts: invokeAccountsLayoutParams) => AccountMeta[];
|
|
5777
|
+
declare const PublicTransactionEventLayout: Layout<PublicTransactionEvent>;
|
|
5778
|
+
declare function encodePublicTransactionEvent(data: PublicTransactionEvent): Buffer$1;
|
|
5779
|
+
declare function decodePublicTransactionEvent(buffer: Buffer$1): PublicTransactionEvent;
|
|
5780
|
+
declare const AppendNullifyCreateAddressInputsMetaLayout: buffer_layout.Layout<unknown>;
|
|
5781
|
+
declare const AppendLeavesInputLayout: buffer_layout.Layout<unknown>;
|
|
5782
|
+
declare const InsertNullifierInputLayout: buffer_layout.Layout<unknown>;
|
|
5783
|
+
declare const InsertAddressInputLayout: buffer_layout.Layout<unknown>;
|
|
5784
|
+
declare const MerkleTreeSequenceNumberLayout: buffer_layout.Layout<unknown>;
|
|
5785
|
+
declare function deserializeAppendNullifyCreateAddressInputsIndexer(buffer: Buffer$1): {
|
|
5786
|
+
meta: unknown;
|
|
5787
|
+
leaves: unknown[];
|
|
5788
|
+
nullifiers: unknown[];
|
|
5789
|
+
addresses: unknown[];
|
|
5790
|
+
sequence_numbers: unknown[];
|
|
5791
|
+
output_leaf_indices: number[];
|
|
5792
|
+
};
|
|
5793
|
+
declare function convertToPublicTransactionEvent(decoded: any, remainingAccounts: PublicKey[], invokeData: InstructionDataInvoke): PublicTransactionEvent;
|
|
5794
|
+
|
|
5795
|
+
/**
|
|
5796
|
+
* @internal Finds the index of a PublicKey in an array, or adds it if not
|
|
5797
|
+
* present
|
|
5798
|
+
* */
|
|
5799
|
+
declare function getIndexOrAdd(accountsArray: PublicKey[], key: PublicKey): number;
|
|
5800
|
+
/**
|
|
5801
|
+
* @internal
|
|
5802
|
+
* Pads output state trees with the 0th state tree of the input state.
|
|
5803
|
+
*
|
|
5804
|
+
* @param outputStateMerkleTrees Optional output state trees
|
|
5805
|
+
* to be inserted into the
|
|
5806
|
+
* output state. Defaults to
|
|
5807
|
+
* the 0th state tree of the
|
|
5808
|
+
* input state. Gets padded to
|
|
5809
|
+
* the length of
|
|
5810
|
+
* outputCompressedAccounts.
|
|
5811
|
+
* @param numberOfOutputCompressedAccounts The number of output
|
|
5812
|
+
* compressed accounts.
|
|
5813
|
+
*
|
|
5814
|
+
* @returns Padded output state trees.
|
|
5815
|
+
*/
|
|
5816
|
+
declare function padOutputStateMerkleTrees(outputStateMerkleTrees: PublicKey, numberOfOutputCompressedAccounts: number): PublicKey[];
|
|
5817
|
+
declare function toAccountMetas(remainingAccounts: PublicKey[]): AccountMeta[];
|
|
5818
|
+
interface PackedStateTreeInfos {
|
|
5819
|
+
packedTreeInfos: PackedStateTreeInfo[];
|
|
5820
|
+
outputTreeIndex: number;
|
|
5821
|
+
}
|
|
5822
|
+
interface PackedTreeInfos {
|
|
5823
|
+
stateTrees?: PackedStateTreeInfos;
|
|
5824
|
+
addressTrees: PackedAddressTreeInfo[];
|
|
5825
|
+
}
|
|
5826
|
+
/**
|
|
5827
|
+
* Packs TreeInfos. Replaces PublicKey with index pointer to remaining accounts.
|
|
5828
|
+
*
|
|
5829
|
+
* Only use for MUT, CLOSE, NEW_ADDRESSES. For INIT, pass
|
|
5830
|
+
* {@link newAddressParamsPacked} and `outputStateTreeIndex` to your program
|
|
5831
|
+
* instead.
|
|
5832
|
+
*
|
|
5833
|
+
*
|
|
5834
|
+
* @param remainingAccounts Optional existing array of accounts
|
|
5835
|
+
* to append to.
|
|
5836
|
+
* @param accountProofInputs Account proof inputs.
|
|
5837
|
+
* @param newAddressProofInputs New address proof inputs.
|
|
5838
|
+
*
|
|
5839
|
+
* @returns Remaining accounts, packed state and address tree infos, state tree
|
|
5840
|
+
* output index and address tree infos.
|
|
5841
|
+
*/
|
|
5842
|
+
declare function packTreeInfos(remainingAccounts: PublicKey[], accountProofInputs: AccountProofInput[], newAddressProofInputs: NewAddressProofInput[]): PackedTreeInfos;
|
|
5843
|
+
/**
|
|
5844
|
+
* Packs Compressed Accounts.
|
|
5845
|
+
*
|
|
5846
|
+
* Replaces PublicKey with index pointer to remaining accounts.
|
|
5847
|
+
*
|
|
5848
|
+
*
|
|
5849
|
+
* @param inputCompressedAccounts Ix input state to be consumed
|
|
5850
|
+
* @param inputStateRootIndices The recent state root indices of the
|
|
5851
|
+
* input state. The expiry is tied to
|
|
5852
|
+
* the proof.
|
|
5853
|
+
* @param outputCompressedAccounts Ix output state to be created
|
|
5854
|
+
* @param outputStateTreeInfo The output state tree info. Gets
|
|
5855
|
+
* padded to the length of
|
|
5856
|
+
* outputCompressedAccounts.
|
|
5857
|
+
*
|
|
5858
|
+
* @param remainingAccounts Optional existing array of accounts
|
|
5859
|
+
* to append to.
|
|
5860
|
+
**/
|
|
5861
|
+
declare function packCompressedAccounts(inputCompressedAccounts: CompressedAccountWithMerkleContextLegacy[], inputStateRootIndices: number[], outputCompressedAccounts: CompressedAccountLegacy[], outputStateTreeInfo?: TreeInfo, remainingAccounts?: PublicKey[]): {
|
|
5862
|
+
packedInputCompressedAccounts: PackedCompressedAccountWithMerkleContext[];
|
|
5863
|
+
packedOutputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
|
|
5864
|
+
remainingAccounts: PublicKey[];
|
|
5865
|
+
};
|
|
5866
|
+
|
|
5867
|
+
declare const sumUpLamports: (accounts: CompressedAccountWithMerkleContext[]) => BN;
|
|
5868
|
+
/**
|
|
5869
|
+
* Create compressed account system transaction params
|
|
5870
|
+
*/
|
|
5871
|
+
type CreateAccountWithSeedParams = {
|
|
5872
|
+
/**
|
|
5873
|
+
* The payer of the transaction.
|
|
5874
|
+
*/
|
|
5875
|
+
payer: PublicKey;
|
|
5876
|
+
/**
|
|
5877
|
+
* Address params for the new compressed account.
|
|
5878
|
+
*/
|
|
5879
|
+
newAddressParams: NewAddressParams;
|
|
5880
|
+
/**
|
|
5881
|
+
* Address of the new compressed account
|
|
5882
|
+
*/
|
|
5883
|
+
newAddress: number[];
|
|
5884
|
+
/**
|
|
5885
|
+
* Recent validity proof proving that there's no existing compressed account
|
|
5886
|
+
* registered with newAccountAddress
|
|
5887
|
+
*/
|
|
5888
|
+
recentValidityProof: ValidityProof | null;
|
|
5889
|
+
/**
|
|
5890
|
+
* State tree pubkey. Defaults to a public state tree if unspecified.
|
|
5891
|
+
*/
|
|
5892
|
+
outputStateTreeInfo?: TreeInfo;
|
|
5893
|
+
/**
|
|
5894
|
+
* Public key of the program to assign as the owner of the created account.
|
|
5895
|
+
*/
|
|
5896
|
+
programId?: PublicKey;
|
|
5897
|
+
/**
|
|
5898
|
+
* Optional input accounts to transfer lamports from into the new compressed
|
|
5899
|
+
* account.
|
|
5900
|
+
*/
|
|
5901
|
+
inputCompressedAccounts?: CompressedAccountWithMerkleContext[];
|
|
5902
|
+
/**
|
|
5903
|
+
* Optional input state root indices of 'inputCompressedAccounts'. The
|
|
5904
|
+
* expiry is tied to the 'recentValidityProof'.
|
|
5905
|
+
*/
|
|
5906
|
+
inputStateRootIndices?: number[];
|
|
5907
|
+
/**
|
|
5908
|
+
* Optional lamports to transfer into the new compressed account.
|
|
5909
|
+
*/
|
|
5910
|
+
lamports?: number | BN;
|
|
5911
|
+
};
|
|
5912
|
+
/**
|
|
5913
|
+
* Defines the parameters for the transfer method
|
|
5914
|
+
*/
|
|
5915
|
+
type TransferParams = {
|
|
5916
|
+
/**
|
|
5917
|
+
* The payer of the transaction.
|
|
5918
|
+
*/
|
|
5919
|
+
payer: PublicKey;
|
|
5920
|
+
/**
|
|
5921
|
+
* The input state to be consumed.
|
|
5922
|
+
*/
|
|
5923
|
+
inputCompressedAccounts: CompressedAccountWithMerkleContext[];
|
|
5924
|
+
/**
|
|
5925
|
+
* Recipient address.
|
|
5926
|
+
*/
|
|
5927
|
+
toAddress: PublicKey;
|
|
5928
|
+
/**
|
|
5929
|
+
* Amount of lamports to transfer.
|
|
5930
|
+
*/
|
|
5931
|
+
lamports: number | BN;
|
|
5932
|
+
/**
|
|
5933
|
+
* The recent state root indices of the input state. The expiry is tied to
|
|
5934
|
+
* the proof.
|
|
5935
|
+
*/
|
|
5936
|
+
recentInputStateRootIndices: number[];
|
|
5937
|
+
/**
|
|
5938
|
+
* The recent validity proof for state inclusion of the input state. Expires
|
|
5939
|
+
* after n slots.
|
|
5940
|
+
*/
|
|
5941
|
+
recentValidityProof: ValidityProof | null;
|
|
5942
|
+
};
|
|
5943
|
+
/**
|
|
5944
|
+
* Defines the parameters for the transfer method
|
|
5945
|
+
*/
|
|
5946
|
+
type CompressParams = {
|
|
5947
|
+
/**
|
|
5948
|
+
* The payer of the transaction.
|
|
5949
|
+
*/
|
|
5950
|
+
payer: PublicKey;
|
|
5951
|
+
/**
|
|
5952
|
+
* address that the lamports are attached to. also defaults to the recipient owner
|
|
5953
|
+
*/
|
|
5954
|
+
toAddress: PublicKey;
|
|
5955
|
+
/**
|
|
5956
|
+
* amount of lamports to compress.
|
|
5957
|
+
*/
|
|
5958
|
+
lamports: number | BN;
|
|
5959
|
+
/**
|
|
5960
|
+
* The state tree that the tx output should be inserted into.
|
|
5961
|
+
*/
|
|
5962
|
+
outputStateTreeInfo: TreeInfo;
|
|
5963
|
+
};
|
|
5964
|
+
/**
|
|
5965
|
+
* Defines the parameters for the transfer method
|
|
5966
|
+
*/
|
|
5967
|
+
type DecompressParams = {
|
|
5968
|
+
/**
|
|
5969
|
+
* The payer of the transaction.
|
|
5970
|
+
*/
|
|
5971
|
+
payer: PublicKey;
|
|
5972
|
+
/**
|
|
5973
|
+
* The input state to be consumed.
|
|
5974
|
+
*/
|
|
5975
|
+
inputCompressedAccounts: CompressedAccountWithMerkleContext[];
|
|
5976
|
+
/**
|
|
5977
|
+
* Recipient address of uncompressed lamports
|
|
5978
|
+
*/
|
|
5979
|
+
toAddress: PublicKey;
|
|
5980
|
+
/**
|
|
5981
|
+
* amount of lamports to decompress.
|
|
5982
|
+
*/
|
|
5983
|
+
lamports: number | BN;
|
|
5984
|
+
/**
|
|
5985
|
+
* The recent state root indices of the input state. The expiry is tied to
|
|
5986
|
+
* the proof.
|
|
5987
|
+
*/
|
|
5988
|
+
recentInputStateRootIndices: number[];
|
|
5989
|
+
/**
|
|
5990
|
+
* The recent validity proof for state inclusion of the input state. It
|
|
5991
|
+
* expires after n slots.
|
|
5992
|
+
*/
|
|
5993
|
+
recentValidityProof: ValidityProof | null;
|
|
5994
|
+
};
|
|
5995
|
+
declare class LightSystemProgram {
|
|
5996
|
+
/**
|
|
5997
|
+
* @internal
|
|
5998
|
+
*/
|
|
5999
|
+
constructor();
|
|
6000
|
+
/**
|
|
6001
|
+
* The LightSystemProgram program ID.
|
|
6002
|
+
*/
|
|
6003
|
+
static programId: PublicKey;
|
|
6004
|
+
/**
|
|
6005
|
+
* @internal
|
|
6006
|
+
* Cwct1kQLwJm8Z3HetLu8m4SXkhD6FZ5fXbJQCxTxPnGY
|
|
6007
|
+
*
|
|
6008
|
+
*/
|
|
6009
|
+
static deriveCompressedSolPda(): PublicKey;
|
|
6010
|
+
static createTransferOutputState(inputCompressedAccounts: CompressedAccountWithMerkleContext[], toAddress: PublicKey, lamports: number | BN): CompressedAccountLegacy[];
|
|
6011
|
+
static createDecompressOutputState(inputCompressedAccounts: CompressedAccountWithMerkleContext[], lamports: number | BN): CompressedAccountLegacy[];
|
|
6012
|
+
/**
|
|
6013
|
+
* No data by default
|
|
6014
|
+
*/
|
|
6015
|
+
static createNewAddressOutputState(address: number[], owner: PublicKey, lamports?: BN | number, inputCompressedAccounts?: CompressedAccountWithMerkleContext[]): CompressedAccountLegacy[];
|
|
6016
|
+
/**
|
|
6017
|
+
* Creates instruction to create compressed account with PDA.
|
|
6018
|
+
* Cannot write data.
|
|
6019
|
+
*/
|
|
6020
|
+
static createAccount({ payer, newAddressParams, newAddress, recentValidityProof, outputStateTreeInfo, inputCompressedAccounts, inputStateRootIndices, lamports, }: CreateAccountWithSeedParams): Promise<TransactionInstruction>;
|
|
6021
|
+
/**
|
|
6022
|
+
* Creates a transaction instruction that transfers compressed lamports from
|
|
6023
|
+
* one owner to another.
|
|
6024
|
+
*/
|
|
6025
|
+
static transfer({ payer, inputCompressedAccounts, toAddress, lamports, recentInputStateRootIndices, recentValidityProof, }: TransferParams): Promise<TransactionInstruction>;
|
|
6026
|
+
/**
|
|
6027
|
+
* Creates a transaction instruction that transfers compressed lamports from
|
|
6028
|
+
* one owner to another.
|
|
6029
|
+
*/
|
|
6030
|
+
static compress({ payer, toAddress, lamports, outputStateTreeInfo, }: CompressParams): Promise<TransactionInstruction>;
|
|
6031
|
+
/**
|
|
6032
|
+
* Creates a transaction instruction that transfers compressed lamports from
|
|
6033
|
+
* one owner to another.
|
|
6034
|
+
*/
|
|
6035
|
+
static decompress({ payer, inputCompressedAccounts, toAddress, lamports, recentInputStateRootIndices, recentValidityProof, }: DecompressParams): Promise<TransactionInstruction>;
|
|
6036
|
+
}
|
|
6037
|
+
|
|
6038
|
+
/**
|
|
6039
|
+
* Selects the minimal number of compressed SOL accounts for a transfer.
|
|
6040
|
+
*
|
|
6041
|
+
* 1. Sorts the accounts by amount in descending order
|
|
6042
|
+
* 2. Accumulates the amount until it is greater than or equal to the transfer
|
|
6043
|
+
* amount
|
|
6044
|
+
*/
|
|
6045
|
+
declare function selectMinCompressedSolAccountsForTransfer(accounts: CompressedAccountWithMerkleContext[], transferLamports: BN | number): [selectedAccounts: CompressedAccountWithMerkleContext[], total: BN];
|
|
6046
|
+
|
|
6047
|
+
declare enum UtxoErrorCode {
|
|
6048
|
+
NEGATIVE_LAMPORTS = "NEGATIVE_LAMPORTS",
|
|
6049
|
+
NOT_U64 = "NOT_U64",
|
|
6050
|
+
BLINDING_EXCEEDS_FIELD_SIZE = "BLINDING_EXCEEDS_FIELD_SIZE"
|
|
6051
|
+
}
|
|
6052
|
+
declare enum SelectInUtxosErrorCode {
|
|
6053
|
+
FAILED_TO_FIND_UTXO_COMBINATION = "FAILED_TO_FIND_UTXO_COMBINATION",
|
|
6054
|
+
INVALID_NUMBER_OF_IN_UTXOS = "INVALID_NUMBER_OF_IN_UTXOS"
|
|
6055
|
+
}
|
|
6056
|
+
declare enum CreateUtxoErrorCode {
|
|
6057
|
+
OWNER_UNDEFINED = "OWNER_UNDEFINED",
|
|
6058
|
+
INVALID_OUTPUT_UTXO_LENGTH = "INVALID_OUTPUT_UTXO_LENGTH",
|
|
6059
|
+
UTXO_DATA_UNDEFINED = "UTXO_DATA_UNDEFINED"
|
|
6060
|
+
}
|
|
6061
|
+
declare enum RpcErrorCode {
|
|
6062
|
+
CONNECTION_UNDEFINED = "CONNECTION_UNDEFINED",
|
|
6063
|
+
RPC_PUBKEY_UNDEFINED = "RPC_PUBKEY_UNDEFINED",
|
|
6064
|
+
RPC_METHOD_NOT_IMPLEMENTED = "RPC_METHOD_NOT_IMPLEMENTED",
|
|
6065
|
+
RPC_INVALID = "RPC_INVALID"
|
|
6066
|
+
}
|
|
6067
|
+
declare enum LookupTableErrorCode {
|
|
6068
|
+
LOOK_UP_TABLE_UNDEFINED = "LOOK_UP_TABLE_UNDEFINED",
|
|
6069
|
+
LOOK_UP_TABLE_NOT_INITIALIZED = "LOOK_UP_TABLE_NOT_INITIALIZED"
|
|
6070
|
+
}
|
|
6071
|
+
declare enum HashErrorCode {
|
|
6072
|
+
NO_POSEIDON_HASHER_PROVIDED = "NO_POSEIDON_HASHER_PROVIDED"
|
|
6073
|
+
}
|
|
6074
|
+
declare enum ProofErrorCode {
|
|
6075
|
+
INVALID_PROOF = "INVALID_PROOF",
|
|
6076
|
+
PROOF_INPUT_UNDEFINED = "PROOF_INPUT_UNDEFINED",
|
|
6077
|
+
PROOF_GENERATION_FAILED = "PROOF_GENERATION_FAILED"
|
|
6078
|
+
}
|
|
6079
|
+
declare enum MerkleTreeErrorCode {
|
|
6080
|
+
MERKLE_TREE_NOT_INITIALIZED = "MERKLE_TREE_NOT_INITIALIZED",
|
|
6081
|
+
SOL_MERKLE_TREE_UNDEFINED = "SOL_MERKLE_TREE_UNDEFINED",
|
|
6082
|
+
MERKLE_TREE_UNDEFINED = "MERKLE_TREE_UNDEFINED",
|
|
6083
|
+
INPUT_UTXO_NOT_INSERTED_IN_MERKLE_TREE = "INPUT_UTXO_NOT_INSERTED_IN_MERKLE_TREE",
|
|
6084
|
+
MERKLE_TREE_INDEX_UNDEFINED = "MERKLE_TREE_INDEX_UNDEFINED",
|
|
6085
|
+
MERKLE_TREE_SET_SPACE_UNDEFINED = "MERKLE_TREE_SET_SPACE_UNDEFINED"
|
|
6086
|
+
}
|
|
6087
|
+
declare enum UtilsErrorCode {
|
|
6088
|
+
ACCOUNT_NAME_UNDEFINED_IN_IDL = "ACCOUNT_NAME_UNDEFINED_IN_IDL",
|
|
6089
|
+
PROPERTY_UNDEFINED = "PROPERTY_UNDEFINED",
|
|
6090
|
+
LOOK_UP_TABLE_CREATION_FAILED = "LOOK_UP_TABLE_CREATION_FAILED",
|
|
6091
|
+
UNSUPPORTED_ARCHITECTURE = "UNSUPPORTED_ARCHITECTURE",
|
|
6092
|
+
UNSUPPORTED_PLATFORM = "UNSUPPORTED_PLATFORM",
|
|
6093
|
+
ACCOUNTS_UNDEFINED = "ACCOUNTS_UNDEFINED",
|
|
6094
|
+
INVALID_NUMBER = "INVALID_NUMBER"
|
|
6095
|
+
}
|
|
6096
|
+
declare class MetaError extends Error {
|
|
6097
|
+
code: string;
|
|
6098
|
+
functionName: string;
|
|
6099
|
+
codeMessage?: string;
|
|
6100
|
+
constructor(code: string, functionName: string, codeMessage?: string);
|
|
6101
|
+
}
|
|
6102
|
+
declare class UtxoError extends MetaError {
|
|
6103
|
+
}
|
|
6104
|
+
declare class SelectInUtxosError extends MetaError {
|
|
6105
|
+
}
|
|
6106
|
+
declare class CreateUtxoError extends MetaError {
|
|
6107
|
+
}
|
|
6108
|
+
declare class RpcError extends MetaError {
|
|
6109
|
+
}
|
|
6110
|
+
declare class LookupTableError extends MetaError {
|
|
6111
|
+
}
|
|
6112
|
+
declare class HashError extends MetaError {
|
|
6113
|
+
}
|
|
6114
|
+
declare class ProofError extends MetaError {
|
|
6115
|
+
}
|
|
6116
|
+
declare class MerkleTreeError extends MetaError {
|
|
6117
|
+
}
|
|
6118
|
+
declare class UtilsError extends MetaError {
|
|
6119
|
+
}
|
|
4213
6120
|
|
|
4214
|
-
export { ADDRESS_QUEUE_ROLLOVER_FEE, ADDRESS_TREE_NETWORK_FEE, ALICE, AccountProofResult, type ActiveTreeBundle, type AddressTreeInfo, type AddressWithTree, type AddressWithTreeInfo, AppendLeavesInputLayout, AppendNullifyCreateAddressInputsMetaLayout, type BN254, BOB, BalanceResult, CHARLIE, COMPRESSED_TOKEN_PROGRAM_ID, COMPUTE_BUDGET_PATTERN, type ClientSubscriptionId, type CompressedAccount, type CompressedAccountData, CompressedAccountLayout, CompressedAccountResult, type CompressedAccountWithMerkleContext, CompressedAccountsByOwnerResult, type CompressedCpiContext, type CompressedMintTokenHolders, CompressedMintTokenHoldersResult, type CompressedProof, type CompressedProofWithContext, CompressedTokenAccountResult, CompressedTokenAccountsByOwnerOrDelegateResult, type CompressedTransaction, CompressedTransactionResult, type CompressionApiInterface, CreateUtxoError, CreateUtxoErrorCode, DAVE, DEFAULT_MERKLE_TREE_HEIGHT, DEFAULT_MERKLE_TREE_ROOTS, DEFAULT_ZERO, type EventWithParsedTokenTlvData, FIELD_SIZE, type GetCompressedAccountConfig, type GetCompressedAccountsByOwnerConfig, type GetCompressedAccountsConfig, type GetCompressedAccountsFilter, type GetCompressedTokenAccountsByOwnerOrDelegateOptions, HIGHEST_ADDRESS_PLUS_ONE, HashError, HashErrorCode, type HashWithTree, type HashWithTreeInfo, HealthResult, type HexBatchInputsForProver, type HexInputsForProver, IDL, INSERT_INTO_QUEUES_DISCRIMINATOR, INVOKE_CPI_DISCRIMINATOR, INVOKE_DISCRIMINATOR, IndexedArray, IndexedElement, IndexedElementBundle, type InputTokenDataWithContext, InsertAddressInputLayout, InsertNullifierInputLayout, type InstructionDataInvoke, type InstructionDataInvokeCpi, InstructionDataInvokeCpiLayout, InstructionDataInvokeLayout, type LatestNonVotingSignatures, type LatestNonVotingSignaturesPaginated, LatestNonVotingSignaturesResult, LatestNonVotingSignaturesResultPaginated, LightSystemProgram
|
|
6121
|
+
export { ADDRESS_QUEUE_ROLLOVER_FEE, ADDRESS_TREE_NETWORK_FEE, ALICE, type AccountProofInput, AccountProofResult, type ActiveTreeBundle, type AddressTreeInfo, type AddressWithTree, type AddressWithTreeInfo, AppendLeavesInputLayout, AppendNullifyCreateAddressInputsMetaLayout, type BN254, BOB, BalanceResult, CHARLIE, COMPRESSED_TOKEN_PROGRAM_ID, COMPUTE_BUDGET_PATTERN, type ClientSubscriptionId, type CompressedAccount, type CompressedAccountData, CompressedAccountLayout, type CompressedAccountLegacy, type CompressedAccountMeta, CompressedAccountResult, CompressedAccountResultV2, type CompressedAccountWithMerkleContext, type CompressedAccountWithMerkleContextLegacy, CompressedAccountsByOwnerResult, CompressedAccountsByOwnerResultV2, type CompressedCpiContext, CompressedCpiContextLayout, type CompressedMintTokenHolders, CompressedMintTokenHoldersResult, type CompressedProof, CompressedProofLayout, type CompressedProofWithContext, CompressedTokenAccountResult, CompressedTokenAccountResultV2, CompressedTokenAccountsByOwnerOrDelegateResult, CompressedTokenAccountsByOwnerOrDelegateResultV2, type CompressedTransaction, CompressedTransactionResult, CompressedTransactionResultV2, type CompressionApiInterface, CreateUtxoError, CreateUtxoErrorCode, DAVE, DEFAULT_MERKLE_TREE_HEIGHT, DEFAULT_MERKLE_TREE_ROOTS, DEFAULT_ZERO, type EventWithParsedTokenTlvData, FIELD_SIZE, type GetCompressedAccountConfig, type GetCompressedAccountsByOwnerConfig, type GetCompressedAccountsConfig, type GetCompressedAccountsFilter, type GetCompressedTokenAccountsByOwnerOrDelegateOptions, HIGHEST_ADDRESS_PLUS_ONE, HashError, HashErrorCode, type HashWithTree, type HashWithTreeInfo, HealthResult, type HexBatchInputsForProver, type HexInputsForProver, IDL, INSERT_INTO_QUEUES_DISCRIMINATOR, INVOKE_CPI_DISCRIMINATOR, INVOKE_CPI_WITH_ACCOUNT_INFO_DISCRIMINATOR, INVOKE_CPI_WITH_READ_ONLY_DISCRIMINATOR, INVOKE_DISCRIMINATOR, InAccountLayout, IndexedArray, IndexedElement, IndexedElementBundle, type InputTokenDataWithContext, InsertAddressInputLayout, InsertNullifierInputLayout, type InstructionDataInvoke, type InstructionDataInvokeCpi, InstructionDataInvokeCpiLayout, InstructionDataInvokeCpiWithReadOnlyLayout, InstructionDataInvokeLayout, type LatestNonVotingSignatures, type LatestNonVotingSignaturesPaginated, LatestNonVotingSignaturesResult, LatestNonVotingSignaturesResultPaginated, LightSystemProgram, type LightSystemProgram$1 as LightSystemProgramIDL, type LightWasm, LookupTableError, LookupTableErrorCode, type MerkleContext, MerkleContextLayout, type MerkleContextLegacy, type MerkleContextWithMerkleProof, type MerkleContextWithNewAddressProof, MerkleProofResult, MerkleProofResultV2, MerkleTree, MerkleTreeError, MerkleTreeErrorCode, type MerkleTreeSequenceNumber, MerkleTreeSequenceNumberLayout, MultipleCompressedAccountsResult, MultipleCompressedAccountsResultV2, MultipleMerkleProofsResult, MultipleMerkleProofsResultV2, NativeBalanceResult, type NewAddressParams, NewAddressParamsAssignedPackedLayout, NewAddressParamsLayout, type NewAddressParamsPacked, type NewAddressProofInput, NewAddressProofResult, type NonInclusionJsonStruct, type NonInclusionMerkleProofInputs, type NullifierMetadata, type OutputCompressedAccountWithPackedContext, type PackedAddressTreeInfo, type PackedCompressedAccountWithMerkleContext, PackedMerkleContextLayout, type PackedMerkleContextLegacy, PackedReadOnlyAddressLayout, PackedReadOnlyCompressedAccountLayout, type PackedStateTreeInfo, type PackedStateTreeInfos, type PackedTreeInfos, type PaginatedOptions, type ParsedTokenAccount, ProofError, ProofErrorCode, type PublicTransactionEvent, PublicTransactionEventLayout, RootIndexResultV2, Rpc, RpcError, RpcErrorCode, type RpcResult, type RpcResultError, type RpcResultSuccess, STATE_MERKLE_TREE_NETWORK_FEE, STATE_MERKLE_TREE_ROLLOVER_FEE, SelectInUtxosError, SelectInUtxosErrorCode, SignatureListResult, SignatureListWithCursorResult, type SignatureWithMetadata, SlotResult, type StateTreeInfo, type StateTreeLUTPair, TRANSACTION_MERKLE_TREE_ROLLOVER_THRESHOLD, TestRpc, type TestRpcConfig, type TokenBalance, TokenBalanceListResult, TokenBalanceListResultV2, TokenBalanceResult, type TokenData$1 as TokenData, TokenDataLayout, TokenDataResult, type TreeInfo, TreeType, UTXO_MERGE_MAXIMUM, UTXO_MERGE_THRESHOLD, UtilsError, UtilsErrorCode, UtxoError, UtxoErrorCode, VERSION, type ValidityProof, ValidityProofResult, ValidityProofResultV2, type ValidityProofWithContext, type WithContext, type WithCursor, type WithRpcContext, accountCompressionProgram, addressQueue, addressTree, airdropSol, batchMerkleTree, batchQueue, bn, bufToDecStr, buildAndSignTx, buildTx, byteArrayToKeypair, calculateComputeUnitPrice, checkValidityProofShape, compress, confirmConfig, confirmTransaction, confirmTx, convertInvokeCpiWithReadOnlyToInvoke, convertMerkleProofsWithContextToHex, convertNonInclusionMerkleProofInputsToHex, convertToPublicTransactionEvent, cpiContext2Pubkey, cpiContextPubkey, createAccount, createAccountWithLamports, createBN254, createCompressedAccountLegacy, createCompressedAccountMeta, createCompressedAccountWithMerkleContextLegacy, createMerkleContextLegacy, createRpc, createRpcResult, createStateTreeLookupTable, decodeInstructionDataInvoke, decodeInstructionDataInvokeCpi, decodeInstructionDataInvokeCpiWithReadOnly, decodePublicTransactionEvent, decompress, dedupeSigner, deepEqual, defaultStateTreeLookupTables, defaultStaticAccounts, defaultStaticAccountsStruct, defaultTestStateTreeAccounts, defaultTestStateTreeAccounts2, deriveAddress, deriveAddressSeed, deserializeAppendNullifyCreateAddressInputsIndexer, encodeBN254toBase58, encodeInstructionDataInvoke, encodePublicTransactionEvent, extendStateTreeLookupTable, featureFlags, getAccountCompressionAuthority, getAllStateTreeInfos, getCompressedTokenAccountByHashTest, getCompressedTokenAccounts, getCompressedTokenAccountsByDelegateTest, getCompressedTokenAccountsByOwnerTest, getConnection, getDefaultAddressTreeInfo, getIndexOrAdd, getParsedEvents, getPublicInputHash, getRegisteredProgramPda, getStateTreeInfoByPubkey, getTestKeypair, getTestRpc, getTreeInfoByPubkey, hashToBn254FieldSizeBe, hashvToBn254FieldSizeBe, invokeAccountsLayout, type invokeAccountsLayoutParams, isLocalTest, isSmallerThanBn254FieldSizeBe, jsonRpcResult, jsonRpcResultAndContext, lightSystemProgram, localTestActiveStateTreeInfos, merkleTree2Pubkey, merkletreePubkey, negateAndCompressProof, newAccountWithLamports, noopProgram, nullifiedStateTreeLookupTableDevnet, nullifiedStateTreeLookupTableMainnet, nullifierQueue2Pubkey, nullifierQueuePubkey, nullifyLookupTable, packCompressedAccounts, packNewAddressParams, packTreeInfos, padOutputStateMerkleTrees, parseAccountData, parseEvents, parseLightTransaction, parsePublicTransactionEventWithIdl, parseTokenLayoutWithIdl, pickRandomTreeAndQueue, pipe, placeholderValidityProof, proofFromJsonStruct, proverRequest, pushUniqueItems, rpcRequest, selectMinCompressedSolAccountsForTransfer, selectStateTreeInfo, sendAndConfirmTx, sleep, stateTreeLookupTableDevnet, stateTreeLookupTableMainnet, sumUpLamports, toAccountMetas, toArray, toCamelCase, toHex, toUnixTimestamp, transfer, validateNumbers, validateNumbersForInclusionProof, validateNumbersForNonInclusionProof, validateNumbersForProof, validateSameOwner, validateSufficientBalance, versionedEndpoint, wrapBigNumbersAsStrings };
|