@streamflow/distributor 8.0.1-alpha.p287.54fe41f → 8.0.1

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.
@@ -5,9 +5,9 @@ require('@solana/wallet-adapter-base');
5
5
  var common = require('@streamflow/common');
6
6
  var solana = require('@streamflow/common/solana');
7
7
  var anchor = require('@coral-xyz/anchor');
8
- var borsh7 = require('@coral-xyz/borsh');
8
+ var borsh8 = require('@coral-xyz/borsh');
9
9
  var buffer = require('buffer');
10
- var BN5 = require('bn.js');
10
+ var BN6 = require('bn.js');
11
11
  var splToken = require('@solana/spl-token');
12
12
  var bs58 = require('bs58');
13
13
 
@@ -31,8 +31,8 @@ function _interopNamespace(e) {
31
31
  return Object.freeze(n);
32
32
  }
33
33
 
34
- var borsh7__namespace = /*#__PURE__*/_interopNamespace(borsh7);
35
- var BN5__default = /*#__PURE__*/_interopDefault(BN5);
34
+ var borsh8__namespace = /*#__PURE__*/_interopNamespace(borsh8);
35
+ var BN6__default = /*#__PURE__*/_interopDefault(BN6);
36
36
  var bs58__default = /*#__PURE__*/_interopDefault(bs58);
37
37
 
38
38
  var __defProp = Object.defineProperty;
@@ -125,21 +125,21 @@ var PROGRAM_ID_CLI = new web3_js.PublicKey("MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHma
125
125
  var PROGRAM_ID = PROGRAM_ID_CLI;
126
126
 
127
127
  // solana/generated/instructions/newDistributor.ts
128
- var layout = borsh7__namespace.struct([
129
- borsh7__namespace.u64("version"),
130
- borsh7__namespace.array(borsh7__namespace.u8(), 32, "root"),
131
- borsh7__namespace.u64("maxTotalClaim"),
132
- borsh7__namespace.u64("maxNumNodes"),
133
- borsh7__namespace.u64("unlockPeriod"),
134
- borsh7__namespace.u64("startVestingTs"),
135
- borsh7__namespace.u64("endVestingTs"),
136
- borsh7__namespace.u64("clawbackStartTs"),
137
- borsh7__namespace.bool("claimsClosableByAdmin"),
138
- borsh7__namespace.option(borsh7__namespace.bool(), "canUpdateDuration"),
139
- borsh7__namespace.option(borsh7__namespace.u64(), "totalAmountUnlocked"),
140
- borsh7__namespace.option(borsh7__namespace.u64(), "totalAmountLocked"),
141
- borsh7__namespace.option(borsh7__namespace.bool(), "claimsClosableByClaimant"),
142
- borsh7__namespace.option(borsh7__namespace.u16(), "claimsLimit")
128
+ var layout = borsh8__namespace.struct([
129
+ borsh8__namespace.u64("version"),
130
+ borsh8__namespace.array(borsh8__namespace.u8(), 32, "root"),
131
+ borsh8__namespace.u64("maxTotalClaim"),
132
+ borsh8__namespace.u64("maxNumNodes"),
133
+ borsh8__namespace.u64("unlockPeriod"),
134
+ borsh8__namespace.u64("startVestingTs"),
135
+ borsh8__namespace.u64("endVestingTs"),
136
+ borsh8__namespace.u64("clawbackStartTs"),
137
+ borsh8__namespace.bool("claimsClosableByAdmin"),
138
+ borsh8__namespace.option(borsh8__namespace.bool(), "canUpdateDuration"),
139
+ borsh8__namespace.option(borsh8__namespace.u64(), "totalAmountUnlocked"),
140
+ borsh8__namespace.option(borsh8__namespace.u64(), "totalAmountLocked"),
141
+ borsh8__namespace.option(borsh8__namespace.bool(), "claimsClosableByClaimant"),
142
+ borsh8__namespace.option(borsh8__namespace.u16(), "claimsLimit")
143
143
  ]);
144
144
  function newDistributor(args, accounts, programId = PROGRAM_ID) {
145
145
  const keys = [
@@ -181,10 +181,10 @@ function newDistributor(args, accounts, programId = PROGRAM_ID) {
181
181
  const ix = new web3_js.TransactionInstruction({ keys, programId, data });
182
182
  return ix;
183
183
  }
184
- var layout2 = borsh7__namespace.struct([
185
- borsh7__namespace.u64("amountUnlocked"),
186
- borsh7__namespace.u64("amountLocked"),
187
- borsh7__namespace.vec(borsh7__namespace.array(borsh7__namespace.u8(), 32), "proof")
184
+ var layout2 = borsh8__namespace.struct([
185
+ borsh8__namespace.u64("amountUnlocked"),
186
+ borsh8__namespace.u64("amountLocked"),
187
+ borsh8__namespace.vec(borsh8__namespace.array(borsh8__namespace.u8(), 32), "proof")
188
188
  ]);
189
189
  function newClaim(args, accounts, programId = PROGRAM_ID) {
190
190
  const keys = [
@@ -245,10 +245,10 @@ function clawback(accounts, programId = PROGRAM_ID) {
245
245
  const ix = new web3_js.TransactionInstruction({ keys, programId, data });
246
246
  return ix;
247
247
  }
248
- var layout3 = borsh7__namespace.struct([
249
- borsh7__namespace.option(borsh7__namespace.u64(), "amountUnlocked"),
250
- borsh7__namespace.option(borsh7__namespace.u64(), "amountLocked"),
251
- borsh7__namespace.option(borsh7__namespace.vec(borsh7__namespace.array(borsh7__namespace.u8(), 32)), "proof")
248
+ var layout3 = borsh8__namespace.struct([
249
+ borsh8__namespace.option(borsh8__namespace.u64(), "amountUnlocked"),
250
+ borsh8__namespace.option(borsh8__namespace.u64(), "amountLocked"),
251
+ borsh8__namespace.option(borsh8__namespace.vec(borsh8__namespace.array(borsh8__namespace.u8(), 32)), "proof")
252
252
  ]);
253
253
  function closeClaim(args, accounts, programId = PROGRAM_ID) {
254
254
  const keys = [
@@ -297,1316 +297,6 @@ function setAdmin(accounts, programId = PROGRAM_ID) {
297
297
  return ix;
298
298
  }
299
299
 
300
- // solana/descriptor/idl/merkle_distributor.json
301
- var merkle_distributor_default = {
302
- address: "MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N",
303
- metadata: {
304
- name: "merkle_distributor",
305
- version: "1.5.0",
306
- spec: "0.1.0",
307
- description: "A Solana program for distributing tokens according to a Merkle root.",
308
- repository: "https://github.com/streamflow-finance/distributor"
309
- },
310
- instructions: [
311
- {
312
- name: "_expose_claim",
313
- discriminator: [103, 233, 83, 69, 115, 199, 128, 249],
314
- accounts: [
315
- {
316
- name: "distributor",
317
- docs: ["The [MerkleDistributor]."]
318
- },
319
- {
320
- name: "claim_status",
321
- docs: ["Claim Status PDA"],
322
- optional: true,
323
- pda: {
324
- seeds: [
325
- {
326
- kind: "const",
327
- value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
328
- },
329
- {
330
- kind: "account",
331
- path: "claimant"
332
- },
333
- {
334
- kind: "account",
335
- path: "distributor"
336
- }
337
- ]
338
- }
339
- },
340
- {
341
- name: "compressed_claim_status",
342
- docs: ["Compress Claim Status PDA"],
343
- optional: true,
344
- pda: {
345
- seeds: [
346
- {
347
- kind: "const",
348
- value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
349
- },
350
- {
351
- kind: "account",
352
- path: "claimant"
353
- },
354
- {
355
- kind: "account",
356
- path: "distributor"
357
- }
358
- ]
359
- }
360
- },
361
- {
362
- name: "claimant",
363
- docs: ["Who is claiming the tokens."],
364
- signer: true
365
- }
366
- ],
367
- args: []
368
- },
369
- {
370
- name: "claim_locked",
371
- discriminator: [34, 206, 181, 23, 11, 207, 147, 90],
372
- accounts: [
373
- {
374
- name: "distributor",
375
- docs: ["The [MerkleDistributor]."],
376
- writable: true
377
- },
378
- {
379
- name: "claim_status",
380
- writable: true,
381
- pda: {
382
- seeds: [
383
- {
384
- kind: "const",
385
- value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
386
- },
387
- {
388
- kind: "account",
389
- path: "claimant"
390
- },
391
- {
392
- kind: "account",
393
- path: "distributor"
394
- }
395
- ]
396
- }
397
- },
398
- {
399
- name: "from",
400
- docs: ["Distributor ATA containing the tokens to distribute."],
401
- writable: true,
402
- pda: {
403
- seeds: [
404
- {
405
- kind: "account",
406
- path: "distributor"
407
- },
408
- {
409
- kind: "account",
410
- path: "token_program"
411
- },
412
- {
413
- kind: "account",
414
- path: "distributor.mint",
415
- account: "MerkleDistributor"
416
- }
417
- ],
418
- program: {
419
- kind: "const",
420
- value: [
421
- 140,
422
- 151,
423
- 37,
424
- 143,
425
- 78,
426
- 36,
427
- 137,
428
- 241,
429
- 187,
430
- 61,
431
- 16,
432
- 41,
433
- 20,
434
- 142,
435
- 13,
436
- 131,
437
- 11,
438
- 90,
439
- 19,
440
- 153,
441
- 218,
442
- 255,
443
- 16,
444
- 132,
445
- 4,
446
- 142,
447
- 123,
448
- 216,
449
- 219,
450
- 233,
451
- 248,
452
- 89
453
- ]
454
- }
455
- }
456
- },
457
- {
458
- name: "to",
459
- docs: [
460
- "Account to send the claimed tokens to.",
461
- "Claimant must sign the transaction and can only claim on behalf of themself"
462
- ],
463
- writable: true
464
- },
465
- {
466
- name: "claimant",
467
- docs: ["Who is claiming the tokens."],
468
- writable: true,
469
- signer: true
470
- },
471
- {
472
- name: "mint",
473
- docs: ["The mint to claim."],
474
- relations: ["distributor"]
475
- },
476
- {
477
- name: "token_program",
478
- docs: ["SPL [Token] program."]
479
- },
480
- {
481
- name: "event_authority",
482
- pda: {
483
- seeds: [
484
- {
485
- kind: "const",
486
- value: [95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
487
- }
488
- ]
489
- }
490
- },
491
- {
492
- name: "program"
493
- }
494
- ],
495
- args: []
496
- },
497
- {
498
- name: "clawback",
499
- discriminator: [111, 92, 142, 79, 33, 234, 82, 27],
500
- accounts: [
501
- {
502
- name: "distributor",
503
- docs: ["The [MerkleDistributor]."],
504
- writable: true
505
- },
506
- {
507
- name: "from",
508
- docs: ["Distributor ATA containing the tokens to distribute."],
509
- writable: true
510
- },
511
- {
512
- name: "to",
513
- docs: ["The Clawback token account."],
514
- writable: true
515
- },
516
- {
517
- name: "admin",
518
- docs: ["Only Admin can trigger the clawback of funds"],
519
- writable: true,
520
- signer: true
521
- },
522
- {
523
- name: "mint"
524
- },
525
- {
526
- name: "system_program",
527
- docs: ["The [System] program."],
528
- address: "11111111111111111111111111111111"
529
- },
530
- {
531
- name: "token_program",
532
- docs: ["SPL [Token] program."]
533
- }
534
- ],
535
- args: []
536
- },
537
- {
538
- name: "close_claim",
539
- discriminator: [42, 177, 165, 35, 213, 179, 211, 19],
540
- accounts: [
541
- {
542
- name: "distributor",
543
- docs: ["The [MerkleDistributor]."],
544
- writable: true
545
- },
546
- {
547
- name: "admin_or_claimant",
548
- docs: ["Admin signer"],
549
- writable: true,
550
- signer: true
551
- },
552
- {
553
- name: "claimant",
554
- writable: true
555
- },
556
- {
557
- name: "claim_status",
558
- writable: true,
559
- pda: {
560
- seeds: [
561
- {
562
- kind: "const",
563
- value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
564
- },
565
- {
566
- kind: "account",
567
- path: "claimant"
568
- },
569
- {
570
- kind: "account",
571
- path: "distributor"
572
- }
573
- ]
574
- }
575
- },
576
- {
577
- name: "system_program",
578
- docs: ["The [System] program."],
579
- address: "11111111111111111111111111111111"
580
- },
581
- {
582
- name: "event_authority",
583
- pda: {
584
- seeds: [
585
- {
586
- kind: "const",
587
- value: [95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
588
- }
589
- ]
590
- }
591
- },
592
- {
593
- name: "program"
594
- }
595
- ],
596
- args: [
597
- {
598
- name: "amount_unlocked",
599
- type: {
600
- option: "u64"
601
- }
602
- },
603
- {
604
- name: "amount_locked",
605
- type: {
606
- option: "u64"
607
- }
608
- },
609
- {
610
- name: "proof",
611
- type: {
612
- option: {
613
- vec: {
614
- array: ["u8", 32]
615
- }
616
- }
617
- }
618
- }
619
- ]
620
- },
621
- {
622
- name: "compress_claim",
623
- discriminator: [219, 45, 247, 134, 71, 119, 125, 89],
624
- accounts: [
625
- {
626
- name: "distributor",
627
- docs: ["The [MerkleDistributor]."],
628
- writable: true
629
- },
630
- {
631
- name: "claim_status",
632
- writable: true,
633
- pda: {
634
- seeds: [
635
- {
636
- kind: "const",
637
- value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
638
- },
639
- {
640
- kind: "account",
641
- path: "claimant"
642
- },
643
- {
644
- kind: "account",
645
- path: "distributor"
646
- }
647
- ]
648
- }
649
- },
650
- {
651
- name: "signer",
652
- docs: ["Signer account"],
653
- writable: true,
654
- signer: true
655
- },
656
- {
657
- name: "claimant"
658
- },
659
- {
660
- name: "system_program",
661
- docs: ["The [System] program."],
662
- address: "11111111111111111111111111111111"
663
- }
664
- ],
665
- args: []
666
- },
667
- {
668
- name: "new_claim",
669
- discriminator: [78, 177, 98, 123, 210, 21, 187, 83],
670
- accounts: [
671
- {
672
- name: "distributor",
673
- docs: ["The [MerkleDistributor]."],
674
- writable: true
675
- },
676
- {
677
- name: "claim_status",
678
- writable: true,
679
- pda: {
680
- seeds: [
681
- {
682
- kind: "const",
683
- value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
684
- },
685
- {
686
- kind: "account",
687
- path: "claimant"
688
- },
689
- {
690
- kind: "account",
691
- path: "distributor"
692
- }
693
- ]
694
- }
695
- },
696
- {
697
- name: "from",
698
- docs: ["Distributor ATA containing the tokens to distribute."],
699
- writable: true,
700
- pda: {
701
- seeds: [
702
- {
703
- kind: "account",
704
- path: "distributor"
705
- },
706
- {
707
- kind: "account",
708
- path: "token_program"
709
- },
710
- {
711
- kind: "account",
712
- path: "distributor.mint",
713
- account: "MerkleDistributor"
714
- }
715
- ],
716
- program: {
717
- kind: "const",
718
- value: [
719
- 140,
720
- 151,
721
- 37,
722
- 143,
723
- 78,
724
- 36,
725
- 137,
726
- 241,
727
- 187,
728
- 61,
729
- 16,
730
- 41,
731
- 20,
732
- 142,
733
- 13,
734
- 131,
735
- 11,
736
- 90,
737
- 19,
738
- 153,
739
- 218,
740
- 255,
741
- 16,
742
- 132,
743
- 4,
744
- 142,
745
- 123,
746
- 216,
747
- 219,
748
- 233,
749
- 248,
750
- 89
751
- ]
752
- }
753
- }
754
- },
755
- {
756
- name: "to",
757
- docs: ["Account to send the claimed tokens to."],
758
- writable: true
759
- },
760
- {
761
- name: "claimant",
762
- docs: ["Who is claiming the tokens."],
763
- writable: true,
764
- signer: true
765
- },
766
- {
767
- name: "mint",
768
- docs: ["The mint to claim."],
769
- relations: ["distributor"]
770
- },
771
- {
772
- name: "token_program",
773
- docs: ["SPL [Token] program."]
774
- },
775
- {
776
- name: "system_program",
777
- docs: ["The [System] program."],
778
- address: "11111111111111111111111111111111"
779
- },
780
- {
781
- name: "event_authority",
782
- pda: {
783
- seeds: [
784
- {
785
- kind: "const",
786
- value: [95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
787
- }
788
- ]
789
- }
790
- },
791
- {
792
- name: "program"
793
- }
794
- ],
795
- args: [
796
- {
797
- name: "amount_unlocked",
798
- type: "u64"
799
- },
800
- {
801
- name: "amount_locked",
802
- type: "u64"
803
- },
804
- {
805
- name: "proof",
806
- type: {
807
- vec: {
808
- array: ["u8", 32]
809
- }
810
- }
811
- }
812
- ]
813
- },
814
- {
815
- name: "new_distributor",
816
- docs: [
817
- "READ THE FOLLOWING:",
818
- "",
819
- "This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.",
820
- "",
821
- "An attack could look like:",
822
- "- A legitimate user opens a new distributor.",
823
- "- Someone observes the call to this instruction.",
824
- "- They replace the clawback_receiver, admin, or time parameters with their own.",
825
- "",
826
- "One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own",
827
- "and sets the clawback_start_ts with the minimal time allowed. After clawback_start_ts has elapsed,",
828
- "the attacker can steal all funds from the distributor to their own clawback_receiver account.",
829
- "",
830
- "HOW TO AVOID:",
831
- "- When you call into this instruction, ensure your transaction succeeds.",
832
- "- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and",
833
- "assert the parameters are what you expect, most importantly the clawback_receiver and admin.",
834
- "- If your transaction fails, double check the value on-chain matches what you expect."
835
- ],
836
- discriminator: [32, 139, 112, 171, 0, 2, 225, 155],
837
- accounts: [
838
- {
839
- name: "distributor",
840
- docs: ["[MerkleDistributor]."],
841
- writable: true,
842
- pda: {
843
- seeds: [
844
- {
845
- kind: "const",
846
- value: [77, 101, 114, 107, 108, 101, 68, 105, 115, 116, 114, 105, 98, 117, 116, 111, 114]
847
- },
848
- {
849
- kind: "account",
850
- path: "mint"
851
- },
852
- {
853
- kind: "arg",
854
- path: "version"
855
- }
856
- ]
857
- }
858
- },
859
- {
860
- name: "clawback_receiver",
861
- docs: ["Clawback receiver token account"],
862
- writable: true
863
- },
864
- {
865
- name: "mint",
866
- docs: ["The mint to distribute."]
867
- },
868
- {
869
- name: "token_vault",
870
- docs: ["Token vault"],
871
- writable: true,
872
- pda: {
873
- seeds: [
874
- {
875
- kind: "account",
876
- path: "distributor"
877
- },
878
- {
879
- kind: "account",
880
- path: "token_program"
881
- },
882
- {
883
- kind: "account",
884
- path: "mint"
885
- }
886
- ],
887
- program: {
888
- kind: "const",
889
- value: [
890
- 140,
891
- 151,
892
- 37,
893
- 143,
894
- 78,
895
- 36,
896
- 137,
897
- 241,
898
- 187,
899
- 61,
900
- 16,
901
- 41,
902
- 20,
903
- 142,
904
- 13,
905
- 131,
906
- 11,
907
- 90,
908
- 19,
909
- 153,
910
- 218,
911
- 255,
912
- 16,
913
- 132,
914
- 4,
915
- 142,
916
- 123,
917
- 216,
918
- 219,
919
- 233,
920
- 248,
921
- 89
922
- ]
923
- }
924
- }
925
- },
926
- {
927
- name: "admin",
928
- docs: [
929
- "Admin wallet, responsible for creating the distributor and paying for the transaction.",
930
- "Also has the authority to set the clawback receiver and change itself."
931
- ],
932
- writable: true,
933
- signer: true
934
- },
935
- {
936
- name: "system_program",
937
- docs: ["The [System] program."],
938
- address: "11111111111111111111111111111111"
939
- },
940
- {
941
- name: "associated_token_program",
942
- docs: ["The [Associated Token] program."],
943
- address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
944
- },
945
- {
946
- name: "token_program",
947
- docs: ["The [Token] program."]
948
- }
949
- ],
950
- args: [
951
- {
952
- name: "version",
953
- type: "u64"
954
- },
955
- {
956
- name: "root",
957
- type: {
958
- array: ["u8", 32]
959
- }
960
- },
961
- {
962
- name: "max_total_claim",
963
- type: "u64"
964
- },
965
- {
966
- name: "max_num_nodes",
967
- type: "u64"
968
- },
969
- {
970
- name: "unlock_period",
971
- type: "u64"
972
- },
973
- {
974
- name: "start_vesting_ts",
975
- type: "u64"
976
- },
977
- {
978
- name: "end_vesting_ts",
979
- type: "u64"
980
- },
981
- {
982
- name: "clawback_start_ts",
983
- type: "u64"
984
- },
985
- {
986
- name: "claims_closable_by_admin",
987
- type: "bool"
988
- },
989
- {
990
- name: "can_update_duration",
991
- type: {
992
- option: "bool"
993
- }
994
- },
995
- {
996
- name: "total_amount_unlocked",
997
- type: {
998
- option: "u64"
999
- }
1000
- },
1001
- {
1002
- name: "total_amount_locked",
1003
- type: {
1004
- option: "u64"
1005
- }
1006
- },
1007
- {
1008
- name: "claims_closable_by_claimant",
1009
- type: {
1010
- option: "bool"
1011
- }
1012
- },
1013
- {
1014
- name: "claims_limit",
1015
- type: {
1016
- option: "u16"
1017
- }
1018
- }
1019
- ]
1020
- },
1021
- {
1022
- name: "refund_claim",
1023
- discriminator: [157, 23, 164, 146, 176, 53, 147, 143],
1024
- accounts: [
1025
- {
1026
- name: "distributor",
1027
- docs: ["The [MerkleDistributor]."],
1028
- writable: true
1029
- },
1030
- {
1031
- name: "claim_status",
1032
- writable: true,
1033
- pda: {
1034
- seeds: [
1035
- {
1036
- kind: "const",
1037
- value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
1038
- },
1039
- {
1040
- kind: "account",
1041
- path: "claimant"
1042
- },
1043
- {
1044
- kind: "account",
1045
- path: "distributor"
1046
- }
1047
- ]
1048
- }
1049
- },
1050
- {
1051
- name: "signer",
1052
- docs: ["Signer account"],
1053
- writable: true,
1054
- signer: true
1055
- },
1056
- {
1057
- name: "claimant"
1058
- },
1059
- {
1060
- name: "streamflow_treasury",
1061
- writable: true,
1062
- address: "5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw"
1063
- },
1064
- {
1065
- name: "system_program",
1066
- docs: ["The [System] program."],
1067
- address: "11111111111111111111111111111111"
1068
- }
1069
- ],
1070
- args: []
1071
- },
1072
- {
1073
- name: "set_admin",
1074
- discriminator: [251, 163, 0, 52, 91, 194, 187, 92],
1075
- accounts: [
1076
- {
1077
- name: "distributor",
1078
- docs: ["The [MerkleDistributor]."],
1079
- writable: true
1080
- },
1081
- {
1082
- name: "admin",
1083
- docs: ["Admin signer"],
1084
- writable: true,
1085
- signer: true
1086
- },
1087
- {
1088
- name: "new_admin",
1089
- docs: ["New admin account"],
1090
- writable: true
1091
- }
1092
- ],
1093
- args: []
1094
- },
1095
- {
1096
- name: "set_clawback_receiver",
1097
- discriminator: [153, 217, 34, 20, 19, 29, 229, 75],
1098
- accounts: [
1099
- {
1100
- name: "distributor",
1101
- docs: ["The [MerkleDistributor]."],
1102
- writable: true
1103
- },
1104
- {
1105
- name: "new_clawback_account",
1106
- docs: ["New clawback account"]
1107
- },
1108
- {
1109
- name: "admin",
1110
- docs: ["Admin signer"],
1111
- writable: true,
1112
- signer: true
1113
- }
1114
- ],
1115
- args: []
1116
- },
1117
- {
1118
- name: "update",
1119
- discriminator: [219, 200, 88, 176, 158, 63, 253, 127],
1120
- accounts: [
1121
- {
1122
- name: "distributor",
1123
- docs: ["The [MerkleDistributor]."],
1124
- writable: true
1125
- },
1126
- {
1127
- name: "admin",
1128
- docs: ["Only Admin can trigger the clawback of funds"],
1129
- writable: true,
1130
- signer: true
1131
- },
1132
- {
1133
- name: "system_program",
1134
- docs: ["The [System] program."],
1135
- address: "11111111111111111111111111111111"
1136
- }
1137
- ],
1138
- args: [
1139
- {
1140
- name: "end_ts",
1141
- type: {
1142
- option: "u64"
1143
- }
1144
- }
1145
- ]
1146
- }
1147
- ],
1148
- accounts: [
1149
- {
1150
- name: "ClaimStatus",
1151
- discriminator: [22, 183, 249, 157, 247, 95, 150, 96]
1152
- },
1153
- {
1154
- name: "CompressedClaimStatus",
1155
- discriminator: [53, 68, 161, 131, 212, 106, 98, 48]
1156
- },
1157
- {
1158
- name: "MerkleDistributor",
1159
- discriminator: [77, 119, 139, 70, 84, 247, 12, 26]
1160
- }
1161
- ],
1162
- events: [
1163
- {
1164
- name: "ClaimClosedEvent",
1165
- discriminator: [139, 166, 215, 195, 184, 233, 26, 217]
1166
- },
1167
- {
1168
- name: "ClaimedEvent",
1169
- discriminator: [144, 172, 209, 86, 144, 87, 84, 115]
1170
- },
1171
- {
1172
- name: "NewClaimEvent",
1173
- discriminator: [244, 3, 231, 151, 60, 101, 55, 55]
1174
- }
1175
- ],
1176
- errors: [
1177
- {
1178
- code: 6e3,
1179
- name: "InsufficientUnlockedTokens",
1180
- msg: "Insufficient unlocked tokens"
1181
- },
1182
- {
1183
- code: 6001,
1184
- name: "InvalidProof",
1185
- msg: "Invalid Merkle proof"
1186
- },
1187
- {
1188
- code: 6002,
1189
- name: "ExceededMaxClaim",
1190
- msg: "Exceeded maximum claim amount"
1191
- },
1192
- {
1193
- code: 6003,
1194
- name: "MaxNodesExceeded",
1195
- msg: "Exceeded maximum node count"
1196
- },
1197
- {
1198
- code: 6004,
1199
- name: "Unauthorized",
1200
- msg: "Account is not authorized to execute this instruction"
1201
- },
1202
- {
1203
- code: 6005,
1204
- name: "OwnerMismatch",
1205
- msg: "Token account owner did not match intended owner"
1206
- },
1207
- {
1208
- code: 6006,
1209
- name: "ClawbackBeforeStart",
1210
- msg: "Attempted clawback before start"
1211
- },
1212
- {
1213
- code: 6007,
1214
- name: "ClawbackAlreadyClaimed",
1215
- msg: "Clawback already claimed"
1216
- },
1217
- {
1218
- code: 6008,
1219
- name: "SameClawbackReceiver",
1220
- msg: "New and old Clawback receivers are identical"
1221
- },
1222
- {
1223
- code: 6009,
1224
- name: "ClawbackReceiverIsTokenVault",
1225
- msg: "Clawback receiver can not be the Token Vault"
1226
- },
1227
- {
1228
- code: 6010,
1229
- name: "SameAdmin",
1230
- msg: "New and old admin are identical"
1231
- },
1232
- {
1233
- code: 6011,
1234
- name: "ClaimExpired",
1235
- msg: "Claim window expired"
1236
- },
1237
- {
1238
- code: 6012,
1239
- name: "ArithmeticError",
1240
- msg: "Arithmetic Error (overflow/underflow)"
1241
- },
1242
- {
1243
- code: 6013,
1244
- name: "StartTimestampAfterEnd",
1245
- msg: "Start Timestamp cannot be after end Timestamp"
1246
- },
1247
- {
1248
- code: 6014,
1249
- name: "TimestampsNotInFuture",
1250
- msg: "Timestamps cannot be in the past"
1251
- },
1252
- {
1253
- code: 6015,
1254
- name: "InvalidMint",
1255
- msg: "Invalid Mint"
1256
- },
1257
- {
1258
- code: 6016,
1259
- name: "ClaimIsClosed",
1260
- msg: "Claim is closed"
1261
- },
1262
- {
1263
- code: 6017,
1264
- name: "ClaimsAreNotClosable",
1265
- msg: "Claims are not closable"
1266
- },
1267
- {
1268
- code: 6018,
1269
- name: "InvalidUnlockPeriod",
1270
- msg: "Invalid unlock period"
1271
- },
1272
- {
1273
- code: 6019,
1274
- name: "DurationUpdateNotAllowed",
1275
- msg: "Duration update is not allowed"
1276
- },
1277
- {
1278
- code: 6020,
1279
- name: "NoVestingAmount",
1280
- msg: "Vesting amounts are not set"
1281
- },
1282
- {
1283
- code: 6021,
1284
- name: "VestingAlreadyFinished",
1285
- msg: "Vesting already finished"
1286
- },
1287
- {
1288
- code: 6022,
1289
- name: "InvalidAmounts",
1290
- msg: "Provided amounts are invalid"
1291
- },
1292
- {
1293
- code: 6023,
1294
- name: "ClaimsLimitReached",
1295
- msg: "Claims limit has been reached"
1296
- }
1297
- ],
1298
- types: [
1299
- {
1300
- name: "ClaimClosedEvent",
1301
- docs: ["Emitted when a new claim is created."],
1302
- type: {
1303
- kind: "struct",
1304
- fields: [
1305
- {
1306
- name: "claimant",
1307
- docs: ["User that claimed."],
1308
- type: "pubkey"
1309
- },
1310
- {
1311
- name: "timestamp",
1312
- docs: ["Timestamp."],
1313
- type: "u64"
1314
- }
1315
- ]
1316
- }
1317
- },
1318
- {
1319
- name: "ClaimStatus",
1320
- docs: ["Holds whether or not a claimant has claimed tokens."],
1321
- type: {
1322
- kind: "struct",
1323
- fields: [
1324
- {
1325
- name: "claimant",
1326
- docs: ["Authority that claimed the tokens."],
1327
- type: "pubkey"
1328
- },
1329
- {
1330
- name: "locked_amount",
1331
- docs: ["Locked amount"],
1332
- type: "u64"
1333
- },
1334
- {
1335
- name: "locked_amount_withdrawn",
1336
- docs: ["Locked amount withdrawn"],
1337
- type: "u64"
1338
- },
1339
- {
1340
- name: "unlocked_amount",
1341
- docs: ["Unlocked amount"],
1342
- type: "u64"
1343
- },
1344
- {
1345
- name: "last_claim_ts",
1346
- docs: ["Last claim time"],
1347
- type: "u64"
1348
- },
1349
- {
1350
- name: "last_amount_per_unlock",
1351
- docs: ["Track amount per unlock, can be useful for non-linear vesting"],
1352
- type: "u64"
1353
- },
1354
- {
1355
- name: "closed",
1356
- docs: ["Whether claim is closed"],
1357
- type: "bool"
1358
- },
1359
- {
1360
- name: "distributor",
1361
- docs: [
1362
- "Distributor account for which ClaimStatus was created, useful to filter by in get_program_accounts"
1363
- ],
1364
- type: "pubkey"
1365
- },
1366
- {
1367
- name: "claims_count",
1368
- docs: ["Number of time amount has been claimed"],
1369
- type: "u16"
1370
- },
1371
- {
1372
- name: "closed_ts",
1373
- docs: ["Time when claim has been closed"],
1374
- type: "u64"
1375
- },
1376
- {
1377
- name: "buffer_2",
1378
- docs: ["Buffer for additional fields"],
1379
- type: {
1380
- array: ["u8", 22]
1381
- }
1382
- }
1383
- ]
1384
- }
1385
- },
1386
- {
1387
- name: "ClaimedEvent",
1388
- docs: ["Emitted when tokens are claimed."],
1389
- type: {
1390
- kind: "struct",
1391
- fields: [
1392
- {
1393
- name: "claimant",
1394
- docs: ["User that claimed."],
1395
- type: "pubkey"
1396
- },
1397
- {
1398
- name: "amount",
1399
- docs: ["Amount of tokens to distribute."],
1400
- type: "u64"
1401
- }
1402
- ]
1403
- }
1404
- },
1405
- {
1406
- name: "CompressedClaimStatus",
1407
- docs: ["Holds whether or not a claimant has claimed tokens."],
1408
- type: {
1409
- kind: "struct",
1410
- fields: [
1411
- {
1412
- name: "state",
1413
- type: {
1414
- defined: {
1415
- name: "State"
1416
- }
1417
- }
1418
- }
1419
- ]
1420
- }
1421
- },
1422
- {
1423
- name: "MerkleDistributor",
1424
- docs: ["State for the account which distributes tokens."],
1425
- type: {
1426
- kind: "struct",
1427
- fields: [
1428
- {
1429
- name: "bump",
1430
- docs: ["Bump seed."],
1431
- type: "u8"
1432
- },
1433
- {
1434
- name: "version",
1435
- docs: ["Version of the airdrop"],
1436
- type: "u64"
1437
- },
1438
- {
1439
- name: "root",
1440
- docs: ["The 256-bit merkle root."],
1441
- type: {
1442
- array: ["u8", 32]
1443
- }
1444
- },
1445
- {
1446
- name: "mint",
1447
- docs: ["[Mint] of the token to be distributed."],
1448
- type: "pubkey"
1449
- },
1450
- {
1451
- name: "token_vault",
1452
- docs: ["Token Address of the vault"],
1453
- type: "pubkey"
1454
- },
1455
- {
1456
- name: "max_total_claim",
1457
- docs: ["Maximum number of tokens that can ever be claimed from this [MerkleDistributor]."],
1458
- type: "u64"
1459
- },
1460
- {
1461
- name: "max_num_nodes",
1462
- docs: ["Maximum number of nodes in [MerkleDistributor]."],
1463
- type: "u64"
1464
- },
1465
- {
1466
- name: "unlock_period",
1467
- docs: ["Time step (period) in seconds per which the unlock occurs"],
1468
- type: "u64"
1469
- },
1470
- {
1471
- name: "total_amount_claimed",
1472
- docs: ["Total amount of tokens that have been claimed."],
1473
- type: "u64"
1474
- },
1475
- {
1476
- name: "num_nodes_claimed",
1477
- docs: ["Number of nodes that have been claimed."],
1478
- type: "u64"
1479
- },
1480
- {
1481
- name: "start_ts",
1482
- docs: ["Lockup time start (Unix Timestamp)"],
1483
- type: "u64"
1484
- },
1485
- {
1486
- name: "end_ts",
1487
- docs: ["Lockup time end (Unix Timestamp)"],
1488
- type: "u64"
1489
- },
1490
- {
1491
- name: "clawback_start_ts",
1492
- docs: ["Clawback start (Unix Timestamp)"],
1493
- type: "u64"
1494
- },
1495
- {
1496
- name: "clawback_receiver",
1497
- docs: ["Clawback receiver"],
1498
- type: "pubkey"
1499
- },
1500
- {
1501
- name: "admin",
1502
- docs: ["Admin wallet"],
1503
- type: "pubkey"
1504
- },
1505
- {
1506
- name: "clawed_back",
1507
- docs: ["Whether or not the distributor has been clawed back"],
1508
- type: "bool"
1509
- },
1510
- {
1511
- name: "claims_closable_by_admin",
1512
- docs: ["Whether claims are closable by the admin or not"],
1513
- type: "bool"
1514
- },
1515
- {
1516
- name: "can_update_duration",
1517
- docs: ["Whether admin can update vesting duration"],
1518
- type: "bool"
1519
- },
1520
- {
1521
- name: "total_amount_unlocked",
1522
- docs: ["Total amount of funds unlocked (cliff/instant)"],
1523
- type: "u64"
1524
- },
1525
- {
1526
- name: "total_amount_locked",
1527
- docs: ["Total amount of funds locked (vested)"],
1528
- type: "u64"
1529
- },
1530
- {
1531
- name: "last_duration_update_ts",
1532
- docs: ["Timestamp when update was last called"],
1533
- type: "u64"
1534
- },
1535
- {
1536
- name: "total_claimable_pre_update",
1537
- docs: [
1538
- "Total amount of locked amount claimable as of last duration update, ever increasing total, accumulates with each update"
1539
- ],
1540
- type: "u64"
1541
- },
1542
- {
1543
- name: "clawed_back_ts",
1544
- docs: ["Timestamp when funds were clawed back"],
1545
- type: "u64"
1546
- },
1547
- {
1548
- name: "claims_closable_by_claimant",
1549
- docs: ["Whether claims are closable by claimant or not"],
1550
- type: "bool"
1551
- },
1552
- {
1553
- name: "claims_limit",
1554
- docs: ["Limit number of claims"],
1555
- type: "u16"
1556
- },
1557
- {
1558
- name: "buffer_2",
1559
- docs: ["Buffer for additional fields"],
1560
- type: {
1561
- array: ["u8", 20]
1562
- }
1563
- },
1564
- {
1565
- name: "buffer_3",
1566
- docs: ["Buffer for additional fields"],
1567
- type: {
1568
- array: ["u8", 32]
1569
- }
1570
- }
1571
- ]
1572
- }
1573
- },
1574
- {
1575
- name: "NewClaimEvent",
1576
- docs: ["Emitted when a new claim is created."],
1577
- type: {
1578
- kind: "struct",
1579
- fields: [
1580
- {
1581
- name: "claimant",
1582
- docs: ["User that claimed."],
1583
- type: "pubkey"
1584
- },
1585
- {
1586
- name: "timestamp",
1587
- docs: ["Timestamp."],
1588
- type: "u64"
1589
- }
1590
- ]
1591
- }
1592
- },
1593
- {
1594
- name: "State",
1595
- type: {
1596
- kind: "enum",
1597
- variants: [
1598
- {
1599
- name: "Claimed"
1600
- },
1601
- {
1602
- name: "Closed"
1603
- }
1604
- ]
1605
- }
1606
- }
1607
- ]
1608
- };
1609
-
1610
300
  // solana/constants.ts
1611
301
  var constants_exports = {};
1612
302
  __export(constants_exports, {
@@ -1647,6 +337,107 @@ var DISTRIBUTOR_PROGRAM_ID = {
1647
337
  [common.ICluster.Testnet]: "MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N",
1648
338
  [common.ICluster.Local]: "MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"
1649
339
  };
340
+ var _ClaimStatus = class _ClaimStatus {
341
+ constructor(fields) {
342
+ this.claimant = fields.claimant;
343
+ this.lockedAmount = fields.lockedAmount;
344
+ this.lockedAmountWithdrawn = fields.lockedAmountWithdrawn;
345
+ this.unlockedAmount = fields.unlockedAmount;
346
+ this.lastClaimTs = fields.lastClaimTs;
347
+ this.lastAmountPerUnlock = fields.lastAmountPerUnlock;
348
+ this.closed = fields.closed;
349
+ this.distributor = fields.distributor;
350
+ this.claimsCount = fields.claimsCount;
351
+ this.closedTs = fields.closedTs;
352
+ this.buffer2 = fields.buffer2;
353
+ }
354
+ static async fetch(c, address, programId = PROGRAM_ID) {
355
+ const info = await c.getAccountInfo(address);
356
+ if (info === null) {
357
+ return null;
358
+ }
359
+ if (!info.owner.equals(programId)) {
360
+ throw new Error("account doesn't belong to this program");
361
+ }
362
+ return this.decode(info.data);
363
+ }
364
+ static async fetchMultiple(c, addresses, programId = PROGRAM_ID) {
365
+ const infos = await c.getMultipleAccountsInfo(addresses);
366
+ return infos.map((info) => {
367
+ if (info === null) {
368
+ return null;
369
+ }
370
+ if (!info.owner.equals(programId)) {
371
+ throw new Error("account doesn't belong to this program");
372
+ }
373
+ return this.decode(info.data);
374
+ });
375
+ }
376
+ static decode(data) {
377
+ if (!data.slice(0, 8).equals(_ClaimStatus.discriminator)) {
378
+ throw new Error("invalid account discriminator");
379
+ }
380
+ const dec = _ClaimStatus.layout.decode(data.slice(8));
381
+ return new _ClaimStatus({
382
+ claimant: dec.claimant,
383
+ lockedAmount: dec.lockedAmount,
384
+ lockedAmountWithdrawn: dec.lockedAmountWithdrawn,
385
+ unlockedAmount: dec.unlockedAmount,
386
+ lastClaimTs: dec.lastClaimTs,
387
+ lastAmountPerUnlock: dec.lastAmountPerUnlock,
388
+ closed: dec.closed,
389
+ distributor: dec.distributor,
390
+ claimsCount: dec.claimsCount,
391
+ closedTs: dec.closedTs,
392
+ buffer2: dec.buffer2
393
+ });
394
+ }
395
+ toJSON() {
396
+ return {
397
+ claimant: this.claimant.toString(),
398
+ lockedAmount: this.lockedAmount.toString(),
399
+ lockedAmountWithdrawn: this.lockedAmountWithdrawn.toString(),
400
+ unlockedAmount: this.unlockedAmount.toString(),
401
+ lastClaimTs: this.lastClaimTs.toString(),
402
+ lastAmountPerUnlock: this.lastAmountPerUnlock.toString(),
403
+ closed: this.closed,
404
+ distributor: this.distributor.toString(),
405
+ claimsCount: this.claimsCount,
406
+ closedTs: this.closedTs.toString(),
407
+ buffer2: this.buffer2
408
+ };
409
+ }
410
+ static fromJSON(obj) {
411
+ return new _ClaimStatus({
412
+ claimant: new web3_js.PublicKey(obj.claimant),
413
+ lockedAmount: new BN6__default.default(obj.lockedAmount),
414
+ lockedAmountWithdrawn: new BN6__default.default(obj.lockedAmountWithdrawn),
415
+ unlockedAmount: new BN6__default.default(obj.unlockedAmount),
416
+ lastClaimTs: new BN6__default.default(obj.lastClaimTs),
417
+ lastAmountPerUnlock: new BN6__default.default(obj.lastAmountPerUnlock),
418
+ closed: obj.closed,
419
+ distributor: new web3_js.PublicKey(obj.distributor),
420
+ claimsCount: obj.claimsCount,
421
+ closedTs: new BN6__default.default(obj.closedTs),
422
+ buffer2: obj.buffer2
423
+ });
424
+ }
425
+ };
426
+ _ClaimStatus.discriminator = Buffer.from([22, 183, 249, 157, 247, 95, 150, 96]);
427
+ _ClaimStatus.layout = borsh8__namespace.struct([
428
+ borsh8__namespace.publicKey("claimant"),
429
+ borsh8__namespace.u64("lockedAmount"),
430
+ borsh8__namespace.u64("lockedAmountWithdrawn"),
431
+ borsh8__namespace.u64("unlockedAmount"),
432
+ borsh8__namespace.u64("lastClaimTs"),
433
+ borsh8__namespace.u64("lastAmountPerUnlock"),
434
+ borsh8__namespace.bool("closed"),
435
+ borsh8__namespace.publicKey("distributor"),
436
+ borsh8__namespace.u16("claimsCount"),
437
+ borsh8__namespace.u64("closedTs"),
438
+ borsh8__namespace.array(borsh8__namespace.u8(), 22, "buffer2")
439
+ ]);
440
+ var ClaimStatus = _ClaimStatus;
1650
441
  var _MerkleDistributor = class _MerkleDistributor {
1651
442
  constructor(fields) {
1652
443
  this.bump = fields.bump;
@@ -1768,28 +559,28 @@ var _MerkleDistributor = class _MerkleDistributor {
1768
559
  static fromJSON(obj) {
1769
560
  return new _MerkleDistributor({
1770
561
  bump: obj.bump,
1771
- version: new BN5__default.default(obj.version),
562
+ version: new BN6__default.default(obj.version),
1772
563
  root: obj.root,
1773
564
  mint: new web3_js.PublicKey(obj.mint),
1774
565
  tokenVault: new web3_js.PublicKey(obj.tokenVault),
1775
- maxTotalClaim: new BN5__default.default(obj.maxTotalClaim),
1776
- maxNumNodes: new BN5__default.default(obj.maxNumNodes),
1777
- unlockPeriod: new BN5__default.default(obj.unlockPeriod),
1778
- totalAmountClaimed: new BN5__default.default(obj.totalAmountClaimed),
1779
- numNodesClaimed: new BN5__default.default(obj.numNodesClaimed),
1780
- startTs: new BN5__default.default(obj.startTs),
1781
- endTs: new BN5__default.default(obj.endTs),
1782
- clawbackStartTs: new BN5__default.default(obj.clawbackStartTs),
566
+ maxTotalClaim: new BN6__default.default(obj.maxTotalClaim),
567
+ maxNumNodes: new BN6__default.default(obj.maxNumNodes),
568
+ unlockPeriod: new BN6__default.default(obj.unlockPeriod),
569
+ totalAmountClaimed: new BN6__default.default(obj.totalAmountClaimed),
570
+ numNodesClaimed: new BN6__default.default(obj.numNodesClaimed),
571
+ startTs: new BN6__default.default(obj.startTs),
572
+ endTs: new BN6__default.default(obj.endTs),
573
+ clawbackStartTs: new BN6__default.default(obj.clawbackStartTs),
1783
574
  clawbackReceiver: new web3_js.PublicKey(obj.clawbackReceiver),
1784
575
  admin: new web3_js.PublicKey(obj.admin),
1785
576
  clawedBack: obj.clawedBack,
1786
577
  claimsClosableByAdmin: obj.claimsClosableByAdmin,
1787
578
  canUpdateDuration: obj.canUpdateDuration,
1788
- totalAmountUnlocked: new BN5__default.default(obj.totalAmountUnlocked),
1789
- totalAmountLocked: new BN5__default.default(obj.totalAmountLocked),
1790
- lastDurationUpdateTs: new BN5__default.default(obj.lastDurationUpdateTs),
1791
- totalClaimablePreUpdate: new BN5__default.default(obj.totalClaimablePreUpdate),
1792
- clawedBackTs: new BN5__default.default(obj.clawedBackTs),
579
+ totalAmountUnlocked: new BN6__default.default(obj.totalAmountUnlocked),
580
+ totalAmountLocked: new BN6__default.default(obj.totalAmountLocked),
581
+ lastDurationUpdateTs: new BN6__default.default(obj.lastDurationUpdateTs),
582
+ totalClaimablePreUpdate: new BN6__default.default(obj.totalClaimablePreUpdate),
583
+ clawedBackTs: new BN6__default.default(obj.clawedBackTs),
1793
584
  claimsClosableByClaimant: obj.claimsClosableByClaimant,
1794
585
  claimsLimit: obj.claimsLimit,
1795
586
  buffer2: obj.buffer2,
@@ -1798,34 +589,34 @@ var _MerkleDistributor = class _MerkleDistributor {
1798
589
  }
1799
590
  };
1800
591
  _MerkleDistributor.discriminator = Buffer.from([77, 119, 139, 70, 84, 247, 12, 26]);
1801
- _MerkleDistributor.layout = borsh7__namespace.struct([
1802
- borsh7__namespace.u8("bump"),
1803
- borsh7__namespace.u64("version"),
1804
- borsh7__namespace.array(borsh7__namespace.u8(), 32, "root"),
1805
- borsh7__namespace.publicKey("mint"),
1806
- borsh7__namespace.publicKey("tokenVault"),
1807
- borsh7__namespace.u64("maxTotalClaim"),
1808
- borsh7__namespace.u64("maxNumNodes"),
1809
- borsh7__namespace.u64("unlockPeriod"),
1810
- borsh7__namespace.u64("totalAmountClaimed"),
1811
- borsh7__namespace.u64("numNodesClaimed"),
1812
- borsh7__namespace.u64("startTs"),
1813
- borsh7__namespace.u64("endTs"),
1814
- borsh7__namespace.u64("clawbackStartTs"),
1815
- borsh7__namespace.publicKey("clawbackReceiver"),
1816
- borsh7__namespace.publicKey("admin"),
1817
- borsh7__namespace.bool("clawedBack"),
1818
- borsh7__namespace.bool("claimsClosableByAdmin"),
1819
- borsh7__namespace.bool("canUpdateDuration"),
1820
- borsh7__namespace.u64("totalAmountUnlocked"),
1821
- borsh7__namespace.u64("totalAmountLocked"),
1822
- borsh7__namespace.u64("lastDurationUpdateTs"),
1823
- borsh7__namespace.u64("totalClaimablePreUpdate"),
1824
- borsh7__namespace.u64("clawedBackTs"),
1825
- borsh7__namespace.bool("claimsClosableByClaimant"),
1826
- borsh7__namespace.u16("claimsLimit"),
1827
- borsh7__namespace.array(borsh7__namespace.u8(), 20, "buffer2"),
1828
- borsh7__namespace.array(borsh7__namespace.u8(), 32, "buffer3")
592
+ _MerkleDistributor.layout = borsh8__namespace.struct([
593
+ borsh8__namespace.u8("bump"),
594
+ borsh8__namespace.u64("version"),
595
+ borsh8__namespace.array(borsh8__namespace.u8(), 32, "root"),
596
+ borsh8__namespace.publicKey("mint"),
597
+ borsh8__namespace.publicKey("tokenVault"),
598
+ borsh8__namespace.u64("maxTotalClaim"),
599
+ borsh8__namespace.u64("maxNumNodes"),
600
+ borsh8__namespace.u64("unlockPeriod"),
601
+ borsh8__namespace.u64("totalAmountClaimed"),
602
+ borsh8__namespace.u64("numNodesClaimed"),
603
+ borsh8__namespace.u64("startTs"),
604
+ borsh8__namespace.u64("endTs"),
605
+ borsh8__namespace.u64("clawbackStartTs"),
606
+ borsh8__namespace.publicKey("clawbackReceiver"),
607
+ borsh8__namespace.publicKey("admin"),
608
+ borsh8__namespace.bool("clawedBack"),
609
+ borsh8__namespace.bool("claimsClosableByAdmin"),
610
+ borsh8__namespace.bool("canUpdateDuration"),
611
+ borsh8__namespace.u64("totalAmountUnlocked"),
612
+ borsh8__namespace.u64("totalAmountLocked"),
613
+ borsh8__namespace.u64("lastDurationUpdateTs"),
614
+ borsh8__namespace.u64("totalClaimablePreUpdate"),
615
+ borsh8__namespace.u64("clawedBackTs"),
616
+ borsh8__namespace.bool("claimsClosableByClaimant"),
617
+ borsh8__namespace.u16("claimsLimit"),
618
+ borsh8__namespace.array(borsh8__namespace.u8(), 20, "buffer2"),
619
+ borsh8__namespace.array(borsh8__namespace.u8(), 32, "buffer3")
1829
620
  ]);
1830
621
  var MerkleDistributor = _MerkleDistributor;
1831
622
 
@@ -2837,9 +1628,9 @@ function getEventAuthorityPda(programId) {
2837
1628
  const seeds = [buffer.Buffer.from("__event_authority")];
2838
1629
  return web3_js.PublicKey.findProgramAddressSync(seeds, programId)[0];
2839
1630
  }
2840
- async function wrappedSignAndExecuteTransaction(...args) {
1631
+ async function wrappedSignAndExecuteTransaction(connection, invoker, tx, confirmationParams, throttleParams) {
2841
1632
  try {
2842
- return await solana.signAndExecuteTransaction(...args);
1633
+ return await solana.signAndExecuteTransaction(connection, invoker, tx, confirmationParams, throttleParams);
2843
1634
  } catch (err) {
2844
1635
  if (err instanceof Error) {
2845
1636
  const parsed = fromTxError(err);
@@ -2880,10 +1671,6 @@ var BaseDistributorClient = class {
2880
1671
  this.connection = new web3_js.Connection(clusterUrl, this.commitment);
2881
1672
  this.programId = programId !== "" ? new web3_js.PublicKey(programId) : new web3_js.PublicKey(DISTRIBUTOR_PROGRAM_ID[cluster]);
2882
1673
  this.sendThrottler = sendThrottler ?? solana.buildSendThrottler(sendRate);
2883
- const merkleDistributorProgram = {
2884
- ...merkle_distributor_default
2885
- };
2886
- this.merkleDistributorProgram = new anchor.Program(merkleDistributorProgram, { connection: this.connection });
2887
1674
  }
2888
1675
  getConnection() {
2889
1676
  return this.connection;
@@ -2918,7 +1705,7 @@ var BaseDistributorClient = class {
2918
1705
  };
2919
1706
  if (extParams.isNative) {
2920
1707
  ixs.push(
2921
- ...await solana.prepareWrappedAccount(this.connection, extParams.invoker.publicKey, new BN5__default.default(data.maxTotalClaim))
1708
+ ...await solana.prepareWrappedAccount(this.connection, extParams.invoker.publicKey, new BN6__default.default(data.maxTotalClaim))
2922
1709
  );
2923
1710
  }
2924
1711
  const newDistributorInstruction = await this.getNewDistributorInstruction(data, accounts);
@@ -2959,14 +1746,7 @@ var BaseDistributorClient = class {
2959
1746
  return { distributorPublicKey, ixs };
2960
1747
  }
2961
1748
  async create(data, extParams) {
2962
- const invoker = extParams.invoker.publicKey;
2963
- common.invariant(invoker, "Invoker's PublicKey is not available, check passed wallet adapter!");
2964
- const executionParams = this.unwrapExecutionParams(extParams);
2965
- const { ixs, distributorPublicKey } = await solana.createAndEstimateTransaction(
2966
- (params) => this.prepareCreateInstructions(data, params),
2967
- executionParams,
2968
- (q) => q.ixs
2969
- );
1749
+ const { ixs, distributorPublicKey } = await this.prepareCreateInstructions(data, extParams);
2970
1750
  const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, extParams.invoker.publicKey);
2971
1751
  const signature = await wrappedSignAndExecuteTransaction(
2972
1752
  this.connection,
@@ -2977,7 +1757,7 @@ var BaseDistributorClient = class {
2977
1757
  context,
2978
1758
  commitment: this.getCommitment()
2979
1759
  },
2980
- { sendThrottler: this.sendThrottler, skipSimulation: executionParams.skipSimulation }
1760
+ { sendThrottler: this.sendThrottler }
2981
1761
  );
2982
1762
  return {
2983
1763
  ixs,
@@ -2985,29 +1765,23 @@ var BaseDistributorClient = class {
2985
1765
  metadataId: distributorPublicKey.toBase58()
2986
1766
  };
2987
1767
  }
2988
- async claim(data, extParams, _serviceTransfer) {
2989
- const executionParams = this.unwrapExecutionParams(extParams);
2990
- const invoker = executionParams.invoker.publicKey;
2991
- common.invariant(invoker, "Invoker's PublicKey is not available, check passed wallet adapter!");
2992
- const ixs = await solana.createAndEstimateTransaction(
2993
- (params) => this.prepareClaimInstructions(data, params, _serviceTransfer),
2994
- executionParams
2995
- );
2996
- const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, invoker);
1768
+ async claim(data, extParams) {
1769
+ const ixs = await this.prepareClaimInstructions(data, extParams);
1770
+ const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, extParams.invoker.publicKey);
2997
1771
  const signature = await wrappedSignAndExecuteTransaction(
2998
1772
  this.connection,
2999
- executionParams.invoker,
1773
+ extParams.invoker,
3000
1774
  tx,
3001
1775
  {
3002
1776
  hash,
3003
1777
  context,
3004
1778
  commitment: this.getCommitment()
3005
1779
  },
3006
- { sendThrottler: this.sendThrottler, skipSimulation: executionParams.skipSimulation }
1780
+ { sendThrottler: this.sendThrottler }
3007
1781
  );
3008
1782
  return { ixs, txId: signature };
3009
1783
  }
3010
- async prepareClaimInstructions(data, extParams, _serviceTransfer) {
1784
+ async prepareClaimInstructions(data, extParams) {
3011
1785
  if (!extParams.invoker.publicKey) {
3012
1786
  throw new Error("Invoker's PublicKey is not available, check passed wallet adapter!");
3013
1787
  }
@@ -3034,7 +1808,7 @@ var BaseDistributorClient = class {
3034
1808
  extParams.invoker.publicKey
3035
1809
  );
3036
1810
  const eventAuthorityPublicKey = getEventAuthorityPda(this.programId);
3037
- const claimStatus = await this.getClaim(claimStatusPublicKey);
1811
+ const claimStatus = await ClaimStatus.fetch(this.connection, claimStatusPublicKey);
3038
1812
  const accounts = {
3039
1813
  distributor: distributorPublicKey,
3040
1814
  claimStatus: claimStatusPublicKey,
@@ -3049,43 +1823,32 @@ var BaseDistributorClient = class {
3049
1823
  };
3050
1824
  if (!claimStatus) {
3051
1825
  const args = {
3052
- amountLocked: new BN5__default.default(data.amountLocked),
3053
- amountUnlocked: new BN5__default.default(data.amountUnlocked),
1826
+ amountLocked: new BN6__default.default(data.amountLocked),
1827
+ amountUnlocked: new BN6__default.default(data.amountUnlocked),
3054
1828
  proof: data.proof
3055
1829
  };
3056
1830
  ixs.push(newClaim(args, accounts, this.programId));
3057
1831
  }
3058
- const nowTs = new BN5__default.default(Math.floor(Date.now() / 1e3));
3059
- if (claimStatus || new BN5__default.default(data.amountLocked).gtn(0) && nowTs.sub(distributor.startTs).gte(distributor.unlockPeriod)) {
1832
+ const nowTs = new BN6__default.default(Math.floor(Date.now() / 1e3));
1833
+ if (claimStatus || new BN6__default.default(data.amountLocked).gtn(0) && nowTs.sub(distributor.startTs).gte(distributor.unlockPeriod)) {
3060
1834
  ixs.push(claimLocked(accounts, this.programId));
3061
1835
  }
3062
- ixs.push(
3063
- this.prepareClaimFeeInstruction(
3064
- extParams.invoker.publicKey,
3065
- typeof _serviceTransfer === "bigint" ? _serviceTransfer : void 0
3066
- )
3067
- );
1836
+ ixs.push(this.prepareClaimFeeInstruction(extParams.invoker.publicKey));
3068
1837
  return ixs;
3069
1838
  }
3070
1839
  async closeClaim(data, extParams) {
3071
- const executionParams = this.unwrapExecutionParams(extParams);
3072
- const invoker = executionParams.invoker.publicKey;
3073
- common.invariant(invoker, "Invoker's PublicKey is not available, check passed wallet adapter!");
3074
- const ixs = await solana.createAndEstimateTransaction(
3075
- (params) => this.prepareCloseClaimInstructions(data, params),
3076
- executionParams
3077
- );
3078
- const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, invoker);
1840
+ const ixs = await this.prepareCloseClaimInstructions(data, extParams);
1841
+ const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, extParams.invoker.publicKey);
3079
1842
  const signature = await wrappedSignAndExecuteTransaction(
3080
1843
  this.connection,
3081
- executionParams.invoker,
1844
+ extParams.invoker,
3082
1845
  tx,
3083
1846
  {
3084
1847
  hash,
3085
1848
  context,
3086
1849
  commitment: this.getCommitment()
3087
1850
  },
3088
- { sendThrottler: this.sendThrottler, skipSimulation: executionParams.skipSimulation }
1851
+ { sendThrottler: this.sendThrottler }
3089
1852
  );
3090
1853
  return { ixs, txId: signature };
3091
1854
  }
@@ -3112,8 +1875,8 @@ var BaseDistributorClient = class {
3112
1875
  program: this.programId
3113
1876
  };
3114
1877
  const closeClaimArgs = {
3115
- amountLocked: data.amountLocked ? new BN5__default.default(data.amountLocked) : void 0,
3116
- amountUnlocked: data.amountUnlocked ? new BN5__default.default(data.amountUnlocked) : void 0,
1878
+ amountLocked: data.amountLocked ? new BN6__default.default(data.amountLocked) : void 0,
1879
+ amountUnlocked: data.amountUnlocked ? new BN6__default.default(data.amountUnlocked) : void 0,
3117
1880
  proof: data.proof
3118
1881
  };
3119
1882
  ixs.push(closeClaim(closeClaimArgs, closeClaimAccounts, this.programId));
@@ -3153,37 +1916,26 @@ var BaseDistributorClient = class {
3153
1916
  return ixs;
3154
1917
  }
3155
1918
  async clawback(data, extParams) {
3156
- const executionParams = this.unwrapExecutionParams(extParams);
3157
- const invoker = executionParams.invoker.publicKey;
3158
- common.invariant(invoker, "Invoker's PublicKey is not available, check passed wallet adapter!");
3159
- const ixs = await solana.createAndEstimateTransaction(
3160
- (params) => this.prepareClawbackInstructions(data, params),
3161
- executionParams
3162
- );
3163
- const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, invoker);
1919
+ const ixs = await this.prepareClawbackInstructions(data, extParams);
1920
+ const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, extParams.invoker.publicKey);
3164
1921
  const signature = await wrappedSignAndExecuteTransaction(
3165
1922
  this.connection,
3166
- executionParams.invoker,
1923
+ extParams.invoker,
3167
1924
  tx,
3168
1925
  {
3169
1926
  hash,
3170
1927
  context,
3171
1928
  commitment: this.getCommitment()
3172
1929
  },
3173
- { sendThrottler: this.sendThrottler, skipSimulation: executionParams.skipSimulation }
1930
+ { sendThrottler: this.sendThrottler }
3174
1931
  );
3175
1932
  return { ixs, txId: signature };
3176
1933
  }
3177
- async getClaim(claimStatus) {
3178
- return this.connection.getAccountInfo(solana.pk(claimStatus)).then((account) => this.decodeClaimStatus(account));
3179
- }
3180
1934
  async getClaims(data) {
3181
1935
  const claimStatusPublicKeys = data.map(({ id, recipient }) => {
3182
1936
  return getClaimantStatusPda(this.programId, new web3_js.PublicKey(id), new web3_js.PublicKey(recipient));
3183
1937
  });
3184
- return this.connection.getMultipleAccountsInfo(claimStatusPublicKeys).then((accounts) => {
3185
- return accounts.map((account) => this.decodeClaimStatus(account));
3186
- });
1938
+ return ClaimStatus.fetchMultiple(this.connection, claimStatusPublicKeys, this.programId);
3187
1939
  }
3188
1940
  async getDistributors(data) {
3189
1941
  const distributorPublicKeys = data.ids.map((distributorId) => new web3_js.PublicKey(distributorId));
@@ -3213,28 +1965,28 @@ var BaseDistributorClient = class {
3213
1965
  account: MerkleDistributor.decode(account.data)
3214
1966
  }));
3215
1967
  }
3216
- prepareClaimFeeInstruction(payer, fee = AIRDROP_CLAIM_FEE) {
1968
+ prepareClaimFeeInstruction(payer) {
3217
1969
  return web3_js.SystemProgram.transfer({
3218
1970
  fromPubkey: payer,
3219
1971
  toPubkey: STREAMFLOW_TREASURY_PUBLIC_KEY,
3220
- lamports: fee
1972
+ lamports: AIRDROP_CLAIM_FEE
3221
1973
  });
3222
1974
  }
3223
1975
  getNewDistributorArgs(data) {
3224
1976
  const args = {
3225
- version: new BN5__default.default(data.version),
1977
+ version: new BN6__default.default(data.version),
3226
1978
  root: data.root,
3227
- maxTotalClaim: new BN5__default.default(data.maxTotalClaim),
3228
- maxNumNodes: new BN5__default.default(data.maxNumNodes),
3229
- unlockPeriod: new BN5__default.default(data.unlockPeriod),
3230
- startVestingTs: new BN5__default.default(data.startVestingTs),
3231
- endVestingTs: new BN5__default.default(data.endVestingTs),
3232
- clawbackStartTs: new BN5__default.default(data.clawbackStartTs),
1979
+ maxTotalClaim: new BN6__default.default(data.maxTotalClaim),
1980
+ maxNumNodes: new BN6__default.default(data.maxNumNodes),
1981
+ unlockPeriod: new BN6__default.default(data.unlockPeriod),
1982
+ startVestingTs: new BN6__default.default(data.startVestingTs),
1983
+ endVestingTs: new BN6__default.default(data.endVestingTs),
1984
+ clawbackStartTs: new BN6__default.default(data.clawbackStartTs),
3233
1985
  claimsClosableByAdmin: data.claimsClosableByAdmin,
3234
1986
  claimsClosableByClaimant: data.claimsClosableByClaimant,
3235
1987
  claimsLimit: data.claimsLimit
3236
1988
  };
3237
- const nowTs = new BN5__default.default(Math.floor(Date.now() / 1e3));
1989
+ const nowTs = new BN6__default.default(Math.floor(Date.now() / 1e3));
3238
1990
  const endVestingTs = args.endVestingTs.isZero() ? nowTs : args.endVestingTs;
3239
1991
  const startVestingTs = args.startVestingTs.isZero() ? nowTs : args.startVestingTs;
3240
1992
  if (endVestingTs.gt(startVestingTs) && endVestingTs.sub(startVestingTs).lt(args.unlockPeriod)) {
@@ -3242,34 +1994,7 @@ var BaseDistributorClient = class {
3242
1994
  }
3243
1995
  return args;
3244
1996
  }
3245
- unwrapExecutionParams(extParams) {
3246
- return solana.unwrapExecutionParams(extParams, this.connection);
3247
- }
3248
- decodeClaimStatus(account) {
3249
- if (!account) {
3250
- return account;
3251
- }
3252
- try {
3253
- return decode(this.merkleDistributorProgram, "claimStatus", account.data);
3254
- } catch (baseClaimStatusError) {
3255
- try {
3256
- return decode(this.merkleDistributorProgram, "compressedClaimStatus", account.data);
3257
- } catch (compressedClaimStatusError) {
3258
- throw new Error("Couldn't decode claim status");
3259
- }
3260
- }
3261
- }
3262
1997
  };
3263
- function decode(program, accountName, accInfo, programKey) {
3264
- const programId = program.programId?.toBase58() ?? "N/A";
3265
- common.invariant(program, `Decoding program with key ${programId} is not available`);
3266
- const accountEntity = program.idl.accounts?.find((acc) => acc.name === accountName);
3267
- common.invariant(
3268
- !!accountEntity,
3269
- `Decoding program with key ${programId} doesn't specify account with name ${String(accountName)}`
3270
- );
3271
- return program.coder.accounts.decode(accountName, accInfo);
3272
- }
3273
1998
 
3274
1999
  // solana/clients/SolanaDistributorClient.ts
3275
2000
  var SolanaDistributorClient = class extends BaseDistributorClient {
@@ -3287,7 +2012,7 @@ var aligned_distributor_default = {
3287
2012
  address: "aMERKpFAWoChCi5oZwPvgsSCoGpZKBiU7fi76bdZjt2",
3288
2013
  metadata: {
3289
2014
  name: "aligned_distributor",
3290
- version: "1.5.0",
2015
+ version: "1.3.2",
3291
2016
  spec: "0.1.0",
3292
2017
  description: "Proxy for merkle distributor that updates Vesting duration according to token market performance."
3293
2018
  },
@@ -3431,48 +2156,6 @@ var aligned_distributor_default = {
3431
2156
  }
3432
2157
  ]
3433
2158
  },
3434
- {
3435
- name: "migrate_test_oracle",
3436
- discriminator: [203, 254, 19, 3, 172, 185, 85, 190],
3437
- accounts: [
3438
- {
3439
- name: "payer",
3440
- writable: true,
3441
- signer: true
3442
- },
3443
- {
3444
- name: "mint"
3445
- },
3446
- {
3447
- name: "creator"
3448
- },
3449
- {
3450
- name: "test_oracle",
3451
- writable: true,
3452
- pda: {
3453
- seeds: [
3454
- {
3455
- kind: "const",
3456
- value: [116, 101, 115, 116, 45, 111, 114, 97, 99, 108, 101]
3457
- },
3458
- {
3459
- kind: "account",
3460
- path: "mint"
3461
- },
3462
- {
3463
- kind: "account",
3464
- path: "creator"
3465
- }
3466
- ]
3467
- }
3468
- },
3469
- {
3470
- name: "system_program",
3471
- address: "11111111111111111111111111111111"
3472
- }
3473
- ],
3474
- args: []
3475
- },
3476
2159
  {
3477
2160
  name: "new_distributor",
3478
2161
  discriminator: [32, 139, 112, 171, 0, 2, 225, 155],
@@ -3558,48 +2241,6 @@ var aligned_distributor_default = {
3558
2241
  }
3559
2242
  ]
3560
2243
  },
3561
- {
3562
- name: "realloc_test_oracle",
3563
- discriminator: [234, 221, 116, 4, 198, 251, 244, 206],
3564
- accounts: [
3565
- {
3566
- name: "payer",
3567
- writable: true,
3568
- signer: true
3569
- },
3570
- {
3571
- name: "mint"
3572
- },
3573
- {
3574
- name: "creator"
3575
- },
3576
- {
3577
- name: "test_oracle",
3578
- writable: true,
3579
- pda: {
3580
- seeds: [
3581
- {
3582
- kind: "const",
3583
- value: [116, 101, 115, 116, 45, 111, 114, 97, 99, 108, 101]
3584
- },
3585
- {
3586
- kind: "account",
3587
- path: "mint"
3588
- },
3589
- {
3590
- kind: "account",
3591
- path: "creator"
3592
- }
3593
- ]
3594
- }
3595
- },
3596
- {
3597
- name: "system_program",
3598
- address: "11111111111111111111111111111111"
3599
- }
3600
- ],
3601
- args: []
3602
- },
3603
2244
  {
3604
2245
  name: "set_admin",
3605
2246
  discriminator: [251, 163, 0, 52, 91, 194, 187, 92],
@@ -4385,21 +3026,22 @@ var SolanaAlignedDistributorClient = class extends BaseDistributorClient {
4385
3026
  unlockPeriod
4386
3027
  } = data;
4387
3028
  return {
4388
- totalAmountLocked: new BN5__default.default(totalAmountLocked),
4389
- totalAmountUnlocked: new BN5__default.default(totalAmountUnlocked),
3029
+ totalAmountLocked: new BN6__default.default(totalAmountLocked),
3030
+ totalAmountUnlocked: new BN6__default.default(totalAmountUnlocked),
4390
3031
  oracleType: !!oracleType ? { [oracleType]: {} } : { none: {} },
4391
3032
  minPrice: common.getBN(minPrice, ALIGNED_PRECISION_FACTOR_POW),
4392
3033
  maxPrice: common.getBN(maxPrice, ALIGNED_PRECISION_FACTOR_POW),
4393
3034
  minPercentage: common.getBN(minPercentage, ALIGNED_PRECISION_FACTOR_POW),
4394
3035
  maxPercentage: common.getBN(maxPercentage, ALIGNED_PRECISION_FACTOR_POW),
4395
- tickSize: new BN5__default.default(tickSize || 1),
3036
+ tickSize: new BN6__default.default(tickSize || 1),
4396
3037
  skipInitial: skipInitial ?? false,
4397
- updatePeriod: unlockPeriod < 30 ? new BN5__default.default(30) : new BN5__default.default(unlockPeriod)
3038
+ updatePeriod: unlockPeriod < 30 ? new BN6__default.default(30) : new BN6__default.default(unlockPeriod)
4398
3039
  };
4399
3040
  }
4400
3041
  };
4401
3042
 
4402
3043
  exports.AnchorErrorCode = AnchorErrorCode;
3044
+ exports.ClaimStatus = ClaimStatus;
4403
3045
  exports.ContractErrorCode = ContractErrorCode;
4404
3046
  exports.MerkleDistributor = MerkleDistributor;
4405
3047
  exports.SolanaAlignedDistributorClient = SolanaAlignedDistributorClient;