@pump-fun/pump-sdk 1.5.0-devnet.1 → 1.6.0-devnet.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.
- package/dist/esm/index.js +817 -55
- package/dist/index.d.mts +2631 -1254
- package/dist/index.d.ts +2631 -1254
- package/dist/index.js +824 -63
- package/package.json +2 -2
- package/src/idl/pump.json +723 -47
- package/src/idl/pump.ts +723 -47
- package/src/index.ts +2 -0
- package/src/pda.ts +20 -0
- package/src/sdk.ts +101 -1
- package/src/state.ts +14 -0
package/dist/index.js
CHANGED
|
@@ -43,9 +43,11 @@ __export(index_exports, {
|
|
|
43
43
|
getPumpProgram: () => getPumpProgram,
|
|
44
44
|
getSellSolAmountFromTokenAmount: () => getSellSolAmountFromTokenAmount,
|
|
45
45
|
globalPda: () => globalPda,
|
|
46
|
+
globalVolumeAccumulatorPda: () => globalVolumeAccumulatorPda,
|
|
46
47
|
newBondingCurve: () => newBondingCurve,
|
|
47
48
|
pumpIdl: () => pump_default,
|
|
48
|
-
pumpPoolAuthorityPda: () => pumpPoolAuthorityPda
|
|
49
|
+
pumpPoolAuthorityPda: () => pumpPoolAuthorityPda,
|
|
50
|
+
userVolumeAccumulatorPda: () => userVolumeAccumulatorPda
|
|
49
51
|
});
|
|
50
52
|
module.exports = __toCommonJS(index_exports);
|
|
51
53
|
|
|
@@ -382,6 +384,84 @@ var pump_default = {
|
|
|
382
384
|
]
|
|
383
385
|
}
|
|
384
386
|
},
|
|
387
|
+
{
|
|
388
|
+
name: "global_volume_accumulator",
|
|
389
|
+
writable: true,
|
|
390
|
+
pda: {
|
|
391
|
+
seeds: [
|
|
392
|
+
{
|
|
393
|
+
kind: "const",
|
|
394
|
+
value: [
|
|
395
|
+
103,
|
|
396
|
+
108,
|
|
397
|
+
111,
|
|
398
|
+
98,
|
|
399
|
+
97,
|
|
400
|
+
108,
|
|
401
|
+
95,
|
|
402
|
+
118,
|
|
403
|
+
111,
|
|
404
|
+
108,
|
|
405
|
+
117,
|
|
406
|
+
109,
|
|
407
|
+
101,
|
|
408
|
+
95,
|
|
409
|
+
97,
|
|
410
|
+
99,
|
|
411
|
+
99,
|
|
412
|
+
117,
|
|
413
|
+
109,
|
|
414
|
+
117,
|
|
415
|
+
108,
|
|
416
|
+
97,
|
|
417
|
+
116,
|
|
418
|
+
111,
|
|
419
|
+
114
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
name: "user_volume_accumulator",
|
|
427
|
+
writable: true,
|
|
428
|
+
pda: {
|
|
429
|
+
seeds: [
|
|
430
|
+
{
|
|
431
|
+
kind: "const",
|
|
432
|
+
value: [
|
|
433
|
+
117,
|
|
434
|
+
115,
|
|
435
|
+
101,
|
|
436
|
+
114,
|
|
437
|
+
95,
|
|
438
|
+
118,
|
|
439
|
+
111,
|
|
440
|
+
108,
|
|
441
|
+
117,
|
|
442
|
+
109,
|
|
443
|
+
101,
|
|
444
|
+
95,
|
|
445
|
+
97,
|
|
446
|
+
99,
|
|
447
|
+
99,
|
|
448
|
+
117,
|
|
449
|
+
109,
|
|
450
|
+
117,
|
|
451
|
+
108,
|
|
452
|
+
97,
|
|
453
|
+
116,
|
|
454
|
+
111,
|
|
455
|
+
114
|
|
456
|
+
]
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
kind: "account",
|
|
460
|
+
path: "user"
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
}
|
|
464
|
+
},
|
|
385
465
|
{
|
|
386
466
|
name: "event_authority",
|
|
387
467
|
pda: {
|
|
@@ -426,6 +506,268 @@ var pump_default = {
|
|
|
426
506
|
}
|
|
427
507
|
]
|
|
428
508
|
},
|
|
509
|
+
{
|
|
510
|
+
name: "claim_pump_incentives",
|
|
511
|
+
discriminator: [
|
|
512
|
+
207,
|
|
513
|
+
204,
|
|
514
|
+
203,
|
|
515
|
+
6,
|
|
516
|
+
18,
|
|
517
|
+
141,
|
|
518
|
+
218,
|
|
519
|
+
200
|
|
520
|
+
],
|
|
521
|
+
accounts: [
|
|
522
|
+
{
|
|
523
|
+
name: "payer",
|
|
524
|
+
writable: true,
|
|
525
|
+
signer: true
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
name: "user"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
name: "user_ata",
|
|
532
|
+
writable: true,
|
|
533
|
+
pda: {
|
|
534
|
+
seeds: [
|
|
535
|
+
{
|
|
536
|
+
kind: "account",
|
|
537
|
+
path: "user"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
kind: "account",
|
|
541
|
+
path: "token_program"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
kind: "account",
|
|
545
|
+
path: "mint"
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
program: {
|
|
549
|
+
kind: "const",
|
|
550
|
+
value: [
|
|
551
|
+
140,
|
|
552
|
+
151,
|
|
553
|
+
37,
|
|
554
|
+
143,
|
|
555
|
+
78,
|
|
556
|
+
36,
|
|
557
|
+
137,
|
|
558
|
+
241,
|
|
559
|
+
187,
|
|
560
|
+
61,
|
|
561
|
+
16,
|
|
562
|
+
41,
|
|
563
|
+
20,
|
|
564
|
+
142,
|
|
565
|
+
13,
|
|
566
|
+
131,
|
|
567
|
+
11,
|
|
568
|
+
90,
|
|
569
|
+
19,
|
|
570
|
+
153,
|
|
571
|
+
218,
|
|
572
|
+
255,
|
|
573
|
+
16,
|
|
574
|
+
132,
|
|
575
|
+
4,
|
|
576
|
+
142,
|
|
577
|
+
123,
|
|
578
|
+
216,
|
|
579
|
+
219,
|
|
580
|
+
233,
|
|
581
|
+
248,
|
|
582
|
+
89
|
|
583
|
+
]
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
name: "global_volume_accumulator",
|
|
589
|
+
pda: {
|
|
590
|
+
seeds: [
|
|
591
|
+
{
|
|
592
|
+
kind: "const",
|
|
593
|
+
value: [
|
|
594
|
+
103,
|
|
595
|
+
108,
|
|
596
|
+
111,
|
|
597
|
+
98,
|
|
598
|
+
97,
|
|
599
|
+
108,
|
|
600
|
+
95,
|
|
601
|
+
118,
|
|
602
|
+
111,
|
|
603
|
+
108,
|
|
604
|
+
117,
|
|
605
|
+
109,
|
|
606
|
+
101,
|
|
607
|
+
95,
|
|
608
|
+
97,
|
|
609
|
+
99,
|
|
610
|
+
99,
|
|
611
|
+
117,
|
|
612
|
+
109,
|
|
613
|
+
117,
|
|
614
|
+
108,
|
|
615
|
+
97,
|
|
616
|
+
116,
|
|
617
|
+
111,
|
|
618
|
+
114
|
|
619
|
+
]
|
|
620
|
+
}
|
|
621
|
+
]
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
name: "global_incentive_token_account",
|
|
626
|
+
writable: true,
|
|
627
|
+
pda: {
|
|
628
|
+
seeds: [
|
|
629
|
+
{
|
|
630
|
+
kind: "account",
|
|
631
|
+
path: "global_volume_accumulator"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
kind: "account",
|
|
635
|
+
path: "token_program"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
kind: "account",
|
|
639
|
+
path: "mint"
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
program: {
|
|
643
|
+
kind: "const",
|
|
644
|
+
value: [
|
|
645
|
+
140,
|
|
646
|
+
151,
|
|
647
|
+
37,
|
|
648
|
+
143,
|
|
649
|
+
78,
|
|
650
|
+
36,
|
|
651
|
+
137,
|
|
652
|
+
241,
|
|
653
|
+
187,
|
|
654
|
+
61,
|
|
655
|
+
16,
|
|
656
|
+
41,
|
|
657
|
+
20,
|
|
658
|
+
142,
|
|
659
|
+
13,
|
|
660
|
+
131,
|
|
661
|
+
11,
|
|
662
|
+
90,
|
|
663
|
+
19,
|
|
664
|
+
153,
|
|
665
|
+
218,
|
|
666
|
+
255,
|
|
667
|
+
16,
|
|
668
|
+
132,
|
|
669
|
+
4,
|
|
670
|
+
142,
|
|
671
|
+
123,
|
|
672
|
+
216,
|
|
673
|
+
219,
|
|
674
|
+
233,
|
|
675
|
+
248,
|
|
676
|
+
89
|
|
677
|
+
]
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
name: "user_volume_accumulator",
|
|
683
|
+
writable: true,
|
|
684
|
+
pda: {
|
|
685
|
+
seeds: [
|
|
686
|
+
{
|
|
687
|
+
kind: "const",
|
|
688
|
+
value: [
|
|
689
|
+
117,
|
|
690
|
+
115,
|
|
691
|
+
101,
|
|
692
|
+
114,
|
|
693
|
+
95,
|
|
694
|
+
118,
|
|
695
|
+
111,
|
|
696
|
+
108,
|
|
697
|
+
117,
|
|
698
|
+
109,
|
|
699
|
+
101,
|
|
700
|
+
95,
|
|
701
|
+
97,
|
|
702
|
+
99,
|
|
703
|
+
99,
|
|
704
|
+
117,
|
|
705
|
+
109,
|
|
706
|
+
117,
|
|
707
|
+
108,
|
|
708
|
+
97,
|
|
709
|
+
116,
|
|
710
|
+
111,
|
|
711
|
+
114
|
|
712
|
+
]
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
kind: "account",
|
|
716
|
+
path: "user"
|
|
717
|
+
}
|
|
718
|
+
]
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
name: "mint",
|
|
723
|
+
address: "pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
name: "token_program"
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
name: "system_program",
|
|
730
|
+
address: "11111111111111111111111111111111"
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
name: "associated_token_program",
|
|
734
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
name: "event_authority",
|
|
738
|
+
pda: {
|
|
739
|
+
seeds: [
|
|
740
|
+
{
|
|
741
|
+
kind: "const",
|
|
742
|
+
value: [
|
|
743
|
+
95,
|
|
744
|
+
95,
|
|
745
|
+
101,
|
|
746
|
+
118,
|
|
747
|
+
101,
|
|
748
|
+
110,
|
|
749
|
+
116,
|
|
750
|
+
95,
|
|
751
|
+
97,
|
|
752
|
+
117,
|
|
753
|
+
116,
|
|
754
|
+
104,
|
|
755
|
+
111,
|
|
756
|
+
114,
|
|
757
|
+
105,
|
|
758
|
+
116,
|
|
759
|
+
121
|
|
760
|
+
]
|
|
761
|
+
}
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
name: "program"
|
|
767
|
+
}
|
|
768
|
+
],
|
|
769
|
+
args: []
|
|
770
|
+
},
|
|
429
771
|
{
|
|
430
772
|
name: "collect_creator_fee",
|
|
431
773
|
docs: [
|
|
@@ -444,8 +786,7 @@ var pump_default = {
|
|
|
444
786
|
accounts: [
|
|
445
787
|
{
|
|
446
788
|
name: "creator",
|
|
447
|
-
writable: true
|
|
448
|
-
signer: true
|
|
789
|
+
writable: true
|
|
449
790
|
},
|
|
450
791
|
{
|
|
451
792
|
name: "creator_vault",
|
|
@@ -2277,7 +2618,143 @@ var pump_default = {
|
|
|
2277
2618
|
]
|
|
2278
2619
|
},
|
|
2279
2620
|
{
|
|
2280
|
-
name: "new_authority"
|
|
2621
|
+
name: "new_authority"
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
name: "event_authority",
|
|
2625
|
+
pda: {
|
|
2626
|
+
seeds: [
|
|
2627
|
+
{
|
|
2628
|
+
kind: "const",
|
|
2629
|
+
value: [
|
|
2630
|
+
95,
|
|
2631
|
+
95,
|
|
2632
|
+
101,
|
|
2633
|
+
118,
|
|
2634
|
+
101,
|
|
2635
|
+
110,
|
|
2636
|
+
116,
|
|
2637
|
+
95,
|
|
2638
|
+
97,
|
|
2639
|
+
117,
|
|
2640
|
+
116,
|
|
2641
|
+
104,
|
|
2642
|
+
111,
|
|
2643
|
+
114,
|
|
2644
|
+
105,
|
|
2645
|
+
116,
|
|
2646
|
+
121
|
|
2647
|
+
]
|
|
2648
|
+
}
|
|
2649
|
+
]
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
{
|
|
2653
|
+
name: "program"
|
|
2654
|
+
}
|
|
2655
|
+
],
|
|
2656
|
+
args: []
|
|
2657
|
+
},
|
|
2658
|
+
{
|
|
2659
|
+
name: "update_pump_incentives",
|
|
2660
|
+
discriminator: [
|
|
2661
|
+
233,
|
|
2662
|
+
15,
|
|
2663
|
+
108,
|
|
2664
|
+
188,
|
|
2665
|
+
211,
|
|
2666
|
+
206,
|
|
2667
|
+
82,
|
|
2668
|
+
34
|
|
2669
|
+
],
|
|
2670
|
+
accounts: [
|
|
2671
|
+
{
|
|
2672
|
+
name: "admin",
|
|
2673
|
+
writable: true,
|
|
2674
|
+
signer: true,
|
|
2675
|
+
relations: [
|
|
2676
|
+
"global_config"
|
|
2677
|
+
]
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
name: "global_config"
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
name: "global_volume_accumulator",
|
|
2684
|
+
writable: true
|
|
2685
|
+
},
|
|
2686
|
+
{
|
|
2687
|
+
name: "mint",
|
|
2688
|
+
writable: true,
|
|
2689
|
+
address: "pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn"
|
|
2690
|
+
},
|
|
2691
|
+
{
|
|
2692
|
+
name: "global_incentive_token_account",
|
|
2693
|
+
writable: true,
|
|
2694
|
+
pda: {
|
|
2695
|
+
seeds: [
|
|
2696
|
+
{
|
|
2697
|
+
kind: "account",
|
|
2698
|
+
path: "global_volume_accumulator"
|
|
2699
|
+
},
|
|
2700
|
+
{
|
|
2701
|
+
kind: "account",
|
|
2702
|
+
path: "token_program"
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
kind: "account",
|
|
2706
|
+
path: "mint"
|
|
2707
|
+
}
|
|
2708
|
+
],
|
|
2709
|
+
program: {
|
|
2710
|
+
kind: "const",
|
|
2711
|
+
value: [
|
|
2712
|
+
140,
|
|
2713
|
+
151,
|
|
2714
|
+
37,
|
|
2715
|
+
143,
|
|
2716
|
+
78,
|
|
2717
|
+
36,
|
|
2718
|
+
137,
|
|
2719
|
+
241,
|
|
2720
|
+
187,
|
|
2721
|
+
61,
|
|
2722
|
+
16,
|
|
2723
|
+
41,
|
|
2724
|
+
20,
|
|
2725
|
+
142,
|
|
2726
|
+
13,
|
|
2727
|
+
131,
|
|
2728
|
+
11,
|
|
2729
|
+
90,
|
|
2730
|
+
19,
|
|
2731
|
+
153,
|
|
2732
|
+
218,
|
|
2733
|
+
255,
|
|
2734
|
+
16,
|
|
2735
|
+
132,
|
|
2736
|
+
4,
|
|
2737
|
+
142,
|
|
2738
|
+
123,
|
|
2739
|
+
216,
|
|
2740
|
+
219,
|
|
2741
|
+
233,
|
|
2742
|
+
248,
|
|
2743
|
+
89
|
|
2744
|
+
]
|
|
2745
|
+
}
|
|
2746
|
+
}
|
|
2747
|
+
},
|
|
2748
|
+
{
|
|
2749
|
+
name: "associated_token_program",
|
|
2750
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
name: "system_program",
|
|
2754
|
+
address: "11111111111111111111111111111111"
|
|
2755
|
+
},
|
|
2756
|
+
{
|
|
2757
|
+
name: "token_program"
|
|
2281
2758
|
},
|
|
2282
2759
|
{
|
|
2283
2760
|
name: "event_authority",
|
|
@@ -2312,7 +2789,24 @@ var pump_default = {
|
|
|
2312
2789
|
name: "program"
|
|
2313
2790
|
}
|
|
2314
2791
|
],
|
|
2315
|
-
args: [
|
|
2792
|
+
args: [
|
|
2793
|
+
{
|
|
2794
|
+
name: "start_time",
|
|
2795
|
+
type: "i64"
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
name: "end_time",
|
|
2799
|
+
type: "i64"
|
|
2800
|
+
},
|
|
2801
|
+
{
|
|
2802
|
+
name: "day_number",
|
|
2803
|
+
type: "u16"
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
name: "pump_token_supply_per_day",
|
|
2807
|
+
type: "u64"
|
|
2808
|
+
}
|
|
2809
|
+
]
|
|
2316
2810
|
}
|
|
2317
2811
|
],
|
|
2318
2812
|
accounts: [
|
|
@@ -2341,6 +2835,45 @@ var pump_default = {
|
|
|
2341
2835
|
114,
|
|
2342
2836
|
127
|
|
2343
2837
|
]
|
|
2838
|
+
},
|
|
2839
|
+
{
|
|
2840
|
+
name: "GlobalConfig",
|
|
2841
|
+
discriminator: [
|
|
2842
|
+
149,
|
|
2843
|
+
8,
|
|
2844
|
+
156,
|
|
2845
|
+
202,
|
|
2846
|
+
160,
|
|
2847
|
+
252,
|
|
2848
|
+
176,
|
|
2849
|
+
217
|
|
2850
|
+
]
|
|
2851
|
+
},
|
|
2852
|
+
{
|
|
2853
|
+
name: "GlobalVolumeAccumulator",
|
|
2854
|
+
discriminator: [
|
|
2855
|
+
202,
|
|
2856
|
+
42,
|
|
2857
|
+
246,
|
|
2858
|
+
43,
|
|
2859
|
+
142,
|
|
2860
|
+
190,
|
|
2861
|
+
30,
|
|
2862
|
+
255
|
|
2863
|
+
]
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
name: "UserVolumeAccumulator",
|
|
2867
|
+
discriminator: [
|
|
2868
|
+
86,
|
|
2869
|
+
255,
|
|
2870
|
+
112,
|
|
2871
|
+
14,
|
|
2872
|
+
102,
|
|
2873
|
+
53,
|
|
2874
|
+
154,
|
|
2875
|
+
250
|
|
2876
|
+
]
|
|
2344
2877
|
}
|
|
2345
2878
|
],
|
|
2346
2879
|
events: [
|
|
@@ -2357,6 +2890,32 @@ var pump_default = {
|
|
|
2357
2890
|
107
|
|
2358
2891
|
]
|
|
2359
2892
|
},
|
|
2893
|
+
{
|
|
2894
|
+
name: "AdminUpdatePumpIncentivesEvent",
|
|
2895
|
+
discriminator: [
|
|
2896
|
+
156,
|
|
2897
|
+
65,
|
|
2898
|
+
48,
|
|
2899
|
+
237,
|
|
2900
|
+
27,
|
|
2901
|
+
54,
|
|
2902
|
+
158,
|
|
2903
|
+
27
|
|
2904
|
+
]
|
|
2905
|
+
},
|
|
2906
|
+
{
|
|
2907
|
+
name: "ClaimPumpIncentivesEvent",
|
|
2908
|
+
discriminator: [
|
|
2909
|
+
13,
|
|
2910
|
+
204,
|
|
2911
|
+
53,
|
|
2912
|
+
161,
|
|
2913
|
+
254,
|
|
2914
|
+
254,
|
|
2915
|
+
81,
|
|
2916
|
+
233
|
|
2917
|
+
]
|
|
2918
|
+
},
|
|
2360
2919
|
{
|
|
2361
2920
|
name: "CollectCreatorFeeEvent",
|
|
2362
2921
|
discriminator: [
|
|
@@ -2643,6 +3202,16 @@ var pump_default = {
|
|
|
2643
3202
|
code: 6030,
|
|
2644
3203
|
name: "CreatorShouldNotBeZero",
|
|
2645
3204
|
msg: "Creator should not be zero"
|
|
3205
|
+
},
|
|
3206
|
+
{
|
|
3207
|
+
code: 6031,
|
|
3208
|
+
name: "InvalidDayIndex",
|
|
3209
|
+
msg: "Invalid day index"
|
|
3210
|
+
},
|
|
3211
|
+
{
|
|
3212
|
+
code: 6032,
|
|
3213
|
+
name: "InvalidTimeRange",
|
|
3214
|
+
msg: "Invalid time range"
|
|
2646
3215
|
}
|
|
2647
3216
|
],
|
|
2648
3217
|
types: [
|
|
@@ -2678,6 +3247,13 @@ var pump_default = {
|
|
|
2678
3247
|
]
|
|
2679
3248
|
}
|
|
2680
3249
|
},
|
|
3250
|
+
{
|
|
3251
|
+
name: "AdminUpdatePumpIncentivesEvent",
|
|
3252
|
+
type: {
|
|
3253
|
+
kind: "struct",
|
|
3254
|
+
fields: []
|
|
3255
|
+
}
|
|
3256
|
+
},
|
|
2681
3257
|
{
|
|
2682
3258
|
name: "BondingCurve",
|
|
2683
3259
|
type: {
|
|
@@ -2714,6 +3290,13 @@ var pump_default = {
|
|
|
2714
3290
|
]
|
|
2715
3291
|
}
|
|
2716
3292
|
},
|
|
3293
|
+
{
|
|
3294
|
+
name: "ClaimPumpIncentivesEvent",
|
|
3295
|
+
type: {
|
|
3296
|
+
kind: "struct",
|
|
3297
|
+
fields: []
|
|
3298
|
+
}
|
|
3299
|
+
},
|
|
2717
3300
|
{
|
|
2718
3301
|
name: "CollectCreatorFeeEvent",
|
|
2719
3302
|
type: {
|
|
@@ -2961,6 +3544,77 @@ var pump_default = {
|
|
|
2961
3544
|
]
|
|
2962
3545
|
}
|
|
2963
3546
|
},
|
|
3547
|
+
{
|
|
3548
|
+
name: "GlobalConfig",
|
|
3549
|
+
type: {
|
|
3550
|
+
kind: "struct",
|
|
3551
|
+
fields: [
|
|
3552
|
+
{
|
|
3553
|
+
name: "admin",
|
|
3554
|
+
type: "pubkey"
|
|
3555
|
+
},
|
|
3556
|
+
{
|
|
3557
|
+
name: "lp_fee_basis_points",
|
|
3558
|
+
type: "u64"
|
|
3559
|
+
},
|
|
3560
|
+
{
|
|
3561
|
+
name: "protocol_fee_basis_points",
|
|
3562
|
+
type: "u64"
|
|
3563
|
+
},
|
|
3564
|
+
{
|
|
3565
|
+
name: "disable_flags",
|
|
3566
|
+
type: "u8"
|
|
3567
|
+
},
|
|
3568
|
+
{
|
|
3569
|
+
name: "protocol_fee_recipients",
|
|
3570
|
+
type: {
|
|
3571
|
+
array: [
|
|
3572
|
+
"pubkey",
|
|
3573
|
+
8
|
|
3574
|
+
]
|
|
3575
|
+
}
|
|
3576
|
+
},
|
|
3577
|
+
{
|
|
3578
|
+
name: "coin_creator_fee_basis_points",
|
|
3579
|
+
type: "u64"
|
|
3580
|
+
}
|
|
3581
|
+
]
|
|
3582
|
+
}
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
name: "GlobalVolumeAccumulator",
|
|
3586
|
+
type: {
|
|
3587
|
+
kind: "struct",
|
|
3588
|
+
fields: [
|
|
3589
|
+
{
|
|
3590
|
+
name: "start_time",
|
|
3591
|
+
type: "i64"
|
|
3592
|
+
},
|
|
3593
|
+
{
|
|
3594
|
+
name: "end_time",
|
|
3595
|
+
type: "i64"
|
|
3596
|
+
},
|
|
3597
|
+
{
|
|
3598
|
+
name: "total_pump_token_supply",
|
|
3599
|
+
type: {
|
|
3600
|
+
array: [
|
|
3601
|
+
"u64",
|
|
3602
|
+
30
|
|
3603
|
+
]
|
|
3604
|
+
}
|
|
3605
|
+
},
|
|
3606
|
+
{
|
|
3607
|
+
name: "sol_volumes",
|
|
3608
|
+
type: {
|
|
3609
|
+
array: [
|
|
3610
|
+
"u64",
|
|
3611
|
+
30
|
|
3612
|
+
]
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
]
|
|
3616
|
+
}
|
|
3617
|
+
},
|
|
2964
3618
|
{
|
|
2965
3619
|
name: "SetCreatorEvent",
|
|
2966
3620
|
type: {
|
|
@@ -3177,6 +3831,30 @@ var pump_default = {
|
|
|
3177
3831
|
}
|
|
3178
3832
|
]
|
|
3179
3833
|
}
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
name: "UserVolumeAccumulator",
|
|
3837
|
+
type: {
|
|
3838
|
+
kind: "struct",
|
|
3839
|
+
fields: [
|
|
3840
|
+
{
|
|
3841
|
+
name: "last_update_timestamp",
|
|
3842
|
+
type: "i64"
|
|
3843
|
+
},
|
|
3844
|
+
{
|
|
3845
|
+
name: "current_sol_volume",
|
|
3846
|
+
type: "u64"
|
|
3847
|
+
},
|
|
3848
|
+
{
|
|
3849
|
+
name: "total_unclaimed_pump_tokens",
|
|
3850
|
+
type: "u64"
|
|
3851
|
+
},
|
|
3852
|
+
{
|
|
3853
|
+
name: "total_claimed_pump_tokens",
|
|
3854
|
+
type: "u64"
|
|
3855
|
+
}
|
|
3856
|
+
]
|
|
3857
|
+
}
|
|
3180
3858
|
}
|
|
3181
3859
|
]
|
|
3182
3860
|
};
|
|
@@ -3253,53 +3931,15 @@ function getSellSolAmountFromTokenAmount(global, bondingCurve, amount) {
|
|
|
3253
3931
|
}
|
|
3254
3932
|
|
|
3255
3933
|
// src/pda.ts
|
|
3256
|
-
var
|
|
3257
|
-
var
|
|
3258
|
-
var
|
|
3259
|
-
function globalPda(programId) {
|
|
3260
|
-
const [globalPda2] = import_web32.PublicKey.findProgramAddressSync(
|
|
3261
|
-
[Buffer.from("global")],
|
|
3262
|
-
programId
|
|
3263
|
-
);
|
|
3264
|
-
return globalPda2;
|
|
3265
|
-
}
|
|
3266
|
-
function bondingCurvePda(programId, mint) {
|
|
3267
|
-
const [bondingCurvePda2] = import_web32.PublicKey.findProgramAddressSync(
|
|
3268
|
-
[Buffer.from("bonding-curve"), new import_web32.PublicKey(mint).toBuffer()],
|
|
3269
|
-
programId
|
|
3270
|
-
);
|
|
3271
|
-
return bondingCurvePda2;
|
|
3272
|
-
}
|
|
3273
|
-
function creatorVaultPda(programId, creator) {
|
|
3274
|
-
const [creatorVault] = import_web32.PublicKey.findProgramAddressSync(
|
|
3275
|
-
[Buffer.from("creator-vault"), creator.toBuffer()],
|
|
3276
|
-
programId
|
|
3277
|
-
);
|
|
3278
|
-
return creatorVault;
|
|
3279
|
-
}
|
|
3280
|
-
function pumpPoolAuthorityPda(mint, pumpProgramId) {
|
|
3281
|
-
return import_web32.PublicKey.findProgramAddressSync(
|
|
3282
|
-
[Buffer.from("pool-authority"), mint.toBuffer()],
|
|
3283
|
-
pumpProgramId
|
|
3284
|
-
);
|
|
3285
|
-
}
|
|
3286
|
-
var CANONICAL_POOL_INDEX = 0;
|
|
3287
|
-
function canonicalPumpPoolPda(pumpProgramId, pumpAmmProgramId, mint) {
|
|
3288
|
-
const [pumpPoolAuthority] = pumpPoolAuthorityPda(mint, pumpProgramId);
|
|
3289
|
-
return (0, import_pump_swap_sdk.poolPda)(
|
|
3290
|
-
CANONICAL_POOL_INDEX,
|
|
3291
|
-
pumpPoolAuthority,
|
|
3292
|
-
mint,
|
|
3293
|
-
import_spl_token.NATIVE_MINT,
|
|
3294
|
-
pumpAmmProgramId
|
|
3295
|
-
);
|
|
3296
|
-
}
|
|
3934
|
+
var import_web33 = require("@solana/web3.js");
|
|
3935
|
+
var import_spl_token2 = require("@solana/spl-token");
|
|
3936
|
+
var import_pump_swap_sdk2 = require("@pump-fun/pump-swap-sdk");
|
|
3297
3937
|
|
|
3298
3938
|
// src/sdk.ts
|
|
3299
3939
|
var import_anchor = require("@coral-xyz/anchor");
|
|
3300
|
-
var
|
|
3301
|
-
var
|
|
3302
|
-
var
|
|
3940
|
+
var import_pump_swap_sdk = require("@pump-fun/pump-swap-sdk");
|
|
3941
|
+
var import_spl_token = require("@solana/spl-token");
|
|
3942
|
+
var import_web32 = require("@solana/web3.js");
|
|
3303
3943
|
var import_bn2 = __toESM(require("bn.js"));
|
|
3304
3944
|
function getPumpProgram(connection, programId) {
|
|
3305
3945
|
const pumpIdlAddressOverride = { ...pump_default };
|
|
@@ -3309,13 +3949,16 @@ function getPumpProgram(connection, programId) {
|
|
|
3309
3949
|
new import_anchor.AnchorProvider(connection, null, {})
|
|
3310
3950
|
);
|
|
3311
3951
|
}
|
|
3312
|
-
var PUMP_PROGRAM_ID = new
|
|
3952
|
+
var PUMP_PROGRAM_ID = new import_web32.PublicKey(
|
|
3313
3953
|
"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
|
|
3314
3954
|
);
|
|
3315
|
-
var PUMP_AMM_PROGRAM_ID = new
|
|
3955
|
+
var PUMP_AMM_PROGRAM_ID = new import_web32.PublicKey(
|
|
3316
3956
|
"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
|
|
3317
3957
|
);
|
|
3318
3958
|
var BONDING_CURVE_NEW_SIZE = 150;
|
|
3959
|
+
var PUMP_TOKEN_MINT = new import_web32.PublicKey(
|
|
3960
|
+
"pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn"
|
|
3961
|
+
);
|
|
3319
3962
|
var PumpSdk = class {
|
|
3320
3963
|
constructor(connection, pumpProgramId = PUMP_PROGRAM_ID, pumpAmmProgramId = PUMP_AMM_PROGRAM_ID) {
|
|
3321
3964
|
this.connection = connection;
|
|
@@ -3324,8 +3967,8 @@ var PumpSdk = class {
|
|
|
3324
3967
|
null,
|
|
3325
3968
|
pumpProgramId
|
|
3326
3969
|
);
|
|
3327
|
-
this.pumpAmmSdk = new
|
|
3328
|
-
this.pumpAmmAdminSdk = new
|
|
3970
|
+
this.pumpAmmSdk = new import_pump_swap_sdk.PumpAmmSdk(connection, pumpAmmProgramId.toBase58());
|
|
3971
|
+
this.pumpAmmAdminSdk = new import_pump_swap_sdk.PumpAmmAdminSdk(
|
|
3329
3972
|
connection,
|
|
3330
3973
|
pumpAmmProgramId.toBase58()
|
|
3331
3974
|
);
|
|
@@ -3352,6 +3995,12 @@ var PumpSdk = class {
|
|
|
3352
3995
|
mint
|
|
3353
3996
|
);
|
|
3354
3997
|
}
|
|
3998
|
+
globalVolumeAccumulatorPda() {
|
|
3999
|
+
return globalVolumeAccumulatorPda(this.offlinePumpProgram.programId);
|
|
4000
|
+
}
|
|
4001
|
+
userVolumeAccumulatorPda(user) {
|
|
4002
|
+
return userVolumeAccumulatorPda(user, this.offlinePumpProgram.programId);
|
|
4003
|
+
}
|
|
3355
4004
|
decodeGlobal(accountInfo) {
|
|
3356
4005
|
return this.offlinePumpProgram.coder.accounts.decode(
|
|
3357
4006
|
"global",
|
|
@@ -3364,6 +4013,18 @@ var PumpSdk = class {
|
|
|
3364
4013
|
accountInfo.data
|
|
3365
4014
|
);
|
|
3366
4015
|
}
|
|
4016
|
+
decodeGlobalVolumeAccumulator(accountInfo) {
|
|
4017
|
+
return this.offlinePumpProgram.coder.accounts.decode(
|
|
4018
|
+
"globalVolumeAccumulator",
|
|
4019
|
+
accountInfo.data
|
|
4020
|
+
);
|
|
4021
|
+
}
|
|
4022
|
+
decodeUserVolumeAccumulator(accountInfo) {
|
|
4023
|
+
return this.offlinePumpProgram.coder.accounts.decode(
|
|
4024
|
+
"userVolumeAccumulator",
|
|
4025
|
+
accountInfo.data
|
|
4026
|
+
);
|
|
4027
|
+
}
|
|
3367
4028
|
async fetchGlobal() {
|
|
3368
4029
|
return await this.pumpProgram.account.global.fetch(this.globalPda());
|
|
3369
4030
|
}
|
|
@@ -3375,7 +4036,7 @@ var PumpSdk = class {
|
|
|
3375
4036
|
async fetchBuyState(mint, user) {
|
|
3376
4037
|
const [bondingCurveAccountInfo, associatedUserAccountInfo] = await this.connection.getMultipleAccountsInfo([
|
|
3377
4038
|
this.bondingCurvePda(mint),
|
|
3378
|
-
(0,
|
|
4039
|
+
(0, import_spl_token.getAssociatedTokenAddressSync)(mint, user, true)
|
|
3379
4040
|
]);
|
|
3380
4041
|
if (!bondingCurveAccountInfo) {
|
|
3381
4042
|
throw new Error(
|
|
@@ -3388,7 +4049,7 @@ var PumpSdk = class {
|
|
|
3388
4049
|
async fetchSellState(mint, user) {
|
|
3389
4050
|
const [bondingCurveAccountInfo, associatedUserAccountInfo] = await this.connection.getMultipleAccountsInfo([
|
|
3390
4051
|
this.bondingCurvePda(mint),
|
|
3391
|
-
(0,
|
|
4052
|
+
(0, import_spl_token.getAssociatedTokenAddressSync)(mint, user, true)
|
|
3392
4053
|
]);
|
|
3393
4054
|
if (!bondingCurveAccountInfo) {
|
|
3394
4055
|
throw new Error(
|
|
@@ -3403,6 +4064,16 @@ var PumpSdk = class {
|
|
|
3403
4064
|
const bondingCurve = this.decodeBondingCurve(bondingCurveAccountInfo);
|
|
3404
4065
|
return { bondingCurveAccountInfo, bondingCurve };
|
|
3405
4066
|
}
|
|
4067
|
+
async fetchGlobalVolumeAccumulator() {
|
|
4068
|
+
return await this.pumpProgram.account.globalVolumeAccumulator.fetch(
|
|
4069
|
+
this.globalVolumeAccumulatorPda()[0]
|
|
4070
|
+
);
|
|
4071
|
+
}
|
|
4072
|
+
async fetchUserVolumeAccumulator(user) {
|
|
4073
|
+
return await this.pumpProgram.account.userVolumeAccumulator.fetch(
|
|
4074
|
+
this.userVolumeAccumulatorPda(user)[0]
|
|
4075
|
+
);
|
|
4076
|
+
}
|
|
3406
4077
|
async createInstruction({
|
|
3407
4078
|
mint,
|
|
3408
4079
|
name,
|
|
@@ -3436,10 +4107,10 @@ var PumpSdk = class {
|
|
|
3436
4107
|
})
|
|
3437
4108
|
);
|
|
3438
4109
|
}
|
|
3439
|
-
const associatedUser = (0,
|
|
4110
|
+
const associatedUser = (0, import_spl_token.getAssociatedTokenAddressSync)(mint, user, true);
|
|
3440
4111
|
if (!associatedUserAccountInfo) {
|
|
3441
4112
|
instructions.push(
|
|
3442
|
-
(0,
|
|
4113
|
+
(0, import_spl_token.createAssociatedTokenAccountIdempotentInstruction)(
|
|
3443
4114
|
user,
|
|
3444
4115
|
associatedUser,
|
|
3445
4116
|
user,
|
|
@@ -3472,14 +4143,14 @@ var PumpSdk = class {
|
|
|
3472
4143
|
amount,
|
|
3473
4144
|
solAmount
|
|
3474
4145
|
}) {
|
|
3475
|
-
const associatedUser = (0,
|
|
4146
|
+
const associatedUser = (0, import_spl_token.getAssociatedTokenAddressSync)(mint, user, true);
|
|
3476
4147
|
return [
|
|
3477
4148
|
await this.createInstruction({ mint, name, symbol, uri, creator, user }),
|
|
3478
4149
|
await this.extendAccountInstruction({
|
|
3479
4150
|
account: this.bondingCurvePda(mint),
|
|
3480
4151
|
user
|
|
3481
4152
|
}),
|
|
3482
|
-
(0,
|
|
4153
|
+
(0, import_spl_token.createAssociatedTokenAccountIdempotentInstruction)(
|
|
3483
4154
|
user,
|
|
3484
4155
|
associatedUser,
|
|
3485
4156
|
user,
|
|
@@ -3548,7 +4219,7 @@ var PumpSdk = class {
|
|
|
3548
4219
|
).accountsPartial({
|
|
3549
4220
|
feeRecipient: getFeeRecipient(global),
|
|
3550
4221
|
mint,
|
|
3551
|
-
associatedUser: (0,
|
|
4222
|
+
associatedUser: (0, import_spl_token.getAssociatedTokenAddressSync)(mint, user, true),
|
|
3552
4223
|
user,
|
|
3553
4224
|
creatorVault: this.creatorVaultPda(bondingCurve.creator)
|
|
3554
4225
|
}).instruction()
|
|
@@ -3577,15 +4248,15 @@ var PumpSdk = class {
|
|
|
3577
4248
|
}).instruction();
|
|
3578
4249
|
}
|
|
3579
4250
|
async collectCoinCreatorFeeInstructions(coinCreator) {
|
|
3580
|
-
let quoteMint =
|
|
3581
|
-
let quoteTokenProgram =
|
|
4251
|
+
let quoteMint = import_spl_token.NATIVE_MINT;
|
|
4252
|
+
let quoteTokenProgram = import_spl_token.TOKEN_PROGRAM_ID;
|
|
3582
4253
|
let coinCreatorVaultAuthority = this.pumpAmmSdk.coinCreatorVaultAuthorityPda(coinCreator);
|
|
3583
4254
|
let coinCreatorVaultAta = this.pumpAmmSdk.coinCreatorVaultAta(
|
|
3584
4255
|
coinCreatorVaultAuthority,
|
|
3585
4256
|
quoteMint,
|
|
3586
4257
|
quoteTokenProgram
|
|
3587
4258
|
);
|
|
3588
|
-
let coinCreatorTokenAccount = (0,
|
|
4259
|
+
let coinCreatorTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)(
|
|
3589
4260
|
quoteMint,
|
|
3590
4261
|
coinCreator,
|
|
3591
4262
|
true,
|
|
@@ -3635,8 +4306,98 @@ var PumpSdk = class {
|
|
|
3635
4306
|
}
|
|
3636
4307
|
return new import_bn2.default(accountInfo.lamports - rentExemptionLamports);
|
|
3637
4308
|
}
|
|
4309
|
+
async adminUpdatePumpIncentives(admin, startTime, endTime, dayNumber, pumpTokenSupplyPerDay, mint = PUMP_TOKEN_MINT, tokenProgram = import_spl_token.TOKEN_2022_PROGRAM_ID) {
|
|
4310
|
+
return await this.offlinePumpProgram.methods.updatePumpIncentives(
|
|
4311
|
+
startTime,
|
|
4312
|
+
endTime,
|
|
4313
|
+
dayNumber.toNumber(),
|
|
4314
|
+
pumpTokenSupplyPerDay
|
|
4315
|
+
).accountsPartial({
|
|
4316
|
+
admin,
|
|
4317
|
+
globalVolumeAccumulator: this.globalVolumeAccumulatorPda()[0],
|
|
4318
|
+
globalConfig: this.globalPda(),
|
|
4319
|
+
mint,
|
|
4320
|
+
tokenProgram
|
|
4321
|
+
}).instruction();
|
|
4322
|
+
}
|
|
4323
|
+
async claimPumpIncentives(user, payer, mint = PUMP_TOKEN_MINT, tokenProgram = import_spl_token.TOKEN_2022_PROGRAM_ID) {
|
|
4324
|
+
const userPumpAta = (0, import_spl_token.getAssociatedTokenAddressSync)(
|
|
4325
|
+
mint,
|
|
4326
|
+
user,
|
|
4327
|
+
true,
|
|
4328
|
+
tokenProgram
|
|
4329
|
+
);
|
|
4330
|
+
return [
|
|
4331
|
+
(0, import_spl_token.createAssociatedTokenAccountIdempotentInstruction)(
|
|
4332
|
+
payer,
|
|
4333
|
+
userPumpAta,
|
|
4334
|
+
user,
|
|
4335
|
+
mint,
|
|
4336
|
+
tokenProgram
|
|
4337
|
+
),
|
|
4338
|
+
await this.offlinePumpProgram.methods.claimPumpIncentives().accountsPartial({
|
|
4339
|
+
user,
|
|
4340
|
+
payer,
|
|
4341
|
+
globalVolumeAccumulator: this.globalVolumeAccumulatorPda()[0],
|
|
4342
|
+
mint,
|
|
4343
|
+
tokenProgram
|
|
4344
|
+
}).instruction()
|
|
4345
|
+
];
|
|
4346
|
+
}
|
|
3638
4347
|
};
|
|
3639
4348
|
function getFeeRecipient(global) {
|
|
3640
4349
|
const feeRecipients = [global.feeRecipient, ...global.feeRecipients];
|
|
3641
4350
|
return feeRecipients[Math.floor(Math.random() * feeRecipients.length)];
|
|
3642
4351
|
}
|
|
4352
|
+
|
|
4353
|
+
// src/pda.ts
|
|
4354
|
+
function globalPda(programId) {
|
|
4355
|
+
const [globalPda2] = import_web33.PublicKey.findProgramAddressSync(
|
|
4356
|
+
[Buffer.from("global")],
|
|
4357
|
+
programId
|
|
4358
|
+
);
|
|
4359
|
+
return globalPda2;
|
|
4360
|
+
}
|
|
4361
|
+
function bondingCurvePda(programId, mint) {
|
|
4362
|
+
const [bondingCurvePda2] = import_web33.PublicKey.findProgramAddressSync(
|
|
4363
|
+
[Buffer.from("bonding-curve"), new import_web33.PublicKey(mint).toBuffer()],
|
|
4364
|
+
programId
|
|
4365
|
+
);
|
|
4366
|
+
return bondingCurvePda2;
|
|
4367
|
+
}
|
|
4368
|
+
function creatorVaultPda(programId, creator) {
|
|
4369
|
+
const [creatorVault] = import_web33.PublicKey.findProgramAddressSync(
|
|
4370
|
+
[Buffer.from("creator-vault"), creator.toBuffer()],
|
|
4371
|
+
programId
|
|
4372
|
+
);
|
|
4373
|
+
return creatorVault;
|
|
4374
|
+
}
|
|
4375
|
+
function pumpPoolAuthorityPda(mint, pumpProgramId) {
|
|
4376
|
+
return import_web33.PublicKey.findProgramAddressSync(
|
|
4377
|
+
[Buffer.from("pool-authority"), mint.toBuffer()],
|
|
4378
|
+
pumpProgramId
|
|
4379
|
+
);
|
|
4380
|
+
}
|
|
4381
|
+
var CANONICAL_POOL_INDEX = 0;
|
|
4382
|
+
function canonicalPumpPoolPda(pumpProgramId, pumpAmmProgramId, mint) {
|
|
4383
|
+
const [pumpPoolAuthority] = pumpPoolAuthorityPda(mint, pumpProgramId);
|
|
4384
|
+
return (0, import_pump_swap_sdk2.poolPda)(
|
|
4385
|
+
CANONICAL_POOL_INDEX,
|
|
4386
|
+
pumpPoolAuthority,
|
|
4387
|
+
mint,
|
|
4388
|
+
import_spl_token2.NATIVE_MINT,
|
|
4389
|
+
pumpAmmProgramId
|
|
4390
|
+
);
|
|
4391
|
+
}
|
|
4392
|
+
function globalVolumeAccumulatorPda(programId = PUMP_PROGRAM_ID) {
|
|
4393
|
+
return import_web33.PublicKey.findProgramAddressSync(
|
|
4394
|
+
[Buffer.from("global_volume_accumulator")],
|
|
4395
|
+
programId
|
|
4396
|
+
);
|
|
4397
|
+
}
|
|
4398
|
+
function userVolumeAccumulatorPda(user, programId = PUMP_PROGRAM_ID) {
|
|
4399
|
+
return import_web33.PublicKey.findProgramAddressSync(
|
|
4400
|
+
[Buffer.from("user_volume_accumulator"), user.toBuffer()],
|
|
4401
|
+
programId
|
|
4402
|
+
);
|
|
4403
|
+
}
|