@lightprotocol/stateless.js 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/browser/actions/compress.d.ts +2 -2
  2. package/dist/cjs/browser/actions/create-account.d.ts +3 -3
  3. package/dist/cjs/browser/actions/transfer.d.ts +1 -2
  4. package/dist/cjs/browser/constants.d.ts +26 -3
  5. package/dist/cjs/browser/index.cjs +1 -1
  6. package/dist/cjs/browser/index.cjs.map +1 -1
  7. package/dist/cjs/browser/index.d.ts +0 -2
  8. package/dist/cjs/browser/programs/index.d.ts +0 -1
  9. package/dist/cjs/browser/{idl.d.ts → programs/system/idl.d.ts} +5 -27
  10. package/dist/cjs/browser/programs/system/index.d.ts +5 -0
  11. package/dist/cjs/{node/programs → browser/programs/system}/layout.d.ts +10 -1
  12. package/dist/cjs/{node/instruction/pack-compressed-accounts.d.ts → browser/programs/system/pack.d.ts} +28 -3
  13. package/dist/cjs/browser/programs/{system.d.ts → system/program.d.ts} +13 -28
  14. package/dist/cjs/browser/programs/system/select-compressed-accounts.d.ts +10 -0
  15. package/dist/cjs/browser/rpc-interface.d.ts +1553 -11
  16. package/dist/cjs/browser/rpc.d.ts +14 -34
  17. package/dist/cjs/browser/state/compressed-account.d.ts +140 -6
  18. package/dist/cjs/browser/state/types.d.ts +265 -26
  19. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +1 -10
  20. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +2 -2
  21. package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +14 -38
  22. package/dist/cjs/browser/utils/calculate-compute-unit-price.d.ts +1 -1
  23. package/dist/cjs/browser/utils/conversion.d.ts +2 -0
  24. package/dist/cjs/browser/utils/get-state-tree-infos.d.ts +16 -9
  25. package/dist/cjs/browser/utils/index.d.ts +1 -2
  26. package/dist/cjs/browser/utils/send-and-confirm.d.ts +1 -1
  27. package/dist/cjs/browser/utils/validation.d.ts +2 -2
  28. package/dist/cjs/node/actions/compress.d.ts +2 -2
  29. package/dist/cjs/node/actions/create-account.d.ts +3 -3
  30. package/dist/cjs/node/actions/transfer.d.ts +1 -2
  31. package/dist/cjs/node/constants.d.ts +26 -3
  32. package/dist/cjs/node/index.cjs +1 -1
  33. package/dist/cjs/node/index.cjs.map +1 -1
  34. package/dist/cjs/node/index.d.ts +0 -2
  35. package/dist/cjs/node/programs/index.d.ts +0 -1
  36. package/dist/cjs/node/{idl.d.ts → programs/system/idl.d.ts} +5 -27
  37. package/dist/cjs/node/programs/system/index.d.ts +5 -0
  38. package/dist/cjs/{browser/programs → node/programs/system}/layout.d.ts +10 -1
  39. package/dist/cjs/{browser/instruction/pack-compressed-accounts.d.ts → node/programs/system/pack.d.ts} +28 -3
  40. package/dist/cjs/node/programs/{system.d.ts → system/program.d.ts} +13 -28
  41. package/dist/cjs/node/programs/system/select-compressed-accounts.d.ts +10 -0
  42. package/dist/cjs/node/rpc-interface.d.ts +1553 -11
  43. package/dist/cjs/node/rpc.d.ts +14 -34
  44. package/dist/cjs/node/state/compressed-account.d.ts +140 -6
  45. package/dist/cjs/node/state/types.d.ts +265 -26
  46. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-accounts.d.ts +1 -10
  47. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +2 -2
  48. package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +14 -38
  49. package/dist/cjs/node/utils/calculate-compute-unit-price.d.ts +1 -1
  50. package/dist/cjs/node/utils/conversion.d.ts +2 -0
  51. package/dist/cjs/node/utils/get-state-tree-infos.d.ts +16 -9
  52. package/dist/cjs/node/utils/index.d.ts +1 -2
  53. package/dist/cjs/node/utils/send-and-confirm.d.ts +1 -1
  54. package/dist/cjs/node/utils/validation.d.ts +2 -2
  55. package/dist/types/index.d.ts +2784 -877
  56. package/package.json +13 -6
  57. package/dist/cjs/browser/instruction/index.d.ts +0 -1
  58. package/dist/cjs/node/instruction/index.d.ts +0 -1
@@ -1,6 +1,6 @@
1
1
  import { PublicKey, MemcmpFilter, DataSlice } from '@solana/web3.js';
2
2
  import { Struct } from 'superstruct';
3
- import { BN254, ValidityProof, CompressedAccountWithMerkleContext, MerkleContextWithMerkleProof, TokenData, StateTreeInfo, AddressTreeInfo, CompressedProof } 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: {
@@ -54,7 +54,7 @@ export interface HashWithTreeInfo {
54
54
  /**
55
55
  * State tree info.
56
56
  */
57
- stateTreeInfo: StateTreeInfo;
57
+ stateTreeInfo: TreeInfo;
58
58
  }
59
59
  /**
60
60
  * Address and associated address tree info.
@@ -125,7 +125,7 @@ export type ValidityProofWithContext = {
125
125
  /**
126
126
  * Validity proof.
127
127
  */
128
- compressedProof: ValidityProof;
128
+ compressedProof: ValidityProof | null;
129
129
  /**
130
130
  * Roots.
131
131
  */
@@ -145,7 +145,11 @@ export type ValidityProofWithContext = {
145
145
  /**
146
146
  * Tree infos.
147
147
  */
148
- treeInfos: StateTreeInfo[];
148
+ treeInfos: TreeInfo[];
149
+ /**
150
+ * Whether to prove by indices.
151
+ */
152
+ proveByIndices: boolean[];
149
153
  };
150
154
  /**
151
155
  * @deprecated use {@link ValidityProofWithContext} instead
@@ -260,6 +264,79 @@ export declare const CompressedAccountResult: Struct<{
260
264
  seq: Struct<BN | null, null>;
261
265
  slotCreated: Struct<BN, null>;
262
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
+ }>;
263
340
  export declare const TokenDataResult: Struct<{
264
341
  owner: PublicKey;
265
342
  mint: PublicKey;
@@ -350,7 +427,333 @@ export declare const CompressedTokenAccountResult: Struct<{
350
427
  /**
351
428
  * @internal
352
429
  */
353
- export declare const MultipleCompressedAccountsResult: Struct<{
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
+ }>;
553
+ /**
554
+ * @internal
555
+ */
556
+ export declare const MultipleCompressedAccountsResult: Struct<{
557
+ items: {
558
+ data: {
559
+ data: string;
560
+ dataHash: BN;
561
+ discriminator: BN;
562
+ } | null;
563
+ lamports: BN;
564
+ tree: PublicKey;
565
+ address: number[] | null;
566
+ hash: BN;
567
+ owner: PublicKey;
568
+ leafIndex: number;
569
+ seq: BN | null;
570
+ slotCreated: BN;
571
+ }[];
572
+ }, {
573
+ items: Struct<{
574
+ data: {
575
+ data: string;
576
+ dataHash: BN;
577
+ discriminator: BN;
578
+ } | null;
579
+ lamports: BN;
580
+ tree: PublicKey;
581
+ address: number[] | null;
582
+ hash: BN;
583
+ owner: PublicKey;
584
+ leafIndex: number;
585
+ seq: BN | null;
586
+ slotCreated: BN;
587
+ }[], Struct<{
588
+ data: {
589
+ data: string;
590
+ dataHash: BN;
591
+ discriminator: BN;
592
+ } | null;
593
+ lamports: BN;
594
+ tree: PublicKey;
595
+ address: number[] | null;
596
+ hash: BN;
597
+ owner: PublicKey;
598
+ leafIndex: number;
599
+ seq: BN | null;
600
+ slotCreated: BN;
601
+ }, {
602
+ address: Struct<number[] | null, null>;
603
+ hash: Struct<BN, null>;
604
+ data: Struct<{
605
+ data: string;
606
+ dataHash: BN;
607
+ discriminator: BN;
608
+ } | null, {
609
+ data: Struct<string, null>;
610
+ dataHash: Struct<BN, null>;
611
+ discriminator: Struct<BN, null>;
612
+ }>;
613
+ lamports: Struct<BN, null>;
614
+ owner: Struct<PublicKey, null>;
615
+ leafIndex: Struct<number, null>;
616
+ tree: Struct<PublicKey, null>;
617
+ seq: Struct<BN | null, null>;
618
+ slotCreated: Struct<BN, null>;
619
+ }>>;
620
+ }>;
621
+ /**
622
+ * @internal
623
+ */
624
+ export declare const MultipleCompressedAccountsResultV2: Struct<{
625
+ items: {
626
+ data: {
627
+ data: string;
628
+ dataHash: BN;
629
+ discriminator: BN;
630
+ } | null;
631
+ lamports: BN;
632
+ address: number[] | null;
633
+ hash: BN;
634
+ owner: PublicKey;
635
+ leafIndex: number;
636
+ seq: BN | null;
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;
651
+ }[];
652
+ }, {
653
+ items: Struct<{
654
+ data: {
655
+ data: string;
656
+ dataHash: BN;
657
+ discriminator: BN;
658
+ } | null;
659
+ lamports: BN;
660
+ address: number[] | null;
661
+ hash: BN;
662
+ owner: PublicKey;
663
+ leafIndex: number;
664
+ seq: BN | null;
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;
679
+ }[], Struct<{
680
+ data: {
681
+ data: string;
682
+ dataHash: BN;
683
+ discriminator: BN;
684
+ } | null;
685
+ lamports: BN;
686
+ address: number[] | null;
687
+ hash: BN;
688
+ owner: PublicKey;
689
+ leafIndex: number;
690
+ seq: BN | null;
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;
705
+ }, {
706
+ address: Struct<number[] | null, null>;
707
+ hash: Struct<BN, null>;
708
+ data: Struct<{
709
+ data: string;
710
+ dataHash: BN;
711
+ discriminator: BN;
712
+ } | null, {
713
+ data: Struct<string, null>;
714
+ dataHash: Struct<BN, null>;
715
+ discriminator: Struct<BN, null>;
716
+ }>;
717
+ lamports: Struct<BN, null>;
718
+ owner: Struct<PublicKey, null>;
719
+ leafIndex: Struct<number, null>;
720
+ seq: Struct<BN | null, null>;
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>;
751
+ }>>;
752
+ }>;
753
+ /**
754
+ * @internal
755
+ */
756
+ export declare const CompressedAccountsByOwnerResult: Struct<{
354
757
  items: {
355
758
  data: {
356
759
  data: string;
@@ -366,6 +769,7 @@ export declare const MultipleCompressedAccountsResult: Struct<{
366
769
  seq: BN | null;
367
770
  slotCreated: BN;
368
771
  }[];
772
+ cursor: string | null;
369
773
  }, {
370
774
  items: Struct<{
371
775
  data: {
@@ -414,11 +818,12 @@ export declare const MultipleCompressedAccountsResult: Struct<{
414
818
  seq: Struct<BN | null, null>;
415
819
  slotCreated: Struct<BN, null>;
416
820
  }>>;
821
+ cursor: Struct<string | null, null>;
417
822
  }>;
418
823
  /**
419
824
  * @internal
420
825
  */
421
- export declare const CompressedAccountsByOwnerResult: Struct<{
826
+ export declare const CompressedAccountsByOwnerResultV2: Struct<{
422
827
  items: {
423
828
  data: {
424
829
  data: string;
@@ -426,13 +831,25 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
426
831
  discriminator: BN;
427
832
  } | null;
428
833
  lamports: BN;
429
- tree: PublicKey;
430
834
  address: number[] | null;
431
835
  hash: BN;
432
836
  owner: PublicKey;
433
837
  leafIndex: number;
434
838
  seq: BN | null;
435
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;
436
853
  }[];
437
854
  cursor: string | null;
438
855
  }, {
@@ -443,13 +860,25 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
443
860
  discriminator: BN;
444
861
  } | null;
445
862
  lamports: BN;
446
- tree: PublicKey;
447
863
  address: number[] | null;
448
864
  hash: BN;
449
865
  owner: PublicKey;
450
866
  leafIndex: number;
451
867
  seq: BN | null;
452
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;
453
882
  }[], Struct<{
454
883
  data: {
455
884
  data: string;
@@ -457,13 +886,25 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
457
886
  discriminator: BN;
458
887
  } | null;
459
888
  lamports: BN;
460
- tree: PublicKey;
461
889
  address: number[] | null;
462
890
  hash: BN;
463
891
  owner: PublicKey;
464
892
  leafIndex: number;
465
893
  seq: BN | null;
466
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;
467
908
  }, {
468
909
  address: Struct<number[] | null, null>;
469
910
  hash: Struct<BN, null>;
@@ -479,9 +920,37 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
479
920
  lamports: Struct<BN, null>;
480
921
  owner: Struct<PublicKey, null>;
481
922
  leafIndex: Struct<number, null>;
482
- tree: Struct<PublicKey, null>;
483
923
  seq: Struct<BN | null, null>;
484
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>;
485
954
  }>>;
486
955
  cursor: Struct<string | null, null>;
487
956
  }>;
@@ -611,6 +1080,208 @@ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
611
1080
  }>>;
612
1081
  cursor: Struct<string | null, null>;
613
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
+ }>;
614
1285
  /**
615
1286
  * @internal
616
1287
  */
@@ -676,7 +1347,7 @@ export declare const LatestNonVotingSignaturesResultPaginated: Struct<{
676
1347
  /**
677
1348
  * @internal
678
1349
  */
679
- export declare const MerkeProofResult: Struct<{
1350
+ export declare const MerkleProofResult: Struct<{
680
1351
  root: BN;
681
1352
  hash: BN;
682
1353
  leafIndex: number;
@@ -691,6 +1362,64 @@ export declare const MerkeProofResult: Struct<{
691
1362
  rootSeq: Struct<number, null>;
692
1363
  root: Struct<BN, null>;
693
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
+ }>;
694
1423
  /**
695
1424
  * @internal
696
1425
  */
@@ -715,6 +1444,16 @@ export declare const NewAddressProofResult: Struct<{
715
1444
  higherRangeAddress: Struct<BN, null>;
716
1445
  lowElementLeafIndex: Struct<number, null>;
717
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
+ }>;
718
1457
  /**
719
1458
  * @internal
720
1459
  */
@@ -745,6 +1484,206 @@ export declare const ValidityProofResult: Struct<{
745
1484
  roots: Struct<BN[], Struct<BN, null>>;
746
1485
  merkleTrees: Struct<PublicKey[], Struct<PublicKey, null>>;
747
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
+ }>;
748
1687
  /**
749
1688
  * @internal
750
1689
  */
@@ -770,6 +1709,83 @@ export declare const MultipleMerkleProofsResult: Struct<{
770
1709
  rootSeq: Struct<number, null>;
771
1710
  root: Struct<BN, null>;
772
1711
  }>>;
1712
+ /**
1713
+ * @internal
1714
+ */
1715
+ export declare const MultipleMerkleProofsResultV2: Struct<{
1716
+ root: BN;
1717
+ hash: BN;
1718
+ leafIndex: number;
1719
+ proveByIndex: boolean;
1720
+ proof: BN[];
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
+ };
1734
+ }[], Struct<{
1735
+ root: BN;
1736
+ hash: BN;
1737
+ leafIndex: number;
1738
+ proveByIndex: boolean;
1739
+ proof: BN[];
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
+ };
1753
+ }, {
1754
+ hash: Struct<BN, null>;
1755
+ leafIndex: Struct<number, null>;
1756
+ proof: Struct<BN[], Struct<BN, null>>;
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
+ }>;
1788
+ }>>;
773
1789
  /**
774
1790
  * @internal
775
1791
  */
@@ -897,6 +1913,9 @@ export declare const SignatureListWithCursorResult: Struct<{
897
1913
  }>>;
898
1914
  cursor: Struct<string | null, null>;
899
1915
  }>;
1916
+ /**
1917
+ * @internal
1918
+ */
900
1919
  export declare const CompressedTransactionResult: Struct<{
901
1920
  compressionInfo: {
902
1921
  closedAccounts: {
@@ -1191,6 +2210,529 @@ export declare const CompressedTransactionResult: Struct<{
1191
2210
  }>;
1192
2211
  transaction: Struct<any, null>;
1193
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
+ }>;
1194
2736
  export interface CompressionApiInterface {
1195
2737
  getCompressedAccount(address?: BN254, hash?: BN254): Promise<CompressedAccountWithMerkleContext | null>;
1196
2738
  getCompressedBalance(address?: BN254, hash?: BN254): Promise<BN | null>;