@lightprotocol/stateless.js 0.20.9 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/cjs/browser/actions/compress.d.ts +9 -7
  2. package/dist/cjs/browser/actions/create-account.d.ts +25 -28
  3. package/dist/cjs/browser/actions/decompress.d.ts +6 -7
  4. package/dist/cjs/browser/actions/index.d.ts +1 -1
  5. package/dist/cjs/browser/actions/transfer.d.ts +7 -11
  6. package/dist/cjs/browser/constants.d.ts +40 -7
  7. package/dist/cjs/browser/index.cjs +1 -1
  8. package/dist/cjs/browser/index.cjs.map +1 -1
  9. package/dist/cjs/browser/index.d.ts +1 -3
  10. package/dist/cjs/browser/programs/index.d.ts +0 -1
  11. package/dist/cjs/{node → browser/programs/system}/idl.d.ts +5 -27
  12. package/dist/cjs/browser/programs/system/index.d.ts +5 -0
  13. package/dist/cjs/browser/programs/{layout.d.ts → system/layout.d.ts} +37 -1
  14. package/dist/cjs/browser/programs/system/pack.d.ts +74 -0
  15. package/dist/cjs/browser/programs/{system.d.ts → system/program.d.ts} +25 -49
  16. package/dist/cjs/browser/programs/system/select-compressed-accounts.d.ts +10 -0
  17. package/dist/cjs/browser/rpc-interface.d.ts +1689 -82
  18. package/dist/cjs/browser/rpc.d.ts +27 -67
  19. package/dist/cjs/browser/state/BN254.d.ts +0 -1
  20. package/dist/cjs/browser/state/bn.d.ts +3 -0
  21. package/dist/cjs/browser/state/compressed-account.d.ts +189 -15
  22. package/dist/cjs/browser/state/index.d.ts +1 -0
  23. package/dist/cjs/browser/state/types.d.ts +345 -31
  24. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +3 -3
  25. package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +21 -49
  26. package/dist/cjs/browser/utils/calculate-compute-unit-price.d.ts +1 -1
  27. package/dist/cjs/browser/utils/conversion.d.ts +2 -0
  28. package/dist/cjs/browser/utils/get-state-tree-infos.d.ts +48 -0
  29. package/dist/cjs/browser/utils/index.d.ts +4 -2
  30. package/dist/cjs/browser/utils/parse-validity-proof.d.ts +3 -3
  31. package/dist/cjs/browser/utils/send-and-confirm.d.ts +1 -1
  32. package/dist/cjs/browser/utils/state-tree-lookup-table.d.ts +68 -0
  33. package/dist/cjs/browser/utils/validation.d.ts +2 -2
  34. package/dist/cjs/node/actions/compress.d.ts +9 -7
  35. package/dist/cjs/node/actions/create-account.d.ts +25 -28
  36. package/dist/cjs/node/actions/decompress.d.ts +6 -7
  37. package/dist/cjs/node/actions/index.d.ts +1 -1
  38. package/dist/cjs/node/actions/transfer.d.ts +7 -11
  39. package/dist/cjs/node/constants.d.ts +40 -7
  40. package/dist/cjs/node/index.cjs +1 -1
  41. package/dist/cjs/node/index.cjs.map +1 -1
  42. package/dist/cjs/node/index.d.ts +1 -3
  43. package/dist/cjs/node/programs/index.d.ts +0 -1
  44. package/dist/cjs/{browser → node/programs/system}/idl.d.ts +5 -27
  45. package/dist/cjs/node/programs/system/index.d.ts +5 -0
  46. package/dist/cjs/node/programs/{layout.d.ts → system/layout.d.ts} +37 -1
  47. package/dist/cjs/node/programs/system/pack.d.ts +74 -0
  48. package/dist/cjs/node/programs/{system.d.ts → system/program.d.ts} +25 -49
  49. package/dist/cjs/node/programs/system/select-compressed-accounts.d.ts +10 -0
  50. package/dist/cjs/node/rpc-interface.d.ts +1689 -82
  51. package/dist/cjs/node/rpc.d.ts +27 -67
  52. package/dist/cjs/node/state/BN254.d.ts +0 -1
  53. package/dist/cjs/node/state/bn.d.ts +3 -0
  54. package/dist/cjs/node/state/compressed-account.d.ts +189 -15
  55. package/dist/cjs/node/state/index.d.ts +1 -0
  56. package/dist/cjs/node/state/types.d.ts +345 -31
  57. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +3 -3
  58. package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +21 -49
  59. package/dist/cjs/node/utils/calculate-compute-unit-price.d.ts +1 -1
  60. package/dist/cjs/node/utils/conversion.d.ts +2 -0
  61. package/dist/cjs/node/utils/get-state-tree-infos.d.ts +48 -0
  62. package/dist/cjs/node/utils/index.d.ts +4 -2
  63. package/dist/cjs/node/utils/parse-validity-proof.d.ts +3 -3
  64. package/dist/cjs/node/utils/send-and-confirm.d.ts +1 -1
  65. package/dist/cjs/node/utils/state-tree-lookup-table.d.ts +68 -0
  66. package/dist/cjs/node/utils/validation.d.ts +2 -2
  67. package/dist/types/index.d.ts +3177 -1063
  68. package/package.json +16 -8
  69. package/dist/cjs/browser/instruction/index.d.ts +0 -1
  70. package/dist/cjs/browser/instruction/pack-compressed-accounts.d.ts +0 -51
  71. package/dist/cjs/browser/utils/get-light-state-tree-info.d.ts +0 -76
  72. package/dist/cjs/node/instruction/index.d.ts +0 -1
  73. package/dist/cjs/node/instruction/pack-compressed-accounts.d.ts +0 -51
  74. package/dist/cjs/node/utils/get-light-state-tree-info.d.ts +0 -76
  75. /package/dist/cjs/browser/{actions/common.d.ts → utils/dedupe-signer.d.ts} +0 -0
  76. /package/dist/cjs/node/{actions/common.d.ts → utils/dedupe-signer.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { PublicKey, MemcmpFilter, DataSlice } from '@solana/web3.js';
2
2
  import { Struct } from 'superstruct';
3
- import { BN254, CompressedProof, CompressedAccountWithMerkleContext, MerkleContextWithMerkleProof, TokenData } from './state';
3
+ import { BN254, ValidityProof, CompressedAccountWithMerkleContext, MerkleContextWithMerkleProof, TokenData, TreeInfo, AddressTreeInfo, CompressedProof } from './state';
4
4
  import BN from 'bn.js';
5
5
  export interface LatestNonVotingSignatures {
6
6
  context: {
@@ -43,6 +43,32 @@ export interface SignatureWithMetadata {
43
43
  signature: string;
44
44
  slot: number;
45
45
  }
46
+ /**
47
+ * Account hash and associated state tree info.
48
+ */
49
+ export interface HashWithTreeInfo {
50
+ /**
51
+ * Account hash.
52
+ */
53
+ hash: BN254;
54
+ /**
55
+ * State tree info.
56
+ */
57
+ stateTreeInfo: TreeInfo;
58
+ }
59
+ /**
60
+ * Address and associated address tree info.
61
+ */
62
+ export interface AddressWithTreeInfo {
63
+ /**
64
+ * Address.
65
+ */
66
+ address: BN254;
67
+ /**
68
+ * Address tree info.
69
+ */
70
+ addressTreeInfo: AddressTreeInfo;
71
+ }
46
72
  export interface HashWithTree {
47
73
  hash: BN254;
48
74
  tree: PublicKey;
@@ -53,6 +79,10 @@ export interface AddressWithTree {
53
79
  tree: PublicKey;
54
80
  queue: PublicKey;
55
81
  }
82
+ export interface AddressWithTreeInfo {
83
+ address: BN254;
84
+ treeInfo: AddressTreeInfo;
85
+ }
56
86
  export interface CompressedTransaction {
57
87
  compressionInfo: {
58
88
  closedAccounts: {
@@ -85,6 +115,45 @@ export interface HexInputsForProver {
85
115
  pathElements: string[];
86
116
  leaf: string;
87
117
  }
118
+ /**
119
+ * Validity proof with context.
120
+ *
121
+ * You can request proofs via `rpc.getValidityProof` or
122
+ * `rpc.getValidityProofV0`.
123
+ */
124
+ export type ValidityProofWithContext = {
125
+ /**
126
+ * Validity proof.
127
+ */
128
+ compressedProof: ValidityProof | null;
129
+ /**
130
+ * Roots.
131
+ */
132
+ roots: BN[];
133
+ /**
134
+ * Root indices.
135
+ */
136
+ rootIndices: number[];
137
+ /**
138
+ * Leaf indices.
139
+ */
140
+ leafIndices: number[];
141
+ /**
142
+ * Leaves.
143
+ */
144
+ leaves: BN[];
145
+ /**
146
+ * Tree infos.
147
+ */
148
+ treeInfos: TreeInfo[];
149
+ /**
150
+ * Whether to prove by indices.
151
+ */
152
+ proveByIndices: boolean[];
153
+ };
154
+ /**
155
+ * @deprecated use {@link ValidityProofWithContext} instead
156
+ */
88
157
  export type CompressedProofWithContext = {
89
158
  compressedProof: CompressedProof;
90
159
  roots: BN[];
@@ -169,11 +238,11 @@ export declare const CompressedAccountResult: Struct<{
169
238
  discriminator: BN;
170
239
  } | null;
171
240
  lamports: BN;
241
+ tree: PublicKey;
172
242
  address: number[] | null;
173
243
  hash: BN;
174
244
  owner: PublicKey;
175
245
  leafIndex: number;
176
- tree: PublicKey;
177
246
  seq: BN | null;
178
247
  slotCreated: BN;
179
248
  }, {
@@ -195,6 +264,79 @@ export declare const CompressedAccountResult: Struct<{
195
264
  seq: Struct<BN | null, null>;
196
265
  slotCreated: Struct<BN, null>;
197
266
  }>;
267
+ export declare const CompressedAccountResultV2: Struct<{
268
+ data: {
269
+ data: string;
270
+ dataHash: BN;
271
+ discriminator: BN;
272
+ } | null;
273
+ lamports: BN;
274
+ address: number[] | null;
275
+ hash: BN;
276
+ owner: PublicKey;
277
+ leafIndex: number;
278
+ seq: BN | null;
279
+ slotCreated: BN;
280
+ merkleContext: {
281
+ cpiContext: PublicKey | null;
282
+ tree: PublicKey;
283
+ queue: PublicKey;
284
+ treeType: number;
285
+ nextTreeContext?: {
286
+ cpiContext: PublicKey | null;
287
+ tree: PublicKey;
288
+ queue: PublicKey;
289
+ treeType: number;
290
+ } | null | undefined;
291
+ };
292
+ proveByIndex: boolean;
293
+ }, {
294
+ address: Struct<number[] | null, null>;
295
+ hash: Struct<BN, null>;
296
+ data: Struct<{
297
+ data: string;
298
+ dataHash: BN;
299
+ discriminator: BN;
300
+ } | null, {
301
+ data: Struct<string, null>;
302
+ dataHash: Struct<BN, null>;
303
+ discriminator: Struct<BN, null>;
304
+ }>;
305
+ lamports: Struct<BN, null>;
306
+ owner: Struct<PublicKey, null>;
307
+ leafIndex: Struct<number, null>;
308
+ seq: Struct<BN | null, null>;
309
+ slotCreated: Struct<BN, null>;
310
+ merkleContext: Struct<{
311
+ cpiContext: PublicKey | null;
312
+ tree: PublicKey;
313
+ queue: PublicKey;
314
+ treeType: number;
315
+ nextTreeContext?: {
316
+ cpiContext: PublicKey | null;
317
+ tree: PublicKey;
318
+ queue: PublicKey;
319
+ treeType: number;
320
+ } | null | undefined;
321
+ }, {
322
+ treeType: Struct<number, null>;
323
+ tree: Struct<PublicKey, null>;
324
+ queue: Struct<PublicKey, null>;
325
+ cpiContext: Struct<PublicKey | null, null>;
326
+ nextTreeContext: Struct<{
327
+ cpiContext: PublicKey | null;
328
+ tree: PublicKey;
329
+ queue: PublicKey;
330
+ treeType: number;
331
+ } | null | undefined, {
332
+ treeType: Struct<number, null>;
333
+ tree: Struct<PublicKey, null>;
334
+ queue: Struct<PublicKey, null>;
335
+ cpiContext: Struct<PublicKey | null, null>;
336
+ }>;
337
+ }>;
338
+ proveByIndex: Struct<boolean, null>;
339
+ }>;
198
340
  export declare const TokenDataResult: Struct<{
199
341
  owner: PublicKey;
200
342
  mint: PublicKey;
@@ -226,11 +368,11 @@ export declare const CompressedTokenAccountResult: Struct<{
226
368
  discriminator: BN;
227
369
  } | null;
228
370
  lamports: BN;
371
+ tree: PublicKey;
229
372
  address: number[] | null;
230
373
  hash: BN;
231
374
  owner: PublicKey;
232
375
  leafIndex: number;
233
- tree: PublicKey;
234
376
  seq: BN | null;
235
377
  slotCreated: BN;
236
378
  };
@@ -255,11 +397,11 @@ export declare const CompressedTokenAccountResult: Struct<{
255
397
  discriminator: BN;
256
398
  } | null;
257
399
  lamports: BN;
400
+ tree: PublicKey;
258
401
  address: number[] | null;
259
402
  hash: BN;
260
403
  owner: PublicKey;
261
404
  leafIndex: number;
262
- tree: PublicKey;
263
405
  seq: BN | null;
264
406
  slotCreated: BN;
265
407
  }, {
@@ -282,6 +424,132 @@ export declare const CompressedTokenAccountResult: Struct<{
282
424
  slotCreated: Struct<BN, null>;
283
425
  }>;
284
426
  }>;
427
+ /**
428
+ * @internal
429
+ */
430
+ export declare const CompressedTokenAccountResultV2: Struct<{
431
+ tokenData: {
432
+ owner: PublicKey;
433
+ mint: PublicKey;
434
+ amount: BN;
435
+ delegate: PublicKey | null;
436
+ state: string;
437
+ };
438
+ account: {
439
+ data: {
440
+ data: string;
441
+ dataHash: BN;
442
+ discriminator: BN;
443
+ } | null;
444
+ lamports: BN;
445
+ address: number[] | null;
446
+ hash: BN;
447
+ owner: PublicKey;
448
+ leafIndex: number;
449
+ seq: BN | null;
450
+ slotCreated: BN;
451
+ merkleContext: {
452
+ cpiContext: PublicKey | null;
453
+ tree: PublicKey;
454
+ queue: PublicKey;
455
+ treeType: number;
456
+ nextTreeContext?: {
457
+ cpiContext: PublicKey | null;
458
+ tree: PublicKey;
459
+ queue: PublicKey;
460
+ treeType: number;
461
+ } | null | undefined;
462
+ };
463
+ proveByIndex: boolean;
464
+ };
465
+ }, {
466
+ tokenData: Struct<{
467
+ owner: PublicKey;
468
+ mint: PublicKey;
469
+ amount: BN;
470
+ delegate: PublicKey | null;
471
+ state: string;
472
+ }, {
473
+ mint: Struct<PublicKey, null>;
474
+ owner: Struct<PublicKey, null>;
475
+ amount: Struct<BN, null>;
476
+ delegate: Struct<PublicKey | null, null>;
477
+ state: Struct<string, null>;
478
+ }>;
479
+ account: Struct<{
480
+ data: {
481
+ data: string;
482
+ dataHash: BN;
483
+ discriminator: BN;
484
+ } | null;
485
+ lamports: BN;
486
+ address: number[] | null;
487
+ hash: BN;
488
+ owner: PublicKey;
489
+ leafIndex: number;
490
+ seq: BN | null;
491
+ slotCreated: BN;
492
+ merkleContext: {
493
+ cpiContext: PublicKey | null;
494
+ tree: PublicKey;
495
+ queue: PublicKey;
496
+ treeType: number;
497
+ nextTreeContext?: {
498
+ cpiContext: PublicKey | null;
499
+ tree: PublicKey;
500
+ queue: PublicKey;
501
+ treeType: number;
502
+ } | null | undefined;
503
+ };
504
+ proveByIndex: boolean;
505
+ }, {
506
+ address: Struct<number[] | null, null>;
507
+ hash: Struct<BN, null>;
508
+ data: Struct<{
509
+ data: string;
510
+ dataHash: BN;
511
+ discriminator: BN;
512
+ } | null, {
513
+ data: Struct<string, null>;
514
+ dataHash: Struct<BN, null>;
515
+ discriminator: Struct<BN, null>;
516
+ }>;
517
+ lamports: Struct<BN, null>;
518
+ owner: Struct<PublicKey, null>;
519
+ leafIndex: Struct<number, null>;
520
+ seq: Struct<BN | null, null>;
521
+ slotCreated: Struct<BN, null>;
522
+ merkleContext: Struct<{
523
+ cpiContext: PublicKey | null;
524
+ tree: PublicKey;
525
+ queue: PublicKey;
526
+ treeType: number;
527
+ nextTreeContext?: {
528
+ cpiContext: PublicKey | null;
529
+ tree: PublicKey;
530
+ queue: PublicKey;
531
+ treeType: number;
532
+ } | null | undefined;
533
+ }, {
534
+ treeType: Struct<number, null>;
535
+ tree: Struct<PublicKey, null>;
536
+ queue: Struct<PublicKey, null>;
537
+ cpiContext: Struct<PublicKey | null, null>;
538
+ nextTreeContext: Struct<{
539
+ cpiContext: PublicKey | null;
540
+ tree: PublicKey;
541
+ queue: PublicKey;
542
+ treeType: number;
543
+ } | null | undefined, {
544
+ treeType: Struct<number, null>;
545
+ tree: Struct<PublicKey, null>;
546
+ queue: Struct<PublicKey, null>;
547
+ cpiContext: Struct<PublicKey | null, null>;
548
+ }>;
549
+ }>;
550
+ proveByIndex: Struct<boolean, null>;
551
+ }>;
552
+ }>;
285
553
  /**
286
554
  * @internal
287
555
  */
@@ -293,11 +561,11 @@ export declare const MultipleCompressedAccountsResult: Struct<{
293
561
  discriminator: BN;
294
562
  } | null;
295
563
  lamports: BN;
564
+ tree: PublicKey;
296
565
  address: number[] | null;
297
566
  hash: BN;
298
567
  owner: PublicKey;
299
568
  leafIndex: number;
300
- tree: PublicKey;
301
569
  seq: BN | null;
302
570
  slotCreated: BN;
303
571
  }[];
@@ -309,11 +577,11 @@ export declare const MultipleCompressedAccountsResult: Struct<{
309
577
  discriminator: BN;
310
578
  } | null;
311
579
  lamports: BN;
580
+ tree: PublicKey;
312
581
  address: number[] | null;
313
582
  hash: BN;
314
583
  owner: PublicKey;
315
584
  leafIndex: number;
316
- tree: PublicKey;
317
585
  seq: BN | null;
318
586
  slotCreated: BN;
319
587
  }[], Struct<{
@@ -323,11 +591,11 @@ export declare const MultipleCompressedAccountsResult: Struct<{
323
591
  discriminator: BN;
324
592
  } | null;
325
593
  lamports: BN;
594
+ tree: PublicKey;
326
595
  address: number[] | null;
327
596
  hash: BN;
328
597
  owner: PublicKey;
329
598
  leafIndex: number;
330
- tree: PublicKey;
331
599
  seq: BN | null;
332
600
  slotCreated: BN;
333
601
  }, {
@@ -353,7 +621,7 @@ export declare const MultipleCompressedAccountsResult: Struct<{
353
621
  /**
354
622
  * @internal
355
623
  */
356
- export declare const CompressedAccountsByOwnerResult: Struct<{
624
+ export declare const MultipleCompressedAccountsResultV2: Struct<{
357
625
  items: {
358
626
  data: {
359
627
  data: string;
@@ -365,11 +633,22 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
365
633
  hash: BN;
366
634
  owner: PublicKey;
367
635
  leafIndex: number;
368
- tree: PublicKey;
369
636
  seq: BN | null;
370
637
  slotCreated: BN;
638
+ merkleContext: {
639
+ cpiContext: PublicKey | null;
640
+ tree: PublicKey;
641
+ queue: PublicKey;
642
+ treeType: number;
643
+ nextTreeContext?: {
644
+ cpiContext: PublicKey | null;
645
+ tree: PublicKey;
646
+ queue: PublicKey;
647
+ treeType: number;
648
+ } | null | undefined;
649
+ };
650
+ proveByIndex: boolean;
371
651
  }[];
372
- cursor: string | null;
373
652
  }, {
374
653
  items: Struct<{
375
654
  data: {
@@ -382,9 +661,21 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
382
661
  hash: BN;
383
662
  owner: PublicKey;
384
663
  leafIndex: number;
385
- tree: PublicKey;
386
664
  seq: BN | null;
387
665
  slotCreated: BN;
666
+ merkleContext: {
667
+ cpiContext: PublicKey | null;
668
+ tree: PublicKey;
669
+ queue: PublicKey;
670
+ treeType: number;
671
+ nextTreeContext?: {
672
+ cpiContext: PublicKey | null;
673
+ tree: PublicKey;
674
+ queue: PublicKey;
675
+ treeType: number;
676
+ } | null | undefined;
677
+ };
678
+ proveByIndex: boolean;
388
679
  }[], Struct<{
389
680
  data: {
390
681
  data: string;
@@ -396,9 +687,21 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
396
687
  hash: BN;
397
688
  owner: PublicKey;
398
689
  leafIndex: number;
399
- tree: PublicKey;
400
690
  seq: BN | null;
401
691
  slotCreated: BN;
692
+ merkleContext: {
693
+ cpiContext: PublicKey | null;
694
+ tree: PublicKey;
695
+ queue: PublicKey;
696
+ treeType: number;
697
+ nextTreeContext?: {
698
+ cpiContext: PublicKey | null;
699
+ tree: PublicKey;
700
+ queue: PublicKey;
701
+ treeType: number;
702
+ } | null | undefined;
703
+ };
704
+ proveByIndex: boolean;
402
705
  }, {
403
706
  address: Struct<number[] | null, null>;
404
707
  hash: Struct<BN, null>;
@@ -414,69 +717,277 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
414
717
  lamports: Struct<BN, null>;
415
718
  owner: Struct<PublicKey, null>;
416
719
  leafIndex: Struct<number, null>;
417
- tree: Struct<PublicKey, null>;
418
720
  seq: Struct<BN | null, null>;
419
721
  slotCreated: Struct<BN, null>;
722
+ merkleContext: Struct<{
723
+ cpiContext: PublicKey | null;
724
+ tree: PublicKey;
725
+ queue: PublicKey;
726
+ treeType: number;
727
+ nextTreeContext?: {
728
+ cpiContext: PublicKey | null;
729
+ tree: PublicKey;
730
+ queue: PublicKey;
731
+ treeType: number;
732
+ } | null | undefined;
733
+ }, {
734
+ treeType: Struct<number, null>;
735
+ tree: Struct<PublicKey, null>;
736
+ queue: Struct<PublicKey, null>;
737
+ cpiContext: Struct<PublicKey | null, null>;
738
+ nextTreeContext: Struct<{
739
+ cpiContext: PublicKey | null;
740
+ tree: PublicKey;
741
+ queue: PublicKey;
742
+ treeType: number;
743
+ } | null | undefined, {
744
+ treeType: Struct<number, null>;
745
+ tree: Struct<PublicKey, null>;
746
+ queue: Struct<PublicKey, null>;
747
+ cpiContext: Struct<PublicKey | null, null>;
748
+ }>;
749
+ }>;
750
+ proveByIndex: Struct<boolean, null>;
420
751
  }>>;
421
- cursor: Struct<string | null, null>;
422
752
  }>;
423
753
  /**
424
754
  * @internal
425
755
  */
426
- export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
756
+ export declare const CompressedAccountsByOwnerResult: Struct<{
427
757
  items: {
428
- tokenData: {
429
- owner: PublicKey;
430
- mint: PublicKey;
431
- amount: BN;
432
- delegate: PublicKey | null;
433
- state: string;
434
- };
435
- account: {
436
- data: {
437
- data: string;
438
- dataHash: BN;
439
- discriminator: BN;
440
- } | null;
441
- lamports: BN;
442
- address: number[] | null;
443
- hash: BN;
444
- owner: PublicKey;
445
- leafIndex: number;
446
- tree: PublicKey;
447
- seq: BN | null;
448
- slotCreated: BN;
449
- };
758
+ data: {
759
+ data: string;
760
+ dataHash: BN;
761
+ discriminator: BN;
762
+ } | null;
763
+ lamports: BN;
764
+ tree: PublicKey;
765
+ address: number[] | null;
766
+ hash: BN;
767
+ owner: PublicKey;
768
+ leafIndex: number;
769
+ seq: BN | null;
770
+ slotCreated: BN;
450
771
  }[];
451
772
  cursor: string | null;
452
773
  }, {
453
774
  items: Struct<{
454
- tokenData: {
455
- owner: PublicKey;
456
- mint: PublicKey;
457
- amount: BN;
458
- delegate: PublicKey | null;
459
- state: string;
460
- };
461
- account: {
462
- data: {
463
- data: string;
464
- dataHash: BN;
465
- discriminator: BN;
466
- } | null;
467
- lamports: BN;
468
- address: number[] | null;
469
- hash: BN;
470
- owner: PublicKey;
471
- leafIndex: number;
472
- tree: PublicKey;
473
- seq: BN | null;
474
- slotCreated: BN;
475
- };
775
+ data: {
776
+ data: string;
777
+ dataHash: BN;
778
+ discriminator: BN;
779
+ } | null;
780
+ lamports: BN;
781
+ tree: PublicKey;
782
+ address: number[] | null;
783
+ hash: BN;
784
+ owner: PublicKey;
785
+ leafIndex: number;
786
+ seq: BN | null;
787
+ slotCreated: BN;
476
788
  }[], Struct<{
477
- tokenData: {
478
- owner: PublicKey;
479
- mint: PublicKey;
789
+ data: {
790
+ data: string;
791
+ dataHash: BN;
792
+ discriminator: BN;
793
+ } | null;
794
+ lamports: BN;
795
+ tree: PublicKey;
796
+ address: number[] | null;
797
+ hash: BN;
798
+ owner: PublicKey;
799
+ leafIndex: number;
800
+ seq: BN | null;
801
+ slotCreated: BN;
802
+ }, {
803
+ address: Struct<number[] | null, null>;
804
+ hash: Struct<BN, null>;
805
+ data: Struct<{
806
+ data: string;
807
+ dataHash: BN;
808
+ discriminator: BN;
809
+ } | null, {
810
+ data: Struct<string, null>;
811
+ dataHash: Struct<BN, null>;
812
+ discriminator: Struct<BN, null>;
813
+ }>;
814
+ lamports: Struct<BN, null>;
815
+ owner: Struct<PublicKey, null>;
816
+ leafIndex: Struct<number, null>;
817
+ tree: Struct<PublicKey, null>;
818
+ seq: Struct<BN | null, null>;
819
+ slotCreated: Struct<BN, null>;
820
+ }>>;
821
+ cursor: Struct<string | null, null>;
822
+ }>;
823
+ /**
824
+ * @internal
825
+ */
826
+ export declare const CompressedAccountsByOwnerResultV2: Struct<{
827
+ items: {
828
+ data: {
829
+ data: string;
830
+ dataHash: BN;
831
+ discriminator: BN;
832
+ } | null;
833
+ lamports: BN;
834
+ address: number[] | null;
835
+ hash: BN;
836
+ owner: PublicKey;
837
+ leafIndex: number;
838
+ seq: BN | null;
839
+ slotCreated: BN;
840
+ merkleContext: {
841
+ cpiContext: PublicKey | null;
842
+ tree: PublicKey;
843
+ queue: PublicKey;
844
+ treeType: number;
845
+ nextTreeContext?: {
846
+ cpiContext: PublicKey | null;
847
+ tree: PublicKey;
848
+ queue: PublicKey;
849
+ treeType: number;
850
+ } | null | undefined;
851
+ };
852
+ proveByIndex: boolean;
853
+ }[];
854
+ cursor: string | null;
855
+ }, {
856
+ items: Struct<{
857
+ data: {
858
+ data: string;
859
+ dataHash: BN;
860
+ discriminator: BN;
861
+ } | null;
862
+ lamports: BN;
863
+ address: number[] | null;
864
+ hash: BN;
865
+ owner: PublicKey;
866
+ leafIndex: number;
867
+ seq: BN | null;
868
+ slotCreated: BN;
869
+ merkleContext: {
870
+ cpiContext: PublicKey | null;
871
+ tree: PublicKey;
872
+ queue: PublicKey;
873
+ treeType: number;
874
+ nextTreeContext?: {
875
+ cpiContext: PublicKey | null;
876
+ tree: PublicKey;
877
+ queue: PublicKey;
878
+ treeType: number;
879
+ } | null | undefined;
880
+ };
881
+ proveByIndex: boolean;
882
+ }[], Struct<{
883
+ data: {
884
+ data: string;
885
+ dataHash: BN;
886
+ discriminator: BN;
887
+ } | null;
888
+ lamports: BN;
889
+ address: number[] | null;
890
+ hash: BN;
891
+ owner: PublicKey;
892
+ leafIndex: number;
893
+ seq: BN | null;
894
+ slotCreated: BN;
895
+ merkleContext: {
896
+ cpiContext: PublicKey | null;
897
+ tree: PublicKey;
898
+ queue: PublicKey;
899
+ treeType: number;
900
+ nextTreeContext?: {
901
+ cpiContext: PublicKey | null;
902
+ tree: PublicKey;
903
+ queue: PublicKey;
904
+ treeType: number;
905
+ } | null | undefined;
906
+ };
907
+ proveByIndex: boolean;
908
+ }, {
909
+ address: Struct<number[] | null, null>;
910
+ hash: Struct<BN, null>;
911
+ data: Struct<{
912
+ data: string;
913
+ dataHash: BN;
914
+ discriminator: BN;
915
+ } | null, {
916
+ data: Struct<string, null>;
917
+ dataHash: Struct<BN, null>;
918
+ discriminator: Struct<BN, null>;
919
+ }>;
920
+ lamports: Struct<BN, null>;
921
+ owner: Struct<PublicKey, null>;
922
+ leafIndex: Struct<number, null>;
923
+ seq: Struct<BN | null, null>;
924
+ slotCreated: Struct<BN, null>;
925
+ merkleContext: Struct<{
926
+ cpiContext: PublicKey | null;
927
+ tree: PublicKey;
928
+ queue: PublicKey;
929
+ treeType: number;
930
+ nextTreeContext?: {
931
+ cpiContext: PublicKey | null;
932
+ tree: PublicKey;
933
+ queue: PublicKey;
934
+ treeType: number;
935
+ } | null | undefined;
936
+ }, {
937
+ treeType: Struct<number, null>;
938
+ tree: Struct<PublicKey, null>;
939
+ queue: Struct<PublicKey, null>;
940
+ cpiContext: Struct<PublicKey | null, null>;
941
+ nextTreeContext: Struct<{
942
+ cpiContext: PublicKey | null;
943
+ tree: PublicKey;
944
+ queue: PublicKey;
945
+ treeType: number;
946
+ } | null | undefined, {
947
+ treeType: Struct<number, null>;
948
+ tree: Struct<PublicKey, null>;
949
+ queue: Struct<PublicKey, null>;
950
+ cpiContext: Struct<PublicKey | null, null>;
951
+ }>;
952
+ }>;
953
+ proveByIndex: Struct<boolean, null>;
954
+ }>>;
955
+ cursor: Struct<string | null, null>;
956
+ }>;
957
+ /**
958
+ * @internal
959
+ */
960
+ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
961
+ items: {
962
+ tokenData: {
963
+ owner: PublicKey;
964
+ mint: PublicKey;
965
+ amount: BN;
966
+ delegate: PublicKey | null;
967
+ state: string;
968
+ };
969
+ account: {
970
+ data: {
971
+ data: string;
972
+ dataHash: BN;
973
+ discriminator: BN;
974
+ } | null;
975
+ lamports: BN;
976
+ tree: PublicKey;
977
+ address: number[] | null;
978
+ hash: BN;
979
+ owner: PublicKey;
980
+ leafIndex: number;
981
+ seq: BN | null;
982
+ slotCreated: BN;
983
+ };
984
+ }[];
985
+ cursor: string | null;
986
+ }, {
987
+ items: Struct<{
988
+ tokenData: {
989
+ owner: PublicKey;
990
+ mint: PublicKey;
480
991
  amount: BN;
481
992
  delegate: PublicKey | null;
482
993
  state: string;
@@ -488,11 +999,34 @@ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
488
999
  discriminator: BN;
489
1000
  } | null;
490
1001
  lamports: BN;
1002
+ tree: PublicKey;
491
1003
  address: number[] | null;
492
1004
  hash: BN;
493
1005
  owner: PublicKey;
494
1006
  leafIndex: number;
1007
+ seq: BN | null;
1008
+ slotCreated: BN;
1009
+ };
1010
+ }[], Struct<{
1011
+ tokenData: {
1012
+ owner: PublicKey;
1013
+ mint: PublicKey;
1014
+ amount: BN;
1015
+ delegate: PublicKey | null;
1016
+ state: string;
1017
+ };
1018
+ account: {
1019
+ data: {
1020
+ data: string;
1021
+ dataHash: BN;
1022
+ discriminator: BN;
1023
+ } | null;
1024
+ lamports: BN;
495
1025
  tree: PublicKey;
1026
+ address: number[] | null;
1027
+ hash: BN;
1028
+ owner: PublicKey;
1029
+ leafIndex: number;
496
1030
  seq: BN | null;
497
1031
  slotCreated: BN;
498
1032
  };
@@ -517,11 +1051,11 @@ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
517
1051
  discriminator: BN;
518
1052
  } | null;
519
1053
  lamports: BN;
1054
+ tree: PublicKey;
520
1055
  address: number[] | null;
521
1056
  hash: BN;
522
1057
  owner: PublicKey;
523
1058
  leafIndex: number;
524
- tree: PublicKey;
525
1059
  seq: BN | null;
526
1060
  slotCreated: BN;
527
1061
  }, {
@@ -546,6 +1080,208 @@ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
546
1080
  }>>;
547
1081
  cursor: Struct<string | null, null>;
548
1082
  }>;
1083
+ /**
1084
+ * @internal
1085
+ */
1086
+ export declare const CompressedTokenAccountsByOwnerOrDelegateResultV2: Struct<{
1087
+ items: {
1088
+ tokenData: {
1089
+ owner: PublicKey;
1090
+ mint: PublicKey;
1091
+ amount: BN;
1092
+ delegate: PublicKey | null;
1093
+ state: string;
1094
+ };
1095
+ account: {
1096
+ data: {
1097
+ data: string;
1098
+ dataHash: BN;
1099
+ discriminator: BN;
1100
+ } | null;
1101
+ lamports: BN;
1102
+ address: number[] | null;
1103
+ hash: BN;
1104
+ owner: PublicKey;
1105
+ leafIndex: number;
1106
+ seq: BN | null;
1107
+ slotCreated: BN;
1108
+ merkleContext: {
1109
+ cpiContext: PublicKey | null;
1110
+ tree: PublicKey;
1111
+ queue: PublicKey;
1112
+ treeType: number;
1113
+ nextTreeContext?: {
1114
+ cpiContext: PublicKey | null;
1115
+ tree: PublicKey;
1116
+ queue: PublicKey;
1117
+ treeType: number;
1118
+ } | null | undefined;
1119
+ };
1120
+ proveByIndex: boolean;
1121
+ };
1122
+ }[];
1123
+ cursor: string | null;
1124
+ }, {
1125
+ items: Struct<{
1126
+ tokenData: {
1127
+ owner: PublicKey;
1128
+ mint: PublicKey;
1129
+ amount: BN;
1130
+ delegate: PublicKey | null;
1131
+ state: string;
1132
+ };
1133
+ account: {
1134
+ data: {
1135
+ data: string;
1136
+ dataHash: BN;
1137
+ discriminator: BN;
1138
+ } | null;
1139
+ lamports: BN;
1140
+ address: number[] | null;
1141
+ hash: BN;
1142
+ owner: PublicKey;
1143
+ leafIndex: number;
1144
+ seq: BN | null;
1145
+ slotCreated: BN;
1146
+ merkleContext: {
1147
+ cpiContext: PublicKey | null;
1148
+ tree: PublicKey;
1149
+ queue: PublicKey;
1150
+ treeType: number;
1151
+ nextTreeContext?: {
1152
+ cpiContext: PublicKey | null;
1153
+ tree: PublicKey;
1154
+ queue: PublicKey;
1155
+ treeType: number;
1156
+ } | null | undefined;
1157
+ };
1158
+ proveByIndex: boolean;
1159
+ };
1160
+ }[], Struct<{
1161
+ tokenData: {
1162
+ owner: PublicKey;
1163
+ mint: PublicKey;
1164
+ amount: BN;
1165
+ delegate: PublicKey | null;
1166
+ state: string;
1167
+ };
1168
+ account: {
1169
+ data: {
1170
+ data: string;
1171
+ dataHash: BN;
1172
+ discriminator: BN;
1173
+ } | null;
1174
+ lamports: BN;
1175
+ address: number[] | null;
1176
+ hash: BN;
1177
+ owner: PublicKey;
1178
+ leafIndex: number;
1179
+ seq: BN | null;
1180
+ slotCreated: BN;
1181
+ merkleContext: {
1182
+ cpiContext: PublicKey | null;
1183
+ tree: PublicKey;
1184
+ queue: PublicKey;
1185
+ treeType: number;
1186
+ nextTreeContext?: {
1187
+ cpiContext: PublicKey | null;
1188
+ tree: PublicKey;
1189
+ queue: PublicKey;
1190
+ treeType: number;
1191
+ } | null | undefined;
1192
+ };
1193
+ proveByIndex: boolean;
1194
+ };
1195
+ }, {
1196
+ tokenData: Struct<{
1197
+ owner: PublicKey;
1198
+ mint: PublicKey;
1199
+ amount: BN;
1200
+ delegate: PublicKey | null;
1201
+ state: string;
1202
+ }, {
1203
+ mint: Struct<PublicKey, null>;
1204
+ owner: Struct<PublicKey, null>;
1205
+ amount: Struct<BN, null>;
1206
+ delegate: Struct<PublicKey | null, null>;
1207
+ state: Struct<string, null>;
1208
+ }>;
1209
+ account: Struct<{
1210
+ data: {
1211
+ data: string;
1212
+ dataHash: BN;
1213
+ discriminator: BN;
1214
+ } | null;
1215
+ lamports: BN;
1216
+ address: number[] | null;
1217
+ hash: BN;
1218
+ owner: PublicKey;
1219
+ leafIndex: number;
1220
+ seq: BN | null;
1221
+ slotCreated: BN;
1222
+ merkleContext: {
1223
+ cpiContext: PublicKey | null;
1224
+ tree: PublicKey;
1225
+ queue: PublicKey;
1226
+ treeType: number;
1227
+ nextTreeContext?: {
1228
+ cpiContext: PublicKey | null;
1229
+ tree: PublicKey;
1230
+ queue: PublicKey;
1231
+ treeType: number;
1232
+ } | null | undefined;
1233
+ };
1234
+ proveByIndex: boolean;
1235
+ }, {
1236
+ address: Struct<number[] | null, null>;
1237
+ hash: Struct<BN, null>;
1238
+ data: Struct<{
1239
+ data: string;
1240
+ dataHash: BN;
1241
+ discriminator: BN;
1242
+ } | null, {
1243
+ data: Struct<string, null>;
1244
+ dataHash: Struct<BN, null>;
1245
+ discriminator: Struct<BN, null>;
1246
+ }>;
1247
+ lamports: Struct<BN, null>;
1248
+ owner: Struct<PublicKey, null>;
1249
+ leafIndex: Struct<number, null>;
1250
+ seq: Struct<BN | null, null>;
1251
+ slotCreated: Struct<BN, null>;
1252
+ merkleContext: Struct<{
1253
+ cpiContext: PublicKey | null;
1254
+ tree: PublicKey;
1255
+ queue: PublicKey;
1256
+ treeType: number;
1257
+ nextTreeContext?: {
1258
+ cpiContext: PublicKey | null;
1259
+ tree: PublicKey;
1260
+ queue: PublicKey;
1261
+ treeType: number;
1262
+ } | null | undefined;
1263
+ }, {
1264
+ treeType: Struct<number, null>;
1265
+ tree: Struct<PublicKey, null>;
1266
+ queue: Struct<PublicKey, null>;
1267
+ cpiContext: Struct<PublicKey | null, null>;
1268
+ nextTreeContext: Struct<{
1269
+ cpiContext: PublicKey | null;
1270
+ tree: PublicKey;
1271
+ queue: PublicKey;
1272
+ treeType: number;
1273
+ } | null | undefined, {
1274
+ treeType: Struct<number, null>;
1275
+ tree: Struct<PublicKey, null>;
1276
+ queue: Struct<PublicKey, null>;
1277
+ cpiContext: Struct<PublicKey | null, null>;
1278
+ }>;
1279
+ }>;
1280
+ proveByIndex: Struct<boolean, null>;
1281
+ }>;
1282
+ }>>;
1283
+ cursor: Struct<string | null, null>;
1284
+ }>;
549
1285
  /**
550
1286
  * @internal
551
1287
  */
@@ -611,7 +1347,7 @@ export declare const LatestNonVotingSignaturesResultPaginated: Struct<{
611
1347
  /**
612
1348
  * @internal
613
1349
  */
614
- export declare const MerkeProofResult: Struct<{
1350
+ export declare const MerkleProofResult: Struct<{
615
1351
  root: BN;
616
1352
  hash: BN;
617
1353
  leafIndex: number;
@@ -626,6 +1362,64 @@ export declare const MerkeProofResult: Struct<{
626
1362
  rootSeq: Struct<number, null>;
627
1363
  root: Struct<BN, null>;
628
1364
  }>;
1365
+ /**
1366
+ * @internal
1367
+ */
1368
+ export declare const MerkleProofResultV2: Struct<{
1369
+ root: BN;
1370
+ hash: BN;
1371
+ leafIndex: number;
1372
+ proveByIndex: boolean;
1373
+ proof: BN[];
1374
+ rootSeq: number;
1375
+ treeContext: {
1376
+ cpiContext: PublicKey | null;
1377
+ tree: PublicKey;
1378
+ queue: PublicKey;
1379
+ treeType: number;
1380
+ nextTreeContext?: {
1381
+ cpiContext: PublicKey | null;
1382
+ tree: PublicKey;
1383
+ queue: PublicKey;
1384
+ treeType: number;
1385
+ } | null | undefined;
1386
+ };
1387
+ }, {
1388
+ hash: Struct<BN, null>;
1389
+ leafIndex: Struct<number, null>;
1390
+ proof: Struct<BN[], Struct<BN, null>>;
1391
+ root: Struct<BN, null>;
1392
+ rootSeq: Struct<number, null>;
1393
+ proveByIndex: Struct<boolean, null>;
1394
+ treeContext: Struct<{
1395
+ cpiContext: PublicKey | null;
1396
+ tree: PublicKey;
1397
+ queue: PublicKey;
1398
+ treeType: number;
1399
+ nextTreeContext?: {
1400
+ cpiContext: PublicKey | null;
1401
+ tree: PublicKey;
1402
+ queue: PublicKey;
1403
+ treeType: number;
1404
+ } | null | undefined;
1405
+ }, {
1406
+ treeType: Struct<number, null>;
1407
+ tree: Struct<PublicKey, null>;
1408
+ queue: Struct<PublicKey, null>;
1409
+ cpiContext: Struct<PublicKey | null, null>;
1410
+ nextTreeContext: Struct<{
1411
+ cpiContext: PublicKey | null;
1412
+ tree: PublicKey;
1413
+ queue: PublicKey;
1414
+ treeType: number;
1415
+ } | null | undefined, {
1416
+ treeType: Struct<number, null>;
1417
+ tree: Struct<PublicKey, null>;
1418
+ queue: Struct<PublicKey, null>;
1419
+ cpiContext: Struct<PublicKey | null, null>;
1420
+ }>;
1421
+ }>;
1422
+ }>;
629
1423
  /**
630
1424
  * @internal
631
1425
  */
@@ -650,6 +1444,16 @@ export declare const NewAddressProofResult: Struct<{
650
1444
  higherRangeAddress: Struct<BN, null>;
651
1445
  lowElementLeafIndex: Struct<number, null>;
652
1446
  }>;
1447
+ /**
1448
+ * @internal
1449
+ */
1450
+ export declare const RootIndexResultV2: Struct<{
1451
+ proveByIndex: boolean;
1452
+ rootIndex: number;
1453
+ }, {
1454
+ rootIndex: Struct<number, null>;
1455
+ proveByIndex: Struct<boolean, null>;
1456
+ }>;
653
1457
  /**
654
1458
  * @internal
655
1459
  */
@@ -680,30 +1484,307 @@ export declare const ValidityProofResult: Struct<{
680
1484
  roots: Struct<BN[], Struct<BN, null>>;
681
1485
  merkleTrees: Struct<PublicKey[], Struct<PublicKey, null>>;
682
1486
  }>;
1487
+ export declare const ValidityProofResultV2: Struct<{
1488
+ accounts: {
1489
+ root: BN;
1490
+ hash: BN;
1491
+ leafIndex: number;
1492
+ merkleContext: {
1493
+ cpiContext: PublicKey | null;
1494
+ tree: PublicKey;
1495
+ queue: PublicKey;
1496
+ treeType: number;
1497
+ nextTreeContext?: {
1498
+ cpiContext: PublicKey | null;
1499
+ tree: PublicKey;
1500
+ queue: PublicKey;
1501
+ treeType: number;
1502
+ } | null | undefined;
1503
+ };
1504
+ rootIndex: {
1505
+ proveByIndex: boolean;
1506
+ rootIndex: number;
1507
+ };
1508
+ }[];
1509
+ compressedProof: {
1510
+ a: number[];
1511
+ c: number[];
1512
+ b: number[];
1513
+ } | null;
1514
+ addresses: {
1515
+ root: BN;
1516
+ address: BN;
1517
+ merkleContext: {
1518
+ cpiContext: PublicKey | null;
1519
+ tree: PublicKey;
1520
+ queue: PublicKey;
1521
+ treeType: number;
1522
+ nextTreeContext?: {
1523
+ cpiContext: PublicKey | null;
1524
+ tree: PublicKey;
1525
+ queue: PublicKey;
1526
+ treeType: number;
1527
+ } | null | undefined;
1528
+ };
1529
+ rootIndex: number;
1530
+ }[];
1531
+ }, {
1532
+ compressedProof: Struct<{
1533
+ a: number[];
1534
+ c: number[];
1535
+ b: number[];
1536
+ } | null, {
1537
+ a: Struct<number[], Struct<number, null>>;
1538
+ b: Struct<number[], Struct<number, null>>;
1539
+ c: Struct<number[], Struct<number, null>>;
1540
+ }>;
1541
+ accounts: Struct<{
1542
+ root: BN;
1543
+ hash: BN;
1544
+ leafIndex: number;
1545
+ merkleContext: {
1546
+ cpiContext: PublicKey | null;
1547
+ tree: PublicKey;
1548
+ queue: PublicKey;
1549
+ treeType: number;
1550
+ nextTreeContext?: {
1551
+ cpiContext: PublicKey | null;
1552
+ tree: PublicKey;
1553
+ queue: PublicKey;
1554
+ treeType: number;
1555
+ } | null | undefined;
1556
+ };
1557
+ rootIndex: {
1558
+ proveByIndex: boolean;
1559
+ rootIndex: number;
1560
+ };
1561
+ }[], Struct<{
1562
+ root: BN;
1563
+ hash: BN;
1564
+ leafIndex: number;
1565
+ merkleContext: {
1566
+ cpiContext: PublicKey | null;
1567
+ tree: PublicKey;
1568
+ queue: PublicKey;
1569
+ treeType: number;
1570
+ nextTreeContext?: {
1571
+ cpiContext: PublicKey | null;
1572
+ tree: PublicKey;
1573
+ queue: PublicKey;
1574
+ treeType: number;
1575
+ } | null | undefined;
1576
+ };
1577
+ rootIndex: {
1578
+ proveByIndex: boolean;
1579
+ rootIndex: number;
1580
+ };
1581
+ }, {
1582
+ hash: Struct<BN, null>;
1583
+ root: Struct<BN, null>;
1584
+ rootIndex: Struct<{
1585
+ proveByIndex: boolean;
1586
+ rootIndex: number;
1587
+ }, {
1588
+ rootIndex: Struct<number, null>;
1589
+ proveByIndex: Struct<boolean, null>;
1590
+ }>;
1591
+ merkleContext: Struct<{
1592
+ cpiContext: PublicKey | null;
1593
+ tree: PublicKey;
1594
+ queue: PublicKey;
1595
+ treeType: number;
1596
+ nextTreeContext?: {
1597
+ cpiContext: PublicKey | null;
1598
+ tree: PublicKey;
1599
+ queue: PublicKey;
1600
+ treeType: number;
1601
+ } | null | undefined;
1602
+ }, {
1603
+ treeType: Struct<number, null>;
1604
+ tree: Struct<PublicKey, null>;
1605
+ queue: Struct<PublicKey, null>;
1606
+ cpiContext: Struct<PublicKey | null, null>;
1607
+ nextTreeContext: Struct<{
1608
+ cpiContext: PublicKey | null;
1609
+ tree: PublicKey;
1610
+ queue: PublicKey;
1611
+ treeType: number;
1612
+ } | null | undefined, {
1613
+ treeType: Struct<number, null>;
1614
+ tree: Struct<PublicKey, null>;
1615
+ queue: Struct<PublicKey, null>;
1616
+ cpiContext: Struct<PublicKey | null, null>;
1617
+ }>;
1618
+ }>;
1619
+ leafIndex: Struct<number, null>;
1620
+ }>>;
1621
+ addresses: Struct<{
1622
+ root: BN;
1623
+ address: BN;
1624
+ merkleContext: {
1625
+ cpiContext: PublicKey | null;
1626
+ tree: PublicKey;
1627
+ queue: PublicKey;
1628
+ treeType: number;
1629
+ nextTreeContext?: {
1630
+ cpiContext: PublicKey | null;
1631
+ tree: PublicKey;
1632
+ queue: PublicKey;
1633
+ treeType: number;
1634
+ } | null | undefined;
1635
+ };
1636
+ rootIndex: number;
1637
+ }[], Struct<{
1638
+ root: BN;
1639
+ address: BN;
1640
+ merkleContext: {
1641
+ cpiContext: PublicKey | null;
1642
+ tree: PublicKey;
1643
+ queue: PublicKey;
1644
+ treeType: number;
1645
+ nextTreeContext?: {
1646
+ cpiContext: PublicKey | null;
1647
+ tree: PublicKey;
1648
+ queue: PublicKey;
1649
+ treeType: number;
1650
+ } | null | undefined;
1651
+ };
1652
+ rootIndex: number;
1653
+ }, {
1654
+ address: Struct<BN, null>;
1655
+ root: Struct<BN, null>;
1656
+ rootIndex: Struct<number, null>;
1657
+ merkleContext: Struct<{
1658
+ cpiContext: PublicKey | null;
1659
+ tree: PublicKey;
1660
+ queue: PublicKey;
1661
+ treeType: number;
1662
+ nextTreeContext?: {
1663
+ cpiContext: PublicKey | null;
1664
+ tree: PublicKey;
1665
+ queue: PublicKey;
1666
+ treeType: number;
1667
+ } | null | undefined;
1668
+ }, {
1669
+ treeType: Struct<number, null>;
1670
+ tree: Struct<PublicKey, null>;
1671
+ queue: Struct<PublicKey, null>;
1672
+ cpiContext: Struct<PublicKey | null, null>;
1673
+ nextTreeContext: Struct<{
1674
+ cpiContext: PublicKey | null;
1675
+ tree: PublicKey;
1676
+ queue: PublicKey;
1677
+ treeType: number;
1678
+ } | null | undefined, {
1679
+ treeType: Struct<number, null>;
1680
+ tree: Struct<PublicKey, null>;
1681
+ queue: Struct<PublicKey, null>;
1682
+ cpiContext: Struct<PublicKey | null, null>;
1683
+ }>;
1684
+ }>;
1685
+ }>>;
1686
+ }>;
1687
+ /**
1688
+ * @internal
1689
+ */
1690
+ export declare const MultipleMerkleProofsResult: Struct<{
1691
+ root: BN;
1692
+ hash: BN;
1693
+ leafIndex: number;
1694
+ merkleTree: PublicKey;
1695
+ proof: BN[];
1696
+ rootSeq: number;
1697
+ }[], Struct<{
1698
+ root: BN;
1699
+ hash: BN;
1700
+ leafIndex: number;
1701
+ merkleTree: PublicKey;
1702
+ proof: BN[];
1703
+ rootSeq: number;
1704
+ }, {
1705
+ hash: Struct<BN, null>;
1706
+ leafIndex: Struct<number, null>;
1707
+ merkleTree: Struct<PublicKey, null>;
1708
+ proof: Struct<BN[], Struct<BN, null>>;
1709
+ rootSeq: Struct<number, null>;
1710
+ root: Struct<BN, null>;
1711
+ }>>;
683
1712
  /**
684
1713
  * @internal
685
1714
  */
686
- export declare const MultipleMerkleProofsResult: Struct<{
1715
+ export declare const MultipleMerkleProofsResultV2: Struct<{
687
1716
  root: BN;
688
1717
  hash: BN;
689
1718
  leafIndex: number;
690
- merkleTree: PublicKey;
1719
+ proveByIndex: boolean;
691
1720
  proof: BN[];
692
1721
  rootSeq: number;
1722
+ treeContext: {
1723
+ cpiContext: PublicKey | null;
1724
+ tree: PublicKey;
1725
+ queue: PublicKey;
1726
+ treeType: number;
1727
+ nextTreeContext?: {
1728
+ cpiContext: PublicKey | null;
1729
+ tree: PublicKey;
1730
+ queue: PublicKey;
1731
+ treeType: number;
1732
+ } | null | undefined;
1733
+ };
693
1734
  }[], Struct<{
694
1735
  root: BN;
695
1736
  hash: BN;
696
1737
  leafIndex: number;
697
- merkleTree: PublicKey;
1738
+ proveByIndex: boolean;
698
1739
  proof: BN[];
699
1740
  rootSeq: number;
1741
+ treeContext: {
1742
+ cpiContext: PublicKey | null;
1743
+ tree: PublicKey;
1744
+ queue: PublicKey;
1745
+ treeType: number;
1746
+ nextTreeContext?: {
1747
+ cpiContext: PublicKey | null;
1748
+ tree: PublicKey;
1749
+ queue: PublicKey;
1750
+ treeType: number;
1751
+ } | null | undefined;
1752
+ };
700
1753
  }, {
701
1754
  hash: Struct<BN, null>;
702
1755
  leafIndex: Struct<number, null>;
703
- merkleTree: Struct<PublicKey, null>;
704
1756
  proof: Struct<BN[], Struct<BN, null>>;
705
- rootSeq: Struct<number, null>;
706
1757
  root: Struct<BN, null>;
1758
+ rootSeq: Struct<number, null>;
1759
+ proveByIndex: Struct<boolean, null>;
1760
+ treeContext: Struct<{
1761
+ cpiContext: PublicKey | null;
1762
+ tree: PublicKey;
1763
+ queue: PublicKey;
1764
+ treeType: number;
1765
+ nextTreeContext?: {
1766
+ cpiContext: PublicKey | null;
1767
+ tree: PublicKey;
1768
+ queue: PublicKey;
1769
+ treeType: number;
1770
+ } | null | undefined;
1771
+ }, {
1772
+ treeType: Struct<number, null>;
1773
+ tree: Struct<PublicKey, null>;
1774
+ queue: Struct<PublicKey, null>;
1775
+ cpiContext: Struct<PublicKey | null, null>;
1776
+ nextTreeContext: Struct<{
1777
+ cpiContext: PublicKey | null;
1778
+ tree: PublicKey;
1779
+ queue: PublicKey;
1780
+ treeType: number;
1781
+ } | null | undefined, {
1782
+ treeType: Struct<number, null>;
1783
+ tree: Struct<PublicKey, null>;
1784
+ queue: Struct<PublicKey, null>;
1785
+ cpiContext: Struct<PublicKey | null, null>;
1786
+ }>;
1787
+ }>;
707
1788
  }>>;
708
1789
  /**
709
1790
  * @internal
@@ -832,6 +1913,9 @@ export declare const SignatureListWithCursorResult: Struct<{
832
1913
  }>>;
833
1914
  cursor: Struct<string | null, null>;
834
1915
  }>;
1916
+ /**
1917
+ * @internal
1918
+ */
835
1919
  export declare const CompressedTransactionResult: Struct<{
836
1920
  compressionInfo: {
837
1921
  closedAccounts: {
@@ -842,11 +1926,11 @@ export declare const CompressedTransactionResult: Struct<{
842
1926
  discriminator: BN;
843
1927
  } | null;
844
1928
  lamports: BN;
1929
+ tree: PublicKey;
845
1930
  address: number[] | null;
846
1931
  hash: BN;
847
1932
  owner: PublicKey;
848
1933
  leafIndex: number;
849
- tree: PublicKey;
850
1934
  seq: BN | null;
851
1935
  slotCreated: BN;
852
1936
  };
@@ -866,11 +1950,11 @@ export declare const CompressedTransactionResult: Struct<{
866
1950
  discriminator: BN;
867
1951
  } | null;
868
1952
  lamports: BN;
1953
+ tree: PublicKey;
869
1954
  address: number[] | null;
870
1955
  hash: BN;
871
1956
  owner: PublicKey;
872
1957
  leafIndex: number;
873
- tree: PublicKey;
874
1958
  seq: BN | null;
875
1959
  slotCreated: BN;
876
1960
  };
@@ -894,11 +1978,11 @@ export declare const CompressedTransactionResult: Struct<{
894
1978
  discriminator: BN;
895
1979
  } | null;
896
1980
  lamports: BN;
1981
+ tree: PublicKey;
897
1982
  address: number[] | null;
898
1983
  hash: BN;
899
1984
  owner: PublicKey;
900
1985
  leafIndex: number;
901
- tree: PublicKey;
902
1986
  seq: BN | null;
903
1987
  slotCreated: BN;
904
1988
  };
@@ -918,11 +2002,11 @@ export declare const CompressedTransactionResult: Struct<{
918
2002
  discriminator: BN;
919
2003
  } | null;
920
2004
  lamports: BN;
2005
+ tree: PublicKey;
921
2006
  address: number[] | null;
922
2007
  hash: BN;
923
2008
  owner: PublicKey;
924
2009
  leafIndex: number;
925
- tree: PublicKey;
926
2010
  seq: BN | null;
927
2011
  slotCreated: BN;
928
2012
  };
@@ -943,11 +2027,11 @@ export declare const CompressedTransactionResult: Struct<{
943
2027
  discriminator: BN;
944
2028
  } | null;
945
2029
  lamports: BN;
2030
+ tree: PublicKey;
946
2031
  address: number[] | null;
947
2032
  hash: BN;
948
2033
  owner: PublicKey;
949
2034
  leafIndex: number;
950
- tree: PublicKey;
951
2035
  seq: BN | null;
952
2036
  slotCreated: BN;
953
2037
  };
@@ -966,11 +2050,11 @@ export declare const CompressedTransactionResult: Struct<{
966
2050
  discriminator: BN;
967
2051
  } | null;
968
2052
  lamports: BN;
2053
+ tree: PublicKey;
969
2054
  address: number[] | null;
970
2055
  hash: BN;
971
2056
  owner: PublicKey;
972
2057
  leafIndex: number;
973
- tree: PublicKey;
974
2058
  seq: BN | null;
975
2059
  slotCreated: BN;
976
2060
  };
@@ -989,11 +2073,11 @@ export declare const CompressedTransactionResult: Struct<{
989
2073
  discriminator: BN;
990
2074
  } | null;
991
2075
  lamports: BN;
2076
+ tree: PublicKey;
992
2077
  address: number[] | null;
993
2078
  hash: BN;
994
2079
  owner: PublicKey;
995
2080
  leafIndex: number;
996
- tree: PublicKey;
997
2081
  seq: BN | null;
998
2082
  slotCreated: BN;
999
2083
  }, {
@@ -1037,11 +2121,11 @@ export declare const CompressedTransactionResult: Struct<{
1037
2121
  discriminator: BN;
1038
2122
  } | null;
1039
2123
  lamports: BN;
2124
+ tree: PublicKey;
1040
2125
  address: number[] | null;
1041
2126
  hash: BN;
1042
2127
  owner: PublicKey;
1043
2128
  leafIndex: number;
1044
- tree: PublicKey;
1045
2129
  seq: BN | null;
1046
2130
  slotCreated: BN;
1047
2131
  };
@@ -1060,11 +2144,11 @@ export declare const CompressedTransactionResult: Struct<{
1060
2144
  discriminator: BN;
1061
2145
  } | null;
1062
2146
  lamports: BN;
2147
+ tree: PublicKey;
1063
2148
  address: number[] | null;
1064
2149
  hash: BN;
1065
2150
  owner: PublicKey;
1066
2151
  leafIndex: number;
1067
- tree: PublicKey;
1068
2152
  seq: BN | null;
1069
2153
  slotCreated: BN;
1070
2154
  };
@@ -1083,11 +2167,11 @@ export declare const CompressedTransactionResult: Struct<{
1083
2167
  discriminator: BN;
1084
2168
  } | null;
1085
2169
  lamports: BN;
2170
+ tree: PublicKey;
1086
2171
  address: number[] | null;
1087
2172
  hash: BN;
1088
2173
  owner: PublicKey;
1089
2174
  leafIndex: number;
1090
- tree: PublicKey;
1091
2175
  seq: BN | null;
1092
2176
  slotCreated: BN;
1093
2177
  }, {
@@ -1126,6 +2210,529 @@ export declare const CompressedTransactionResult: Struct<{
1126
2210
  }>;
1127
2211
  transaction: Struct<any, null>;
1128
2212
  }>;
2213
+ /**
2214
+ * @internal
2215
+ */
2216
+ export declare const CompressedTransactionResultV2: Struct<{
2217
+ compressionInfo: {
2218
+ closedAccounts: {
2219
+ account: {
2220
+ account: {
2221
+ data: {
2222
+ data: string;
2223
+ dataHash: BN;
2224
+ discriminator: BN;
2225
+ } | null;
2226
+ lamports: BN;
2227
+ address: number[] | null;
2228
+ hash: BN;
2229
+ owner: PublicKey;
2230
+ leafIndex: number;
2231
+ seq: BN | null;
2232
+ slotCreated: BN;
2233
+ merkleContext: {
2234
+ cpiContext: PublicKey | null;
2235
+ tree: PublicKey;
2236
+ queue: PublicKey;
2237
+ treeType: number;
2238
+ nextTreeContext?: {
2239
+ cpiContext: PublicKey | null;
2240
+ tree: PublicKey;
2241
+ queue: PublicKey;
2242
+ treeType: number;
2243
+ } | null | undefined;
2244
+ };
2245
+ proveByIndex: boolean;
2246
+ };
2247
+ txHash: BN;
2248
+ nullifier: BN;
2249
+ };
2250
+ optionalTokenData: {
2251
+ owner: PublicKey;
2252
+ mint: PublicKey;
2253
+ amount: BN;
2254
+ delegate: PublicKey | null;
2255
+ state: string;
2256
+ } | null;
2257
+ }[];
2258
+ openedAccounts: {
2259
+ account: {
2260
+ data: {
2261
+ data: string;
2262
+ dataHash: BN;
2263
+ discriminator: BN;
2264
+ } | null;
2265
+ lamports: BN;
2266
+ address: number[] | null;
2267
+ hash: BN;
2268
+ owner: PublicKey;
2269
+ leafIndex: number;
2270
+ seq: BN | null;
2271
+ slotCreated: BN;
2272
+ merkleContext: {
2273
+ cpiContext: PublicKey | null;
2274
+ tree: PublicKey;
2275
+ queue: PublicKey;
2276
+ treeType: number;
2277
+ nextTreeContext?: {
2278
+ cpiContext: PublicKey | null;
2279
+ tree: PublicKey;
2280
+ queue: PublicKey;
2281
+ treeType: number;
2282
+ } | null | undefined;
2283
+ };
2284
+ proveByIndex: boolean;
2285
+ };
2286
+ optionalTokenData: {
2287
+ owner: PublicKey;
2288
+ mint: PublicKey;
2289
+ amount: BN;
2290
+ delegate: PublicKey | null;
2291
+ state: string;
2292
+ } | null;
2293
+ }[];
2294
+ };
2295
+ transaction?: any;
2296
+ }, {
2297
+ compressionInfo: Struct<{
2298
+ closedAccounts: {
2299
+ account: {
2300
+ account: {
2301
+ data: {
2302
+ data: string;
2303
+ dataHash: BN;
2304
+ discriminator: BN;
2305
+ } | null;
2306
+ lamports: BN;
2307
+ address: number[] | null;
2308
+ hash: BN;
2309
+ owner: PublicKey;
2310
+ leafIndex: number;
2311
+ seq: BN | null;
2312
+ slotCreated: BN;
2313
+ merkleContext: {
2314
+ cpiContext: PublicKey | null;
2315
+ tree: PublicKey;
2316
+ queue: PublicKey;
2317
+ treeType: number;
2318
+ nextTreeContext?: {
2319
+ cpiContext: PublicKey | null;
2320
+ tree: PublicKey;
2321
+ queue: PublicKey;
2322
+ treeType: number;
2323
+ } | null | undefined;
2324
+ };
2325
+ proveByIndex: boolean;
2326
+ };
2327
+ txHash: BN;
2328
+ nullifier: BN;
2329
+ };
2330
+ optionalTokenData: {
2331
+ owner: PublicKey;
2332
+ mint: PublicKey;
2333
+ amount: BN;
2334
+ delegate: PublicKey | null;
2335
+ state: string;
2336
+ } | null;
2337
+ }[];
2338
+ openedAccounts: {
2339
+ account: {
2340
+ data: {
2341
+ data: string;
2342
+ dataHash: BN;
2343
+ discriminator: BN;
2344
+ } | null;
2345
+ lamports: BN;
2346
+ address: number[] | null;
2347
+ hash: BN;
2348
+ owner: PublicKey;
2349
+ leafIndex: number;
2350
+ seq: BN | null;
2351
+ slotCreated: BN;
2352
+ merkleContext: {
2353
+ cpiContext: PublicKey | null;
2354
+ tree: PublicKey;
2355
+ queue: PublicKey;
2356
+ treeType: number;
2357
+ nextTreeContext?: {
2358
+ cpiContext: PublicKey | null;
2359
+ tree: PublicKey;
2360
+ queue: PublicKey;
2361
+ treeType: number;
2362
+ } | null | undefined;
2363
+ };
2364
+ proveByIndex: boolean;
2365
+ };
2366
+ optionalTokenData: {
2367
+ owner: PublicKey;
2368
+ mint: PublicKey;
2369
+ amount: BN;
2370
+ delegate: PublicKey | null;
2371
+ state: string;
2372
+ } | null;
2373
+ }[];
2374
+ }, {
2375
+ closedAccounts: Struct<{
2376
+ account: {
2377
+ account: {
2378
+ data: {
2379
+ data: string;
2380
+ dataHash: BN;
2381
+ discriminator: BN;
2382
+ } | null;
2383
+ lamports: BN;
2384
+ address: number[] | null;
2385
+ hash: BN;
2386
+ owner: PublicKey;
2387
+ leafIndex: number;
2388
+ seq: BN | null;
2389
+ slotCreated: BN;
2390
+ merkleContext: {
2391
+ cpiContext: PublicKey | null;
2392
+ tree: PublicKey;
2393
+ queue: PublicKey;
2394
+ treeType: number;
2395
+ nextTreeContext?: {
2396
+ cpiContext: PublicKey | null;
2397
+ tree: PublicKey;
2398
+ queue: PublicKey;
2399
+ treeType: number;
2400
+ } | null | undefined;
2401
+ };
2402
+ proveByIndex: boolean;
2403
+ };
2404
+ txHash: BN;
2405
+ nullifier: BN;
2406
+ };
2407
+ optionalTokenData: {
2408
+ owner: PublicKey;
2409
+ mint: PublicKey;
2410
+ amount: BN;
2411
+ delegate: PublicKey | null;
2412
+ state: string;
2413
+ } | null;
2414
+ }[], Struct<{
2415
+ account: {
2416
+ account: {
2417
+ data: {
2418
+ data: string;
2419
+ dataHash: BN;
2420
+ discriminator: BN;
2421
+ } | null;
2422
+ lamports: BN;
2423
+ address: number[] | null;
2424
+ hash: BN;
2425
+ owner: PublicKey;
2426
+ leafIndex: number;
2427
+ seq: BN | null;
2428
+ slotCreated: BN;
2429
+ merkleContext: {
2430
+ cpiContext: PublicKey | null;
2431
+ tree: PublicKey;
2432
+ queue: PublicKey;
2433
+ treeType: number;
2434
+ nextTreeContext?: {
2435
+ cpiContext: PublicKey | null;
2436
+ tree: PublicKey;
2437
+ queue: PublicKey;
2438
+ treeType: number;
2439
+ } | null | undefined;
2440
+ };
2441
+ proveByIndex: boolean;
2442
+ };
2443
+ txHash: BN;
2444
+ nullifier: BN;
2445
+ };
2446
+ optionalTokenData: {
2447
+ owner: PublicKey;
2448
+ mint: PublicKey;
2449
+ amount: BN;
2450
+ delegate: PublicKey | null;
2451
+ state: string;
2452
+ } | null;
2453
+ }, {
2454
+ account: Struct<{
2455
+ account: {
2456
+ data: {
2457
+ data: string;
2458
+ dataHash: BN;
2459
+ discriminator: BN;
2460
+ } | null;
2461
+ lamports: BN;
2462
+ address: number[] | null;
2463
+ hash: BN;
2464
+ owner: PublicKey;
2465
+ leafIndex: number;
2466
+ seq: BN | null;
2467
+ slotCreated: BN;
2468
+ merkleContext: {
2469
+ cpiContext: PublicKey | null;
2470
+ tree: PublicKey;
2471
+ queue: PublicKey;
2472
+ treeType: number;
2473
+ nextTreeContext?: {
2474
+ cpiContext: PublicKey | null;
2475
+ tree: PublicKey;
2476
+ queue: PublicKey;
2477
+ treeType: number;
2478
+ } | null | undefined;
2479
+ };
2480
+ proveByIndex: boolean;
2481
+ };
2482
+ txHash: BN;
2483
+ nullifier: BN;
2484
+ }, {
2485
+ account: Struct<{
2486
+ data: {
2487
+ data: string;
2488
+ dataHash: BN;
2489
+ discriminator: BN;
2490
+ } | null;
2491
+ lamports: BN;
2492
+ address: number[] | null;
2493
+ hash: BN;
2494
+ owner: PublicKey;
2495
+ leafIndex: number;
2496
+ seq: BN | null;
2497
+ slotCreated: BN;
2498
+ merkleContext: {
2499
+ cpiContext: PublicKey | null;
2500
+ tree: PublicKey;
2501
+ queue: PublicKey;
2502
+ treeType: number;
2503
+ nextTreeContext?: {
2504
+ cpiContext: PublicKey | null;
2505
+ tree: PublicKey;
2506
+ queue: PublicKey;
2507
+ treeType: number;
2508
+ } | null | undefined;
2509
+ };
2510
+ proveByIndex: boolean;
2511
+ }, {
2512
+ address: Struct<number[] | null, null>;
2513
+ hash: Struct<BN, null>;
2514
+ data: Struct<{
2515
+ data: string;
2516
+ dataHash: BN;
2517
+ discriminator: BN;
2518
+ } | null, {
2519
+ data: Struct<string, null>;
2520
+ dataHash: Struct<BN, null>;
2521
+ discriminator: Struct<BN, null>;
2522
+ }>;
2523
+ lamports: Struct<BN, null>;
2524
+ owner: Struct<PublicKey, null>;
2525
+ leafIndex: Struct<number, null>;
2526
+ seq: Struct<BN | null, null>;
2527
+ slotCreated: Struct<BN, null>;
2528
+ merkleContext: Struct<{
2529
+ cpiContext: PublicKey | null;
2530
+ tree: PublicKey;
2531
+ queue: PublicKey;
2532
+ treeType: number;
2533
+ nextTreeContext?: {
2534
+ cpiContext: PublicKey | null;
2535
+ tree: PublicKey;
2536
+ queue: PublicKey;
2537
+ treeType: number;
2538
+ } | null | undefined;
2539
+ }, {
2540
+ treeType: Struct<number, null>;
2541
+ tree: Struct<PublicKey, null>;
2542
+ queue: Struct<PublicKey, null>;
2543
+ cpiContext: Struct<PublicKey | null, null>;
2544
+ nextTreeContext: Struct<{
2545
+ cpiContext: PublicKey | null;
2546
+ tree: PublicKey;
2547
+ queue: PublicKey;
2548
+ treeType: number;
2549
+ } | null | undefined, {
2550
+ treeType: Struct<number, null>;
2551
+ tree: Struct<PublicKey, null>;
2552
+ queue: Struct<PublicKey, null>;
2553
+ cpiContext: Struct<PublicKey | null, null>;
2554
+ }>;
2555
+ }>;
2556
+ proveByIndex: Struct<boolean, null>;
2557
+ }>;
2558
+ txHash: Struct<BN, null>;
2559
+ nullifier: Struct<BN, null>;
2560
+ }>;
2561
+ optionalTokenData: Struct<{
2562
+ owner: PublicKey;
2563
+ mint: PublicKey;
2564
+ amount: BN;
2565
+ delegate: PublicKey | null;
2566
+ state: string;
2567
+ } | null, {
2568
+ mint: Struct<PublicKey, null>;
2569
+ owner: Struct<PublicKey, null>;
2570
+ amount: Struct<BN, null>;
2571
+ delegate: Struct<PublicKey | null, null>;
2572
+ state: Struct<string, null>;
2573
+ }>;
2574
+ }>>;
2575
+ openedAccounts: Struct<{
2576
+ account: {
2577
+ data: {
2578
+ data: string;
2579
+ dataHash: BN;
2580
+ discriminator: BN;
2581
+ } | null;
2582
+ lamports: BN;
2583
+ address: number[] | null;
2584
+ hash: BN;
2585
+ owner: PublicKey;
2586
+ leafIndex: number;
2587
+ seq: BN | null;
2588
+ slotCreated: BN;
2589
+ merkleContext: {
2590
+ cpiContext: PublicKey | null;
2591
+ tree: PublicKey;
2592
+ queue: PublicKey;
2593
+ treeType: number;
2594
+ nextTreeContext?: {
2595
+ cpiContext: PublicKey | null;
2596
+ tree: PublicKey;
2597
+ queue: PublicKey;
2598
+ treeType: number;
2599
+ } | null | undefined;
2600
+ };
2601
+ proveByIndex: boolean;
2602
+ };
2603
+ optionalTokenData: {
2604
+ owner: PublicKey;
2605
+ mint: PublicKey;
2606
+ amount: BN;
2607
+ delegate: PublicKey | null;
2608
+ state: string;
2609
+ } | null;
2610
+ }[], Struct<{
2611
+ account: {
2612
+ data: {
2613
+ data: string;
2614
+ dataHash: BN;
2615
+ discriminator: BN;
2616
+ } | null;
2617
+ lamports: BN;
2618
+ address: number[] | null;
2619
+ hash: BN;
2620
+ owner: PublicKey;
2621
+ leafIndex: number;
2622
+ seq: BN | null;
2623
+ slotCreated: BN;
2624
+ merkleContext: {
2625
+ cpiContext: PublicKey | null;
2626
+ tree: PublicKey;
2627
+ queue: PublicKey;
2628
+ treeType: number;
2629
+ nextTreeContext?: {
2630
+ cpiContext: PublicKey | null;
2631
+ tree: PublicKey;
2632
+ queue: PublicKey;
2633
+ treeType: number;
2634
+ } | null | undefined;
2635
+ };
2636
+ proveByIndex: boolean;
2637
+ };
2638
+ optionalTokenData: {
2639
+ owner: PublicKey;
2640
+ mint: PublicKey;
2641
+ amount: BN;
2642
+ delegate: PublicKey | null;
2643
+ state: string;
2644
+ } | null;
2645
+ }, {
2646
+ account: Struct<{
2647
+ data: {
2648
+ data: string;
2649
+ dataHash: BN;
2650
+ discriminator: BN;
2651
+ } | null;
2652
+ lamports: BN;
2653
+ address: number[] | null;
2654
+ hash: BN;
2655
+ owner: PublicKey;
2656
+ leafIndex: number;
2657
+ seq: BN | null;
2658
+ slotCreated: BN;
2659
+ merkleContext: {
2660
+ cpiContext: PublicKey | null;
2661
+ tree: PublicKey;
2662
+ queue: PublicKey;
2663
+ treeType: number;
2664
+ nextTreeContext?: {
2665
+ cpiContext: PublicKey | null;
2666
+ tree: PublicKey;
2667
+ queue: PublicKey;
2668
+ treeType: number;
2669
+ } | null | undefined;
2670
+ };
2671
+ proveByIndex: boolean;
2672
+ }, {
2673
+ address: Struct<number[] | null, null>;
2674
+ hash: Struct<BN, null>;
2675
+ data: Struct<{
2676
+ data: string;
2677
+ dataHash: BN;
2678
+ discriminator: BN;
2679
+ } | null, {
2680
+ data: Struct<string, null>;
2681
+ dataHash: Struct<BN, null>;
2682
+ discriminator: Struct<BN, null>;
2683
+ }>;
2684
+ lamports: Struct<BN, null>;
2685
+ owner: Struct<PublicKey, null>;
2686
+ leafIndex: Struct<number, null>;
2687
+ seq: Struct<BN | null, null>;
2688
+ slotCreated: Struct<BN, null>;
2689
+ merkleContext: Struct<{
2690
+ cpiContext: PublicKey | null;
2691
+ tree: PublicKey;
2692
+ queue: PublicKey;
2693
+ treeType: number;
2694
+ nextTreeContext?: {
2695
+ cpiContext: PublicKey | null;
2696
+ tree: PublicKey;
2697
+ queue: PublicKey;
2698
+ treeType: number;
2699
+ } | null | undefined;
2700
+ }, {
2701
+ treeType: Struct<number, null>;
2702
+ tree: Struct<PublicKey, null>;
2703
+ queue: Struct<PublicKey, null>;
2704
+ cpiContext: Struct<PublicKey | null, null>;
2705
+ nextTreeContext: Struct<{
2706
+ cpiContext: PublicKey | null;
2707
+ tree: PublicKey;
2708
+ queue: PublicKey;
2709
+ treeType: number;
2710
+ } | null | undefined, {
2711
+ treeType: Struct<number, null>;
2712
+ tree: Struct<PublicKey, null>;
2713
+ queue: Struct<PublicKey, null>;
2714
+ cpiContext: Struct<PublicKey | null, null>;
2715
+ }>;
2716
+ }>;
2717
+ proveByIndex: Struct<boolean, null>;
2718
+ }>;
2719
+ optionalTokenData: Struct<{
2720
+ owner: PublicKey;
2721
+ mint: PublicKey;
2722
+ amount: BN;
2723
+ delegate: PublicKey | null;
2724
+ state: string;
2725
+ } | null, {
2726
+ mint: Struct<PublicKey, null>;
2727
+ owner: Struct<PublicKey, null>;
2728
+ amount: Struct<BN, null>;
2729
+ delegate: Struct<PublicKey | null, null>;
2730
+ state: Struct<string, null>;
2731
+ }>;
2732
+ }>>;
2733
+ }>;
2734
+ transaction: Struct<any, null>;
2735
+ }>;
1129
2736
  export interface CompressionApiInterface {
1130
2737
  getCompressedAccount(address?: BN254, hash?: BN254): Promise<CompressedAccountWithMerkleContext | null>;
1131
2738
  getCompressedBalance(address?: BN254, hash?: BN254): Promise<BN | null>;
@@ -1133,9 +2740,9 @@ export interface CompressionApiInterface {
1133
2740
  getCompressedAccountProof(hash: BN254): Promise<MerkleContextWithMerkleProof>;
1134
2741
  getMultipleCompressedAccounts(hashes: BN254[]): Promise<CompressedAccountWithMerkleContext[]>;
1135
2742
  getMultipleCompressedAccountProofs(hashes: BN254[]): Promise<MerkleContextWithMerkleProof[]>;
1136
- getValidityProof(hashes: BN254[], newAddresses: BN254[]): Promise<CompressedProofWithContext>;
1137
- getValidityProofV0(hashes: HashWithTree[], newAddresses: AddressWithTree[]): Promise<CompressedProofWithContext>;
1138
- getValidityProofAndRpcContext(hashes: HashWithTree[], newAddresses: AddressWithTree[]): Promise<WithContext<CompressedProofWithContext>>;
2743
+ getValidityProof(hashes: BN254[], newAddresses: BN254[]): Promise<ValidityProofWithContext>;
2744
+ getValidityProofV0(hashes: HashWithTree[], newAddresses: AddressWithTree[]): Promise<ValidityProofWithContext>;
2745
+ getValidityProofAndRpcContext(hashes: HashWithTree[], newAddresses: AddressWithTree[]): Promise<WithContext<ValidityProofWithContext>>;
1139
2746
  getCompressedAccountsByOwner(owner: PublicKey, config?: GetCompressedAccountsByOwnerConfig): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
1140
2747
  getCompressedMintTokenHolders(mint: PublicKey, options?: PaginatedOptions): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
1141
2748
  getCompressedTokenAccountsByOwner(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;