@lightprotocol/stateless.js 0.20.2 → 0.20.3

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.
Files changed (74) hide show
  1. package/dist/cjs/browser/actions/common.d.ts +4 -1
  2. package/dist/cjs/browser/actions/compress.d.ts +14 -2
  3. package/dist/cjs/browser/actions/create-account.d.ts +27 -3
  4. package/dist/cjs/browser/actions/decompress.d.ts +14 -2
  5. package/dist/cjs/browser/actions/transfer.d.ts +15 -2
  6. package/dist/cjs/browser/constants.d.ts +30 -15
  7. package/dist/cjs/browser/errors.d.ts +40 -49
  8. package/dist/cjs/browser/idl.d.ts +45 -45
  9. package/dist/cjs/browser/index.cjs +9611 -1
  10. package/dist/cjs/browser/index.cjs.map +1 -1
  11. package/dist/cjs/browser/index.d.ts +0 -1
  12. package/dist/cjs/browser/instruction/pack-compressed-accounts.d.ts +24 -5
  13. package/dist/cjs/browser/programs/layout.d.ts +39 -17
  14. package/dist/cjs/browser/programs/system.d.ts +61 -10
  15. package/dist/cjs/browser/rpc-interface.d.ts +1127 -871
  16. package/dist/cjs/browser/rpc.d.ts +158 -34
  17. package/dist/cjs/browser/state/BN254.d.ts +9 -2
  18. package/dist/cjs/browser/state/compressed-account.d.ts +23 -6
  19. package/dist/cjs/browser/state/types.d.ts +1 -1
  20. package/dist/cjs/browser/test-helpers/merkle-tree/indexed-array.d.ts +18 -4
  21. package/dist/cjs/browser/test-helpers/merkle-tree/merkle-tree.d.ts +19 -6
  22. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +12 -3
  23. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +21 -5
  24. package/dist/cjs/browser/test-helpers/test-rpc/get-parsed-events.d.ts +14 -4
  25. package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +135 -31
  26. package/dist/cjs/browser/test-helpers/test-utils.d.ts +5 -1
  27. package/dist/cjs/browser/utils/address.d.ts +12 -3
  28. package/dist/cjs/browser/utils/airdrop.d.ts +14 -2
  29. package/dist/cjs/browser/utils/calculate-compute-unit-price.d.ts +4 -1
  30. package/dist/cjs/browser/utils/conversion.d.ts +9 -3
  31. package/dist/cjs/browser/utils/get-light-state-tree-info.d.ts +28 -4
  32. package/dist/cjs/browser/utils/parse-validity-proof.d.ts +3 -1
  33. package/dist/cjs/browser/utils/pipe.d.ts +4 -1
  34. package/dist/cjs/browser/utils/send-and-confirm.d.ts +42 -11
  35. package/dist/cjs/browser/utils/validation.d.ts +9 -2
  36. package/dist/cjs/node/actions/common.d.ts +4 -1
  37. package/dist/cjs/node/actions/compress.d.ts +14 -2
  38. package/dist/cjs/node/actions/create-account.d.ts +27 -3
  39. package/dist/cjs/node/actions/decompress.d.ts +14 -2
  40. package/dist/cjs/node/actions/transfer.d.ts +15 -2
  41. package/dist/cjs/node/constants.d.ts +30 -15
  42. package/dist/cjs/node/errors.d.ts +40 -49
  43. package/dist/cjs/node/idl.d.ts +45 -45
  44. package/dist/cjs/node/index.cjs +8310 -1
  45. package/dist/cjs/node/index.cjs.map +1 -1
  46. package/dist/cjs/node/index.d.ts +0 -1
  47. package/dist/cjs/node/instruction/pack-compressed-accounts.d.ts +24 -5
  48. package/dist/cjs/node/programs/layout.d.ts +39 -17
  49. package/dist/cjs/node/programs/system.d.ts +61 -10
  50. package/dist/cjs/node/rpc-interface.d.ts +1127 -871
  51. package/dist/cjs/node/rpc.d.ts +158 -34
  52. package/dist/cjs/node/state/BN254.d.ts +9 -2
  53. package/dist/cjs/node/state/compressed-account.d.ts +23 -6
  54. package/dist/cjs/node/state/types.d.ts +1 -1
  55. package/dist/cjs/node/test-helpers/merkle-tree/indexed-array.d.ts +18 -4
  56. package/dist/cjs/node/test-helpers/merkle-tree/merkle-tree.d.ts +19 -6
  57. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-accounts.d.ts +12 -3
  58. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +21 -5
  59. package/dist/cjs/node/test-helpers/test-rpc/get-parsed-events.d.ts +14 -4
  60. package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +135 -31
  61. package/dist/cjs/node/test-helpers/test-utils.d.ts +5 -1
  62. package/dist/cjs/node/utils/address.d.ts +12 -3
  63. package/dist/cjs/node/utils/airdrop.d.ts +14 -2
  64. package/dist/cjs/node/utils/calculate-compute-unit-price.d.ts +4 -1
  65. package/dist/cjs/node/utils/conversion.d.ts +9 -3
  66. package/dist/cjs/node/utils/get-light-state-tree-info.d.ts +28 -4
  67. package/dist/cjs/node/utils/parse-validity-proof.d.ts +3 -1
  68. package/dist/cjs/node/utils/pipe.d.ts +4 -1
  69. package/dist/cjs/node/utils/send-and-confirm.d.ts +42 -11
  70. package/dist/cjs/node/utils/validation.d.ts +9 -2
  71. package/dist/types/index.d.ts +2111 -1141
  72. package/package.json +1 -2
  73. package/dist/cjs/browser/logger.d.ts +0 -1
  74. package/dist/cjs/node/logger.d.ts +0 -1
@@ -1,5 +1,23 @@
1
1
  import * as _solana_web3_js from '@solana/web3.js';
2
- import { PublicKey, Connection, Commitment, Keypair, TransactionInstruction, AddressLookupTableAccount, VersionedTransaction, ConfirmOptions, TransactionSignature, RpcResponseAndContext, SignatureResult, Signer, DataSlice, MemcmpFilter, ConnectionConfig, ParsedTransactionWithMeta, AccountMeta } from '@solana/web3.js';
2
+ import {
3
+ PublicKey,
4
+ Connection,
5
+ Commitment,
6
+ Keypair,
7
+ TransactionInstruction,
8
+ AddressLookupTableAccount,
9
+ VersionedTransaction,
10
+ ConfirmOptions,
11
+ TransactionSignature,
12
+ RpcResponseAndContext,
13
+ SignatureResult,
14
+ Signer,
15
+ DataSlice,
16
+ MemcmpFilter,
17
+ ConnectionConfig,
18
+ ParsedTransactionWithMeta,
19
+ AccountMeta,
20
+ } from '@solana/web3.js';
3
21
  import { Buffer as Buffer$1 } from 'buffer';
4
22
  import { Struct } from 'superstruct';
5
23
  import BN from 'bn.js';
@@ -13,13 +31,23 @@ import { Layout } from '@coral-xyz/borsh';
13
31
  * are used to from working with the web3.js PublicKey type.
14
32
  */
15
33
  type BN254 = BN;
16
- declare const bn: (number: string | number | BN | Buffer$1 | Uint8Array | number[], base?: number | "hex" | undefined, endian?: BN.Endianness | undefined) => BN;
34
+ declare const bn: (
35
+ number: string | number | BN | Buffer$1 | Uint8Array | number[],
36
+ base?: number | 'hex' | undefined,
37
+ endian?: BN.Endianness | undefined,
38
+ ) => BN;
17
39
  /** Create a bigint instance with <254-bit max size and base58 capabilities */
18
- declare const createBN254: (number: string | number | BN | Buffer$1 | Uint8Array | number[], base?: number | "hex" | "base58" | undefined) => BN254;
40
+ declare const createBN254: (
41
+ number: string | number | BN | Buffer$1 | Uint8Array | number[],
42
+ base?: number | 'hex' | 'base58' | undefined,
43
+ ) => BN254;
19
44
  /** Convert <254-bit bigint to Base58 string. */
20
45
  declare function encodeBN254toBase58(bigintNumber: BN): string;
21
46
 
22
- declare function deriveAddressSeed(seeds: Uint8Array[], programId: PublicKey): Uint8Array;
47
+ declare function deriveAddressSeed(
48
+ seeds: Uint8Array[],
49
+ programId: PublicKey,
50
+ ): Uint8Array;
23
51
  /**
24
52
  * Derive an address for a compressed account from a seed and an address Merkle
25
53
  * tree public key.
@@ -29,7 +57,10 @@ declare function deriveAddressSeed(seeds: Uint8Array[], programId: PublicKey): U
29
57
  * defaultTestStateTreeAccounts().addressTree
30
58
  * @returns Derived address
31
59
  */
32
- declare function deriveAddress(seed: Uint8Array, addressMerkleTreePubkey?: PublicKey): PublicKey;
60
+ declare function deriveAddress(
61
+ seed: Uint8Array,
62
+ addressMerkleTreePubkey?: PublicKey,
63
+ ): PublicKey;
33
64
  interface NewAddressParams {
34
65
  /**
35
66
  * Seed for the compressed account. Must be seed used to derive
@@ -77,17 +108,30 @@ interface NewAddressParamsPacked {
77
108
  * @param remainingAccounts Remaining accounts
78
109
  * @returns Packed new address params
79
110
  */
80
- declare function packNewAddressParams(newAddressParams: NewAddressParams[], remainingAccounts: PublicKey[]): {
111
+ declare function packNewAddressParams(
112
+ newAddressParams: NewAddressParams[],
113
+ remainingAccounts: PublicKey[],
114
+ ): {
81
115
  newAddressParamsPacked: NewAddressParamsPacked[];
82
116
  remainingAccounts: PublicKey[];
83
117
  };
84
118
 
85
- declare function airdropSol({ connection, lamports, recipientPublicKey, }: {
119
+ declare function airdropSol({
120
+ connection,
121
+ lamports,
122
+ recipientPublicKey,
123
+ }: {
86
124
  connection: Connection;
87
125
  lamports: number;
88
126
  recipientPublicKey: PublicKey;
89
127
  }): Promise<string>;
90
- declare function confirmTransaction(connection: Connection, signature: string, confirmation?: Commitment): Promise<_solana_web3_js.RpcResponseAndContext<_solana_web3_js.SignatureResult>>;
128
+ declare function confirmTransaction(
129
+ connection: Connection,
130
+ signature: string,
131
+ confirmation?: Commitment,
132
+ ): Promise<
133
+ _solana_web3_js.RpcResponseAndContext<_solana_web3_js.SignatureResult>
134
+ >;
91
135
 
92
136
  declare function byteArrayToKeypair(byteArray: number[]): Keypair;
93
137
  /**
@@ -104,7 +148,9 @@ declare const bufToDecStr: (buf: Buffer$1) => string;
104
148
  *
105
149
  * @deprecated Use `hashvToBn254FieldSizeBe` instead.
106
150
  */
107
- declare function hashToBn254FieldSizeBe(bytes: Buffer$1): [Buffer$1, number] | null;
151
+ declare function hashToBn254FieldSizeBe(
152
+ bytes: Buffer$1,
153
+ ): [Buffer$1, number] | null;
108
154
  /**
109
155
  * Hash the provided `bytes` with Keccak256 and ensure that the result fits in
110
156
  * the BN254 prime field by truncating the resulting hash to 31 bytes.
@@ -116,7 +162,9 @@ declare function hashToBn254FieldSizeBe(bytes: Buffer$1): [Buffer$1, number] | n
116
162
  declare function hashvToBn254FieldSizeBe(bytes: Uint8Array[]): Uint8Array;
117
163
  /** Mutates array in place */
118
164
  declare function pushUniqueItems<T>(items: T[], map: T[]): void;
119
- declare function toCamelCase(obj: Array<any> | unknown | any): Array<any> | unknown | any;
165
+ declare function toCamelCase(
166
+ obj: Array<any> | unknown | any,
167
+ ): Array<any> | unknown | any;
120
168
 
121
169
  interface GnarkProofJson {
122
170
  ar: string[];
@@ -138,7 +186,10 @@ declare function proofFromJsonStruct(json: GnarkProofJson): ProofABC;
138
186
  declare function negateAndCompressProof(proof: ProofABC): CompressedProof;
139
187
 
140
188
  /** pipe function */
141
- declare function pipe<T, R>(initialFunction: (arg: T) => R, ...functions: ((arg: R) => R)[]): (initialValue: T) => R;
189
+ declare function pipe<T, R>(
190
+ initialFunction: (arg: T) => R,
191
+ ...functions: ((arg: R) => R)[]
192
+ ): (initialValue: T) => R;
142
193
 
143
194
  /**
144
195
  * Builds a versioned Transaction from instructions.
@@ -150,7 +201,12 @@ declare function pipe<T, R>(initialFunction: (arg: T) => R, ...functions: ((arg:
150
201
  *
151
202
  * @return VersionedTransaction
152
203
  */
153
- declare function buildTx(instructions: TransactionInstruction[], payerPublicKey: PublicKey, blockhash: string, lookupTableAccounts?: AddressLookupTableAccount[]): VersionedTransaction;
204
+ declare function buildTx(
205
+ instructions: TransactionInstruction[],
206
+ payerPublicKey: PublicKey,
207
+ blockhash: string,
208
+ lookupTableAccounts?: AddressLookupTableAccount[],
209
+ ): VersionedTransaction;
154
210
  /**
155
211
  * Sends a versioned transaction and confirms it.
156
212
  *
@@ -161,10 +217,15 @@ declare function buildTx(instructions: TransactionInstruction[], payerPublicKey:
161
217
  *
162
218
  * @return TransactionSignature
163
219
  */
164
- declare function sendAndConfirmTx(rpc: Rpc, tx: VersionedTransaction, confirmOptions?: ConfirmOptions, blockHashCtx?: {
165
- blockhash: string;
166
- lastValidBlockHeight: number;
167
- }): Promise<TransactionSignature>;
220
+ declare function sendAndConfirmTx(
221
+ rpc: Rpc,
222
+ tx: VersionedTransaction,
223
+ confirmOptions?: ConfirmOptions,
224
+ blockHashCtx?: {
225
+ blockhash: string;
226
+ lastValidBlockHeight: number;
227
+ },
228
+ ): Promise<TransactionSignature>;
168
229
  /**
169
230
  * Confirms a transaction with a given txId.
170
231
  *
@@ -174,10 +235,15 @@ declare function sendAndConfirmTx(rpc: Rpc, tx: VersionedTransaction, confirmOpt
174
235
  * @param blockHashCtx blockhash context for confirmation
175
236
  * @return SignatureResult
176
237
  */
177
- declare function confirmTx(rpc: Rpc, txId: string, confirmOptions?: ConfirmOptions, blockHashCtx?: {
178
- blockhash: string;
179
- lastValidBlockHeight: number;
180
- }): Promise<RpcResponseAndContext<SignatureResult>>;
238
+ declare function confirmTx(
239
+ rpc: Rpc,
240
+ txId: string,
241
+ confirmOptions?: ConfirmOptions,
242
+ blockHashCtx?: {
243
+ blockhash: string;
244
+ lastValidBlockHeight: number;
245
+ },
246
+ ): Promise<RpcResponseAndContext<SignatureResult>>;
181
247
  /**
182
248
  * Builds a versioned Transaction from instructions and signs it.
183
249
  *
@@ -189,12 +255,22 @@ declare function confirmTx(rpc: Rpc, txId: string, confirmOptions?: ConfirmOptio
189
255
  * @param lookupTableAccounts lookup table accounts to include in the
190
256
  * transaction
191
257
  */
192
- declare function buildAndSignTx(instructions: TransactionInstruction[], payer: Signer, blockhash: string, additionalSigners?: Signer[], lookupTableAccounts?: AddressLookupTableAccount[]): VersionedTransaction;
258
+ declare function buildAndSignTx(
259
+ instructions: TransactionInstruction[],
260
+ payer: Signer,
261
+ blockhash: string,
262
+ additionalSigners?: Signer[],
263
+ lookupTableAccounts?: AddressLookupTableAccount[],
264
+ ): VersionedTransaction;
193
265
 
194
266
  declare function sleep(ms: number): Promise<void>;
195
267
 
196
268
  declare const validateSufficientBalance: (balance: BN) => void;
197
- declare const validateSameOwner: (compressedAccounts: CompressedAccount[] | CompressedAccountWithMerkleContext[]) => void;
269
+ declare const validateSameOwner: (
270
+ compressedAccounts:
271
+ | CompressedAccount[]
272
+ | CompressedAccountWithMerkleContext[],
273
+ ) => void;
198
274
 
199
275
  /**
200
276
  * @param targetLamports - Target priority fee in lamports
@@ -202,7 +278,10 @@ declare const validateSameOwner: (compressedAccounts: CompressedAccount[] | Comp
202
278
  * @returns microLamports per compute unit (use in
203
279
  * `ComputeBudgetProgram.setComputeUnitPrice`)
204
280
  */
205
- declare function calculateComputeUnitPrice(targetLamports: number, computeUnits: number): number;
281
+ declare function calculateComputeUnitPrice(
282
+ targetLamports: number,
283
+ computeUnits: number,
284
+ ): number;
206
285
 
207
286
  /**
208
287
  * Create two lookup tables storing all public state tree and queue addresses
@@ -214,7 +293,12 @@ declare function calculateComputeUnitPrice(targetLamports: number, computeUnits:
214
293
  * @param authority - Keypair of the authority
215
294
  * @param recentSlot - Slot of the recent block
216
295
  */
217
- declare function createStateTreeLookupTable({ connection, payer, authority, recentSlot, }: {
296
+ declare function createStateTreeLookupTable({
297
+ connection,
298
+ payer,
299
+ authority,
300
+ recentSlot,
301
+ }: {
218
302
  connection: Connection;
219
303
  payer: Keypair;
220
304
  authority: Keypair;
@@ -234,7 +318,15 @@ declare function createStateTreeLookupTable({ connection, payer, authority, rece
234
318
  * @param payer - Keypair of the payer
235
319
  * @param authority - Keypair of the authority
236
320
  */
237
- declare function extendStateTreeLookupTable({ connection, tableAddress, newStateTreeAddresses, newQueueAddresses, newCpiContextAddresses, payer, authority, }: {
321
+ declare function extendStateTreeLookupTable({
322
+ connection,
323
+ tableAddress,
324
+ newStateTreeAddresses,
325
+ newQueueAddresses,
326
+ newCpiContextAddresses,
327
+ payer,
328
+ authority,
329
+ }: {
238
330
  connection: Connection;
239
331
  tableAddress: PublicKey;
240
332
  newStateTreeAddresses: PublicKey[];
@@ -259,7 +351,14 @@ declare function extendStateTreeLookupTable({ connection, tableAddress, newState
259
351
  * @param payer - Keypair of the payer
260
352
  * @param authority - Keypair of the authority
261
353
  */
262
- declare function nullifyLookupTable({ connection, fullStateTreeAddress, nullifyTableAddress, stateTreeLookupTableAddress, payer, authority, }: {
354
+ declare function nullifyLookupTable({
355
+ connection,
356
+ fullStateTreeAddress,
357
+ nullifyTableAddress,
358
+ stateTreeLookupTableAddress,
359
+ payer,
360
+ authority,
361
+ }: {
263
362
  connection: Connection;
264
363
  fullStateTreeAddress: PublicKey;
265
364
  nullifyTableAddress: PublicKey;
@@ -273,7 +372,11 @@ declare function nullifyLookupTable({ connection, fullStateTreeAddress, nullifyT
273
372
  * Get most recent , active state tree data
274
373
  * we store in lookup table for each public state tree
275
374
  */
276
- declare function getLightStateTreeInfo({ connection, stateTreeLookupTableAddress, nullifyTableAddress, }: {
375
+ declare function getLightStateTreeInfo({
376
+ connection,
377
+ stateTreeLookupTableAddress,
378
+ nullifyTableAddress,
379
+ }: {
277
380
  connection: Connection;
278
381
  stateTreeLookupTableAddress: PublicKey;
279
382
  nullifyTableAddress: PublicKey;
@@ -295,7 +398,7 @@ declare enum TreeType {
295
398
  /**
296
399
  * v2 address merkle tree
297
400
  */
298
- BatchedAddress = 3
401
+ BatchedAddress = 3,
299
402
  }
300
403
  type ActiveTreeBundle = {
301
404
  tree: PublicKey;
@@ -411,9 +514,10 @@ type TokenData$1 = {
411
514
  tlv: Buffer$1 | null;
412
515
  };
413
516
 
414
- type CompressedAccountWithMerkleContext = CompressedAccount & MerkleContext & {
415
- readOnly: boolean;
416
- };
517
+ type CompressedAccountWithMerkleContext = CompressedAccount &
518
+ MerkleContext & {
519
+ readOnly: boolean;
520
+ };
417
521
  /**
418
522
  * Context for compressed account inserted into a state Merkle tree
419
523
  * */
@@ -435,9 +539,25 @@ type MerkleContextWithMerkleProof = MerkleContext & {
435
539
  /** Current root */
436
540
  root: BN254;
437
541
  };
438
- declare const createCompressedAccount: (owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccount;
439
- declare const createCompressedAccountWithMerkleContext: (merkleContext: MerkleContext, owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccountWithMerkleContext;
440
- declare const createMerkleContext: (merkleTree: PublicKey, nullifierQueue: PublicKey, hash: number[], leafIndex: number) => MerkleContext;
542
+ declare const createCompressedAccount: (
543
+ owner: PublicKey,
544
+ lamports?: BN,
545
+ data?: CompressedAccountData,
546
+ address?: number[],
547
+ ) => CompressedAccount;
548
+ declare const createCompressedAccountWithMerkleContext: (
549
+ merkleContext: MerkleContext,
550
+ owner: PublicKey,
551
+ lamports?: BN,
552
+ data?: CompressedAccountData,
553
+ address?: number[],
554
+ ) => CompressedAccountWithMerkleContext;
555
+ declare const createMerkleContext: (
556
+ merkleTree: PublicKey,
557
+ nullifierQueue: PublicKey,
558
+ hash: number[],
559
+ leafIndex: number,
560
+ ) => MerkleContext;
441
561
 
442
562
  interface LatestNonVotingSignatures {
443
563
  context: {
@@ -581,11 +701,15 @@ type WithCursor<T> = {
581
701
  /**
582
702
  * @internal
583
703
  */
584
- declare function createRpcResult<T, U>(result: Struct<T, U>): Struct<RpcResult<T>, null>;
704
+ declare function createRpcResult<T, U>(
705
+ result: Struct<T, U>,
706
+ ): Struct<RpcResult<T>, null>;
585
707
  /**
586
708
  * @internal
587
709
  */
588
- declare function jsonRpcResult<T, U>(schema: Struct<T, U>): Struct<RpcResult<T>, null>;
710
+ declare function jsonRpcResult<T, U>(
711
+ schema: Struct<T, U>,
712
+ ): Struct<RpcResult<T>, null>;
589
713
  type WithRpcContext<T> = {
590
714
  context: {
591
715
  slot: number;
@@ -595,165 +719,14 @@ type WithRpcContext<T> = {
595
719
  /**
596
720
  * @internal
597
721
  */
598
- declare function jsonRpcResultAndContext<T, U>(value: Struct<T, U>): Struct<RpcResult<WithRpcContext<T>>, null>;
599
- /**
600
- * @internal
601
- */
602
- declare const CompressedAccountResult: Struct<{
603
- lamports: BN;
604
- data: {
605
- data: string;
606
- dataHash: BN;
607
- discriminator: BN;
608
- } | null;
609
- address: number[] | null;
610
- hash: BN;
611
- owner: PublicKey;
612
- leafIndex: number;
613
- tree: PublicKey;
614
- seq: BN | null;
615
- slotCreated: BN;
616
- }, {
617
- address: Struct<number[] | null, null>;
618
- hash: Struct<BN, null>;
619
- data: Struct<{
620
- data: string;
621
- dataHash: BN;
622
- discriminator: BN;
623
- } | null, {
624
- data: Struct<string, null>;
625
- dataHash: Struct<BN, null>;
626
- discriminator: Struct<BN, null>;
627
- }>;
628
- lamports: Struct<BN, null>;
629
- owner: Struct<PublicKey, null>;
630
- leafIndex: Struct<number, null>;
631
- tree: Struct<PublicKey, null>;
632
- seq: Struct<BN | null, null>;
633
- slotCreated: Struct<BN, null>;
634
- }>;
635
- declare const TokenDataResult: Struct<{
636
- owner: PublicKey;
637
- mint: PublicKey;
638
- amount: BN;
639
- delegate: PublicKey | null;
640
- state: string;
641
- }, {
642
- mint: Struct<PublicKey, null>;
643
- owner: Struct<PublicKey, null>;
644
- amount: Struct<BN, null>;
645
- delegate: Struct<PublicKey | null, null>;
646
- state: Struct<string, null>;
647
- }>;
648
- /**
649
- * @internal
650
- */
651
- declare const CompressedTokenAccountResult: Struct<{
652
- tokenData: {
653
- owner: PublicKey;
654
- mint: PublicKey;
655
- amount: BN;
656
- delegate: PublicKey | null;
657
- state: string;
658
- };
659
- account: {
660
- lamports: BN;
661
- data: {
662
- data: string;
663
- dataHash: BN;
664
- discriminator: BN;
665
- } | null;
666
- address: number[] | null;
667
- hash: BN;
668
- owner: PublicKey;
669
- leafIndex: number;
670
- tree: PublicKey;
671
- seq: BN | null;
672
- slotCreated: BN;
673
- };
674
- }, {
675
- tokenData: Struct<{
676
- owner: PublicKey;
677
- mint: PublicKey;
678
- amount: BN;
679
- delegate: PublicKey | null;
680
- state: string;
681
- }, {
682
- mint: Struct<PublicKey, null>;
683
- owner: Struct<PublicKey, null>;
684
- amount: Struct<BN, null>;
685
- delegate: Struct<PublicKey | null, null>;
686
- state: Struct<string, null>;
687
- }>;
688
- account: Struct<{
689
- lamports: BN;
690
- data: {
691
- data: string;
692
- dataHash: BN;
693
- discriminator: BN;
694
- } | null;
695
- address: number[] | null;
696
- hash: BN;
697
- owner: PublicKey;
698
- leafIndex: number;
699
- tree: PublicKey;
700
- seq: BN | null;
701
- slotCreated: BN;
702
- }, {
703
- address: Struct<number[] | null, null>;
704
- hash: Struct<BN, null>;
705
- data: Struct<{
706
- data: string;
707
- dataHash: BN;
708
- discriminator: BN;
709
- } | null, {
710
- data: Struct<string, null>;
711
- dataHash: Struct<BN, null>;
712
- discriminator: Struct<BN, null>;
713
- }>;
714
- lamports: Struct<BN, null>;
715
- owner: Struct<PublicKey, null>;
716
- leafIndex: Struct<number, null>;
717
- tree: Struct<PublicKey, null>;
718
- seq: Struct<BN | null, null>;
719
- slotCreated: Struct<BN, null>;
720
- }>;
721
- }>;
722
+ declare function jsonRpcResultAndContext<T, U>(
723
+ value: Struct<T, U>,
724
+ ): Struct<RpcResult<WithRpcContext<T>>, null>;
722
725
  /**
723
726
  * @internal
724
727
  */
725
- declare const MultipleCompressedAccountsResult: Struct<{
726
- items: {
727
- lamports: BN;
728
- data: {
729
- data: string;
730
- dataHash: BN;
731
- discriminator: BN;
732
- } | null;
733
- address: number[] | null;
734
- hash: BN;
735
- owner: PublicKey;
736
- leafIndex: number;
737
- tree: PublicKey;
738
- seq: BN | null;
739
- slotCreated: BN;
740
- }[];
741
- }, {
742
- items: Struct<{
743
- lamports: BN;
744
- data: {
745
- data: string;
746
- dataHash: BN;
747
- discriminator: BN;
748
- } | null;
749
- address: number[] | null;
750
- hash: BN;
751
- owner: PublicKey;
752
- leafIndex: number;
753
- tree: PublicKey;
754
- seq: BN | null;
755
- slotCreated: BN;
756
- }[], Struct<{
728
+ declare const CompressedAccountResult: Struct<
729
+ {
757
730
  lamports: BN;
758
731
  data: {
759
732
  data: string;
@@ -767,101 +740,51 @@ declare const MultipleCompressedAccountsResult: Struct<{
767
740
  tree: PublicKey;
768
741
  seq: BN | null;
769
742
  slotCreated: BN;
770
- }, {
743
+ },
744
+ {
771
745
  address: Struct<number[] | null, null>;
772
746
  hash: Struct<BN, null>;
773
- data: Struct<{
774
- data: string;
775
- dataHash: BN;
776
- discriminator: BN;
777
- } | null, {
778
- data: Struct<string, null>;
779
- dataHash: Struct<BN, null>;
780
- discriminator: Struct<BN, null>;
781
- }>;
747
+ data: Struct<
748
+ {
749
+ data: string;
750
+ dataHash: BN;
751
+ discriminator: BN;
752
+ } | null,
753
+ {
754
+ data: Struct<string, null>;
755
+ dataHash: Struct<BN, null>;
756
+ discriminator: Struct<BN, null>;
757
+ }
758
+ >;
782
759
  lamports: Struct<BN, null>;
783
760
  owner: Struct<PublicKey, null>;
784
761
  leafIndex: Struct<number, null>;
785
762
  tree: Struct<PublicKey, null>;
786
763
  seq: Struct<BN | null, null>;
787
764
  slotCreated: Struct<BN, null>;
788
- }>>;
789
- }>;
790
- /**
791
- * @internal
792
- */
793
- declare const CompressedAccountsByOwnerResult: Struct<{
794
- items: {
795
- lamports: BN;
796
- data: {
797
- data: string;
798
- dataHash: BN;
799
- discriminator: BN;
800
- } | null;
801
- address: number[] | null;
802
- hash: BN;
803
- owner: PublicKey;
804
- leafIndex: number;
805
- tree: PublicKey;
806
- seq: BN | null;
807
- slotCreated: BN;
808
- }[];
809
- cursor: string | null;
810
- }, {
811
- items: Struct<{
812
- lamports: BN;
813
- data: {
814
- data: string;
815
- dataHash: BN;
816
- discriminator: BN;
817
- } | null;
818
- address: number[] | null;
819
- hash: BN;
820
- owner: PublicKey;
821
- leafIndex: number;
822
- tree: PublicKey;
823
- seq: BN | null;
824
- slotCreated: BN;
825
- }[], Struct<{
826
- lamports: BN;
827
- data: {
828
- data: string;
829
- dataHash: BN;
830
- discriminator: BN;
831
- } | null;
832
- address: number[] | null;
833
- hash: BN;
765
+ }
766
+ >;
767
+ declare const TokenDataResult: Struct<
768
+ {
834
769
  owner: PublicKey;
835
- leafIndex: number;
836
- tree: PublicKey;
837
- seq: BN | null;
838
- slotCreated: BN;
839
- }, {
840
- address: Struct<number[] | null, null>;
841
- hash: Struct<BN, null>;
842
- data: Struct<{
843
- data: string;
844
- dataHash: BN;
845
- discriminator: BN;
846
- } | null, {
847
- data: Struct<string, null>;
848
- dataHash: Struct<BN, null>;
849
- discriminator: Struct<BN, null>;
850
- }>;
851
- lamports: Struct<BN, null>;
770
+ mint: PublicKey;
771
+ amount: BN;
772
+ delegate: PublicKey | null;
773
+ state: string;
774
+ },
775
+ {
776
+ mint: Struct<PublicKey, null>;
852
777
  owner: Struct<PublicKey, null>;
853
- leafIndex: Struct<number, null>;
854
- tree: Struct<PublicKey, null>;
855
- seq: Struct<BN | null, null>;
856
- slotCreated: Struct<BN, null>;
857
- }>>;
858
- cursor: Struct<string | null, null>;
859
- }>;
778
+ amount: Struct<BN, null>;
779
+ delegate: Struct<PublicKey | null, null>;
780
+ state: Struct<string, null>;
781
+ }
782
+ >;
860
783
  /**
861
784
  * @internal
862
785
  */
863
- declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
864
- items: {
786
+ declare const CompressedTokenAccountResult: Struct<
787
+ {
865
788
  tokenData: {
866
789
  owner: PublicKey;
867
790
  mint: PublicKey;
@@ -884,18 +807,71 @@ declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
884
807
  seq: BN | null;
885
808
  slotCreated: BN;
886
809
  };
887
- }[];
888
- cursor: string | null;
889
- }, {
890
- items: Struct<{
891
- tokenData: {
892
- owner: PublicKey;
893
- mint: PublicKey;
894
- amount: BN;
895
- delegate: PublicKey | null;
896
- state: string;
897
- };
898
- account: {
810
+ },
811
+ {
812
+ tokenData: Struct<
813
+ {
814
+ owner: PublicKey;
815
+ mint: PublicKey;
816
+ amount: BN;
817
+ delegate: PublicKey | null;
818
+ state: string;
819
+ },
820
+ {
821
+ mint: Struct<PublicKey, null>;
822
+ owner: Struct<PublicKey, null>;
823
+ amount: Struct<BN, null>;
824
+ delegate: Struct<PublicKey | null, null>;
825
+ state: Struct<string, null>;
826
+ }
827
+ >;
828
+ account: Struct<
829
+ {
830
+ lamports: BN;
831
+ data: {
832
+ data: string;
833
+ dataHash: BN;
834
+ discriminator: BN;
835
+ } | null;
836
+ address: number[] | null;
837
+ hash: BN;
838
+ owner: PublicKey;
839
+ leafIndex: number;
840
+ tree: PublicKey;
841
+ seq: BN | null;
842
+ slotCreated: BN;
843
+ },
844
+ {
845
+ address: Struct<number[] | null, null>;
846
+ hash: Struct<BN, null>;
847
+ data: Struct<
848
+ {
849
+ data: string;
850
+ dataHash: BN;
851
+ discriminator: BN;
852
+ } | null,
853
+ {
854
+ data: Struct<string, null>;
855
+ dataHash: Struct<BN, null>;
856
+ discriminator: Struct<BN, null>;
857
+ }
858
+ >;
859
+ lamports: Struct<BN, null>;
860
+ owner: Struct<PublicKey, null>;
861
+ leafIndex: Struct<number, null>;
862
+ tree: Struct<PublicKey, null>;
863
+ seq: Struct<BN | null, null>;
864
+ slotCreated: Struct<BN, null>;
865
+ }
866
+ >;
867
+ }
868
+ >;
869
+ /**
870
+ * @internal
871
+ */
872
+ declare const MultipleCompressedAccountsResult: Struct<
873
+ {
874
+ items: {
899
875
  lamports: BN;
900
876
  data: {
901
877
  data: string;
@@ -909,588 +885,92 @@ declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
909
885
  tree: PublicKey;
910
886
  seq: BN | null;
911
887
  slotCreated: BN;
912
- };
913
- }[], Struct<{
914
- tokenData: {
915
- owner: PublicKey;
916
- mint: PublicKey;
917
- amount: BN;
918
- delegate: PublicKey | null;
919
- state: string;
920
- };
921
- account: {
888
+ }[];
889
+ },
890
+ {
891
+ items: Struct<
892
+ {
893
+ lamports: BN;
894
+ data: {
895
+ data: string;
896
+ dataHash: BN;
897
+ discriminator: BN;
898
+ } | null;
899
+ address: number[] | null;
900
+ hash: BN;
901
+ owner: PublicKey;
902
+ leafIndex: number;
903
+ tree: PublicKey;
904
+ seq: BN | null;
905
+ slotCreated: BN;
906
+ }[],
907
+ Struct<
908
+ {
909
+ lamports: BN;
910
+ data: {
911
+ data: string;
912
+ dataHash: BN;
913
+ discriminator: BN;
914
+ } | null;
915
+ address: number[] | null;
916
+ hash: BN;
917
+ owner: PublicKey;
918
+ leafIndex: number;
919
+ tree: PublicKey;
920
+ seq: BN | null;
921
+ slotCreated: BN;
922
+ },
923
+ {
924
+ address: Struct<number[] | null, null>;
925
+ hash: Struct<BN, null>;
926
+ data: Struct<
927
+ {
928
+ data: string;
929
+ dataHash: BN;
930
+ discriminator: BN;
931
+ } | null,
932
+ {
933
+ data: Struct<string, null>;
934
+ dataHash: Struct<BN, null>;
935
+ discriminator: Struct<BN, null>;
936
+ }
937
+ >;
938
+ lamports: Struct<BN, null>;
939
+ owner: Struct<PublicKey, null>;
940
+ leafIndex: Struct<number, null>;
941
+ tree: Struct<PublicKey, null>;
942
+ seq: Struct<BN | null, null>;
943
+ slotCreated: Struct<BN, null>;
944
+ }
945
+ >
946
+ >;
947
+ }
948
+ >;
949
+ /**
950
+ * @internal
951
+ */
952
+ declare const CompressedAccountsByOwnerResult: Struct<
953
+ {
954
+ items: {
922
955
  lamports: BN;
923
- data: {
924
- data: string;
925
- dataHash: BN;
926
- discriminator: BN;
927
- } | null;
928
- address: number[] | null;
929
- hash: BN;
930
- owner: PublicKey;
931
- leafIndex: number;
932
- tree: PublicKey;
933
- seq: BN | null;
934
- slotCreated: BN;
935
- };
936
- }, {
937
- tokenData: Struct<{
938
- owner: PublicKey;
939
- mint: PublicKey;
940
- amount: BN;
941
- delegate: PublicKey | null;
942
- state: string;
943
- }, {
944
- mint: Struct<PublicKey, null>;
945
- owner: Struct<PublicKey, null>;
946
- amount: Struct<BN, null>;
947
- delegate: Struct<PublicKey | null, null>;
948
- state: Struct<string, null>;
949
- }>;
950
- account: Struct<{
951
- lamports: BN;
952
- data: {
953
- data: string;
954
- dataHash: BN;
955
- discriminator: BN;
956
- } | null;
957
- address: number[] | null;
958
- hash: BN;
959
- owner: PublicKey;
960
- leafIndex: number;
961
- tree: PublicKey;
962
- seq: BN | null;
963
- slotCreated: BN;
964
- }, {
965
- address: Struct<number[] | null, null>;
966
- hash: Struct<BN, null>;
967
- data: Struct<{
968
- data: string;
969
- dataHash: BN;
970
- discriminator: BN;
971
- } | null, {
972
- data: Struct<string, null>;
973
- dataHash: Struct<BN, null>;
974
- discriminator: Struct<BN, null>;
975
- }>;
976
- lamports: Struct<BN, null>;
977
- owner: Struct<PublicKey, null>;
978
- leafIndex: Struct<number, null>;
979
- tree: Struct<PublicKey, null>;
980
- seq: Struct<BN | null, null>;
981
- slotCreated: Struct<BN, null>;
982
- }>;
983
- }>>;
984
- cursor: Struct<string | null, null>;
985
- }>;
986
- /**
987
- * @internal
988
- */
989
- declare const SlotResult: Struct<number, null>;
990
- /**
991
- * @internal
992
- */
993
- declare const HealthResult: Struct<string, null>;
994
- /**
995
- * @internal
996
- */
997
- declare const LatestNonVotingSignaturesResult: Struct<{
998
- items: {
999
- signature: string;
1000
- error: string | null;
1001
- slot: number;
1002
- blockTime: number;
1003
- }[];
1004
- }, {
1005
- items: Struct<{
1006
- signature: string;
1007
- error: string | null;
1008
- slot: number;
1009
- blockTime: number;
1010
- }[], Struct<{
1011
- signature: string;
1012
- error: string | null;
1013
- slot: number;
1014
- blockTime: number;
1015
- }, {
1016
- signature: Struct<string, null>;
1017
- slot: Struct<number, null>;
1018
- blockTime: Struct<number, null>;
1019
- error: Struct<string | null, null>;
1020
- }>>;
1021
- }>;
1022
- /**
1023
- * @internal
1024
- */
1025
- declare const LatestNonVotingSignaturesResultPaginated: Struct<{
1026
- items: {
1027
- signature: string;
1028
- slot: number;
1029
- blockTime: number;
1030
- }[];
1031
- cursor: string | null;
1032
- }, {
1033
- items: Struct<{
1034
- signature: string;
1035
- slot: number;
1036
- blockTime: number;
1037
- }[], Struct<{
1038
- signature: string;
1039
- slot: number;
1040
- blockTime: number;
1041
- }, {
1042
- signature: Struct<string, null>;
1043
- slot: Struct<number, null>;
1044
- blockTime: Struct<number, null>;
1045
- }>>;
1046
- cursor: Struct<string | null, null>;
1047
- }>;
1048
- /**
1049
- * @internal
1050
- */
1051
- declare const MerkeProofResult: Struct<{
1052
- root: BN;
1053
- hash: BN;
1054
- leafIndex: number;
1055
- merkleTree: PublicKey;
1056
- proof: BN[];
1057
- rootSeq: number;
1058
- }, {
1059
- hash: Struct<BN, null>;
1060
- leafIndex: Struct<number, null>;
1061
- merkleTree: Struct<PublicKey, null>;
1062
- proof: Struct<BN[], Struct<BN, null>>;
1063
- rootSeq: Struct<number, null>;
1064
- root: Struct<BN, null>;
1065
- }>;
1066
- /**
1067
- * @internal
1068
- */
1069
- declare const NewAddressProofResult: Struct<{
1070
- root: BN;
1071
- address: BN;
1072
- merkleTree: PublicKey;
1073
- proof: BN[];
1074
- rootSeq: number;
1075
- nextIndex: number;
1076
- lowerRangeAddress: BN;
1077
- higherRangeAddress: BN;
1078
- lowElementLeafIndex: number;
1079
- }, {
1080
- address: Struct<BN, null>;
1081
- nextIndex: Struct<number, null>;
1082
- merkleTree: Struct<PublicKey, null>;
1083
- proof: Struct<BN[], Struct<BN, null>>;
1084
- rootSeq: Struct<number, null>;
1085
- root: Struct<BN, null>;
1086
- lowerRangeAddress: Struct<BN, null>;
1087
- higherRangeAddress: Struct<BN, null>;
1088
- lowElementLeafIndex: Struct<number, null>;
1089
- }>;
1090
- /**
1091
- * @internal
1092
- */
1093
- declare const ValidityProofResult: Struct<{
1094
- compressedProof: {
1095
- a: number[];
1096
- b: number[];
1097
- c: number[];
1098
- };
1099
- leafIndices: number[];
1100
- leaves: BN[];
1101
- rootIndices: number[];
1102
- roots: BN[];
1103
- merkleTrees: PublicKey[];
1104
- }, {
1105
- compressedProof: Struct<{
1106
- a: number[];
1107
- b: number[];
1108
- c: number[];
1109
- }, {
1110
- a: Struct<number[], Struct<number, null>>;
1111
- b: Struct<number[], Struct<number, null>>;
1112
- c: Struct<number[], Struct<number, null>>;
1113
- }>;
1114
- leafIndices: Struct<number[], Struct<number, null>>;
1115
- leaves: Struct<BN[], Struct<BN, null>>;
1116
- rootIndices: Struct<number[], Struct<number, null>>;
1117
- roots: Struct<BN[], Struct<BN, null>>;
1118
- merkleTrees: Struct<PublicKey[], Struct<PublicKey, null>>;
1119
- }>;
1120
- /**
1121
- * @internal
1122
- */
1123
- declare const MultipleMerkleProofsResult: Struct<{
1124
- root: BN;
1125
- hash: BN;
1126
- leafIndex: number;
1127
- merkleTree: PublicKey;
1128
- proof: BN[];
1129
- rootSeq: number;
1130
- }[], Struct<{
1131
- root: BN;
1132
- hash: BN;
1133
- leafIndex: number;
1134
- merkleTree: PublicKey;
1135
- proof: BN[];
1136
- rootSeq: number;
1137
- }, {
1138
- hash: Struct<BN, null>;
1139
- leafIndex: Struct<number, null>;
1140
- merkleTree: Struct<PublicKey, null>;
1141
- proof: Struct<BN[], Struct<BN, null>>;
1142
- rootSeq: Struct<number, null>;
1143
- root: Struct<BN, null>;
1144
- }>>;
1145
- /**
1146
- * @internal
1147
- */
1148
- declare const BalanceResult: Struct<{
1149
- amount: BN;
1150
- }, {
1151
- amount: Struct<BN, null>;
1152
- }>;
1153
- declare const NativeBalanceResult: Struct<BN, null>;
1154
- declare const TokenBalanceResult: Struct<{
1155
- mint: PublicKey;
1156
- balance: BN;
1157
- }, {
1158
- balance: Struct<BN, null>;
1159
- mint: Struct<PublicKey, null>;
1160
- }>;
1161
- declare const TokenBalanceListResult: Struct<{
1162
- cursor: string | null;
1163
- tokenBalances: {
1164
- mint: PublicKey;
1165
- balance: BN;
1166
- }[];
1167
- }, {
1168
- tokenBalances: Struct<{
1169
- mint: PublicKey;
1170
- balance: BN;
1171
- }[], Struct<{
1172
- mint: PublicKey;
1173
- balance: BN;
1174
- }, {
1175
- balance: Struct<BN, null>;
1176
- mint: Struct<PublicKey, null>;
1177
- }>>;
1178
- cursor: Struct<string | null, null>;
1179
- }>;
1180
- declare const TokenBalanceListResultV2: Struct<{
1181
- items: {
1182
- mint: PublicKey;
1183
- balance: BN;
1184
- }[];
1185
- cursor: string | null;
1186
- }, {
1187
- items: Struct<{
1188
- mint: PublicKey;
1189
- balance: BN;
1190
- }[], Struct<{
1191
- mint: PublicKey;
1192
- balance: BN;
1193
- }, {
1194
- balance: Struct<BN, null>;
1195
- mint: Struct<PublicKey, null>;
1196
- }>>;
1197
- cursor: Struct<string | null, null>;
1198
- }>;
1199
- declare const CompressedMintTokenHoldersResult: Struct<{
1200
- items: {
1201
- owner: PublicKey;
1202
- balance: BN;
1203
- }[];
1204
- cursor: string | null;
1205
- }, {
1206
- cursor: Struct<string | null, null>;
1207
- items: Struct<{
1208
- owner: PublicKey;
1209
- balance: BN;
1210
- }[], Struct<{
1211
- owner: PublicKey;
1212
- balance: BN;
1213
- }, {
1214
- balance: Struct<BN, null>;
1215
- owner: Struct<PublicKey, null>;
1216
- }>>;
1217
- }>;
1218
- declare const AccountProofResult: Struct<{
1219
- root: number[];
1220
- hash: number[];
1221
- proof: number[][];
1222
- }, {
1223
- hash: Struct<number[], Struct<number, null>>;
1224
- root: Struct<number[], Struct<number, null>>;
1225
- proof: Struct<number[][], Struct<number[], Struct<number, null>>>;
1226
- }>;
1227
- declare const toUnixTimestamp: (blockTime: string) => number;
1228
- declare const SignatureListResult: Struct<{
1229
- items: {
1230
- signature: string;
1231
- slot: number;
1232
- blockTime: number;
1233
- }[];
1234
- }, {
1235
- items: Struct<{
1236
- signature: string;
1237
- slot: number;
1238
- blockTime: number;
1239
- }[], Struct<{
1240
- signature: string;
1241
- slot: number;
1242
- blockTime: number;
1243
- }, {
1244
- blockTime: Struct<number, null>;
1245
- signature: Struct<string, null>;
1246
- slot: Struct<number, null>;
1247
- }>>;
1248
- }>;
1249
- declare const SignatureListWithCursorResult: Struct<{
1250
- items: {
1251
- signature: string;
1252
- slot: number;
1253
- blockTime: number;
1254
- }[];
1255
- cursor: string | null;
1256
- }, {
1257
- items: Struct<{
1258
- signature: string;
1259
- slot: number;
1260
- blockTime: number;
1261
- }[], Struct<{
1262
- signature: string;
1263
- slot: number;
1264
- blockTime: number;
1265
- }, {
1266
- blockTime: Struct<number, null>;
1267
- signature: Struct<string, null>;
1268
- slot: Struct<number, null>;
1269
- }>>;
1270
- cursor: Struct<string | null, null>;
1271
- }>;
1272
- declare const CompressedTransactionResult: Struct<{
1273
- compressionInfo: {
1274
- closedAccounts: {
1275
- account: {
1276
- lamports: BN;
1277
- data: {
1278
- data: string;
1279
- dataHash: BN;
1280
- discriminator: BN;
1281
- } | null;
1282
- address: number[] | null;
1283
- hash: BN;
1284
- owner: PublicKey;
1285
- leafIndex: number;
1286
- tree: PublicKey;
1287
- seq: BN | null;
1288
- slotCreated: BN;
1289
- };
1290
- optionalTokenData: {
1291
- owner: PublicKey;
1292
- mint: PublicKey;
1293
- amount: BN;
1294
- delegate: PublicKey | null;
1295
- state: string;
1296
- } | null;
1297
- }[];
1298
- openedAccounts: {
1299
- account: {
1300
- lamports: BN;
1301
- data: {
1302
- data: string;
1303
- dataHash: BN;
1304
- discriminator: BN;
1305
- } | null;
1306
- address: number[] | null;
1307
- hash: BN;
1308
- owner: PublicKey;
1309
- leafIndex: number;
1310
- tree: PublicKey;
1311
- seq: BN | null;
1312
- slotCreated: BN;
1313
- };
1314
- optionalTokenData: {
1315
- owner: PublicKey;
1316
- mint: PublicKey;
1317
- amount: BN;
1318
- delegate: PublicKey | null;
1319
- state: string;
1320
- } | null;
1321
- }[];
1322
- };
1323
- transaction?: any;
1324
- }, {
1325
- compressionInfo: Struct<{
1326
- closedAccounts: {
1327
- account: {
1328
- lamports: BN;
1329
- data: {
1330
- data: string;
1331
- dataHash: BN;
1332
- discriminator: BN;
1333
- } | null;
1334
- address: number[] | null;
1335
- hash: BN;
1336
- owner: PublicKey;
1337
- leafIndex: number;
1338
- tree: PublicKey;
1339
- seq: BN | null;
1340
- slotCreated: BN;
1341
- };
1342
- optionalTokenData: {
1343
- owner: PublicKey;
1344
- mint: PublicKey;
1345
- amount: BN;
1346
- delegate: PublicKey | null;
1347
- state: string;
1348
- } | null;
1349
- }[];
1350
- openedAccounts: {
1351
- account: {
1352
- lamports: BN;
1353
- data: {
1354
- data: string;
1355
- dataHash: BN;
1356
- discriminator: BN;
1357
- } | null;
1358
- address: number[] | null;
1359
- hash: BN;
1360
- owner: PublicKey;
1361
- leafIndex: number;
1362
- tree: PublicKey;
1363
- seq: BN | null;
1364
- slotCreated: BN;
1365
- };
1366
- optionalTokenData: {
1367
- owner: PublicKey;
1368
- mint: PublicKey;
1369
- amount: BN;
1370
- delegate: PublicKey | null;
1371
- state: string;
1372
- } | null;
1373
- }[];
1374
- }, {
1375
- closedAccounts: Struct<{
1376
- account: {
1377
- lamports: BN;
1378
- data: {
1379
- data: string;
1380
- dataHash: BN;
1381
- discriminator: BN;
1382
- } | null;
1383
- address: number[] | null;
1384
- hash: BN;
1385
- owner: PublicKey;
1386
- leafIndex: number;
1387
- tree: PublicKey;
1388
- seq: BN | null;
1389
- slotCreated: BN;
1390
- };
1391
- optionalTokenData: {
1392
- owner: PublicKey;
1393
- mint: PublicKey;
1394
- amount: BN;
1395
- delegate: PublicKey | null;
1396
- state: string;
1397
- } | null;
1398
- }[], Struct<{
1399
- account: {
1400
- lamports: BN;
1401
- data: {
1402
- data: string;
1403
- dataHash: BN;
1404
- discriminator: BN;
1405
- } | null;
1406
- address: number[] | null;
1407
- hash: BN;
1408
- owner: PublicKey;
1409
- leafIndex: number;
1410
- tree: PublicKey;
1411
- seq: BN | null;
1412
- slotCreated: BN;
1413
- };
1414
- optionalTokenData: {
1415
- owner: PublicKey;
1416
- mint: PublicKey;
1417
- amount: BN;
1418
- delegate: PublicKey | null;
1419
- state: string;
1420
- } | null;
1421
- }, {
1422
- account: Struct<{
1423
- lamports: BN;
1424
- data: {
1425
- data: string;
1426
- dataHash: BN;
1427
- discriminator: BN;
1428
- } | null;
1429
- address: number[] | null;
1430
- hash: BN;
1431
- owner: PublicKey;
1432
- leafIndex: number;
1433
- tree: PublicKey;
1434
- seq: BN | null;
1435
- slotCreated: BN;
1436
- }, {
1437
- address: Struct<number[] | null, null>;
1438
- hash: Struct<BN, null>;
1439
- data: Struct<{
1440
- data: string;
1441
- dataHash: BN;
1442
- discriminator: BN;
1443
- } | null, {
1444
- data: Struct<string, null>;
1445
- dataHash: Struct<BN, null>;
1446
- discriminator: Struct<BN, null>;
1447
- }>;
1448
- lamports: Struct<BN, null>;
1449
- owner: Struct<PublicKey, null>;
1450
- leafIndex: Struct<number, null>;
1451
- tree: Struct<PublicKey, null>;
1452
- seq: Struct<BN | null, null>;
1453
- slotCreated: Struct<BN, null>;
1454
- }>;
1455
- optionalTokenData: Struct<{
1456
- owner: PublicKey;
1457
- mint: PublicKey;
1458
- amount: BN;
1459
- delegate: PublicKey | null;
1460
- state: string;
1461
- } | null, {
1462
- mint: Struct<PublicKey, null>;
1463
- owner: Struct<PublicKey, null>;
1464
- amount: Struct<BN, null>;
1465
- delegate: Struct<PublicKey | null, null>;
1466
- state: Struct<string, null>;
1467
- }>;
1468
- }>>;
1469
- openedAccounts: Struct<{
1470
- account: {
1471
- lamports: BN;
1472
- data: {
1473
- data: string;
1474
- dataHash: BN;
1475
- discriminator: BN;
1476
- } | null;
1477
- address: number[] | null;
1478
- hash: BN;
1479
- owner: PublicKey;
1480
- leafIndex: number;
1481
- tree: PublicKey;
1482
- seq: BN | null;
1483
- slotCreated: BN;
1484
- };
1485
- optionalTokenData: {
1486
- owner: PublicKey;
1487
- mint: PublicKey;
1488
- amount: BN;
1489
- delegate: PublicKey | null;
1490
- state: string;
956
+ data: {
957
+ data: string;
958
+ dataHash: BN;
959
+ discriminator: BN;
1491
960
  } | null;
1492
- }[], Struct<{
1493
- account: {
961
+ address: number[] | null;
962
+ hash: BN;
963
+ owner: PublicKey;
964
+ leafIndex: number;
965
+ tree: PublicKey;
966
+ seq: BN | null;
967
+ slotCreated: BN;
968
+ }[];
969
+ cursor: string | null;
970
+ },
971
+ {
972
+ items: Struct<
973
+ {
1494
974
  lamports: BN;
1495
975
  data: {
1496
976
  data: string;
@@ -1504,16 +984,64 @@ declare const CompressedTransactionResult: Struct<{
1504
984
  tree: PublicKey;
1505
985
  seq: BN | null;
1506
986
  slotCreated: BN;
1507
- };
1508
- optionalTokenData: {
987
+ }[],
988
+ Struct<
989
+ {
990
+ lamports: BN;
991
+ data: {
992
+ data: string;
993
+ dataHash: BN;
994
+ discriminator: BN;
995
+ } | null;
996
+ address: number[] | null;
997
+ hash: BN;
998
+ owner: PublicKey;
999
+ leafIndex: number;
1000
+ tree: PublicKey;
1001
+ seq: BN | null;
1002
+ slotCreated: BN;
1003
+ },
1004
+ {
1005
+ address: Struct<number[] | null, null>;
1006
+ hash: Struct<BN, null>;
1007
+ data: Struct<
1008
+ {
1009
+ data: string;
1010
+ dataHash: BN;
1011
+ discriminator: BN;
1012
+ } | null,
1013
+ {
1014
+ data: Struct<string, null>;
1015
+ dataHash: Struct<BN, null>;
1016
+ discriminator: Struct<BN, null>;
1017
+ }
1018
+ >;
1019
+ lamports: Struct<BN, null>;
1020
+ owner: Struct<PublicKey, null>;
1021
+ leafIndex: Struct<number, null>;
1022
+ tree: Struct<PublicKey, null>;
1023
+ seq: Struct<BN | null, null>;
1024
+ slotCreated: Struct<BN, null>;
1025
+ }
1026
+ >
1027
+ >;
1028
+ cursor: Struct<string | null, null>;
1029
+ }
1030
+ >;
1031
+ /**
1032
+ * @internal
1033
+ */
1034
+ declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<
1035
+ {
1036
+ items: {
1037
+ tokenData: {
1509
1038
  owner: PublicKey;
1510
1039
  mint: PublicKey;
1511
1040
  amount: BN;
1512
1041
  delegate: PublicKey | null;
1513
1042
  state: string;
1514
- } | null;
1515
- }, {
1516
- account: Struct<{
1043
+ };
1044
+ account: {
1517
1045
  lamports: BN;
1518
1046
  data: {
1519
1047
  data: string;
@@ -1527,68 +1055,910 @@ declare const CompressedTransactionResult: Struct<{
1527
1055
  tree: PublicKey;
1528
1056
  seq: BN | null;
1529
1057
  slotCreated: BN;
1530
- }, {
1531
- address: Struct<number[] | null, null>;
1532
- hash: Struct<BN, null>;
1533
- data: Struct<{
1534
- data: string;
1535
- dataHash: BN;
1536
- discriminator: BN;
1537
- } | null, {
1538
- data: Struct<string, null>;
1539
- dataHash: Struct<BN, null>;
1540
- discriminator: Struct<BN, null>;
1541
- }>;
1542
- lamports: Struct<BN, null>;
1543
- owner: Struct<PublicKey, null>;
1544
- leafIndex: Struct<number, null>;
1545
- tree: Struct<PublicKey, null>;
1546
- seq: Struct<BN | null, null>;
1547
- slotCreated: Struct<BN, null>;
1548
- }>;
1549
- optionalTokenData: Struct<{
1550
- owner: PublicKey;
1058
+ };
1059
+ }[];
1060
+ cursor: string | null;
1061
+ },
1062
+ {
1063
+ items: Struct<
1064
+ {
1065
+ tokenData: {
1066
+ owner: PublicKey;
1067
+ mint: PublicKey;
1068
+ amount: BN;
1069
+ delegate: PublicKey | null;
1070
+ state: string;
1071
+ };
1072
+ account: {
1073
+ lamports: BN;
1074
+ data: {
1075
+ data: string;
1076
+ dataHash: BN;
1077
+ discriminator: BN;
1078
+ } | null;
1079
+ address: number[] | null;
1080
+ hash: BN;
1081
+ owner: PublicKey;
1082
+ leafIndex: number;
1083
+ tree: PublicKey;
1084
+ seq: BN | null;
1085
+ slotCreated: BN;
1086
+ };
1087
+ }[],
1088
+ Struct<
1089
+ {
1090
+ tokenData: {
1091
+ owner: PublicKey;
1092
+ mint: PublicKey;
1093
+ amount: BN;
1094
+ delegate: PublicKey | null;
1095
+ state: string;
1096
+ };
1097
+ account: {
1098
+ lamports: BN;
1099
+ data: {
1100
+ data: string;
1101
+ dataHash: BN;
1102
+ discriminator: BN;
1103
+ } | null;
1104
+ address: number[] | null;
1105
+ hash: BN;
1106
+ owner: PublicKey;
1107
+ leafIndex: number;
1108
+ tree: PublicKey;
1109
+ seq: BN | null;
1110
+ slotCreated: BN;
1111
+ };
1112
+ },
1113
+ {
1114
+ tokenData: Struct<
1115
+ {
1116
+ owner: PublicKey;
1117
+ mint: PublicKey;
1118
+ amount: BN;
1119
+ delegate: PublicKey | null;
1120
+ state: string;
1121
+ },
1122
+ {
1123
+ mint: Struct<PublicKey, null>;
1124
+ owner: Struct<PublicKey, null>;
1125
+ amount: Struct<BN, null>;
1126
+ delegate: Struct<PublicKey | null, null>;
1127
+ state: Struct<string, null>;
1128
+ }
1129
+ >;
1130
+ account: Struct<
1131
+ {
1132
+ lamports: BN;
1133
+ data: {
1134
+ data: string;
1135
+ dataHash: BN;
1136
+ discriminator: BN;
1137
+ } | null;
1138
+ address: number[] | null;
1139
+ hash: BN;
1140
+ owner: PublicKey;
1141
+ leafIndex: number;
1142
+ tree: PublicKey;
1143
+ seq: BN | null;
1144
+ slotCreated: BN;
1145
+ },
1146
+ {
1147
+ address: Struct<number[] | null, null>;
1148
+ hash: Struct<BN, null>;
1149
+ data: Struct<
1150
+ {
1151
+ data: string;
1152
+ dataHash: BN;
1153
+ discriminator: BN;
1154
+ } | null,
1155
+ {
1156
+ data: Struct<string, null>;
1157
+ dataHash: Struct<BN, null>;
1158
+ discriminator: Struct<BN, null>;
1159
+ }
1160
+ >;
1161
+ lamports: Struct<BN, null>;
1162
+ owner: Struct<PublicKey, null>;
1163
+ leafIndex: Struct<number, null>;
1164
+ tree: Struct<PublicKey, null>;
1165
+ seq: Struct<BN | null, null>;
1166
+ slotCreated: Struct<BN, null>;
1167
+ }
1168
+ >;
1169
+ }
1170
+ >
1171
+ >;
1172
+ cursor: Struct<string | null, null>;
1173
+ }
1174
+ >;
1175
+ /**
1176
+ * @internal
1177
+ */
1178
+ declare const SlotResult: Struct<number, null>;
1179
+ /**
1180
+ * @internal
1181
+ */
1182
+ declare const HealthResult: Struct<string, null>;
1183
+ /**
1184
+ * @internal
1185
+ */
1186
+ declare const LatestNonVotingSignaturesResult: Struct<
1187
+ {
1188
+ items: {
1189
+ signature: string;
1190
+ error: string | null;
1191
+ slot: number;
1192
+ blockTime: number;
1193
+ }[];
1194
+ },
1195
+ {
1196
+ items: Struct<
1197
+ {
1198
+ signature: string;
1199
+ error: string | null;
1200
+ slot: number;
1201
+ blockTime: number;
1202
+ }[],
1203
+ Struct<
1204
+ {
1205
+ signature: string;
1206
+ error: string | null;
1207
+ slot: number;
1208
+ blockTime: number;
1209
+ },
1210
+ {
1211
+ signature: Struct<string, null>;
1212
+ slot: Struct<number, null>;
1213
+ blockTime: Struct<number, null>;
1214
+ error: Struct<string | null, null>;
1215
+ }
1216
+ >
1217
+ >;
1218
+ }
1219
+ >;
1220
+ /**
1221
+ * @internal
1222
+ */
1223
+ declare const LatestNonVotingSignaturesResultPaginated: Struct<
1224
+ {
1225
+ items: {
1226
+ signature: string;
1227
+ slot: number;
1228
+ blockTime: number;
1229
+ }[];
1230
+ cursor: string | null;
1231
+ },
1232
+ {
1233
+ items: Struct<
1234
+ {
1235
+ signature: string;
1236
+ slot: number;
1237
+ blockTime: number;
1238
+ }[],
1239
+ Struct<
1240
+ {
1241
+ signature: string;
1242
+ slot: number;
1243
+ blockTime: number;
1244
+ },
1245
+ {
1246
+ signature: Struct<string, null>;
1247
+ slot: Struct<number, null>;
1248
+ blockTime: Struct<number, null>;
1249
+ }
1250
+ >
1251
+ >;
1252
+ cursor: Struct<string | null, null>;
1253
+ }
1254
+ >;
1255
+ /**
1256
+ * @internal
1257
+ */
1258
+ declare const MerkeProofResult: Struct<
1259
+ {
1260
+ root: BN;
1261
+ hash: BN;
1262
+ leafIndex: number;
1263
+ merkleTree: PublicKey;
1264
+ proof: BN[];
1265
+ rootSeq: number;
1266
+ },
1267
+ {
1268
+ hash: Struct<BN, null>;
1269
+ leafIndex: Struct<number, null>;
1270
+ merkleTree: Struct<PublicKey, null>;
1271
+ proof: Struct<BN[], Struct<BN, null>>;
1272
+ rootSeq: Struct<number, null>;
1273
+ root: Struct<BN, null>;
1274
+ }
1275
+ >;
1276
+ /**
1277
+ * @internal
1278
+ */
1279
+ declare const NewAddressProofResult: Struct<
1280
+ {
1281
+ root: BN;
1282
+ address: BN;
1283
+ merkleTree: PublicKey;
1284
+ proof: BN[];
1285
+ rootSeq: number;
1286
+ nextIndex: number;
1287
+ lowerRangeAddress: BN;
1288
+ higherRangeAddress: BN;
1289
+ lowElementLeafIndex: number;
1290
+ },
1291
+ {
1292
+ address: Struct<BN, null>;
1293
+ nextIndex: Struct<number, null>;
1294
+ merkleTree: Struct<PublicKey, null>;
1295
+ proof: Struct<BN[], Struct<BN, null>>;
1296
+ rootSeq: Struct<number, null>;
1297
+ root: Struct<BN, null>;
1298
+ lowerRangeAddress: Struct<BN, null>;
1299
+ higherRangeAddress: Struct<BN, null>;
1300
+ lowElementLeafIndex: Struct<number, null>;
1301
+ }
1302
+ >;
1303
+ /**
1304
+ * @internal
1305
+ */
1306
+ declare const ValidityProofResult: Struct<
1307
+ {
1308
+ compressedProof: {
1309
+ a: number[];
1310
+ b: number[];
1311
+ c: number[];
1312
+ };
1313
+ leafIndices: number[];
1314
+ leaves: BN[];
1315
+ rootIndices: number[];
1316
+ roots: BN[];
1317
+ merkleTrees: PublicKey[];
1318
+ },
1319
+ {
1320
+ compressedProof: Struct<
1321
+ {
1322
+ a: number[];
1323
+ b: number[];
1324
+ c: number[];
1325
+ },
1326
+ {
1327
+ a: Struct<number[], Struct<number, null>>;
1328
+ b: Struct<number[], Struct<number, null>>;
1329
+ c: Struct<number[], Struct<number, null>>;
1330
+ }
1331
+ >;
1332
+ leafIndices: Struct<number[], Struct<number, null>>;
1333
+ leaves: Struct<BN[], Struct<BN, null>>;
1334
+ rootIndices: Struct<number[], Struct<number, null>>;
1335
+ roots: Struct<BN[], Struct<BN, null>>;
1336
+ merkleTrees: Struct<PublicKey[], Struct<PublicKey, null>>;
1337
+ }
1338
+ >;
1339
+ /**
1340
+ * @internal
1341
+ */
1342
+ declare const MultipleMerkleProofsResult: Struct<
1343
+ {
1344
+ root: BN;
1345
+ hash: BN;
1346
+ leafIndex: number;
1347
+ merkleTree: PublicKey;
1348
+ proof: BN[];
1349
+ rootSeq: number;
1350
+ }[],
1351
+ Struct<
1352
+ {
1353
+ root: BN;
1354
+ hash: BN;
1355
+ leafIndex: number;
1356
+ merkleTree: PublicKey;
1357
+ proof: BN[];
1358
+ rootSeq: number;
1359
+ },
1360
+ {
1361
+ hash: Struct<BN, null>;
1362
+ leafIndex: Struct<number, null>;
1363
+ merkleTree: Struct<PublicKey, null>;
1364
+ proof: Struct<BN[], Struct<BN, null>>;
1365
+ rootSeq: Struct<number, null>;
1366
+ root: Struct<BN, null>;
1367
+ }
1368
+ >
1369
+ >;
1370
+ /**
1371
+ * @internal
1372
+ */
1373
+ declare const BalanceResult: Struct<
1374
+ {
1375
+ amount: BN;
1376
+ },
1377
+ {
1378
+ amount: Struct<BN, null>;
1379
+ }
1380
+ >;
1381
+ declare const NativeBalanceResult: Struct<BN, null>;
1382
+ declare const TokenBalanceResult: Struct<
1383
+ {
1384
+ mint: PublicKey;
1385
+ balance: BN;
1386
+ },
1387
+ {
1388
+ balance: Struct<BN, null>;
1389
+ mint: Struct<PublicKey, null>;
1390
+ }
1391
+ >;
1392
+ declare const TokenBalanceListResult: Struct<
1393
+ {
1394
+ cursor: string | null;
1395
+ tokenBalances: {
1396
+ mint: PublicKey;
1397
+ balance: BN;
1398
+ }[];
1399
+ },
1400
+ {
1401
+ tokenBalances: Struct<
1402
+ {
1551
1403
  mint: PublicKey;
1552
- amount: BN;
1553
- delegate: PublicKey | null;
1554
- state: string;
1555
- } | null, {
1556
- mint: Struct<PublicKey, null>;
1557
- owner: Struct<PublicKey, null>;
1558
- amount: Struct<BN, null>;
1559
- delegate: Struct<PublicKey | null, null>;
1560
- state: Struct<string, null>;
1561
- }>;
1562
- }>>;
1563
- }>;
1564
- transaction: Struct<any, null>;
1565
- }>;
1404
+ balance: BN;
1405
+ }[],
1406
+ Struct<
1407
+ {
1408
+ mint: PublicKey;
1409
+ balance: BN;
1410
+ },
1411
+ {
1412
+ balance: Struct<BN, null>;
1413
+ mint: Struct<PublicKey, null>;
1414
+ }
1415
+ >
1416
+ >;
1417
+ cursor: Struct<string | null, null>;
1418
+ }
1419
+ >;
1420
+ declare const TokenBalanceListResultV2: Struct<
1421
+ {
1422
+ items: {
1423
+ mint: PublicKey;
1424
+ balance: BN;
1425
+ }[];
1426
+ cursor: string | null;
1427
+ },
1428
+ {
1429
+ items: Struct<
1430
+ {
1431
+ mint: PublicKey;
1432
+ balance: BN;
1433
+ }[],
1434
+ Struct<
1435
+ {
1436
+ mint: PublicKey;
1437
+ balance: BN;
1438
+ },
1439
+ {
1440
+ balance: Struct<BN, null>;
1441
+ mint: Struct<PublicKey, null>;
1442
+ }
1443
+ >
1444
+ >;
1445
+ cursor: Struct<string | null, null>;
1446
+ }
1447
+ >;
1448
+ declare const CompressedMintTokenHoldersResult: Struct<
1449
+ {
1450
+ items: {
1451
+ owner: PublicKey;
1452
+ balance: BN;
1453
+ }[];
1454
+ cursor: string | null;
1455
+ },
1456
+ {
1457
+ cursor: Struct<string | null, null>;
1458
+ items: Struct<
1459
+ {
1460
+ owner: PublicKey;
1461
+ balance: BN;
1462
+ }[],
1463
+ Struct<
1464
+ {
1465
+ owner: PublicKey;
1466
+ balance: BN;
1467
+ },
1468
+ {
1469
+ balance: Struct<BN, null>;
1470
+ owner: Struct<PublicKey, null>;
1471
+ }
1472
+ >
1473
+ >;
1474
+ }
1475
+ >;
1476
+ declare const AccountProofResult: Struct<
1477
+ {
1478
+ root: number[];
1479
+ hash: number[];
1480
+ proof: number[][];
1481
+ },
1482
+ {
1483
+ hash: Struct<number[], Struct<number, null>>;
1484
+ root: Struct<number[], Struct<number, null>>;
1485
+ proof: Struct<number[][], Struct<number[], Struct<number, null>>>;
1486
+ }
1487
+ >;
1488
+ declare const toUnixTimestamp: (blockTime: string) => number;
1489
+ declare const SignatureListResult: Struct<
1490
+ {
1491
+ items: {
1492
+ signature: string;
1493
+ slot: number;
1494
+ blockTime: number;
1495
+ }[];
1496
+ },
1497
+ {
1498
+ items: Struct<
1499
+ {
1500
+ signature: string;
1501
+ slot: number;
1502
+ blockTime: number;
1503
+ }[],
1504
+ Struct<
1505
+ {
1506
+ signature: string;
1507
+ slot: number;
1508
+ blockTime: number;
1509
+ },
1510
+ {
1511
+ blockTime: Struct<number, null>;
1512
+ signature: Struct<string, null>;
1513
+ slot: Struct<number, null>;
1514
+ }
1515
+ >
1516
+ >;
1517
+ }
1518
+ >;
1519
+ declare const SignatureListWithCursorResult: Struct<
1520
+ {
1521
+ items: {
1522
+ signature: string;
1523
+ slot: number;
1524
+ blockTime: number;
1525
+ }[];
1526
+ cursor: string | null;
1527
+ },
1528
+ {
1529
+ items: Struct<
1530
+ {
1531
+ signature: string;
1532
+ slot: number;
1533
+ blockTime: number;
1534
+ }[],
1535
+ Struct<
1536
+ {
1537
+ signature: string;
1538
+ slot: number;
1539
+ blockTime: number;
1540
+ },
1541
+ {
1542
+ blockTime: Struct<number, null>;
1543
+ signature: Struct<string, null>;
1544
+ slot: Struct<number, null>;
1545
+ }
1546
+ >
1547
+ >;
1548
+ cursor: Struct<string | null, null>;
1549
+ }
1550
+ >;
1551
+ declare const CompressedTransactionResult: Struct<
1552
+ {
1553
+ compressionInfo: {
1554
+ closedAccounts: {
1555
+ account: {
1556
+ lamports: BN;
1557
+ data: {
1558
+ data: string;
1559
+ dataHash: BN;
1560
+ discriminator: BN;
1561
+ } | null;
1562
+ address: number[] | null;
1563
+ hash: BN;
1564
+ owner: PublicKey;
1565
+ leafIndex: number;
1566
+ tree: PublicKey;
1567
+ seq: BN | null;
1568
+ slotCreated: BN;
1569
+ };
1570
+ optionalTokenData: {
1571
+ owner: PublicKey;
1572
+ mint: PublicKey;
1573
+ amount: BN;
1574
+ delegate: PublicKey | null;
1575
+ state: string;
1576
+ } | null;
1577
+ }[];
1578
+ openedAccounts: {
1579
+ account: {
1580
+ lamports: BN;
1581
+ data: {
1582
+ data: string;
1583
+ dataHash: BN;
1584
+ discriminator: BN;
1585
+ } | null;
1586
+ address: number[] | null;
1587
+ hash: BN;
1588
+ owner: PublicKey;
1589
+ leafIndex: number;
1590
+ tree: PublicKey;
1591
+ seq: BN | null;
1592
+ slotCreated: BN;
1593
+ };
1594
+ optionalTokenData: {
1595
+ owner: PublicKey;
1596
+ mint: PublicKey;
1597
+ amount: BN;
1598
+ delegate: PublicKey | null;
1599
+ state: string;
1600
+ } | null;
1601
+ }[];
1602
+ };
1603
+ transaction?: any;
1604
+ },
1605
+ {
1606
+ compressionInfo: Struct<
1607
+ {
1608
+ closedAccounts: {
1609
+ account: {
1610
+ lamports: BN;
1611
+ data: {
1612
+ data: string;
1613
+ dataHash: BN;
1614
+ discriminator: BN;
1615
+ } | null;
1616
+ address: number[] | null;
1617
+ hash: BN;
1618
+ owner: PublicKey;
1619
+ leafIndex: number;
1620
+ tree: PublicKey;
1621
+ seq: BN | null;
1622
+ slotCreated: BN;
1623
+ };
1624
+ optionalTokenData: {
1625
+ owner: PublicKey;
1626
+ mint: PublicKey;
1627
+ amount: BN;
1628
+ delegate: PublicKey | null;
1629
+ state: string;
1630
+ } | null;
1631
+ }[];
1632
+ openedAccounts: {
1633
+ account: {
1634
+ lamports: BN;
1635
+ data: {
1636
+ data: string;
1637
+ dataHash: BN;
1638
+ discriminator: BN;
1639
+ } | null;
1640
+ address: number[] | null;
1641
+ hash: BN;
1642
+ owner: PublicKey;
1643
+ leafIndex: number;
1644
+ tree: PublicKey;
1645
+ seq: BN | null;
1646
+ slotCreated: BN;
1647
+ };
1648
+ optionalTokenData: {
1649
+ owner: PublicKey;
1650
+ mint: PublicKey;
1651
+ amount: BN;
1652
+ delegate: PublicKey | null;
1653
+ state: string;
1654
+ } | null;
1655
+ }[];
1656
+ },
1657
+ {
1658
+ closedAccounts: Struct<
1659
+ {
1660
+ account: {
1661
+ lamports: BN;
1662
+ data: {
1663
+ data: string;
1664
+ dataHash: BN;
1665
+ discriminator: BN;
1666
+ } | null;
1667
+ address: number[] | null;
1668
+ hash: BN;
1669
+ owner: PublicKey;
1670
+ leafIndex: number;
1671
+ tree: PublicKey;
1672
+ seq: BN | null;
1673
+ slotCreated: BN;
1674
+ };
1675
+ optionalTokenData: {
1676
+ owner: PublicKey;
1677
+ mint: PublicKey;
1678
+ amount: BN;
1679
+ delegate: PublicKey | null;
1680
+ state: string;
1681
+ } | null;
1682
+ }[],
1683
+ Struct<
1684
+ {
1685
+ account: {
1686
+ lamports: BN;
1687
+ data: {
1688
+ data: string;
1689
+ dataHash: BN;
1690
+ discriminator: BN;
1691
+ } | null;
1692
+ address: number[] | null;
1693
+ hash: BN;
1694
+ owner: PublicKey;
1695
+ leafIndex: number;
1696
+ tree: PublicKey;
1697
+ seq: BN | null;
1698
+ slotCreated: BN;
1699
+ };
1700
+ optionalTokenData: {
1701
+ owner: PublicKey;
1702
+ mint: PublicKey;
1703
+ amount: BN;
1704
+ delegate: PublicKey | null;
1705
+ state: string;
1706
+ } | null;
1707
+ },
1708
+ {
1709
+ account: Struct<
1710
+ {
1711
+ lamports: BN;
1712
+ data: {
1713
+ data: string;
1714
+ dataHash: BN;
1715
+ discriminator: BN;
1716
+ } | null;
1717
+ address: number[] | null;
1718
+ hash: BN;
1719
+ owner: PublicKey;
1720
+ leafIndex: number;
1721
+ tree: PublicKey;
1722
+ seq: BN | null;
1723
+ slotCreated: BN;
1724
+ },
1725
+ {
1726
+ address: Struct<number[] | null, null>;
1727
+ hash: Struct<BN, null>;
1728
+ data: Struct<
1729
+ {
1730
+ data: string;
1731
+ dataHash: BN;
1732
+ discriminator: BN;
1733
+ } | null,
1734
+ {
1735
+ data: Struct<string, null>;
1736
+ dataHash: Struct<BN, null>;
1737
+ discriminator: Struct<BN, null>;
1738
+ }
1739
+ >;
1740
+ lamports: Struct<BN, null>;
1741
+ owner: Struct<PublicKey, null>;
1742
+ leafIndex: Struct<number, null>;
1743
+ tree: Struct<PublicKey, null>;
1744
+ seq: Struct<BN | null, null>;
1745
+ slotCreated: Struct<BN, null>;
1746
+ }
1747
+ >;
1748
+ optionalTokenData: Struct<
1749
+ {
1750
+ owner: PublicKey;
1751
+ mint: PublicKey;
1752
+ amount: BN;
1753
+ delegate: PublicKey | null;
1754
+ state: string;
1755
+ } | null,
1756
+ {
1757
+ mint: Struct<PublicKey, null>;
1758
+ owner: Struct<PublicKey, null>;
1759
+ amount: Struct<BN, null>;
1760
+ delegate: Struct<PublicKey | null, null>;
1761
+ state: Struct<string, null>;
1762
+ }
1763
+ >;
1764
+ }
1765
+ >
1766
+ >;
1767
+ openedAccounts: Struct<
1768
+ {
1769
+ account: {
1770
+ lamports: BN;
1771
+ data: {
1772
+ data: string;
1773
+ dataHash: BN;
1774
+ discriminator: BN;
1775
+ } | null;
1776
+ address: number[] | null;
1777
+ hash: BN;
1778
+ owner: PublicKey;
1779
+ leafIndex: number;
1780
+ tree: PublicKey;
1781
+ seq: BN | null;
1782
+ slotCreated: BN;
1783
+ };
1784
+ optionalTokenData: {
1785
+ owner: PublicKey;
1786
+ mint: PublicKey;
1787
+ amount: BN;
1788
+ delegate: PublicKey | null;
1789
+ state: string;
1790
+ } | null;
1791
+ }[],
1792
+ Struct<
1793
+ {
1794
+ account: {
1795
+ lamports: BN;
1796
+ data: {
1797
+ data: string;
1798
+ dataHash: BN;
1799
+ discriminator: BN;
1800
+ } | null;
1801
+ address: number[] | null;
1802
+ hash: BN;
1803
+ owner: PublicKey;
1804
+ leafIndex: number;
1805
+ tree: PublicKey;
1806
+ seq: BN | null;
1807
+ slotCreated: BN;
1808
+ };
1809
+ optionalTokenData: {
1810
+ owner: PublicKey;
1811
+ mint: PublicKey;
1812
+ amount: BN;
1813
+ delegate: PublicKey | null;
1814
+ state: string;
1815
+ } | null;
1816
+ },
1817
+ {
1818
+ account: Struct<
1819
+ {
1820
+ lamports: BN;
1821
+ data: {
1822
+ data: string;
1823
+ dataHash: BN;
1824
+ discriminator: BN;
1825
+ } | null;
1826
+ address: number[] | null;
1827
+ hash: BN;
1828
+ owner: PublicKey;
1829
+ leafIndex: number;
1830
+ tree: PublicKey;
1831
+ seq: BN | null;
1832
+ slotCreated: BN;
1833
+ },
1834
+ {
1835
+ address: Struct<number[] | null, null>;
1836
+ hash: Struct<BN, null>;
1837
+ data: Struct<
1838
+ {
1839
+ data: string;
1840
+ dataHash: BN;
1841
+ discriminator: BN;
1842
+ } | null,
1843
+ {
1844
+ data: Struct<string, null>;
1845
+ dataHash: Struct<BN, null>;
1846
+ discriminator: Struct<BN, null>;
1847
+ }
1848
+ >;
1849
+ lamports: Struct<BN, null>;
1850
+ owner: Struct<PublicKey, null>;
1851
+ leafIndex: Struct<number, null>;
1852
+ tree: Struct<PublicKey, null>;
1853
+ seq: Struct<BN | null, null>;
1854
+ slotCreated: Struct<BN, null>;
1855
+ }
1856
+ >;
1857
+ optionalTokenData: Struct<
1858
+ {
1859
+ owner: PublicKey;
1860
+ mint: PublicKey;
1861
+ amount: BN;
1862
+ delegate: PublicKey | null;
1863
+ state: string;
1864
+ } | null,
1865
+ {
1866
+ mint: Struct<PublicKey, null>;
1867
+ owner: Struct<PublicKey, null>;
1868
+ amount: Struct<BN, null>;
1869
+ delegate: Struct<PublicKey | null, null>;
1870
+ state: Struct<string, null>;
1871
+ }
1872
+ >;
1873
+ }
1874
+ >
1875
+ >;
1876
+ }
1877
+ >;
1878
+ transaction: Struct<any, null>;
1879
+ }
1880
+ >;
1566
1881
  interface CompressionApiInterface {
1567
- getCompressedAccount(address?: BN254, hash?: BN254): Promise<CompressedAccountWithMerkleContext | null>;
1882
+ getCompressedAccount(
1883
+ address?: BN254,
1884
+ hash?: BN254,
1885
+ ): Promise<CompressedAccountWithMerkleContext | null>;
1568
1886
  getCompressedBalance(address?: BN254, hash?: BN254): Promise<BN | null>;
1569
1887
  getCompressedBalanceByOwner(owner: PublicKey): Promise<BN>;
1570
- getCompressedAccountProof(hash: BN254): Promise<MerkleContextWithMerkleProof>;
1571
- getMultipleCompressedAccounts(hashes: BN254[]): Promise<CompressedAccountWithMerkleContext[]>;
1572
- getMultipleCompressedAccountProofs(hashes: BN254[]): Promise<MerkleContextWithMerkleProof[]>;
1573
- getValidityProof(hashes: BN254[], newAddresses: BN254[]): Promise<CompressedProofWithContext>;
1574
- getValidityProofV0(hashes: HashWithTree[], newAddresses: AddressWithTree[]): Promise<CompressedProofWithContext>;
1575
- getValidityProofAndRpcContext(hashes: HashWithTree[], newAddresses: AddressWithTree[]): Promise<WithContext<CompressedProofWithContext>>;
1576
- getCompressedAccountsByOwner(owner: PublicKey, config?: GetCompressedAccountsByOwnerConfig): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
1577
- getCompressedMintTokenHolders(mint: PublicKey, options?: PaginatedOptions): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
1578
- getCompressedTokenAccountsByOwner(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
1579
- getCompressedTokenAccountsByDelegate(delegate: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
1888
+ getCompressedAccountProof(
1889
+ hash: BN254,
1890
+ ): Promise<MerkleContextWithMerkleProof>;
1891
+ getMultipleCompressedAccounts(
1892
+ hashes: BN254[],
1893
+ ): Promise<CompressedAccountWithMerkleContext[]>;
1894
+ getMultipleCompressedAccountProofs(
1895
+ hashes: BN254[],
1896
+ ): Promise<MerkleContextWithMerkleProof[]>;
1897
+ getValidityProof(
1898
+ hashes: BN254[],
1899
+ newAddresses: BN254[],
1900
+ ): Promise<CompressedProofWithContext>;
1901
+ getValidityProofV0(
1902
+ hashes: HashWithTree[],
1903
+ newAddresses: AddressWithTree[],
1904
+ ): Promise<CompressedProofWithContext>;
1905
+ getValidityProofAndRpcContext(
1906
+ hashes: HashWithTree[],
1907
+ newAddresses: AddressWithTree[],
1908
+ ): Promise<WithContext<CompressedProofWithContext>>;
1909
+ getCompressedAccountsByOwner(
1910
+ owner: PublicKey,
1911
+ config?: GetCompressedAccountsByOwnerConfig,
1912
+ ): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
1913
+ getCompressedMintTokenHolders(
1914
+ mint: PublicKey,
1915
+ options?: PaginatedOptions,
1916
+ ): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
1917
+ getCompressedTokenAccountsByOwner(
1918
+ publicKey: PublicKey,
1919
+ options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
1920
+ ): Promise<WithCursor<ParsedTokenAccount[]>>;
1921
+ getCompressedTokenAccountsByDelegate(
1922
+ delegate: PublicKey,
1923
+ options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
1924
+ ): Promise<WithCursor<ParsedTokenAccount[]>>;
1580
1925
  getCompressedTokenAccountBalance(hash: BN254): Promise<{
1581
1926
  amount: BN;
1582
1927
  }>;
1583
- getCompressedTokenBalancesByOwner(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<TokenBalance[]>>;
1584
- getCompressedTokenBalancesByOwnerV2(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithContext<WithCursor<TokenBalance[]>>>;
1585
- getTransactionWithCompressionInfo(signature: string): Promise<CompressedTransaction | null>;
1586
- getCompressionSignaturesForAccount(hash: BN254): Promise<SignatureWithMetadata[]>;
1587
- getCompressionSignaturesForAddress(address: PublicKey, options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
1588
- getCompressionSignaturesForOwner(owner: PublicKey, options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
1589
- getCompressionSignaturesForTokenOwner(owner: PublicKey, options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
1590
- getLatestNonVotingSignatures(limit?: number, cursor?: string): Promise<LatestNonVotingSignatures>;
1591
- getLatestCompressionSignatures(cursor?: string, limit?: number): Promise<LatestNonVotingSignaturesPaginated>;
1928
+ getCompressedTokenBalancesByOwner(
1929
+ publicKey: PublicKey,
1930
+ options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
1931
+ ): Promise<WithCursor<TokenBalance[]>>;
1932
+ getCompressedTokenBalancesByOwnerV2(
1933
+ publicKey: PublicKey,
1934
+ options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
1935
+ ): Promise<WithContext<WithCursor<TokenBalance[]>>>;
1936
+ getTransactionWithCompressionInfo(
1937
+ signature: string,
1938
+ ): Promise<CompressedTransaction | null>;
1939
+ getCompressionSignaturesForAccount(
1940
+ hash: BN254,
1941
+ ): Promise<SignatureWithMetadata[]>;
1942
+ getCompressionSignaturesForAddress(
1943
+ address: PublicKey,
1944
+ options?: PaginatedOptions,
1945
+ ): Promise<WithCursor<SignatureWithMetadata[]>>;
1946
+ getCompressionSignaturesForOwner(
1947
+ owner: PublicKey,
1948
+ options?: PaginatedOptions,
1949
+ ): Promise<WithCursor<SignatureWithMetadata[]>>;
1950
+ getCompressionSignaturesForTokenOwner(
1951
+ owner: PublicKey,
1952
+ options?: PaginatedOptions,
1953
+ ): Promise<WithCursor<SignatureWithMetadata[]>>;
1954
+ getLatestNonVotingSignatures(
1955
+ limit?: number,
1956
+ cursor?: string,
1957
+ ): Promise<LatestNonVotingSignatures>;
1958
+ getLatestCompressionSignatures(
1959
+ cursor?: string,
1960
+ limit?: number,
1961
+ ): Promise<LatestNonVotingSignaturesPaginated>;
1592
1962
  getIndexerHealth(): Promise<string>;
1593
1963
  getIndexerSlot(): Promise<number>;
1594
1964
  }
@@ -1658,7 +2028,16 @@ interface LightWasm {
1658
2028
  * @param depth Depth of the merkle tree.
1659
2029
  * @param log Log proof generation time.
1660
2030
  */
1661
- declare function getTestRpc(lightWasm: LightWasm, endpoint?: string, compressionApiEndpoint?: string, proverEndpoint?: string, merkleTreeAddress?: PublicKey, nullifierQueueAddress?: PublicKey, depth?: number, log?: boolean): Promise<TestRpc>;
2031
+ declare function getTestRpc(
2032
+ lightWasm: LightWasm,
2033
+ endpoint?: string,
2034
+ compressionApiEndpoint?: string,
2035
+ proverEndpoint?: string,
2036
+ merkleTreeAddress?: PublicKey,
2037
+ nullifierQueueAddress?: PublicKey,
2038
+ depth?: number,
2039
+ log?: boolean,
2040
+ ): Promise<TestRpc>;
1662
2041
  /**
1663
2042
  * Simple mock rpc for unit tests that simulates the compression rpc interface.
1664
2043
  * Fetches, parses events and builds merkletree on-demand, i.e. it does not persist state.
@@ -1691,7 +2070,14 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1691
2070
  * @param connectionConfig Optional connection config
1692
2071
  * @param testRpcConfig Config for the mock rpc
1693
2072
  */
1694
- constructor(endpoint: string, hasher: LightWasm, compressionApiEndpoint: string, proverEndpoint: string, connectionConfig?: ConnectionConfig, testRpcConfig?: TestRpcConfig);
2073
+ constructor(
2074
+ endpoint: string,
2075
+ hasher: LightWasm,
2076
+ compressionApiEndpoint: string,
2077
+ proverEndpoint: string,
2078
+ connectionConfig?: ConnectionConfig,
2079
+ testRpcConfig?: TestRpcConfig,
2080
+ );
1695
2081
  /**
1696
2082
  * Manually set state tree addresses
1697
2083
  */
@@ -1707,7 +2093,10 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1707
2093
  /**
1708
2094
  * Fetch the compressed account for the specified account hash
1709
2095
  */
1710
- getCompressedAccount(address?: BN254, hash?: BN254): Promise<CompressedAccountWithMerkleContext | null>;
2096
+ getCompressedAccount(
2097
+ address?: BN254,
2098
+ hash?: BN254,
2099
+ ): Promise<CompressedAccountWithMerkleContext | null>;
1711
2100
  /**
1712
2101
  * Fetch the compressed balance for the specified account hash
1713
2102
  */
@@ -1720,12 +2109,16 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1720
2109
  * Fetch the latest merkle proof for the specified account hash from the
1721
2110
  * cluster
1722
2111
  */
1723
- getCompressedAccountProof(hash: BN254): Promise<MerkleContextWithMerkleProof>;
2112
+ getCompressedAccountProof(
2113
+ hash: BN254,
2114
+ ): Promise<MerkleContextWithMerkleProof>;
1724
2115
  /**
1725
2116
  * Fetch all the account info for multiple compressed accounts specified by
1726
2117
  * an array of account hashes
1727
2118
  */
1728
- getMultipleCompressedAccounts(hashes: BN254[]): Promise<CompressedAccountWithMerkleContext[]>;
2119
+ getMultipleCompressedAccounts(
2120
+ hashes: BN254[],
2121
+ ): Promise<CompressedAccountWithMerkleContext[]>;
1729
2122
  /**
1730
2123
  * Ensure that the Compression Indexer has already indexed the transaction
1731
2124
  */
@@ -1734,31 +2127,47 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1734
2127
  * Fetch the latest merkle proofs for multiple compressed accounts specified
1735
2128
  * by an array account hashes
1736
2129
  */
1737
- getMultipleCompressedAccountProofs(hashes: BN254[]): Promise<MerkleContextWithMerkleProof[]>;
2130
+ getMultipleCompressedAccountProofs(
2131
+ hashes: BN254[],
2132
+ ): Promise<MerkleContextWithMerkleProof[]>;
1738
2133
  /**
1739
2134
  * Fetch all the compressed accounts owned by the specified public key.
1740
2135
  * Owner can be a program or user account
1741
2136
  */
1742
- getCompressedAccountsByOwner(owner: PublicKey, _config?: GetCompressedAccountsByOwnerConfig): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
2137
+ getCompressedAccountsByOwner(
2138
+ owner: PublicKey,
2139
+ _config?: GetCompressedAccountsByOwnerConfig,
2140
+ ): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
1743
2141
  /**
1744
2142
  * Fetch the latest compression signatures on the cluster. Results are
1745
2143
  * paginated.
1746
2144
  */
1747
- getLatestCompressionSignatures(_cursor?: string, _limit?: number): Promise<LatestNonVotingSignaturesPaginated>;
2145
+ getLatestCompressionSignatures(
2146
+ _cursor?: string,
2147
+ _limit?: number,
2148
+ ): Promise<LatestNonVotingSignaturesPaginated>;
1748
2149
  /**
1749
2150
  * Fetch the latest non-voting signatures on the cluster. Results are
1750
2151
  * not paginated.
1751
2152
  */
1752
- getLatestNonVotingSignatures(_limit?: number): Promise<LatestNonVotingSignatures>;
2153
+ getLatestNonVotingSignatures(
2154
+ _limit?: number,
2155
+ ): Promise<LatestNonVotingSignatures>;
1753
2156
  /**
1754
2157
  * Fetch all the compressed token accounts owned by the specified public
1755
2158
  * key. Owner can be a program or user account
1756
2159
  */
1757
- getCompressedTokenAccountsByOwner(owner: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
2160
+ getCompressedTokenAccountsByOwner(
2161
+ owner: PublicKey,
2162
+ options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
2163
+ ): Promise<WithCursor<ParsedTokenAccount[]>>;
1758
2164
  /**
1759
2165
  * Fetch all the compressed accounts delegated to the specified public key.
1760
2166
  */
1761
- getCompressedTokenAccountsByDelegate(delegate: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
2167
+ getCompressedTokenAccountsByDelegate(
2168
+ delegate: PublicKey,
2169
+ options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
2170
+ ): Promise<WithCursor<ParsedTokenAccount[]>>;
1762
2171
  /**
1763
2172
  * Fetch the compressed token balance for the specified account hash
1764
2173
  */
@@ -1770,15 +2179,25 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1770
2179
  * Fetch all the compressed token balances owned by the specified public
1771
2180
  * key. Can filter by mint.
1772
2181
  */
1773
- getCompressedTokenBalancesByOwner(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<{
1774
- balance: BN;
1775
- mint: PublicKey;
1776
- }[]>>;
2182
+ getCompressedTokenBalancesByOwner(
2183
+ publicKey: PublicKey,
2184
+ options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
2185
+ ): Promise<
2186
+ WithCursor<
2187
+ {
2188
+ balance: BN;
2189
+ mint: PublicKey;
2190
+ }[]
2191
+ >
2192
+ >;
1777
2193
  /**
1778
2194
  * Fetch all the compressed token balances owned by the specified public
1779
2195
  * key. Can filter by mint. Uses context.
1780
2196
  */
1781
- getCompressedTokenBalancesByOwnerV2(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithContext<WithCursor<TokenBalance[]>>>;
2197
+ getCompressedTokenBalancesByOwnerV2(
2198
+ publicKey: PublicKey,
2199
+ options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
2200
+ ): Promise<WithContext<WithCursor<TokenBalance[]>>>;
1782
2201
  /**
1783
2202
  * Returns confirmed signatures for transactions involving the specified
1784
2203
  * account hash forward in time from genesis to the most recent confirmed
@@ -1786,12 +2205,16 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1786
2205
  *
1787
2206
  * @param hash queried account hash
1788
2207
  */
1789
- getCompressionSignaturesForAccount(_hash: BN254): Promise<SignatureWithMetadata[]>;
2208
+ getCompressionSignaturesForAccount(
2209
+ _hash: BN254,
2210
+ ): Promise<SignatureWithMetadata[]>;
1790
2211
  /**
1791
2212
  * Fetch a confirmed or finalized transaction from the cluster. Return with
1792
2213
  * CompressionInfo
1793
2214
  */
1794
- getTransactionWithCompressionInfo(_signature: string): Promise<CompressedTransaction | null>;
2215
+ getTransactionWithCompressionInfo(
2216
+ _signature: string,
2217
+ ): Promise<CompressedTransaction | null>;
1795
2218
  /**
1796
2219
  * Returns confirmed signatures for transactions involving the specified
1797
2220
  * address forward in time from genesis to the most recent confirmed
@@ -1799,7 +2222,10 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1799
2222
  *
1800
2223
  * @param address queried compressed account address
1801
2224
  */
1802
- getCompressionSignaturesForAddress(_address: PublicKey, _options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
2225
+ getCompressionSignaturesForAddress(
2226
+ _address: PublicKey,
2227
+ _options?: PaginatedOptions,
2228
+ ): Promise<WithCursor<SignatureWithMetadata[]>>;
1803
2229
  /**
1804
2230
  * Returns confirmed signatures for compression transactions involving the
1805
2231
  * specified account owner forward in time from genesis to the
@@ -1807,13 +2233,19 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1807
2233
  *
1808
2234
  * @param owner queried owner public key
1809
2235
  */
1810
- getCompressionSignaturesForOwner(_owner: PublicKey, _options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
2236
+ getCompressionSignaturesForOwner(
2237
+ _owner: PublicKey,
2238
+ _options?: PaginatedOptions,
2239
+ ): Promise<WithCursor<SignatureWithMetadata[]>>;
1811
2240
  /**
1812
2241
  * Returns confirmed signatures for compression transactions involving the
1813
2242
  * specified token account owner forward in time from genesis to the most
1814
2243
  * recent confirmed block
1815
2244
  */
1816
- getCompressionSignaturesForTokenOwner(_owner: PublicKey, _options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
2245
+ getCompressionSignaturesForTokenOwner(
2246
+ _owner: PublicKey,
2247
+ _options?: PaginatedOptions,
2248
+ ): Promise<WithCursor<SignatureWithMetadata[]>>;
1817
2249
  /**
1818
2250
  * Fetch the current indexer health status
1819
2251
  */
@@ -1830,8 +2262,13 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1830
2262
  * @param addresses Array of BN254 new addresses
1831
2263
  * @returns Array of validity proofs for new addresses
1832
2264
  */
1833
- getMultipleNewAddressProofs(addresses: BN254[]): Promise<MerkleContextWithNewAddressProof[]>;
1834
- getCompressedMintTokenHolders(_mint: PublicKey, _options?: PaginatedOptions): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
2265
+ getMultipleNewAddressProofs(
2266
+ addresses: BN254[],
2267
+ ): Promise<MerkleContextWithNewAddressProof[]>;
2268
+ getCompressedMintTokenHolders(
2269
+ _mint: PublicKey,
2270
+ _options?: PaginatedOptions,
2271
+ ): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
1835
2272
  /**
1836
2273
  * Advanced usage of getValidityProof: fetches ZKP directly from a custom
1837
2274
  * non-rpcprover. Note: This uses the proverEndpoint specified in the
@@ -1841,12 +2278,18 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1841
2278
  * Note: Use RPC class for forested trees. TestRpc is only for custom
1842
2279
  * testing purposes.
1843
2280
  */
1844
- getValidityProofDirect(hashes?: BN254[], newAddresses?: BN254[]): Promise<CompressedProofWithContext>;
2281
+ getValidityProofDirect(
2282
+ hashes?: BN254[],
2283
+ newAddresses?: BN254[],
2284
+ ): Promise<CompressedProofWithContext>;
1845
2285
  /**
1846
2286
  * @deprecated This method is not available for TestRpc. Please use
1847
2287
  * {@link getValidityProof} instead.
1848
2288
  */
1849
- getValidityProofAndRpcContext(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<WithContext<CompressedProofWithContext>>;
2289
+ getValidityProofAndRpcContext(
2290
+ hashes?: HashWithTree[],
2291
+ newAddresses?: AddressWithTree[],
2292
+ ): Promise<WithContext<CompressedProofWithContext>>;
1850
2293
  /**
1851
2294
  * Fetch the latest validity proof for (1) compressed accounts specified by
1852
2295
  * an array of account hashes. (2) new unique addresses specified by an
@@ -1861,8 +2304,14 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
1861
2304
  * @param newAddresses Array of BN254 new addresses.
1862
2305
  * @returns validity proof with context
1863
2306
  */
1864
- getValidityProof(hashes?: BN254[], newAddresses?: BN254[]): Promise<CompressedProofWithContext>;
1865
- getValidityProofV0(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<CompressedProofWithContext>;
2307
+ getValidityProof(
2308
+ hashes?: BN254[],
2309
+ newAddresses?: BN254[],
2310
+ ): Promise<CompressedProofWithContext>;
2311
+ getValidityProofV0(
2312
+ hashes?: HashWithTree[],
2313
+ newAddresses?: AddressWithTree[],
2314
+ ): Promise<CompressedProofWithContext>;
1866
2315
  }
1867
2316
 
1868
2317
  declare class IndexedElement {
@@ -1878,7 +2327,11 @@ declare class IndexedElementBundle {
1878
2327
  newLowElement: IndexedElement;
1879
2328
  newElement: IndexedElement;
1880
2329
  newElementNextValue: BN;
1881
- constructor(newLowElement: IndexedElement, newElement: IndexedElement, newElementNextValue: BN);
2330
+ constructor(
2331
+ newLowElement: IndexedElement,
2332
+ newElement: IndexedElement,
2333
+ newElementNextValue: BN,
2334
+ );
1882
2335
  }
1883
2336
  /**
1884
2337
  * This indexed array implementation mirrors the rust implementation of the
@@ -1888,7 +2341,11 @@ declare class IndexedArray {
1888
2341
  elements: Array<IndexedElement>;
1889
2342
  currentNodeIndex: number;
1890
2343
  highestElementIndex: number;
1891
- constructor(elements: Array<IndexedElement>, currentNodeIndex: number, highestElementIndex: number);
2344
+ constructor(
2345
+ elements: Array<IndexedElement>,
2346
+ currentNodeIndex: number,
2347
+ highestElementIndex: number,
2348
+ );
1892
2349
  static default(): IndexedArray;
1893
2350
  get(index: number): IndexedElement | undefined;
1894
2351
  length(): number;
@@ -1928,7 +2385,10 @@ declare class IndexedArray {
1928
2385
  * @param value The value of the new element to append.
1929
2386
  * @returns The new element and its updated low element.
1930
2387
  */
1931
- appendWithLowElementIndex(lowElementIndex: number, value: BN): IndexedElementBundle;
2388
+ appendWithLowElementIndex(
2389
+ lowElementIndex: number,
2390
+ value: BN,
2391
+ ): IndexedElementBundle;
1932
2392
  /**
1933
2393
  * Finds the lowest element in the array.
1934
2394
  * @returns The lowest element or undefined if the array is empty.
@@ -1940,7 +2400,10 @@ declare class IndexedArray {
1940
2400
  * @param value The value for the new element.
1941
2401
  * @returns A bundle containing the new element, the updated low element, and the value of the next element.
1942
2402
  */
1943
- newElementWithLowElementIndex(lowElementIndex: number, value: BN): IndexedElementBundle;
2403
+ newElementWithLowElementIndex(
2404
+ lowElementIndex: number,
2405
+ value: BN,
2406
+ ): IndexedElementBundle;
1944
2407
  /**
1945
2408
  * Creates a new element with the specified value by first finding the appropriate low element index.
1946
2409
  * @param value The value for the new element.
@@ -1949,7 +2412,7 @@ declare class IndexedArray {
1949
2412
  newElement(value: BN): IndexedElementBundle;
1950
2413
  }
1951
2414
 
1952
- declare const DEFAULT_ZERO = "0";
2415
+ declare const DEFAULT_ZERO = '0';
1953
2416
  /**
1954
2417
  * @callback hashFunction
1955
2418
  * @param left Left leaf
@@ -1973,9 +2436,16 @@ declare class MerkleTree {
1973
2436
  _zeros: string[];
1974
2437
  _layers: string[][];
1975
2438
  _lightWasm: LightWasm;
1976
- constructor(levels: number, lightWasm: LightWasm, elements?: string[], { zeroElement }?: {
1977
- zeroElement?: string | undefined;
1978
- });
2439
+ constructor(
2440
+ levels: number,
2441
+ lightWasm: LightWasm,
2442
+ elements?: string[],
2443
+ {
2444
+ zeroElement,
2445
+ }?: {
2446
+ zeroElement?: string | undefined;
2447
+ },
2448
+ );
1979
2449
  _rebuild(): void;
1980
2450
  /**
1981
2451
  * Get tree root
@@ -2013,7 +2483,10 @@ declare class MerkleTree {
2013
2483
  * @param comparator A function that checks leaf value equality
2014
2484
  * @returns {number} Index if element is found, otherwise -1
2015
2485
  */
2016
- indexOf(element: string, comparator?: ((element: string, el: string) => boolean) | null): number;
2486
+ indexOf(
2487
+ element: string,
2488
+ comparator?: ((element: string, el: string) => boolean) | null,
2489
+ ): number;
2017
2490
  /**
2018
2491
  * Returns a copy of non-zero tree elements
2019
2492
  * @returns {Object[]}
@@ -2038,7 +2511,10 @@ declare class MerkleTree {
2038
2511
  * @param hashFunction
2039
2512
  * @returns {MerkleTree}
2040
2513
  */
2041
- static deserialize(data: any, hashFunction: (left: string, right: string) => string): any;
2514
+ static deserialize(
2515
+ data: any,
2516
+ hashFunction: (left: string, right: string) => string,
2517
+ ): any;
2042
2518
  }
2043
2519
 
2044
2520
  type Deserializer<T> = (data: Buffer$1, tx: ParsedTransactionWithMeta) => T;
@@ -2048,9 +2524,17 @@ type Deserializer<T> = (data: Buffer$1, tx: ParsedTransactionWithMeta) => T;
2048
2524
  *
2049
2525
  * */
2050
2526
  declare function getParsedEvents(rpc: Rpc): Promise<PublicTransactionEvent[]>;
2051
- declare const parseEvents: <T>(indexerEventsTransactions: (ParsedTransactionWithMeta | null)[], deserializeFn: Deserializer<T>) => NonNullable<T>[];
2052
- declare const parsePublicTransactionEventWithIdl: (data: Buffer$1) => PublicTransactionEvent | null;
2053
- declare function parseLightTransaction(dataVec: Uint8Array[], accountKeys: PublicKey[][]): PublicTransactionEvent | null | undefined;
2527
+ declare const parseEvents: <T>(
2528
+ indexerEventsTransactions: (ParsedTransactionWithMeta | null)[],
2529
+ deserializeFn: Deserializer<T>,
2530
+ ) => NonNullable<T>[];
2531
+ declare const parsePublicTransactionEventWithIdl: (
2532
+ data: Buffer$1,
2533
+ ) => PublicTransactionEvent | null;
2534
+ declare function parseLightTransaction(
2535
+ dataVec: Uint8Array[],
2536
+ accountKeys: PublicKey[][],
2537
+ ): PublicTransactionEvent | null | undefined;
2054
2538
 
2055
2539
  type TokenData = {
2056
2540
  mint: PublicKey;
@@ -2070,7 +2554,10 @@ type EventWithParsedTokenTlvData = {
2070
2554
  * @param compressedAccount - The compressed account
2071
2555
  * @returns The parsed token data
2072
2556
  */
2073
- declare function parseTokenLayoutWithIdl(compressedAccount: CompressedAccount, programId?: PublicKey): TokenData | null;
2557
+ declare function parseTokenLayoutWithIdl(
2558
+ compressedAccount: CompressedAccount,
2559
+ programId?: PublicKey,
2560
+ ): TokenData | null;
2074
2561
  /**
2075
2562
  * Retrieves all compressed token accounts for a given mint and owner.
2076
2563
  *
@@ -2080,11 +2567,24 @@ declare function parseTokenLayoutWithIdl(compressedAccount: CompressedAccount, p
2080
2567
  * @param owner PublicKey of the token owner
2081
2568
  * @param mint PublicKey of the token mint
2082
2569
  */
2083
- declare function getCompressedTokenAccounts(events: PublicTransactionEvent[]): Promise<ParsedTokenAccount[]>;
2570
+ declare function getCompressedTokenAccounts(
2571
+ events: PublicTransactionEvent[],
2572
+ ): Promise<ParsedTokenAccount[]>;
2084
2573
  /** @internal */
2085
- declare function getCompressedTokenAccountsByOwnerTest(rpc: Rpc, owner: PublicKey, mint: PublicKey): Promise<WithCursor<ParsedTokenAccount[]>>;
2086
- declare function getCompressedTokenAccountsByDelegateTest(rpc: Rpc, delegate: PublicKey, mint: PublicKey): Promise<WithCursor<ParsedTokenAccount[]>>;
2087
- declare function getCompressedTokenAccountByHashTest(rpc: Rpc, hash: BN): Promise<ParsedTokenAccount>;
2574
+ declare function getCompressedTokenAccountsByOwnerTest(
2575
+ rpc: Rpc,
2576
+ owner: PublicKey,
2577
+ mint: PublicKey,
2578
+ ): Promise<WithCursor<ParsedTokenAccount[]>>;
2579
+ declare function getCompressedTokenAccountsByDelegateTest(
2580
+ rpc: Rpc,
2581
+ delegate: PublicKey,
2582
+ mint: PublicKey,
2583
+ ): Promise<WithCursor<ParsedTokenAccount[]>>;
2584
+ declare function getCompressedTokenAccountByHashTest(
2585
+ rpc: Rpc,
2586
+ hash: BN,
2587
+ ): Promise<ParsedTokenAccount>;
2088
2588
 
2089
2589
  declare const ALICE: Keypair;
2090
2590
  declare const BOB: Keypair;
@@ -2106,7 +2606,11 @@ declare function deepEqual(ref: any, val: any): boolean;
2106
2606
  * @param counter counter to use for generating the keypair.
2107
2607
  * If undefined or >255, generates random keypair.
2108
2608
  */
2109
- declare function newAccountWithLamports(rpc: Rpc, lamports?: number, counter?: number | undefined): Promise<Signer>;
2609
+ declare function newAccountWithLamports(
2610
+ rpc: Rpc,
2611
+ lamports?: number,
2612
+ counter?: number | undefined,
2613
+ ): Promise<Signer>;
2110
2614
  declare function getConnection(): Connection;
2111
2615
  /**
2112
2616
  * For use in tests.
@@ -2117,7 +2621,11 @@ declare function getConnection(): Connection;
2117
2621
  declare function getTestKeypair(counter?: number | undefined): Keypair;
2118
2622
 
2119
2623
  /** @internal */
2120
- declare function parseAccountData({ discriminator, data, dataHash, }: {
2624
+ declare function parseAccountData({
2625
+ discriminator,
2626
+ data,
2627
+ dataHash,
2628
+ }: {
2121
2629
  discriminator: BN;
2122
2630
  data: string;
2123
2631
  dataHash: BN;
@@ -2136,7 +2644,12 @@ declare function parseAccountData({ discriminator, data, dataHash, }: {
2136
2644
  * to endpoint
2137
2645
  * @param connectionConfig Optional connection config
2138
2646
  */
2139
- declare function createRpc(endpointOrWeb3JsConnection?: string | Connection, compressionApiEndpoint?: string, proverEndpoint?: string, config?: ConnectionConfig): Rpc;
2647
+ declare function createRpc(
2648
+ endpointOrWeb3JsConnection?: string | Connection,
2649
+ compressionApiEndpoint?: string,
2650
+ proverEndpoint?: string,
2651
+ config?: ConnectionConfig,
2652
+ ): Rpc;
2140
2653
  /**
2141
2654
  * Helper function to preprocess the response to wrap numbers as strings
2142
2655
  * @param {string} text - The JSON string to preprocess
@@ -2144,9 +2657,21 @@ declare function createRpc(endpointOrWeb3JsConnection?: string | Connection, com
2144
2657
  */
2145
2658
  declare function wrapBigNumbersAsStrings(text: string): string;
2146
2659
  /** @internal */
2147
- declare const rpcRequest: (rpcEndpoint: string, method: string, params?: any, convertToCamelCase?: boolean, debug?: boolean) => Promise<any>;
2660
+ declare const rpcRequest: (
2661
+ rpcEndpoint: string,
2662
+ method: string,
2663
+ params?: any,
2664
+ convertToCamelCase?: boolean,
2665
+ debug?: boolean,
2666
+ ) => Promise<any>;
2148
2667
  /** @internal */
2149
- declare const proverRequest: (proverEndpoint: string, method: "inclusion" | "new-address" | "combined", params?: any, log?: boolean, publicInputHash?: BN | undefined) => Promise<CompressedProof>;
2668
+ declare const proverRequest: (
2669
+ proverEndpoint: string,
2670
+ method: 'inclusion' | 'new-address' | 'combined',
2671
+ params?: any,
2672
+ log?: boolean,
2673
+ publicInputHash?: BN | undefined,
2674
+ ) => Promise<CompressedProof>;
2150
2675
  type NonInclusionMerkleProofInputs = {
2151
2676
  root: BN;
2152
2677
  value: BN;
@@ -2177,9 +2702,18 @@ type NonInclusionJsonStruct = {
2177
2702
  leafHigherRangeValue: string;
2178
2703
  nextIndex: number;
2179
2704
  };
2180
- declare function convertMerkleProofsWithContextToHex(merkleProofsWithContext: MerkleContextWithMerkleProof[]): HexInputsForProver[];
2181
- declare function convertNonInclusionMerkleProofInputsToHex(nonInclusionMerkleProofInputs: MerkleContextWithNewAddressProof[]): NonInclusionJsonStruct[];
2182
- declare function getPublicInputHash(accountProofs: MerkleContextWithMerkleProof[], accountHashes: BN254[], newAddressProofs: MerkleContextWithNewAddressProof[], lightWasm: LightWasm): BN;
2705
+ declare function convertMerkleProofsWithContextToHex(
2706
+ merkleProofsWithContext: MerkleContextWithMerkleProof[],
2707
+ ): HexInputsForProver[];
2708
+ declare function convertNonInclusionMerkleProofInputsToHex(
2709
+ nonInclusionMerkleProofInputs: MerkleContextWithNewAddressProof[],
2710
+ ): NonInclusionJsonStruct[];
2711
+ declare function getPublicInputHash(
2712
+ accountProofs: MerkleContextWithMerkleProof[],
2713
+ accountHashes: BN254[],
2714
+ newAddressProofs: MerkleContextWithNewAddressProof[],
2715
+ lightWasm: LightWasm,
2716
+ ): BN;
2183
2717
  /**
2184
2718
  * Get the queue for a given tree
2185
2719
  *
@@ -2187,7 +2721,10 @@ declare function getPublicInputHash(accountProofs: MerkleContextWithMerkleProof[
2187
2721
  * @param tree - The tree to get the queue for
2188
2722
  * @returns The queue for the given tree, or undefined if not found
2189
2723
  */
2190
- declare function getQueueForTree(info: ActiveTreeBundle[], tree: PublicKey): PublicKey;
2724
+ declare function getQueueForTree(
2725
+ info: ActiveTreeBundle[],
2726
+ tree: PublicKey,
2727
+ ): PublicKey;
2191
2728
  /**
2192
2729
  * Get the tree for a given queue
2193
2730
  *
@@ -2195,7 +2732,10 @@ declare function getQueueForTree(info: ActiveTreeBundle[], tree: PublicKey): Pub
2195
2732
  * @param queue - The queue to get the tree for
2196
2733
  * @returns The tree for the given queue, or undefined if not found
2197
2734
  */
2198
- declare function getTreeForQueue(info: ActiveTreeBundle[], queue: PublicKey): PublicKey;
2735
+ declare function getTreeForQueue(
2736
+ info: ActiveTreeBundle[],
2737
+ queue: PublicKey,
2738
+ ): PublicKey;
2199
2739
  /**
2200
2740
  * Get a random tree and queue from the active state tree addresses.
2201
2741
  *
@@ -2215,7 +2755,12 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2215
2755
  compressionApiEndpoint: string;
2216
2756
  proverEndpoint: string;
2217
2757
  activeStateTreeInfo: ActiveTreeBundle[] | null;
2218
- constructor(endpoint: string, compressionApiEndpoint: string, proverEndpoint: string, config?: ConnectionConfig);
2758
+ constructor(
2759
+ endpoint: string,
2760
+ compressionApiEndpoint: string,
2761
+ proverEndpoint: string,
2762
+ config?: ConnectionConfig,
2763
+ );
2219
2764
  /**
2220
2765
  * Manually set state tree addresses
2221
2766
  */
@@ -2232,7 +2777,10 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2232
2777
  /**
2233
2778
  * Fetch the compressed account for the specified account address or hash
2234
2779
  */
2235
- getCompressedAccount(address?: BN254, hash?: BN254): Promise<CompressedAccountWithMerkleContext | null>;
2780
+ getCompressedAccount(
2781
+ address?: BN254,
2782
+ hash?: BN254,
2783
+ ): Promise<CompressedAccountWithMerkleContext | null>;
2236
2784
  /**
2237
2785
  * Fetch the compressed balance for the specified account address or hash
2238
2786
  */
@@ -2245,31 +2793,46 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2245
2793
  * Fetch the latest merkle proof for the specified account hash from the
2246
2794
  * cluster
2247
2795
  */
2248
- getCompressedAccountProof(hash: BN254): Promise<MerkleContextWithMerkleProof>;
2796
+ getCompressedAccountProof(
2797
+ hash: BN254,
2798
+ ): Promise<MerkleContextWithMerkleProof>;
2249
2799
  /**
2250
2800
  * Fetch all the account info for multiple compressed accounts specified by
2251
2801
  * an array of account hashes
2252
2802
  */
2253
- getMultipleCompressedAccounts(hashes: BN254[]): Promise<CompressedAccountWithMerkleContext[]>;
2803
+ getMultipleCompressedAccounts(
2804
+ hashes: BN254[],
2805
+ ): Promise<CompressedAccountWithMerkleContext[]>;
2254
2806
  /**
2255
2807
  * Fetch the latest merkle proofs for multiple compressed accounts specified
2256
2808
  * by an array account hashes
2257
2809
  */
2258
- getMultipleCompressedAccountProofs(hashes: BN254[]): Promise<MerkleContextWithMerkleProof[]>;
2810
+ getMultipleCompressedAccountProofs(
2811
+ hashes: BN254[],
2812
+ ): Promise<MerkleContextWithMerkleProof[]>;
2259
2813
  /**
2260
2814
  * Fetch all the compressed accounts owned by the specified public key.
2261
2815
  * Owner can be a program or user account
2262
2816
  */
2263
- getCompressedAccountsByOwner(owner: PublicKey, config?: GetCompressedAccountsByOwnerConfig | undefined): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
2817
+ getCompressedAccountsByOwner(
2818
+ owner: PublicKey,
2819
+ config?: GetCompressedAccountsByOwnerConfig | undefined,
2820
+ ): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
2264
2821
  /**
2265
2822
  * Fetch all the compressed token accounts owned by the specified public
2266
2823
  * key. Owner can be a program or user account
2267
2824
  */
2268
- getCompressedTokenAccountsByOwner(owner: PublicKey, options?: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
2825
+ getCompressedTokenAccountsByOwner(
2826
+ owner: PublicKey,
2827
+ options?: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
2828
+ ): Promise<WithCursor<ParsedTokenAccount[]>>;
2269
2829
  /**
2270
2830
  * Fetch all the compressed accounts delegated to the specified public key.
2271
2831
  */
2272
- getCompressedTokenAccountsByDelegate(delegate: PublicKey, options?: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
2832
+ getCompressedTokenAccountsByDelegate(
2833
+ delegate: PublicKey,
2834
+ options?: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
2835
+ ): Promise<WithCursor<ParsedTokenAccount[]>>;
2273
2836
  /**
2274
2837
  * Fetch the compressed token balance for the specified account hash
2275
2838
  */
@@ -2282,12 +2845,18 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2282
2845
  * Fetch all the compressed token balances owned by the specified public
2283
2846
  * key. Can filter by mint. Returns without context.
2284
2847
  */
2285
- getCompressedTokenBalancesByOwner(owner: PublicKey, options?: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<TokenBalance[]>>;
2848
+ getCompressedTokenBalancesByOwner(
2849
+ owner: PublicKey,
2850
+ options?: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
2851
+ ): Promise<WithCursor<TokenBalance[]>>;
2286
2852
  /**
2287
2853
  * Fetch the compressed token balances owned by the specified public
2288
2854
  * key. Paginated. Can filter by mint. Returns with context.
2289
2855
  */
2290
- getCompressedTokenBalancesByOwnerV2(owner: PublicKey, options?: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithContext<WithCursor<TokenBalance[]>>>;
2856
+ getCompressedTokenBalancesByOwnerV2(
2857
+ owner: PublicKey,
2858
+ options?: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
2859
+ ): Promise<WithContext<WithCursor<TokenBalance[]>>>;
2291
2860
  /**
2292
2861
  * Returns confirmed compression signatures for transactions involving the specified
2293
2862
  * account hash forward in time from genesis to the most recent confirmed
@@ -2295,19 +2864,26 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2295
2864
  *
2296
2865
  * @param hash queried account hash
2297
2866
  */
2298
- getCompressionSignaturesForAccount(hash: BN254): Promise<SignatureWithMetadata[]>;
2867
+ getCompressionSignaturesForAccount(
2868
+ hash: BN254,
2869
+ ): Promise<SignatureWithMetadata[]>;
2299
2870
  /**
2300
2871
  * Fetch a confirmed or finalized transaction from the cluster. Return with
2301
2872
  * CompressionInfo
2302
2873
  */
2303
- getTransactionWithCompressionInfo(signature: string): Promise<CompressedTransaction | null>;
2874
+ getTransactionWithCompressionInfo(
2875
+ signature: string,
2876
+ ): Promise<CompressedTransaction | null>;
2304
2877
  /**
2305
2878
  * Returns confirmed signatures for transactions involving the specified
2306
2879
  * address forward in time from genesis to the most recent confirmed block
2307
2880
  *
2308
2881
  * @param address queried compressed account address
2309
2882
  */
2310
- getCompressionSignaturesForAddress(address: PublicKey, options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
2883
+ getCompressionSignaturesForAddress(
2884
+ address: PublicKey,
2885
+ options?: PaginatedOptions,
2886
+ ): Promise<WithCursor<SignatureWithMetadata[]>>;
2311
2887
  /**
2312
2888
  * Returns confirmed signatures for compression transactions involving the
2313
2889
  * specified account owner forward in time from genesis to the
@@ -2315,13 +2891,19 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2315
2891
  *
2316
2892
  * @param owner queried owner public key
2317
2893
  */
2318
- getCompressionSignaturesForOwner(owner: PublicKey, options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
2894
+ getCompressionSignaturesForOwner(
2895
+ owner: PublicKey,
2896
+ options?: PaginatedOptions,
2897
+ ): Promise<WithCursor<SignatureWithMetadata[]>>;
2319
2898
  /**
2320
2899
  * Returns confirmed signatures for compression transactions involving the
2321
2900
  * specified token account owner forward in time from genesis to the most
2322
2901
  * recent confirmed block
2323
2902
  */
2324
- getCompressionSignaturesForTokenOwner(owner: PublicKey, options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
2903
+ getCompressionSignaturesForTokenOwner(
2904
+ owner: PublicKey,
2905
+ options?: PaginatedOptions,
2906
+ ): Promise<WithCursor<SignatureWithMetadata[]>>;
2325
2907
  /**
2326
2908
  * Fetch the current indexer health status
2327
2909
  */
@@ -2337,16 +2919,25 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2337
2919
  /**
2338
2920
  * Fetch all the compressed token holders for a given mint. Paginated.
2339
2921
  */
2340
- getCompressedMintTokenHolders(mint: PublicKey, options?: PaginatedOptions): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
2922
+ getCompressedMintTokenHolders(
2923
+ mint: PublicKey,
2924
+ options?: PaginatedOptions,
2925
+ ): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
2341
2926
  /**
2342
2927
  * Fetch the latest compression signatures on the cluster. Results are
2343
2928
  * paginated.
2344
2929
  */
2345
- getLatestCompressionSignatures(cursor?: string, limit?: number): Promise<LatestNonVotingSignaturesPaginated>;
2930
+ getLatestCompressionSignatures(
2931
+ cursor?: string,
2932
+ limit?: number,
2933
+ ): Promise<LatestNonVotingSignaturesPaginated>;
2346
2934
  /**
2347
2935
  * Fetch all non-voting signatures
2348
2936
  */
2349
- getLatestNonVotingSignatures(limit?: number, cursor?: string): Promise<LatestNonVotingSignatures>;
2937
+ getLatestNonVotingSignatures(
2938
+ limit?: number,
2939
+ cursor?: string,
2940
+ ): Promise<LatestNonVotingSignatures>;
2350
2941
  /**
2351
2942
  * Fetch the latest address proofs for new unique addresses specified by an
2352
2943
  * array of addresses.
@@ -2356,7 +2947,9 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2356
2947
  * @param addresses Array of BN254 new addresses
2357
2948
  * @returns Array of validity proofs for new addresses
2358
2949
  */
2359
- getMultipleNewAddressProofs(addresses: BN254[]): Promise<MerkleContextWithNewAddressProof[]>;
2950
+ getMultipleNewAddressProofs(
2951
+ addresses: BN254[],
2952
+ ): Promise<MerkleContextWithNewAddressProof[]>;
2360
2953
  /**
2361
2954
  * Advanced usage of getValidityProof: fetches ZKP directly from a custom
2362
2955
  * non-rpcprover. Note: This uses the proverEndpoint specified in the
@@ -2376,7 +2969,10 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2376
2969
  * @param newAddresses Array of BN254 new addresses.
2377
2970
  * @returns validity proof with context
2378
2971
  */
2379
- getValidityProofDirect(hashes?: BN254[], newAddresses?: BN254[]): Promise<CompressedProofWithContext>;
2972
+ getValidityProofDirect(
2973
+ hashes?: BN254[],
2974
+ newAddresses?: BN254[],
2975
+ ): Promise<CompressedProofWithContext>;
2380
2976
  /**
2381
2977
  * @deprecated use {@link getValidityProofV0} instead.
2382
2978
  *
@@ -2395,7 +2991,10 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2395
2991
  * @param newAddresses Array of BN254 new addresses.
2396
2992
  * @returns validity proof with context
2397
2993
  */
2398
- getValidityProof(hashes?: BN254[], newAddresses?: BN254[]): Promise<CompressedProofWithContext>;
2994
+ getValidityProof(
2995
+ hashes?: BN254[],
2996
+ newAddresses?: BN254[],
2997
+ ): Promise<CompressedProofWithContext>;
2399
2998
  /**
2400
2999
  * Fetch the latest validity proof for (1) compressed accounts specified by
2401
3000
  * an array of account hashes. (2) new unique addresses specified by an
@@ -2410,7 +3009,10 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2410
3009
  * @param newAddresses Array of { address: BN254, tree: PublicKey, queue: PublicKey }.
2411
3010
  * @returns validity proof with context
2412
3011
  */
2413
- getValidityProofV0(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<CompressedProofWithContext>;
3012
+ getValidityProofV0(
3013
+ hashes?: HashWithTree[],
3014
+ newAddresses?: AddressWithTree[],
3015
+ ): Promise<CompressedProofWithContext>;
2414
3016
  /**
2415
3017
  * Fetch the latest validity proof for (1) compressed accounts specified by
2416
3018
  * an array of account hashes. (2) new unique addresses specified by an
@@ -2427,7 +3029,10 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2427
3029
  * state tree/queue.
2428
3030
  * @returns validity proof with context
2429
3031
  */
2430
- getValidityProofAndRpcContext(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<WithContext<CompressedProofWithContext>>;
3032
+ getValidityProofAndRpcContext(
3033
+ hashes?: HashWithTree[],
3034
+ newAddresses?: AddressWithTree[],
3035
+ ): Promise<WithContext<CompressedProofWithContext>>;
2431
3036
  }
2432
3037
 
2433
3038
  /**
@@ -2442,7 +3047,14 @@ declare class Rpc extends Connection implements CompressionApiInterface {
2442
3047
  *
2443
3048
  * @return Transaction signature
2444
3049
  */
2445
- declare function compress(rpc: Rpc, payer: Signer, lamports: number | BN, toAddress: PublicKey, outputStateTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3050
+ declare function compress(
3051
+ rpc: Rpc,
3052
+ payer: Signer,
3053
+ lamports: number | BN,
3054
+ toAddress: PublicKey,
3055
+ outputStateTree?: PublicKey,
3056
+ confirmOptions?: ConfirmOptions,
3057
+ ): Promise<TransactionSignature>;
2446
3058
 
2447
3059
  /**
2448
3060
  * Create compressed account with address
@@ -2461,7 +3073,16 @@ declare function compress(rpc: Rpc, payer: Signer, lamports: number | BN, toAddr
2461
3073
  *
2462
3074
  * @return Transaction signature
2463
3075
  */
2464
- declare function createAccount(rpc: Rpc, payer: Signer, seeds: Uint8Array[], programId: PublicKey, addressTree?: PublicKey, addressQueue?: PublicKey, outputStateTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3076
+ declare function createAccount(
3077
+ rpc: Rpc,
3078
+ payer: Signer,
3079
+ seeds: Uint8Array[],
3080
+ programId: PublicKey,
3081
+ addressTree?: PublicKey,
3082
+ addressQueue?: PublicKey,
3083
+ outputStateTree?: PublicKey,
3084
+ confirmOptions?: ConfirmOptions,
3085
+ ): Promise<TransactionSignature>;
2465
3086
  /**
2466
3087
  * Create compressed account with address and lamports
2467
3088
  *
@@ -2481,7 +3102,17 @@ declare function createAccount(rpc: Rpc, payer: Signer, seeds: Uint8Array[], pro
2481
3102
  *
2482
3103
  * @return Transaction signature
2483
3104
  */
2484
- declare function createAccountWithLamports(rpc: Rpc, payer: Signer, seeds: Uint8Array[], lamports: number | BN, programId: PublicKey, addressTree?: PublicKey, addressQueue?: PublicKey, outputStateTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3105
+ declare function createAccountWithLamports(
3106
+ rpc: Rpc,
3107
+ payer: Signer,
3108
+ seeds: Uint8Array[],
3109
+ lamports: number | BN,
3110
+ programId: PublicKey,
3111
+ addressTree?: PublicKey,
3112
+ addressQueue?: PublicKey,
3113
+ outputStateTree?: PublicKey,
3114
+ confirmOptions?: ConfirmOptions,
3115
+ ): Promise<TransactionSignature>;
2485
3116
 
2486
3117
  /**
2487
3118
  * Decompress lamports into a solana account
@@ -2495,7 +3126,14 @@ declare function createAccountWithLamports(rpc: Rpc, payer: Signer, seeds: Uint8
2495
3126
  *
2496
3127
  * @return Transaction signature
2497
3128
  */
2498
- declare function decompress(rpc: Rpc, payer: Signer, lamports: number | BN, recipient: PublicKey, outputStateTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3129
+ declare function decompress(
3130
+ rpc: Rpc,
3131
+ payer: Signer,
3132
+ lamports: number | BN,
3133
+ recipient: PublicKey,
3134
+ outputStateTree?: PublicKey,
3135
+ confirmOptions?: ConfirmOptions,
3136
+ ): Promise<TransactionSignature>;
2499
3137
 
2500
3138
  /** @internal remove signer from signers if part of signers */
2501
3139
  declare function dedupeSigner(signer: Signer, signers: Signer[]): Signer[];
@@ -2516,13 +3154,24 @@ declare function dedupeSigner(signer: Signer, signers: Signer[]): Signer[];
2516
3154
  *
2517
3155
  * @return Signature of the confirmed transaction
2518
3156
  */
2519
- declare function transfer(rpc: Rpc, payer: Signer, lamports: number | BN, owner: Signer, toAddress: PublicKey, merkleTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
3157
+ declare function transfer(
3158
+ rpc: Rpc,
3159
+ payer: Signer,
3160
+ lamports: number | BN,
3161
+ owner: Signer,
3162
+ toAddress: PublicKey,
3163
+ merkleTree?: PublicKey,
3164
+ confirmOptions?: ConfirmOptions,
3165
+ ): Promise<TransactionSignature>;
2520
3166
 
2521
3167
  /**
2522
3168
  * @internal Finds the index of a PublicKey in an array, or adds it if not
2523
3169
  * present
2524
3170
  * */
2525
- declare function getIndexOrAdd(accountsArray: PublicKey[], key: PublicKey): number;
3171
+ declare function getIndexOrAdd(
3172
+ accountsArray: PublicKey[],
3173
+ key: PublicKey,
3174
+ ): number;
2526
3175
  /**
2527
3176
  * @internal
2528
3177
  * Pads output state trees with the 0th state tree of the input state.
@@ -2539,7 +3188,11 @@ declare function getIndexOrAdd(accountsArray: PublicKey[], key: PublicKey): numb
2539
3188
  *
2540
3189
  * @returns Padded output state trees.
2541
3190
  */
2542
- declare function padOutputStateMerkleTrees(outputStateMerkleTrees: PublicKey[] | PublicKey | undefined, numberOfOutputCompressedAccounts: number, inputCompressedAccountsWithMerkleContext: CompressedAccountWithMerkleContext[]): PublicKey[];
3191
+ declare function padOutputStateMerkleTrees(
3192
+ outputStateMerkleTrees: PublicKey[] | PublicKey | undefined,
3193
+ numberOfOutputCompressedAccounts: number,
3194
+ inputCompressedAccountsWithMerkleContext: CompressedAccountWithMerkleContext[],
3195
+ ): PublicKey[];
2543
3196
  declare function toAccountMetas(remainingAccounts: PublicKey[]): AccountMeta[];
2544
3197
  /**
2545
3198
  * Packs Compressed Accounts.
@@ -2561,13 +3214,21 @@ declare function toAccountMetas(remainingAccounts: PublicKey[]): AccountMeta[];
2561
3214
  * @param remainingAccounts Optional existing array of accounts
2562
3215
  * to append to.
2563
3216
  **/
2564
- declare function packCompressedAccounts(inputCompressedAccounts: CompressedAccountWithMerkleContext[], inputStateRootIndices: number[], outputCompressedAccounts: CompressedAccount[], outputStateMerkleTrees?: PublicKey[] | PublicKey, remainingAccounts?: PublicKey[]): {
3217
+ declare function packCompressedAccounts(
3218
+ inputCompressedAccounts: CompressedAccountWithMerkleContext[],
3219
+ inputStateRootIndices: number[],
3220
+ outputCompressedAccounts: CompressedAccount[],
3221
+ outputStateMerkleTrees?: PublicKey[] | PublicKey,
3222
+ remainingAccounts?: PublicKey[],
3223
+ ): {
2565
3224
  packedInputCompressedAccounts: PackedCompressedAccountWithMerkleContext[];
2566
3225
  packedOutputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
2567
3226
  remainingAccounts: PublicKey[];
2568
3227
  };
2569
3228
 
2570
- declare const sumUpLamports: (accounts: CompressedAccountWithMerkleContext[]) => BN;
3229
+ declare const sumUpLamports: (
3230
+ accounts: CompressedAccountWithMerkleContext[],
3231
+ ) => BN;
2571
3232
  /**
2572
3233
  * Create compressed account system transaction params
2573
3234
  */
@@ -2724,34 +3385,76 @@ declare class LightSystemProgram$1 {
2724
3385
  *
2725
3386
  */
2726
3387
  static deriveCompressedSolPda(): PublicKey;
2727
- static createTransferOutputState(inputCompressedAccounts: CompressedAccountWithMerkleContext[], toAddress: PublicKey, lamports: number | BN): CompressedAccount[];
2728
- static createDecompressOutputState(inputCompressedAccounts: CompressedAccountWithMerkleContext[], lamports: number | BN): CompressedAccount[];
3388
+ static createTransferOutputState(
3389
+ inputCompressedAccounts: CompressedAccountWithMerkleContext[],
3390
+ toAddress: PublicKey,
3391
+ lamports: number | BN,
3392
+ ): CompressedAccount[];
3393
+ static createDecompressOutputState(
3394
+ inputCompressedAccounts: CompressedAccountWithMerkleContext[],
3395
+ lamports: number | BN,
3396
+ ): CompressedAccount[];
2729
3397
  /**
2730
3398
  * No data by default
2731
3399
  */
2732
- static createNewAddressOutputState(address: number[], owner: PublicKey, lamports?: BN | number, inputCompressedAccounts?: CompressedAccountWithMerkleContext[]): CompressedAccount[];
3400
+ static createNewAddressOutputState(
3401
+ address: number[],
3402
+ owner: PublicKey,
3403
+ lamports?: BN | number,
3404
+ inputCompressedAccounts?: CompressedAccountWithMerkleContext[],
3405
+ ): CompressedAccount[];
2733
3406
  /**
2734
3407
  * Creates instruction to create compressed account with PDA.
2735
3408
  * Cannot write data.
2736
3409
  *
2737
3410
  * TODO: support transfer of lamports to the new account.
2738
3411
  */
2739
- static createAccount({ payer, newAddressParams, newAddress, recentValidityProof, outputStateTree, inputCompressedAccounts, inputStateRootIndices, lamports, }: CreateAccountWithSeedParams): Promise<TransactionInstruction>;
3412
+ static createAccount({
3413
+ payer,
3414
+ newAddressParams,
3415
+ newAddress,
3416
+ recentValidityProof,
3417
+ outputStateTree,
3418
+ inputCompressedAccounts,
3419
+ inputStateRootIndices,
3420
+ lamports,
3421
+ }: CreateAccountWithSeedParams): Promise<TransactionInstruction>;
2740
3422
  /**
2741
3423
  * Creates a transaction instruction that transfers compressed lamports from
2742
3424
  * one owner to another.
2743
3425
  */
2744
- static transfer({ payer, inputCompressedAccounts, toAddress, lamports, recentInputStateRootIndices, recentValidityProof, outputStateTrees, }: TransferParams): Promise<TransactionInstruction>;
3426
+ static transfer({
3427
+ payer,
3428
+ inputCompressedAccounts,
3429
+ toAddress,
3430
+ lamports,
3431
+ recentInputStateRootIndices,
3432
+ recentValidityProof,
3433
+ outputStateTrees,
3434
+ }: TransferParams): Promise<TransactionInstruction>;
2745
3435
  /**
2746
3436
  * Creates a transaction instruction that transfers compressed lamports from
2747
3437
  * one owner to another.
2748
3438
  */
2749
- static compress({ payer, toAddress, lamports, outputStateTree, }: CompressParams): Promise<TransactionInstruction>;
3439
+ static compress({
3440
+ payer,
3441
+ toAddress,
3442
+ lamports,
3443
+ outputStateTree,
3444
+ }: CompressParams): Promise<TransactionInstruction>;
2750
3445
  /**
2751
3446
  * Creates a transaction instruction that transfers compressed lamports from
2752
3447
  * one owner to another.
2753
3448
  */
2754
- static decompress({ payer, inputCompressedAccounts, toAddress, lamports, recentInputStateRootIndices, recentValidityProof, outputStateTree, }: DecompressParams): Promise<TransactionInstruction>;
3449
+ static decompress({
3450
+ payer,
3451
+ inputCompressedAccounts,
3452
+ toAddress,
3453
+ lamports,
3454
+ recentInputStateRootIndices,
3455
+ recentValidityProof,
3456
+ outputStateTree,
3457
+ }: DecompressParams): Promise<TransactionInstruction>;
2755
3458
  }
2756
3459
  /**
2757
3460
  * Selects the minimal number of compressed SOL accounts for a transfer.
@@ -2760,16 +3463,25 @@ declare class LightSystemProgram$1 {
2760
3463
  * 2. Accumulates the amount until it is greater than or equal to the transfer
2761
3464
  * amount
2762
3465
  */
2763
- declare function selectMinCompressedSolAccountsForTransfer(accounts: CompressedAccountWithMerkleContext[], transferLamports: BN | number): [selectedAccounts: CompressedAccountWithMerkleContext[], total: BN];
3466
+ declare function selectMinCompressedSolAccountsForTransfer(
3467
+ accounts: CompressedAccountWithMerkleContext[],
3468
+ transferLamports: BN | number,
3469
+ ): [selectedAccounts: CompressedAccountWithMerkleContext[], total: BN];
2764
3470
 
2765
3471
  declare const CompressedAccountLayout: buffer_layout.Layout<unknown>;
2766
3472
  declare const MerkleContextLayout: buffer_layout.Layout<unknown>;
2767
3473
  declare const NewAddressParamsLayout: buffer_layout.Layout<unknown>;
2768
3474
  declare const InstructionDataInvokeLayout: Layout<InstructionDataInvoke>;
2769
- declare function encodeInstructionDataInvoke(data: InstructionDataInvoke): Buffer$1;
3475
+ declare function encodeInstructionDataInvoke(
3476
+ data: InstructionDataInvoke,
3477
+ ): Buffer$1;
2770
3478
  declare const InstructionDataInvokeCpiLayout: Layout<InstructionDataInvokeCpi>;
2771
- declare function decodeInstructionDataInvoke(buffer: Buffer$1): InstructionDataInvoke;
2772
- declare function decodeInstructionDataInvokeCpi(buffer: Buffer$1): InstructionDataInvokeCpi;
3479
+ declare function decodeInstructionDataInvoke(
3480
+ buffer: Buffer$1,
3481
+ ): InstructionDataInvoke;
3482
+ declare function decodeInstructionDataInvokeCpi(
3483
+ buffer: Buffer$1,
3484
+ ): InstructionDataInvokeCpi;
2773
3485
  type invokeAccountsLayoutParams = {
2774
3486
  feePayer: PublicKey;
2775
3487
  authority: PublicKey;
@@ -2781,16 +3493,24 @@ type invokeAccountsLayoutParams = {
2781
3493
  decompressionRecipient: PublicKey | null;
2782
3494
  systemProgram: PublicKey;
2783
3495
  };
2784
- declare const invokeAccountsLayout: (accounts: invokeAccountsLayoutParams) => AccountMeta[];
3496
+ declare const invokeAccountsLayout: (
3497
+ accounts: invokeAccountsLayoutParams,
3498
+ ) => AccountMeta[];
2785
3499
  declare const PublicTransactionEventLayout: Layout<PublicTransactionEvent>;
2786
- declare function encodePublicTransactionEvent(data: PublicTransactionEvent): Buffer$1;
2787
- declare function decodePublicTransactionEvent(buffer: Buffer$1): PublicTransactionEvent;
3500
+ declare function encodePublicTransactionEvent(
3501
+ data: PublicTransactionEvent,
3502
+ ): Buffer$1;
3503
+ declare function decodePublicTransactionEvent(
3504
+ buffer: Buffer$1,
3505
+ ): PublicTransactionEvent;
2788
3506
  declare const AppendNullifyCreateAddressInputsMetaLayout: buffer_layout.Layout<unknown>;
2789
3507
  declare const AppendLeavesInputLayout: buffer_layout.Layout<unknown>;
2790
3508
  declare const InsertNullifierInputLayout: buffer_layout.Layout<unknown>;
2791
3509
  declare const InsertAddressInputLayout: buffer_layout.Layout<unknown>;
2792
3510
  declare const MerkleTreeSequenceNumberLayout: buffer_layout.Layout<unknown>;
2793
- declare function deserializeAppendNullifyCreateAddressInputsIndexer(buffer: Buffer$1): {
3511
+ declare function deserializeAppendNullifyCreateAddressInputsIndexer(
3512
+ buffer: Buffer$1,
3513
+ ): {
2794
3514
  meta: unknown;
2795
3515
  leaves: unknown[];
2796
3516
  nullifiers: unknown[];
@@ -2798,7 +3518,11 @@ declare function deserializeAppendNullifyCreateAddressInputsIndexer(buffer: Buff
2798
3518
  sequence_numbers: unknown[];
2799
3519
  output_leaf_indices: number[];
2800
3520
  };
2801
- declare function convertToPublicTransactionEvent(decoded: any, remainingAccounts: PublicKey[], invokeData: InstructionDataInvoke): PublicTransactionEvent;
3521
+ declare function convertToPublicTransactionEvent(
3522
+ decoded: any,
3523
+ remainingAccounts: PublicKey[],
3524
+ invokeData: InstructionDataInvoke,
3525
+ ): PublicTransactionEvent;
2802
3526
 
2803
3527
  declare const FIELD_SIZE: BN;
2804
3528
  declare const HIGHEST_ADDRESS_PLUS_ONE: BN;
@@ -2806,9 +3530,10 @@ declare const COMPUTE_BUDGET_PATTERN: number[];
2806
3530
  declare const INVOKE_DISCRIMINATOR: Buffer$1;
2807
3531
  declare const INVOKE_CPI_DISCRIMINATOR: Buffer$1;
2808
3532
  declare const INSERT_INTO_QUEUES_DISCRIMINATOR: Buffer$1;
2809
- declare const noopProgram = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
2810
- declare const lightProgram = "SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7";
2811
- declare const accountCompressionProgram = "compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq";
3533
+ declare const noopProgram = 'noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV';
3534
+ declare const lightProgram = 'SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7';
3535
+ declare const accountCompressionProgram =
3536
+ 'compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq';
2812
3537
  declare const getRegisteredProgramPda: () => PublicKey;
2813
3538
  declare const getAccountCompressionAuthority: () => PublicKey;
2814
3539
  declare const defaultStaticAccounts: () => PublicKey[];
@@ -2856,18 +3581,24 @@ declare const defaultTestStateTreeAccounts2: () => {
2856
3581
  nullifierQueue2: PublicKey;
2857
3582
  merkleTree2: PublicKey;
2858
3583
  };
2859
- declare const stateTreeLookupTableMainnet = "7i86eQs3GSqHjN47WdWLTCGMW6gde1q96G2EVnUyK2st";
2860
- declare const nullifiedStateTreeLookupTableMainnet = "H9QD4u1fG7KmkAzn2tDXhheushxFe1EcrjGGyEFXeMqT";
2861
- declare const stateTreeLookupTableDevnet = "8n8rH2bFRVA6cSGNDpgqcKHCndbFCT1bXxAQG89ejVsh";
2862
- declare const nullifiedStateTreeLookupTableDevnet = "5dhaJLBjnVBQFErr8oiCJmcVsx3Zj6xDekGB2zULPsnP";
2863
- declare const nullifierQueuePubkey = "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148";
2864
- declare const cpiContextPubkey = "cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fonubE4";
2865
- declare const merkletreePubkey = "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT";
2866
- declare const addressTree = "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2";
2867
- declare const addressQueue = "aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F";
2868
- declare const merkleTree2Pubkey = "smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho";
2869
- declare const nullifierQueue2Pubkey = "nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X";
2870
- declare const cpiContext2Pubkey = "cpi2cdhkH5roePvcudTgUL8ppEBfTay1desGh8G8QxK";
3584
+ declare const stateTreeLookupTableMainnet =
3585
+ '7i86eQs3GSqHjN47WdWLTCGMW6gde1q96G2EVnUyK2st';
3586
+ declare const nullifiedStateTreeLookupTableMainnet =
3587
+ 'H9QD4u1fG7KmkAzn2tDXhheushxFe1EcrjGGyEFXeMqT';
3588
+ declare const stateTreeLookupTableDevnet =
3589
+ '8n8rH2bFRVA6cSGNDpgqcKHCndbFCT1bXxAQG89ejVsh';
3590
+ declare const nullifiedStateTreeLookupTableDevnet =
3591
+ '5dhaJLBjnVBQFErr8oiCJmcVsx3Zj6xDekGB2zULPsnP';
3592
+ declare const nullifierQueuePubkey =
3593
+ 'nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148';
3594
+ declare const cpiContextPubkey = 'cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fonubE4';
3595
+ declare const merkletreePubkey = 'smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT';
3596
+ declare const addressTree = 'amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2';
3597
+ declare const addressQueue = 'aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F';
3598
+ declare const merkleTree2Pubkey = 'smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho';
3599
+ declare const nullifierQueue2Pubkey =
3600
+ 'nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X';
3601
+ declare const cpiContext2Pubkey = 'cpi2cdhkH5roePvcudTgUL8ppEBfTay1desGh8G8QxK';
2871
3602
  declare const confirmConfig: ConfirmOptions;
2872
3603
  declare const DEFAULT_MERKLE_TREE_HEIGHT = 26;
2873
3604
  declare const DEFAULT_MERKLE_TREE_ROOTS = 2800;
@@ -2905,53 +3636,53 @@ declare const STATE_MERKLE_TREE_NETWORK_FEE: BN;
2905
3636
  declare const ADDRESS_TREE_NETWORK_FEE: BN;
2906
3637
 
2907
3638
  declare enum UtxoErrorCode {
2908
- NEGATIVE_LAMPORTS = "NEGATIVE_LAMPORTS",
2909
- NOT_U64 = "NOT_U64",
2910
- BLINDING_EXCEEDS_FIELD_SIZE = "BLINDING_EXCEEDS_FIELD_SIZE"
3639
+ NEGATIVE_LAMPORTS = 'NEGATIVE_LAMPORTS',
3640
+ NOT_U64 = 'NOT_U64',
3641
+ BLINDING_EXCEEDS_FIELD_SIZE = 'BLINDING_EXCEEDS_FIELD_SIZE',
2911
3642
  }
2912
3643
  declare enum SelectInUtxosErrorCode {
2913
- FAILED_TO_FIND_UTXO_COMBINATION = "FAILED_TO_FIND_UTXO_COMBINATION",
2914
- INVALID_NUMBER_OF_IN_UTXOS = "INVALID_NUMBER_OF_IN_UTXOS"
3644
+ FAILED_TO_FIND_UTXO_COMBINATION = 'FAILED_TO_FIND_UTXO_COMBINATION',
3645
+ INVALID_NUMBER_OF_IN_UTXOS = 'INVALID_NUMBER_OF_IN_UTXOS',
2915
3646
  }
2916
3647
  declare enum CreateUtxoErrorCode {
2917
- OWNER_UNDEFINED = "OWNER_UNDEFINED",
2918
- INVALID_OUTPUT_UTXO_LENGTH = "INVALID_OUTPUT_UTXO_LENGTH",
2919
- UTXO_DATA_UNDEFINED = "UTXO_DATA_UNDEFINED"
3648
+ OWNER_UNDEFINED = 'OWNER_UNDEFINED',
3649
+ INVALID_OUTPUT_UTXO_LENGTH = 'INVALID_OUTPUT_UTXO_LENGTH',
3650
+ UTXO_DATA_UNDEFINED = 'UTXO_DATA_UNDEFINED',
2920
3651
  }
2921
3652
  declare enum RpcErrorCode {
2922
- CONNECTION_UNDEFINED = "CONNECTION_UNDEFINED",
2923
- RPC_PUBKEY_UNDEFINED = "RPC_PUBKEY_UNDEFINED",
2924
- RPC_METHOD_NOT_IMPLEMENTED = "RPC_METHOD_NOT_IMPLEMENTED",
2925
- RPC_INVALID = "RPC_INVALID"
3653
+ CONNECTION_UNDEFINED = 'CONNECTION_UNDEFINED',
3654
+ RPC_PUBKEY_UNDEFINED = 'RPC_PUBKEY_UNDEFINED',
3655
+ RPC_METHOD_NOT_IMPLEMENTED = 'RPC_METHOD_NOT_IMPLEMENTED',
3656
+ RPC_INVALID = 'RPC_INVALID',
2926
3657
  }
2927
3658
  declare enum LookupTableErrorCode {
2928
- LOOK_UP_TABLE_UNDEFINED = "LOOK_UP_TABLE_UNDEFINED",
2929
- LOOK_UP_TABLE_NOT_INITIALIZED = "LOOK_UP_TABLE_NOT_INITIALIZED"
3659
+ LOOK_UP_TABLE_UNDEFINED = 'LOOK_UP_TABLE_UNDEFINED',
3660
+ LOOK_UP_TABLE_NOT_INITIALIZED = 'LOOK_UP_TABLE_NOT_INITIALIZED',
2930
3661
  }
2931
3662
  declare enum HashErrorCode {
2932
- NO_POSEIDON_HASHER_PROVIDED = "NO_POSEIDON_HASHER_PROVIDED"
3663
+ NO_POSEIDON_HASHER_PROVIDED = 'NO_POSEIDON_HASHER_PROVIDED',
2933
3664
  }
2934
3665
  declare enum ProofErrorCode {
2935
- INVALID_PROOF = "INVALID_PROOF",
2936
- PROOF_INPUT_UNDEFINED = "PROOF_INPUT_UNDEFINED",
2937
- PROOF_GENERATION_FAILED = "PROOF_GENERATION_FAILED"
3666
+ INVALID_PROOF = 'INVALID_PROOF',
3667
+ PROOF_INPUT_UNDEFINED = 'PROOF_INPUT_UNDEFINED',
3668
+ PROOF_GENERATION_FAILED = 'PROOF_GENERATION_FAILED',
2938
3669
  }
2939
3670
  declare enum MerkleTreeErrorCode {
2940
- MERKLE_TREE_NOT_INITIALIZED = "MERKLE_TREE_NOT_INITIALIZED",
2941
- SOL_MERKLE_TREE_UNDEFINED = "SOL_MERKLE_TREE_UNDEFINED",
2942
- MERKLE_TREE_UNDEFINED = "MERKLE_TREE_UNDEFINED",
2943
- INPUT_UTXO_NOT_INSERTED_IN_MERKLE_TREE = "INPUT_UTXO_NOT_INSERTED_IN_MERKLE_TREE",
2944
- MERKLE_TREE_INDEX_UNDEFINED = "MERKLE_TREE_INDEX_UNDEFINED",
2945
- MERKLE_TREE_SET_SPACE_UNDEFINED = "MERKLE_TREE_SET_SPACE_UNDEFINED"
3671
+ MERKLE_TREE_NOT_INITIALIZED = 'MERKLE_TREE_NOT_INITIALIZED',
3672
+ SOL_MERKLE_TREE_UNDEFINED = 'SOL_MERKLE_TREE_UNDEFINED',
3673
+ MERKLE_TREE_UNDEFINED = 'MERKLE_TREE_UNDEFINED',
3674
+ INPUT_UTXO_NOT_INSERTED_IN_MERKLE_TREE = 'INPUT_UTXO_NOT_INSERTED_IN_MERKLE_TREE',
3675
+ MERKLE_TREE_INDEX_UNDEFINED = 'MERKLE_TREE_INDEX_UNDEFINED',
3676
+ MERKLE_TREE_SET_SPACE_UNDEFINED = 'MERKLE_TREE_SET_SPACE_UNDEFINED',
2946
3677
  }
2947
3678
  declare enum UtilsErrorCode {
2948
- ACCOUNT_NAME_UNDEFINED_IN_IDL = "ACCOUNT_NAME_UNDEFINED_IN_IDL",
2949
- PROPERTY_UNDEFINED = "PROPERTY_UNDEFINED",
2950
- LOOK_UP_TABLE_CREATION_FAILED = "LOOK_UP_TABLE_CREATION_FAILED",
2951
- UNSUPPORTED_ARCHITECTURE = "UNSUPPORTED_ARCHITECTURE",
2952
- UNSUPPORTED_PLATFORM = "UNSUPPORTED_PLATFORM",
2953
- ACCOUNTS_UNDEFINED = "ACCOUNTS_UNDEFINED",
2954
- INVALID_NUMBER = "INVALID_NUMBER"
3679
+ ACCOUNT_NAME_UNDEFINED_IN_IDL = 'ACCOUNT_NAME_UNDEFINED_IN_IDL',
3680
+ PROPERTY_UNDEFINED = 'PROPERTY_UNDEFINED',
3681
+ LOOK_UP_TABLE_CREATION_FAILED = 'LOOK_UP_TABLE_CREATION_FAILED',
3682
+ UNSUPPORTED_ARCHITECTURE = 'UNSUPPORTED_ARCHITECTURE',
3683
+ UNSUPPORTED_PLATFORM = 'UNSUPPORTED_PLATFORM',
3684
+ ACCOUNTS_UNDEFINED = 'ACCOUNTS_UNDEFINED',
3685
+ INVALID_NUMBER = 'INVALID_NUMBER',
2955
3686
  }
2956
3687
  declare class MetaError extends Error {
2957
3688
  code: string;
@@ -2959,24 +3690,15 @@ declare class MetaError extends Error {
2959
3690
  codeMessage?: string;
2960
3691
  constructor(code: string, functionName: string, codeMessage?: string);
2961
3692
  }
2962
- declare class UtxoError extends MetaError {
2963
- }
2964
- declare class SelectInUtxosError extends MetaError {
2965
- }
2966
- declare class CreateUtxoError extends MetaError {
2967
- }
2968
- declare class RpcError extends MetaError {
2969
- }
2970
- declare class LookupTableError extends MetaError {
2971
- }
2972
- declare class HashError extends MetaError {
2973
- }
2974
- declare class ProofError extends MetaError {
2975
- }
2976
- declare class MerkleTreeError extends MetaError {
2977
- }
2978
- declare class UtilsError extends MetaError {
2979
- }
3693
+ declare class UtxoError extends MetaError {}
3694
+ declare class SelectInUtxosError extends MetaError {}
3695
+ declare class CreateUtxoError extends MetaError {}
3696
+ declare class RpcError extends MetaError {}
3697
+ declare class LookupTableError extends MetaError {}
3698
+ declare class HashError extends MetaError {}
3699
+ declare class ProofError extends MetaError {}
3700
+ declare class MerkleTreeError extends MetaError {}
3701
+ declare class UtilsError extends MetaError {}
2980
3702
 
2981
3703
  type LightSystemProgram = {
2982
3704
  version: '1.2.0';
@@ -2986,7 +3708,7 @@ type LightSystemProgram = {
2986
3708
  name: 'SOL_POOL_PDA_SEED';
2987
3709
  type: 'bytes';
2988
3710
  value: '[115, 111, 108, 95, 112, 111, 111, 108, 95, 112, 100, 97]';
2989
- }
3711
+ },
2990
3712
  ];
2991
3713
  instructions: [
2992
3714
  {
@@ -3006,7 +3728,7 @@ type LightSystemProgram = {
3006
3728
  name: 'associatedMerkleTree';
3007
3729
  isMut: false;
3008
3730
  isSigner: false;
3009
- }
3731
+ },
3010
3732
  ];
3011
3733
  args: [];
3012
3734
  },
@@ -3018,7 +3740,7 @@ type LightSystemProgram = {
3018
3740
  isMut: true;
3019
3741
  isSigner: true;
3020
3742
  docs: [
3021
- 'Fee payer needs to be mutable to pay rollover and protocol fees.'
3743
+ 'Fee payer needs to be mutable to pay rollover and protocol fees.',
3022
3744
  ];
3023
3745
  },
3024
3746
  {
@@ -3041,7 +3763,7 @@ type LightSystemProgram = {
3041
3763
  isMut: false;
3042
3764
  isSigner: false;
3043
3765
  docs: [
3044
- 'This pda is used to invoke the account compression program.'
3766
+ 'This pda is used to invoke the account compression program.',
3045
3767
  ];
3046
3768
  },
3047
3769
  {
@@ -3057,7 +3779,7 @@ type LightSystemProgram = {
3057
3779
  isOptional: true;
3058
3780
  docs: [
3059
3781
  'Sol pool pda is used to store the native sol that has been compressed.',
3060
- "It's only required when compressing or decompressing sol."
3782
+ "It's only required when compressing or decompressing sol.",
3061
3783
  ];
3062
3784
  },
3063
3785
  {
@@ -3068,20 +3790,20 @@ type LightSystemProgram = {
3068
3790
  docs: [
3069
3791
  'Only needs to be provided for decompression as a recipient for the',
3070
3792
  'decompressed sol.',
3071
- 'Compressed sol originate from authority.'
3793
+ 'Compressed sol originate from authority.',
3072
3794
  ];
3073
3795
  },
3074
3796
  {
3075
3797
  name: 'systemProgram';
3076
3798
  isMut: false;
3077
3799
  isSigner: false;
3078
- }
3800
+ },
3079
3801
  ];
3080
3802
  args: [
3081
3803
  {
3082
3804
  name: 'inputs';
3083
3805
  type: 'bytes';
3084
- }
3806
+ },
3085
3807
  ];
3086
3808
  },
3087
3809
  {
@@ -3092,7 +3814,7 @@ type LightSystemProgram = {
3092
3814
  isMut: true;
3093
3815
  isSigner: true;
3094
3816
  docs: [
3095
- 'Fee payer needs to be mutable to pay rollover and protocol fees.'
3817
+ 'Fee payer needs to be mutable to pay rollover and protocol fees.',
3096
3818
  ];
3097
3819
  },
3098
3820
  {
@@ -3147,13 +3869,13 @@ type LightSystemProgram = {
3147
3869
  isMut: true;
3148
3870
  isSigner: false;
3149
3871
  isOptional: true;
3150
- }
3872
+ },
3151
3873
  ];
3152
3874
  args: [
3153
3875
  {
3154
3876
  name: 'inputs';
3155
3877
  type: 'bytes';
3156
- }
3878
+ },
3157
3879
  ];
3158
3880
  },
3159
3881
  {
@@ -3164,7 +3886,7 @@ type LightSystemProgram = {
3164
3886
  isMut: true;
3165
3887
  isSigner: true;
3166
3888
  docs: [
3167
- 'Fee payer needs to be mutable to pay rollover and protocol fees.'
3889
+ 'Fee payer needs to be mutable to pay rollover and protocol fees.',
3168
3890
  ];
3169
3891
  },
3170
3892
  {
@@ -3219,13 +3941,13 @@ type LightSystemProgram = {
3219
3941
  isMut: true;
3220
3942
  isSigner: false;
3221
3943
  isOptional: true;
3222
- }
3944
+ },
3223
3945
  ];
3224
3946
  args: [
3225
3947
  {
3226
3948
  name: 'inputs';
3227
3949
  type: 'bytes';
3228
- }
3950
+ },
3229
3951
  ];
3230
3952
  },
3231
3953
  {
@@ -3233,7 +3955,7 @@ type LightSystemProgram = {
3233
3955
  docs: [
3234
3956
  'This function is a stub to allow Anchor to include the input types in',
3235
3957
  'the IDL. It should not be included in production builds nor be called in',
3236
- 'practice.'
3958
+ 'practice.',
3237
3959
  ];
3238
3960
  accounts: [
3239
3961
  {
@@ -3241,7 +3963,7 @@ type LightSystemProgram = {
3241
3963
  isMut: true;
3242
3964
  isSigner: true;
3243
3965
  docs: [
3244
- 'Fee payer needs to be mutable to pay rollover and protocol fees.'
3966
+ 'Fee payer needs to be mutable to pay rollover and protocol fees.',
3245
3967
  ];
3246
3968
  },
3247
3969
  {
@@ -3264,7 +3986,7 @@ type LightSystemProgram = {
3264
3986
  isMut: false;
3265
3987
  isSigner: false;
3266
3988
  docs: [
3267
- 'This pda is used to invoke the account compression program.'
3989
+ 'This pda is used to invoke the account compression program.',
3268
3990
  ];
3269
3991
  },
3270
3992
  {
@@ -3280,7 +4002,7 @@ type LightSystemProgram = {
3280
4002
  isOptional: true;
3281
4003
  docs: [
3282
4004
  'Sol pool pda is used to store the native sol that has been compressed.',
3283
- "It's only required when compressing or decompressing sol."
4005
+ "It's only required when compressing or decompressing sol.",
3284
4006
  ];
3285
4007
  },
3286
4008
  {
@@ -3291,14 +4013,14 @@ type LightSystemProgram = {
3291
4013
  docs: [
3292
4014
  'Only needs to be provided for decompression as a recipient for the',
3293
4015
  'decompressed sol.',
3294
- 'Compressed sol originate from authority.'
4016
+ 'Compressed sol originate from authority.',
3295
4017
  ];
3296
4018
  },
3297
4019
  {
3298
4020
  name: 'systemProgram';
3299
4021
  isMut: false;
3300
4022
  isSigner: false;
3301
- }
4023
+ },
3302
4024
  ];
3303
4025
  args: [
3304
4026
  {
@@ -3318,9 +4040,9 @@ type LightSystemProgram = {
3318
4040
  type: {
3319
4041
  defined: 'PublicTransactionEvent';
3320
4042
  };
3321
- }
4043
+ },
3322
4044
  ];
3323
- }
4045
+ },
3324
4046
  ];
3325
4047
  accounts: [
3326
4048
  {
@@ -3331,7 +4053,7 @@ type LightSystemProgram = {
3331
4053
  'Collected instruction data is combined with the instruction data of the executing cpi,',
3332
4054
  'and executed as a single transaction.',
3333
4055
  'This enables to use input compressed accounts that are owned by multiple programs,',
3334
- 'with one zero-knowledge proof.'
4056
+ 'with one zero-knowledge proof.',
3335
4057
  ];
3336
4058
  type: {
3337
4059
  kind: 'struct';
@@ -3351,10 +4073,10 @@ type LightSystemProgram = {
3351
4073
  defined: 'InstructionDataInvokeCpi';
3352
4074
  };
3353
4075
  };
3354
- }
4076
+ },
3355
4077
  ];
3356
4078
  };
3357
- }
4079
+ },
3358
4080
  ];
3359
4081
  types: [
3360
4082
  {
@@ -3409,7 +4131,7 @@ type LightSystemProgram = {
3409
4131
  {
3410
4132
  name: 'isCompress';
3411
4133
  type: 'bool';
3412
- }
4134
+ },
3413
4135
  ];
3414
4136
  };
3415
4137
  },
@@ -3435,7 +4157,7 @@ type LightSystemProgram = {
3435
4157
  {
3436
4158
  name: 'addressMerkleTreeRootIndex';
3437
4159
  type: 'u16';
3438
- }
4160
+ },
3439
4161
  ];
3440
4162
  };
3441
4163
  },
@@ -3453,7 +4175,7 @@ type LightSystemProgram = {
3453
4175
  {
3454
4176
  name: 'merkleTreeIndex';
3455
4177
  type: 'u8';
3456
- }
4178
+ },
3457
4179
  ];
3458
4180
  };
3459
4181
  },
@@ -3479,7 +4201,7 @@ type LightSystemProgram = {
3479
4201
  type: {
3480
4202
  array: ['u8', 32];
3481
4203
  };
3482
- }
4204
+ },
3483
4205
  ];
3484
4206
  };
3485
4207
  },
@@ -3543,7 +4265,7 @@ type LightSystemProgram = {
3543
4265
  defined: 'CompressedCpiContext';
3544
4266
  };
3545
4267
  };
3546
- }
4268
+ },
3547
4269
  ];
3548
4270
  };
3549
4271
  },
@@ -3556,7 +4278,7 @@ type LightSystemProgram = {
3556
4278
  name: 'setContext';
3557
4279
  docs: [
3558
4280
  'Is set by the program that is invoking the CPI to signal that is should',
3559
- 'set the cpi context.'
4281
+ 'set the cpi context.',
3560
4282
  ];
3561
4283
  type: 'bool';
3562
4284
  },
@@ -3564,17 +4286,17 @@ type LightSystemProgram = {
3564
4286
  name: 'firstSetContext';
3565
4287
  docs: [
3566
4288
  'Is set to wipe the cpi context since someone could have set it before',
3567
- 'with unrelated data.'
4289
+ 'with unrelated data.',
3568
4290
  ];
3569
4291
  type: 'bool';
3570
4292
  },
3571
4293
  {
3572
4294
  name: 'cpiContextAccountIndex';
3573
4295
  docs: [
3574
- 'Index of cpi context account in remaining accounts.'
4296
+ 'Index of cpi context account in remaining accounts.',
3575
4297
  ];
3576
4298
  type: 'u8';
3577
- }
4299
+ },
3578
4300
  ];
3579
4301
  };
3580
4302
  },
@@ -3606,7 +4328,7 @@ type LightSystemProgram = {
3606
4328
  defined: 'CompressedAccountData';
3607
4329
  };
3608
4330
  };
3609
- }
4331
+ },
3610
4332
  ];
3611
4333
  };
3612
4334
  },
@@ -3630,7 +4352,7 @@ type LightSystemProgram = {
3630
4352
  type: {
3631
4353
  array: ['u8', 32];
3632
4354
  };
3633
- }
4355
+ },
3634
4356
  ];
3635
4357
  };
3636
4358
  },
@@ -3654,17 +4376,17 @@ type LightSystemProgram = {
3654
4376
  {
3655
4377
  name: 'rootIndex';
3656
4378
  docs: [
3657
- 'Index of root used in inclusion validity proof.'
4379
+ 'Index of root used in inclusion validity proof.',
3658
4380
  ];
3659
4381
  type: 'u16';
3660
4382
  },
3661
4383
  {
3662
4384
  name: 'readOnly';
3663
4385
  docs: [
3664
- 'Placeholder to mark accounts read-only unimplemented set to false.'
4386
+ 'Placeholder to mark accounts read-only unimplemented set to false.',
3665
4387
  ];
3666
4388
  type: 'bool';
3667
- }
4389
+ },
3668
4390
  ];
3669
4391
  };
3670
4392
  },
@@ -3692,7 +4414,7 @@ type LightSystemProgram = {
3692
4414
  defined: 'QueueIndex';
3693
4415
  };
3694
4416
  };
3695
- }
4417
+ },
3696
4418
  ];
3697
4419
  };
3698
4420
  },
@@ -3710,7 +4432,7 @@ type LightSystemProgram = {
3710
4432
  name: 'index';
3711
4433
  docs: ['Index of compressed account hash in queue.'];
3712
4434
  type: 'u16';
3713
- }
4435
+ },
3714
4436
  ];
3715
4437
  };
3716
4438
  },
@@ -3726,7 +4448,7 @@ type LightSystemProgram = {
3726
4448
  {
3727
4449
  name: 'seq';
3728
4450
  type: 'u64';
3729
- }
4451
+ },
3730
4452
  ];
3731
4453
  };
3732
4454
  },
@@ -3800,10 +4522,10 @@ type LightSystemProgram = {
3800
4522
  type: {
3801
4523
  option: 'bytes';
3802
4524
  };
3803
- }
4525
+ },
3804
4526
  ];
3805
4527
  };
3806
- }
4528
+ },
3807
4529
  ];
3808
4530
  errors: [
3809
4531
  {
@@ -3993,11 +4715,259 @@ type LightSystemProgram = {
3993
4715
  {
3994
4716
  code: 6038;
3995
4717
  name: 'InvalidStateTreeHeight';
3996
- }
4718
+ },
3997
4719
  ];
3998
4720
  };
3999
4721
  declare const IDL: LightSystemProgram;
4000
4722
 
4001
- declare const logger: any;
4002
-
4003
- export { ADDRESS_QUEUE_ROLLOVER_FEE, ADDRESS_TREE_NETWORK_FEE, ALICE, AccountProofResult, type ActiveTreeBundle, type AddressWithTree, AppendLeavesInputLayout, AppendNullifyCreateAddressInputsMetaLayout, type BN254, BOB, BalanceResult, CHARLIE, 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, 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$1 as LightSystemProgram, type LightSystemProgram as LightSystemProgramIDL, type LightWasm, LookupTableError, LookupTableErrorCode, MerkeProofResult, type MerkleContext, MerkleContextLayout, type MerkleContextWithMerkleProof, type MerkleContextWithNewAddressProof, MerkleTree, MerkleTreeError, MerkleTreeErrorCode, type MerkleTreeSequenceNumber, MerkleTreeSequenceNumberLayout, MultipleCompressedAccountsResult, MultipleMerkleProofsResult, NativeBalanceResult, type NewAddressParams, NewAddressParamsLayout, type NewAddressParamsPacked, NewAddressProofResult, type NonInclusionJsonStruct, type NonInclusionMerkleProofInputs, type OutputCompressedAccountWithPackedContext, type PackedCompressedAccountWithMerkleContext, type PackedMerkleContext, type PaginatedOptions, type ParsedTokenAccount, ProofError, ProofErrorCode, type PublicTransactionEvent, PublicTransactionEventLayout, type QueueIndex, 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 StateTreeLUTPair, TRANSACTION_MERKLE_TREE_ROLLOVER_THRESHOLD, TestRpc, type TestRpcConfig, type TokenBalance, TokenBalanceListResult, TokenBalanceListResultV2, TokenBalanceResult, type TokenData$1 as TokenData, TokenDataLayout, TokenDataResult, TreeType, UTXO_MERGE_MAXIMUM, UTXO_MERGE_THRESHOLD, UtilsError, UtilsErrorCode, UtxoError, UtxoErrorCode, ValidityProofResult, type WithContext, type WithCursor, type WithRpcContext, accountCompressionProgram, addressQueue, addressTree, airdropSol, bn, bufToDecStr, buildAndSignTx, buildTx, byteArrayToKeypair, calculateComputeUnitPrice, checkValidityProofShape, compress, confirmConfig, confirmTransaction, confirmTx, convertMerkleProofsWithContextToHex, convertNonInclusionMerkleProofInputsToHex, convertToPublicTransactionEvent, cpiContext2Pubkey, cpiContextPubkey, createAccount, createAccountWithLamports, createBN254, createCompressedAccount, createCompressedAccountWithMerkleContext, createMerkleContext, createRpc, createRpcResult, createStateTreeLookupTable, decodeInstructionDataInvoke, decodeInstructionDataInvokeCpi, decodePublicTransactionEvent, decompress, dedupeSigner, deepEqual, defaultStateTreeLookupTables, defaultStaticAccounts, defaultStaticAccountsStruct, defaultTestStateTreeAccounts, defaultTestStateTreeAccounts2, deriveAddress, deriveAddressSeed, deserializeAppendNullifyCreateAddressInputsIndexer, encodeBN254toBase58, encodeInstructionDataInvoke, encodePublicTransactionEvent, extendStateTreeLookupTable, getAccountCompressionAuthority, getCompressedTokenAccountByHashTest, getCompressedTokenAccounts, getCompressedTokenAccountsByDelegateTest, getCompressedTokenAccountsByOwnerTest, getConnection, getIndexOrAdd, getLightStateTreeInfo, getParsedEvents, getPublicInputHash, getQueueForTree, getRegisteredProgramPda, getTestKeypair, getTestRpc, getTreeForQueue, hashToBn254FieldSizeBe, hashvToBn254FieldSizeBe, invokeAccountsLayout, type invokeAccountsLayoutParams, isLocalTest, jsonRpcResult, jsonRpcResultAndContext, lightProgram, localTestActiveStateTreeInfo, logger, merkleTree2Pubkey, merkletreePubkey, negateAndCompressProof, newAccountWithLamports, noopProgram, nullifiedStateTreeLookupTableDevnet, nullifiedStateTreeLookupTableMainnet, nullifierQueue2Pubkey, nullifierQueuePubkey, nullifyLookupTable, packCompressedAccounts, packNewAddressParams, padOutputStateMerkleTrees, parseAccountData, parseEvents, parseLightTransaction, parsePublicTransactionEventWithIdl, parseTokenLayoutWithIdl, pickRandomTreeAndQueue, pipe, placeholderValidityProof, proofFromJsonStruct, proverRequest, pushUniqueItems, rpcRequest, selectMinCompressedSolAccountsForTransfer, sendAndConfirmTx, sleep, stateTreeLookupTableDevnet, stateTreeLookupTableMainnet, sumUpLamports, toAccountMetas, toArray, toCamelCase, toHex, toUnixTimestamp, transfer, validateSameOwner, validateSufficientBalance, wrapBigNumbersAsStrings };
4723
+ export {
4724
+ ADDRESS_QUEUE_ROLLOVER_FEE,
4725
+ ADDRESS_TREE_NETWORK_FEE,
4726
+ ALICE,
4727
+ AccountProofResult,
4728
+ type ActiveTreeBundle,
4729
+ type AddressWithTree,
4730
+ AppendLeavesInputLayout,
4731
+ AppendNullifyCreateAddressInputsMetaLayout,
4732
+ type BN254,
4733
+ BOB,
4734
+ BalanceResult,
4735
+ CHARLIE,
4736
+ COMPUTE_BUDGET_PATTERN,
4737
+ type ClientSubscriptionId,
4738
+ type CompressedAccount,
4739
+ type CompressedAccountData,
4740
+ CompressedAccountLayout,
4741
+ CompressedAccountResult,
4742
+ type CompressedAccountWithMerkleContext,
4743
+ CompressedAccountsByOwnerResult,
4744
+ type CompressedCpiContext,
4745
+ type CompressedMintTokenHolders,
4746
+ CompressedMintTokenHoldersResult,
4747
+ type CompressedProof,
4748
+ type CompressedProofWithContext,
4749
+ CompressedTokenAccountResult,
4750
+ CompressedTokenAccountsByOwnerOrDelegateResult,
4751
+ type CompressedTransaction,
4752
+ CompressedTransactionResult,
4753
+ type CompressionApiInterface,
4754
+ CreateUtxoError,
4755
+ CreateUtxoErrorCode,
4756
+ DAVE,
4757
+ DEFAULT_MERKLE_TREE_HEIGHT,
4758
+ DEFAULT_MERKLE_TREE_ROOTS,
4759
+ DEFAULT_ZERO,
4760
+ type EventWithParsedTokenTlvData,
4761
+ FIELD_SIZE,
4762
+ type GetCompressedAccountConfig,
4763
+ type GetCompressedAccountsByOwnerConfig,
4764
+ type GetCompressedAccountsConfig,
4765
+ type GetCompressedAccountsFilter,
4766
+ type GetCompressedTokenAccountsByOwnerOrDelegateOptions,
4767
+ HIGHEST_ADDRESS_PLUS_ONE,
4768
+ HashError,
4769
+ HashErrorCode,
4770
+ type HashWithTree,
4771
+ HealthResult,
4772
+ type HexBatchInputsForProver,
4773
+ type HexInputsForProver,
4774
+ IDL,
4775
+ INSERT_INTO_QUEUES_DISCRIMINATOR,
4776
+ INVOKE_CPI_DISCRIMINATOR,
4777
+ INVOKE_DISCRIMINATOR,
4778
+ IndexedArray,
4779
+ IndexedElement,
4780
+ IndexedElementBundle,
4781
+ type InputTokenDataWithContext,
4782
+ InsertAddressInputLayout,
4783
+ InsertNullifierInputLayout,
4784
+ type InstructionDataInvoke,
4785
+ type InstructionDataInvokeCpi,
4786
+ InstructionDataInvokeCpiLayout,
4787
+ InstructionDataInvokeLayout,
4788
+ type LatestNonVotingSignatures,
4789
+ type LatestNonVotingSignaturesPaginated,
4790
+ LatestNonVotingSignaturesResult,
4791
+ LatestNonVotingSignaturesResultPaginated,
4792
+ LightSystemProgram$1 as LightSystemProgram,
4793
+ type LightSystemProgram as LightSystemProgramIDL,
4794
+ type LightWasm,
4795
+ LookupTableError,
4796
+ LookupTableErrorCode,
4797
+ MerkeProofResult,
4798
+ type MerkleContext,
4799
+ MerkleContextLayout,
4800
+ type MerkleContextWithMerkleProof,
4801
+ type MerkleContextWithNewAddressProof,
4802
+ MerkleTree,
4803
+ MerkleTreeError,
4804
+ MerkleTreeErrorCode,
4805
+ type MerkleTreeSequenceNumber,
4806
+ MerkleTreeSequenceNumberLayout,
4807
+ MultipleCompressedAccountsResult,
4808
+ MultipleMerkleProofsResult,
4809
+ NativeBalanceResult,
4810
+ type NewAddressParams,
4811
+ NewAddressParamsLayout,
4812
+ type NewAddressParamsPacked,
4813
+ NewAddressProofResult,
4814
+ type NonInclusionJsonStruct,
4815
+ type NonInclusionMerkleProofInputs,
4816
+ type OutputCompressedAccountWithPackedContext,
4817
+ type PackedCompressedAccountWithMerkleContext,
4818
+ type PackedMerkleContext,
4819
+ type PaginatedOptions,
4820
+ type ParsedTokenAccount,
4821
+ ProofError,
4822
+ ProofErrorCode,
4823
+ type PublicTransactionEvent,
4824
+ PublicTransactionEventLayout,
4825
+ type QueueIndex,
4826
+ Rpc,
4827
+ RpcError,
4828
+ RpcErrorCode,
4829
+ type RpcResult,
4830
+ type RpcResultError,
4831
+ type RpcResultSuccess,
4832
+ STATE_MERKLE_TREE_NETWORK_FEE,
4833
+ STATE_MERKLE_TREE_ROLLOVER_FEE,
4834
+ SelectInUtxosError,
4835
+ SelectInUtxosErrorCode,
4836
+ SignatureListResult,
4837
+ SignatureListWithCursorResult,
4838
+ type SignatureWithMetadata,
4839
+ SlotResult,
4840
+ type StateTreeLUTPair,
4841
+ TRANSACTION_MERKLE_TREE_ROLLOVER_THRESHOLD,
4842
+ TestRpc,
4843
+ type TestRpcConfig,
4844
+ type TokenBalance,
4845
+ TokenBalanceListResult,
4846
+ TokenBalanceListResultV2,
4847
+ TokenBalanceResult,
4848
+ type TokenData$1 as TokenData,
4849
+ TokenDataLayout,
4850
+ TokenDataResult,
4851
+ TreeType,
4852
+ UTXO_MERGE_MAXIMUM,
4853
+ UTXO_MERGE_THRESHOLD,
4854
+ UtilsError,
4855
+ UtilsErrorCode,
4856
+ UtxoError,
4857
+ UtxoErrorCode,
4858
+ ValidityProofResult,
4859
+ type WithContext,
4860
+ type WithCursor,
4861
+ type WithRpcContext,
4862
+ accountCompressionProgram,
4863
+ addressQueue,
4864
+ addressTree,
4865
+ airdropSol,
4866
+ bn,
4867
+ bufToDecStr,
4868
+ buildAndSignTx,
4869
+ buildTx,
4870
+ byteArrayToKeypair,
4871
+ calculateComputeUnitPrice,
4872
+ checkValidityProofShape,
4873
+ compress,
4874
+ confirmConfig,
4875
+ confirmTransaction,
4876
+ confirmTx,
4877
+ convertMerkleProofsWithContextToHex,
4878
+ convertNonInclusionMerkleProofInputsToHex,
4879
+ convertToPublicTransactionEvent,
4880
+ cpiContext2Pubkey,
4881
+ cpiContextPubkey,
4882
+ createAccount,
4883
+ createAccountWithLamports,
4884
+ createBN254,
4885
+ createCompressedAccount,
4886
+ createCompressedAccountWithMerkleContext,
4887
+ createMerkleContext,
4888
+ createRpc,
4889
+ createRpcResult,
4890
+ createStateTreeLookupTable,
4891
+ decodeInstructionDataInvoke,
4892
+ decodeInstructionDataInvokeCpi,
4893
+ decodePublicTransactionEvent,
4894
+ decompress,
4895
+ dedupeSigner,
4896
+ deepEqual,
4897
+ defaultStateTreeLookupTables,
4898
+ defaultStaticAccounts,
4899
+ defaultStaticAccountsStruct,
4900
+ defaultTestStateTreeAccounts,
4901
+ defaultTestStateTreeAccounts2,
4902
+ deriveAddress,
4903
+ deriveAddressSeed,
4904
+ deserializeAppendNullifyCreateAddressInputsIndexer,
4905
+ encodeBN254toBase58,
4906
+ encodeInstructionDataInvoke,
4907
+ encodePublicTransactionEvent,
4908
+ extendStateTreeLookupTable,
4909
+ getAccountCompressionAuthority,
4910
+ getCompressedTokenAccountByHashTest,
4911
+ getCompressedTokenAccounts,
4912
+ getCompressedTokenAccountsByDelegateTest,
4913
+ getCompressedTokenAccountsByOwnerTest,
4914
+ getConnection,
4915
+ getIndexOrAdd,
4916
+ getLightStateTreeInfo,
4917
+ getParsedEvents,
4918
+ getPublicInputHash,
4919
+ getQueueForTree,
4920
+ getRegisteredProgramPda,
4921
+ getTestKeypair,
4922
+ getTestRpc,
4923
+ getTreeForQueue,
4924
+ hashToBn254FieldSizeBe,
4925
+ hashvToBn254FieldSizeBe,
4926
+ invokeAccountsLayout,
4927
+ type invokeAccountsLayoutParams,
4928
+ isLocalTest,
4929
+ jsonRpcResult,
4930
+ jsonRpcResultAndContext,
4931
+ lightProgram,
4932
+ localTestActiveStateTreeInfo,
4933
+ merkleTree2Pubkey,
4934
+ merkletreePubkey,
4935
+ negateAndCompressProof,
4936
+ newAccountWithLamports,
4937
+ noopProgram,
4938
+ nullifiedStateTreeLookupTableDevnet,
4939
+ nullifiedStateTreeLookupTableMainnet,
4940
+ nullifierQueue2Pubkey,
4941
+ nullifierQueuePubkey,
4942
+ nullifyLookupTable,
4943
+ packCompressedAccounts,
4944
+ packNewAddressParams,
4945
+ padOutputStateMerkleTrees,
4946
+ parseAccountData,
4947
+ parseEvents,
4948
+ parseLightTransaction,
4949
+ parsePublicTransactionEventWithIdl,
4950
+ parseTokenLayoutWithIdl,
4951
+ pickRandomTreeAndQueue,
4952
+ pipe,
4953
+ placeholderValidityProof,
4954
+ proofFromJsonStruct,
4955
+ proverRequest,
4956
+ pushUniqueItems,
4957
+ rpcRequest,
4958
+ selectMinCompressedSolAccountsForTransfer,
4959
+ sendAndConfirmTx,
4960
+ sleep,
4961
+ stateTreeLookupTableDevnet,
4962
+ stateTreeLookupTableMainnet,
4963
+ sumUpLamports,
4964
+ toAccountMetas,
4965
+ toArray,
4966
+ toCamelCase,
4967
+ toHex,
4968
+ toUnixTimestamp,
4969
+ transfer,
4970
+ validateSameOwner,
4971
+ validateSufficientBalance,
4972
+ wrapBigNumbersAsStrings,
4973
+ };