@sonarwatch/portfolio-plugins 0.14.24 → 0.14.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1262 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NxfinanceStakingIdl = void 0;
4
+ exports.NxfinanceStakingIdl = {
5
+ version: '0.1.0',
6
+ name: 'nx_stake',
7
+ constants: [
8
+ {
9
+ name: 'ADMIN',
10
+ type: 'publicKey',
11
+ value: 'solana_program :: pubkey ! ("Ftr58so5RrSnP5TDUuthethQMtyXZBMp2ySZ3RUT6UBG")',
12
+ },
13
+ {
14
+ name: 'DISTRIBUTOR',
15
+ type: 'publicKey',
16
+ value: 'solana_program :: pubkey ! ("JVPys7nwLWzpnB4ogMpw3KgH3dmGn4Pv6rtUVyKwRY2")',
17
+ },
18
+ {
19
+ name: 'SOL_PK',
20
+ type: 'publicKey',
21
+ value: 'solana_program :: pubkey ! ("So11111111111111111111111111111111111111112")',
22
+ },
23
+ {
24
+ name: 'SPL_MATH_DECIMAL',
25
+ type: 'u64',
26
+ value: '1000_000_000',
27
+ },
28
+ {
29
+ name: 'STALENESS_THRESHOLD',
30
+ type: 'u64',
31
+ value: '600000000',
32
+ },
33
+ {
34
+ name: 'MINUTE_AS_SECOND',
35
+ type: 'i64',
36
+ value: '60',
37
+ },
38
+ {
39
+ name: 'HOUR_AS_SECOND',
40
+ type: 'i64',
41
+ value: '60 * MINUTE_AS_SECOND',
42
+ },
43
+ {
44
+ name: 'DAY_AS_SECOND',
45
+ type: 'i64',
46
+ value: '24 * HOUR_AS_SECOND',
47
+ },
48
+ {
49
+ name: 'WEEK_AS_SECOND',
50
+ type: 'i64',
51
+ value: '7 * DAY_AS_SECOND',
52
+ },
53
+ {
54
+ name: 'YEAR_AS_SECOND',
55
+ type: 'i64',
56
+ value: '365 * DAY_AS_SECOND',
57
+ },
58
+ {
59
+ name: 'USDC',
60
+ type: {
61
+ defined: 'TokenInfo',
62
+ },
63
+ value: 'TokenInfo :: new (pubkey ! ("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v") , 6 , pubkey ! ("Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX") , PriceKind :: Pyth ,)',
64
+ },
65
+ {
66
+ name: 'SOL',
67
+ type: {
68
+ defined: 'TokenInfo',
69
+ },
70
+ value: 'TokenInfo :: new (pubkey ! ("So11111111111111111111111111111111111111112") , 9 , pubkey ! ("7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE") , PriceKind :: Pyth ,)',
71
+ },
72
+ {
73
+ name: 'VSOL',
74
+ type: {
75
+ defined: 'TokenInfo',
76
+ },
77
+ value: 'TokenInfo :: new (pubkey ! ("vSoLxydx6akxyMD9XEcPvGYNGq6Nn66oqVb3UkGkei7") , 9 , pubkey ! ("Fu9BYC6tWBo1KMKaP3CFoKfRhqv9akmy3DuYwnCyWiyC") , PriceKind :: LiquidateStakeToken ,)',
78
+ },
79
+ {
80
+ name: 'JLP',
81
+ type: {
82
+ defined: 'TokenInfo',
83
+ },
84
+ value: 'TokenInfo :: new (pubkey ! ("27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4") , 6 , pubkey ! ("2TTGSRSezqFzeLUH8JwRUbtN66XLLaymfYsWRTMjfiMw") , PriceKind :: Pyth ,)',
85
+ },
86
+ {
87
+ name: 'LP_SOLAYER',
88
+ type: {
89
+ defined: 'TokenInfo',
90
+ },
91
+ value: 'TokenInfo :: new (pubkey ! ("sSo1wxKKr6zW2hqf5hZrp2CawLibcwi1pMBqk5bg2G4") , 9 , pubkey ! ("po1osKDWYF9oiVEGmzKA4eTs8eMveFRMox3bUKazGN2") , PriceKind :: LiquidateStakeToken ,)',
92
+ },
93
+ {
94
+ name: 'SSOL',
95
+ type: {
96
+ defined: 'TokenInfo',
97
+ },
98
+ value: 'TokenInfo :: new (pubkey ! ("sSo14endRuUbvQaJS3dq36Q829a3A6BEfoeeRGJywEh") , 9 , pubkey ! ("po1osKDWYF9oiVEGmzKA4eTs8eMveFRMox3bUKazGN2") , PriceKind :: LiquidateStakeToken ,)',
99
+ },
100
+ {
101
+ name: 'ALL_TOKENS',
102
+ type: {
103
+ array: [
104
+ {
105
+ defined: 'TokenInfo',
106
+ },
107
+ 6,
108
+ ],
109
+ },
110
+ value: '[USDC , SOL , VSOL , JLP , LP_SOLAYER , SSOL]',
111
+ },
112
+ ],
113
+ instructions: [
114
+ {
115
+ name: 'configNxBase',
116
+ accounts: [
117
+ {
118
+ name: 'payer',
119
+ isMut: true,
120
+ isSigner: true,
121
+ },
122
+ {
123
+ name: 'nxBaseAccount',
124
+ isMut: true,
125
+ isSigner: false,
126
+ },
127
+ {
128
+ name: 'systemProgram',
129
+ isMut: false,
130
+ isSigner: false,
131
+ },
132
+ ],
133
+ args: [
134
+ {
135
+ name: 'args',
136
+ type: {
137
+ defined: 'ConfigNxBaseData',
138
+ },
139
+ },
140
+ ],
141
+ },
142
+ {
143
+ name: 'configStakePool',
144
+ accounts: [
145
+ {
146
+ name: 'payer',
147
+ isMut: true,
148
+ isSigner: true,
149
+ },
150
+ {
151
+ name: 'stakePool',
152
+ isMut: true,
153
+ isSigner: false,
154
+ },
155
+ {
156
+ name: 'stakeTokenMint',
157
+ isMut: false,
158
+ isSigner: false,
159
+ },
160
+ {
161
+ name: 'tokenProgram',
162
+ isMut: false,
163
+ isSigner: false,
164
+ docs: ['Solana ecosystem accounts'],
165
+ },
166
+ {
167
+ name: 'associatedTokenProgram',
168
+ isMut: false,
169
+ isSigner: false,
170
+ },
171
+ {
172
+ name: 'systemProgram',
173
+ isMut: false,
174
+ isSigner: false,
175
+ },
176
+ ],
177
+ args: [
178
+ {
179
+ name: 'args',
180
+ type: {
181
+ defined: 'ConfigStakePoolData',
182
+ },
183
+ },
184
+ ],
185
+ },
186
+ {
187
+ name: 'configDistributePool',
188
+ accounts: [
189
+ {
190
+ name: 'payer',
191
+ isMut: true,
192
+ isSigner: true,
193
+ },
194
+ {
195
+ name: 'distributePool',
196
+ isMut: true,
197
+ isSigner: false,
198
+ },
199
+ {
200
+ name: 'rewardTokenMint',
201
+ isMut: false,
202
+ isSigner: false,
203
+ },
204
+ {
205
+ name: 'tokenProgram',
206
+ isMut: false,
207
+ isSigner: false,
208
+ docs: ['Solana ecosystem accounts'],
209
+ },
210
+ {
211
+ name: 'associatedTokenProgram',
212
+ isMut: false,
213
+ isSigner: false,
214
+ },
215
+ {
216
+ name: 'systemProgram',
217
+ isMut: false,
218
+ isSigner: false,
219
+ },
220
+ ],
221
+ args: [
222
+ {
223
+ name: 'args',
224
+ type: {
225
+ defined: 'ConfigDistributePoolata',
226
+ },
227
+ },
228
+ ],
229
+ },
230
+ {
231
+ name: 'stakeNote',
232
+ accounts: [
233
+ {
234
+ name: 'staker',
235
+ isMut: true,
236
+ isSigner: true,
237
+ },
238
+ {
239
+ name: 'nxBaseAccount',
240
+ isMut: false,
241
+ isSigner: false,
242
+ },
243
+ {
244
+ name: 'distributePool',
245
+ isMut: true,
246
+ isSigner: false,
247
+ },
248
+ {
249
+ name: 'stakePool',
250
+ isMut: true,
251
+ isSigner: false,
252
+ },
253
+ {
254
+ name: 'stakeAccount',
255
+ isMut: true,
256
+ isSigner: false,
257
+ },
258
+ {
259
+ name: 'stakeTokenMint',
260
+ isMut: false,
261
+ isSigner: false,
262
+ },
263
+ {
264
+ name: 'tokenProgram',
265
+ isMut: false,
266
+ isSigner: false,
267
+ docs: ['Solana ecosystem accounts'],
268
+ },
269
+ {
270
+ name: 'associatedTokenProgram',
271
+ isMut: false,
272
+ isSigner: false,
273
+ },
274
+ {
275
+ name: 'systemProgram',
276
+ isMut: false,
277
+ isSigner: false,
278
+ },
279
+ ],
280
+ args: [],
281
+ },
282
+ {
283
+ name: 'stakeNx',
284
+ accounts: [
285
+ {
286
+ name: 'staker',
287
+ isMut: true,
288
+ isSigner: true,
289
+ },
290
+ {
291
+ name: 'nxBaseAccount',
292
+ isMut: false,
293
+ isSigner: false,
294
+ },
295
+ {
296
+ name: 'distributePool',
297
+ isMut: true,
298
+ isSigner: false,
299
+ },
300
+ {
301
+ name: 'stakedVaultAuth',
302
+ isMut: false,
303
+ isSigner: false,
304
+ },
305
+ {
306
+ name: 'stakedVaultTokenAccount',
307
+ isMut: true,
308
+ isSigner: false,
309
+ },
310
+ {
311
+ name: 'stakerTokenAccount',
312
+ isMut: true,
313
+ isSigner: false,
314
+ },
315
+ {
316
+ name: 'stakePool',
317
+ isMut: true,
318
+ isSigner: false,
319
+ },
320
+ {
321
+ name: 'stakeAccount',
322
+ isMut: true,
323
+ isSigner: false,
324
+ },
325
+ {
326
+ name: 'stakeTokenMint',
327
+ isMut: false,
328
+ isSigner: false,
329
+ },
330
+ {
331
+ name: 'tokenProgram',
332
+ isMut: false,
333
+ isSigner: false,
334
+ docs: ['Solana ecosystem accounts'],
335
+ },
336
+ {
337
+ name: 'associatedTokenProgram',
338
+ isMut: false,
339
+ isSigner: false,
340
+ },
341
+ {
342
+ name: 'systemProgram',
343
+ isMut: false,
344
+ isSigner: false,
345
+ },
346
+ ],
347
+ args: [
348
+ {
349
+ name: 'amount',
350
+ type: 'u64',
351
+ },
352
+ ],
353
+ },
354
+ {
355
+ name: 'unstakeNxApply',
356
+ accounts: [
357
+ {
358
+ name: 'payer',
359
+ isMut: true,
360
+ isSigner: true,
361
+ },
362
+ {
363
+ name: 'nxBaseAccount',
364
+ isMut: false,
365
+ isSigner: false,
366
+ },
367
+ {
368
+ name: 'stakePool',
369
+ isMut: true,
370
+ isSigner: false,
371
+ },
372
+ {
373
+ name: 'distributePool',
374
+ isMut: true,
375
+ isSigner: false,
376
+ },
377
+ {
378
+ name: 'stakeAccount',
379
+ isMut: true,
380
+ isSigner: false,
381
+ },
382
+ {
383
+ name: 'stakeTokenMint',
384
+ isMut: false,
385
+ isSigner: false,
386
+ },
387
+ {
388
+ name: 'tokenProgram',
389
+ isMut: false,
390
+ isSigner: false,
391
+ docs: ['Solana ecosystem accounts'],
392
+ },
393
+ {
394
+ name: 'associatedTokenProgram',
395
+ isMut: false,
396
+ isSigner: false,
397
+ },
398
+ {
399
+ name: 'systemProgram',
400
+ isMut: false,
401
+ isSigner: false,
402
+ },
403
+ ],
404
+ args: [
405
+ {
406
+ name: 'amount',
407
+ type: 'u64',
408
+ },
409
+ ],
410
+ },
411
+ {
412
+ name: 'unstakeNxExecute',
413
+ accounts: [
414
+ {
415
+ name: 'staker',
416
+ isMut: true,
417
+ isSigner: true,
418
+ },
419
+ {
420
+ name: 'nxBaseAccount',
421
+ isMut: false,
422
+ isSigner: false,
423
+ },
424
+ {
425
+ name: 'distributePool',
426
+ isMut: true,
427
+ isSigner: false,
428
+ },
429
+ {
430
+ name: 'stakePool',
431
+ isMut: true,
432
+ isSigner: false,
433
+ },
434
+ {
435
+ name: 'stakeAccount',
436
+ isMut: true,
437
+ isSigner: false,
438
+ },
439
+ {
440
+ name: 'stakedVaultAuth',
441
+ isMut: false,
442
+ isSigner: false,
443
+ },
444
+ {
445
+ name: 'stakedVaultTokenAccount',
446
+ isMut: true,
447
+ isSigner: false,
448
+ },
449
+ {
450
+ name: 'stakerTokenAccount',
451
+ isMut: true,
452
+ isSigner: false,
453
+ },
454
+ {
455
+ name: 'stakeTokenMint',
456
+ isMut: false,
457
+ isSigner: false,
458
+ },
459
+ {
460
+ name: 'tokenProgram',
461
+ isMut: false,
462
+ isSigner: false,
463
+ docs: ['Solana ecosystem accounts'],
464
+ },
465
+ {
466
+ name: 'associatedTokenProgram',
467
+ isMut: false,
468
+ isSigner: false,
469
+ },
470
+ {
471
+ name: 'systemProgram',
472
+ isMut: false,
473
+ isSigner: false,
474
+ },
475
+ ],
476
+ args: [],
477
+ },
478
+ {
479
+ name: 'withdrawTokenAndDistributeSecondly',
480
+ accounts: [
481
+ {
482
+ name: 'distributor',
483
+ isMut: true,
484
+ isSigner: true,
485
+ },
486
+ {
487
+ name: 'distributePool',
488
+ isMut: true,
489
+ isSigner: false,
490
+ },
491
+ {
492
+ name: 'stakePool',
493
+ isMut: true,
494
+ isSigner: false,
495
+ },
496
+ {
497
+ name: 'stakeTokenMint',
498
+ isMut: false,
499
+ isSigner: false,
500
+ },
501
+ {
502
+ name: 'nxBaseAccount',
503
+ isMut: false,
504
+ isSigner: false,
505
+ },
506
+ {
507
+ name: 'distributorDistributeTokenAccount',
508
+ isMut: true,
509
+ isSigner: false,
510
+ },
511
+ {
512
+ name: 'distributeVaultAuth',
513
+ isMut: false,
514
+ isSigner: false,
515
+ },
516
+ {
517
+ name: 'distributeVault',
518
+ isMut: true,
519
+ isSigner: false,
520
+ },
521
+ {
522
+ name: 'distributeTokenMint',
523
+ isMut: false,
524
+ isSigner: false,
525
+ },
526
+ {
527
+ name: 'instructions',
528
+ isMut: false,
529
+ isSigner: false,
530
+ docs: ['Solana ecosystem account'],
531
+ },
532
+ {
533
+ name: 'tokenProgram',
534
+ isMut: false,
535
+ isSigner: false,
536
+ },
537
+ {
538
+ name: 'associatedTokenProgram',
539
+ isMut: false,
540
+ isSigner: false,
541
+ },
542
+ {
543
+ name: 'systemProgram',
544
+ isMut: false,
545
+ isSigner: false,
546
+ },
547
+ ],
548
+ args: [],
549
+ },
550
+ {
551
+ name: 'withdrawTokenAndDistributeFirstly',
552
+ accounts: [
553
+ {
554
+ name: 'distributor',
555
+ isMut: true,
556
+ isSigner: true,
557
+ },
558
+ {
559
+ name: 'distributePool',
560
+ isMut: true,
561
+ isSigner: false,
562
+ },
563
+ {
564
+ name: 'nxBaseAccount',
565
+ isMut: false,
566
+ isSigner: false,
567
+ },
568
+ {
569
+ name: 'withdrawTokenPriceOracle',
570
+ isMut: true,
571
+ isSigner: false,
572
+ },
573
+ {
574
+ name: 'distributeTokenPriceOracle',
575
+ isMut: true,
576
+ isSigner: false,
577
+ },
578
+ {
579
+ name: 'solPriceOracle',
580
+ isMut: false,
581
+ isSigner: false,
582
+ },
583
+ {
584
+ name: 'vaultAuth',
585
+ isMut: false,
586
+ isSigner: false,
587
+ },
588
+ {
589
+ name: 'withdrawTokenMint',
590
+ isMut: false,
591
+ isSigner: false,
592
+ },
593
+ {
594
+ name: 'vaultTokenAccount',
595
+ isMut: true,
596
+ isSigner: false,
597
+ },
598
+ {
599
+ name: 'distributorWithdrawTokenAccount',
600
+ isMut: true,
601
+ isSigner: false,
602
+ },
603
+ {
604
+ name: 'distributorDistributeTokenAccount',
605
+ isMut: false,
606
+ isSigner: false,
607
+ },
608
+ {
609
+ name: 'distributeTokenMint',
610
+ isMut: false,
611
+ isSigner: false,
612
+ },
613
+ {
614
+ name: 'instructions',
615
+ isMut: false,
616
+ isSigner: false,
617
+ docs: ['Solana ecosystem accounts'],
618
+ },
619
+ {
620
+ name: 'tokenProgram',
621
+ isMut: false,
622
+ isSigner: false,
623
+ },
624
+ {
625
+ name: 'associatedTokenProgram',
626
+ isMut: false,
627
+ isSigner: false,
628
+ },
629
+ {
630
+ name: 'systemProgram',
631
+ isMut: false,
632
+ isSigner: false,
633
+ },
634
+ ],
635
+ args: [
636
+ {
637
+ name: 'withdrawAmt',
638
+ type: 'u64',
639
+ },
640
+ ],
641
+ },
642
+ {
643
+ name: 'stakerClaimDistributionReward',
644
+ accounts: [
645
+ {
646
+ name: 'claimer',
647
+ isMut: false,
648
+ isSigner: true,
649
+ },
650
+ {
651
+ name: 'distributePool',
652
+ isMut: true,
653
+ isSigner: false,
654
+ },
655
+ {
656
+ name: 'stakePool',
657
+ isMut: true,
658
+ isSigner: false,
659
+ },
660
+ {
661
+ name: 'nxBaseAccount',
662
+ isMut: false,
663
+ isSigner: false,
664
+ },
665
+ {
666
+ name: 'stakeAccount',
667
+ isMut: true,
668
+ isSigner: false,
669
+ },
670
+ {
671
+ name: 'distributeVaultAuth',
672
+ isMut: false,
673
+ isSigner: false,
674
+ },
675
+ {
676
+ name: 'distributeVault',
677
+ isMut: true,
678
+ isSigner: false,
679
+ },
680
+ {
681
+ name: 'claimerDistributeTokenAccount',
682
+ isMut: true,
683
+ isSigner: false,
684
+ },
685
+ {
686
+ name: 'stakeTokenMint',
687
+ isMut: false,
688
+ isSigner: false,
689
+ },
690
+ {
691
+ name: 'distributeTokenMint',
692
+ isMut: false,
693
+ isSigner: false,
694
+ },
695
+ {
696
+ name: 'tokenProgram',
697
+ isMut: false,
698
+ isSigner: false,
699
+ docs: ['Solana ecosystem accounts'],
700
+ },
701
+ {
702
+ name: 'associatedTokenProgram',
703
+ isMut: false,
704
+ isSigner: false,
705
+ },
706
+ {
707
+ name: 'systemProgram',
708
+ isMut: false,
709
+ isSigner: false,
710
+ },
711
+ ],
712
+ args: [],
713
+ },
714
+ ],
715
+ accounts: [
716
+ {
717
+ name: 'distributePool',
718
+ type: {
719
+ kind: 'struct',
720
+ fields: [
721
+ {
722
+ name: 'rewardToken',
723
+ docs: ['Public key of reward token'],
724
+ type: 'publicKey',
725
+ },
726
+ {
727
+ name: 'epochLength',
728
+ docs: [
729
+ 'The time interval between each epoch(withdraw token for distribute)',
730
+ ],
731
+ type: 'i64',
732
+ },
733
+ {
734
+ name: 'releaseEpochLength',
735
+ docs: ['The time interval between each epoch(distribute sol)'],
736
+ type: 'i64',
737
+ },
738
+ {
739
+ name: 'adminWithdrawRateEachEpoch',
740
+ docs: ['The rate of each distribute epoch'],
741
+ type: 'u64',
742
+ },
743
+ {
744
+ name: 'adminLastWithdrawedTokens',
745
+ docs: ["Admin's last token extraction record"],
746
+ type: {
747
+ vec: {
748
+ defined: 'AdminWithdrawDetail',
749
+ },
750
+ },
751
+ },
752
+ {
753
+ name: 'distributeTotal',
754
+ docs: ['Total number of tokens that can be released'],
755
+ type: 'u64',
756
+ },
757
+ {
758
+ name: 'releasedTotal',
759
+ docs: ['Total number of tokens that have been released'],
760
+ type: 'u64',
761
+ },
762
+ {
763
+ name: 'startTime',
764
+ docs: ['Start time of this distribution'],
765
+ type: 'i64',
766
+ },
767
+ {
768
+ name: 'finishTime',
769
+ docs: ['Finish time of this distribution'],
770
+ type: 'i64',
771
+ },
772
+ {
773
+ name: 'rewardPerNotes',
774
+ docs: [
775
+ 'How much REWARD can be awarded per unit of NOTE, It increases each time a reward is distributed, but never decreases.',
776
+ ],
777
+ type: 'u64',
778
+ },
779
+ {
780
+ name: 'swapTemp',
781
+ type: {
782
+ defined: 'SwapTemp',
783
+ },
784
+ },
785
+ ],
786
+ },
787
+ },
788
+ {
789
+ name: 'nxBase',
790
+ type: {
791
+ kind: 'struct',
792
+ fields: [
793
+ {
794
+ name: 'paused',
795
+ docs: ['Disable all protocol operations'],
796
+ type: 'bool',
797
+ },
798
+ {
799
+ name: 'withdrawLockUpPeriod',
800
+ docs: ['Lock-up period for withdrawals(second)'],
801
+ type: 'u64',
802
+ },
803
+ {
804
+ name: 'swapSlippageRate',
805
+ docs: [
806
+ 'Maximum slippage supported for all swap transactions。 The denominator is a constant: SPL_MATH_DECIMAL',
807
+ ],
808
+ type: 'u64',
809
+ },
810
+ ],
811
+ },
812
+ },
813
+ {
814
+ name: 'stakeAccount',
815
+ type: {
816
+ kind: 'struct',
817
+ fields: [
818
+ {
819
+ name: 'owner',
820
+ type: 'publicKey',
821
+ },
822
+ {
823
+ name: 'notes',
824
+ docs: ['Stake NX can get the note'],
825
+ type: 'u64',
826
+ },
827
+ {
828
+ name: 'stakedTokens',
829
+ docs: ['Staking nx can get notes and rewards'],
830
+ type: 'u64',
831
+ },
832
+ {
833
+ name: 'stakedNotes',
834
+ docs: [
835
+ 'Staking nx can get notes and rewards, and these notes can be re-staking to get rewards',
836
+ ],
837
+ type: 'u64',
838
+ },
839
+ {
840
+ name: 'withdrawingTokens',
841
+ docs: ['Total amount of tokens withdrawing,'],
842
+ type: 'u64',
843
+ },
844
+ {
845
+ name: 'timeOfWithdrawApply',
846
+ docs: ['Time to apply for withdrawal'],
847
+ type: 'i64',
848
+ },
849
+ {
850
+ name: 'claimableReward',
851
+ type: 'u64',
852
+ },
853
+ {
854
+ name: 'lastUpdateNoteTime',
855
+ type: 'i64',
856
+ },
857
+ {
858
+ name: 'lastDistributedAndNoteRate',
859
+ docs: [
860
+ 'The ratio of the distributed to note in the last time update',
861
+ ],
862
+ type: 'u64',
863
+ },
864
+ ],
865
+ },
866
+ },
867
+ {
868
+ name: 'stakePool',
869
+ type: {
870
+ kind: 'struct',
871
+ fields: [
872
+ {
873
+ name: 'stakeTokenMint',
874
+ docs: ['Public key of tokens supporting staking'],
875
+ type: 'publicKey',
876
+ },
877
+ {
878
+ name: 'stakedTokens',
879
+ docs: ['Total amount of tokens staked'],
880
+ type: 'u64',
881
+ },
882
+ {
883
+ name: 'stakedNotes',
884
+ docs: [
885
+ 'Staking nx can get notes and rewards, and these notes can be re-staking to get rewards',
886
+ ],
887
+ type: 'u64',
888
+ },
889
+ {
890
+ name: 'withdrawingTokens',
891
+ docs: ['Total amount of tokens withdrawing,'],
892
+ type: 'u64',
893
+ },
894
+ {
895
+ name: 'increaseNoteRatePerSecond',
896
+ docs: ['The ratio of notes to tokens added per second'],
897
+ type: 'u64',
898
+ },
899
+ {
900
+ name: 'maxMultipleOfNote',
901
+ docs: ['The maximum note can be nx times'],
902
+ type: 'u64',
903
+ },
904
+ ],
905
+ },
906
+ },
907
+ ],
908
+ types: [
909
+ {
910
+ name: 'ConfigDistributePoolata',
911
+ type: {
912
+ kind: 'struct',
913
+ fields: [
914
+ {
915
+ name: 'adminWithdrawRateEachEpoch',
916
+ type: 'u64',
917
+ },
918
+ {
919
+ name: 'epochLength',
920
+ type: 'i64',
921
+ },
922
+ {
923
+ name: 'releaseEpochLength',
924
+ type: 'i64',
925
+ },
926
+ ],
927
+ },
928
+ },
929
+ {
930
+ name: 'ConfigNxBaseData',
931
+ type: {
932
+ kind: 'struct',
933
+ fields: [
934
+ {
935
+ name: 'paused',
936
+ type: 'bool',
937
+ },
938
+ {
939
+ name: 'withdrawLockUpPeriod',
940
+ docs: ['Lock-up period for withdrawals(second)'],
941
+ type: 'u64',
942
+ },
943
+ {
944
+ name: 'swapSlippageRate',
945
+ docs: [
946
+ 'Maximum slippage supported for all swap transactions。 The denominator is a constant: SPL_MATH_DECIMAL',
947
+ ],
948
+ type: 'u64',
949
+ },
950
+ ],
951
+ },
952
+ },
953
+ {
954
+ name: 'ConfigStakePoolData',
955
+ type: {
956
+ kind: 'struct',
957
+ fields: [
958
+ {
959
+ name: 'increaseNoteRatePerSecond',
960
+ type: 'u64',
961
+ },
962
+ {
963
+ name: 'maxMultipleOfNote',
964
+ type: 'u64',
965
+ },
966
+ ],
967
+ },
968
+ },
969
+ {
970
+ name: 'ConfigStakePoolata',
971
+ type: {
972
+ kind: 'struct',
973
+ fields: [
974
+ {
975
+ name: 'increaseNoteRatePerSecond',
976
+ type: 'u64',
977
+ },
978
+ ],
979
+ },
980
+ },
981
+ {
982
+ name: 'Amount',
983
+ docs: ['Represent an amount of some value (like tokens, or notes)'],
984
+ type: {
985
+ kind: 'struct',
986
+ fields: [
987
+ {
988
+ name: 'kind',
989
+ type: {
990
+ defined: 'AmountKind',
991
+ },
992
+ },
993
+ {
994
+ name: 'value',
995
+ type: 'u64',
996
+ },
997
+ ],
998
+ },
999
+ },
1000
+ {
1001
+ name: 'AdminWithdrawDetail',
1002
+ docs: ['collateral detailed state'],
1003
+ type: {
1004
+ kind: 'struct',
1005
+ fields: [
1006
+ {
1007
+ name: 'tokenMint',
1008
+ docs: ['Public key of distribut token'],
1009
+ type: 'publicKey',
1010
+ },
1011
+ {
1012
+ name: 'lastTime',
1013
+ docs: ['The last time a reward was issued using this coin'],
1014
+ type: 'i64',
1015
+ },
1016
+ ],
1017
+ },
1018
+ },
1019
+ {
1020
+ name: 'SwapTemp',
1021
+ type: {
1022
+ kind: 'struct',
1023
+ fields: [
1024
+ {
1025
+ name: 'beforeAmount',
1026
+ type: 'u64',
1027
+ },
1028
+ {
1029
+ name: 'expected',
1030
+ type: 'u64',
1031
+ },
1032
+ ],
1033
+ },
1034
+ },
1035
+ {
1036
+ name: 'TokenInfo',
1037
+ type: {
1038
+ kind: 'struct',
1039
+ fields: [
1040
+ {
1041
+ name: 'mintPk',
1042
+ type: 'publicKey',
1043
+ },
1044
+ {
1045
+ name: 'decimals',
1046
+ type: 'i32',
1047
+ },
1048
+ {
1049
+ name: 'priceOracle',
1050
+ type: 'publicKey',
1051
+ },
1052
+ {
1053
+ name: 'oracleKind',
1054
+ type: {
1055
+ defined: 'PriceKind',
1056
+ },
1057
+ },
1058
+ ],
1059
+ },
1060
+ },
1061
+ {
1062
+ name: 'AmountKind',
1063
+ type: {
1064
+ kind: 'enum',
1065
+ variants: [
1066
+ {
1067
+ name: 'Tokens',
1068
+ },
1069
+ {
1070
+ name: 'Notes',
1071
+ },
1072
+ ],
1073
+ },
1074
+ },
1075
+ {
1076
+ name: 'PoolAction',
1077
+ docs: [
1078
+ 'Represents the primary pool actions, used in determining the',
1079
+ 'rounding direction between tokens and notes.',
1080
+ ],
1081
+ type: {
1082
+ kind: 'enum',
1083
+ variants: [
1084
+ {
1085
+ name: 'Deposit',
1086
+ },
1087
+ {
1088
+ name: 'Withdraw',
1089
+ },
1090
+ ],
1091
+ },
1092
+ },
1093
+ {
1094
+ name: 'RoundingDirection',
1095
+ docs: [
1096
+ 'Represents the direction in which we should round when converting',
1097
+ 'between tokens and notes.',
1098
+ ],
1099
+ type: {
1100
+ kind: 'enum',
1101
+ variants: [
1102
+ {
1103
+ name: 'Down',
1104
+ },
1105
+ {
1106
+ name: 'Up',
1107
+ },
1108
+ ],
1109
+ },
1110
+ },
1111
+ {
1112
+ name: 'PriceKind',
1113
+ type: {
1114
+ kind: 'enum',
1115
+ variants: [
1116
+ {
1117
+ name: 'Pyth',
1118
+ },
1119
+ {
1120
+ name: 'Switchboard',
1121
+ },
1122
+ {
1123
+ name: 'LiquidateStakeToken',
1124
+ },
1125
+ ],
1126
+ },
1127
+ },
1128
+ ],
1129
+ errors: [
1130
+ {
1131
+ code: 6000,
1132
+ name: 'Paused',
1133
+ msg: 'Protocol paused',
1134
+ },
1135
+ {
1136
+ code: 6001,
1137
+ name: 'NotSupportToken',
1138
+ msg: 'Not support token',
1139
+ },
1140
+ {
1141
+ code: 6002,
1142
+ name: 'InvalidAmount',
1143
+ msg: 'Invalid operation amount',
1144
+ },
1145
+ {
1146
+ code: 6003,
1147
+ name: 'DuplicateApplication',
1148
+ msg: 'Duplicate application',
1149
+ },
1150
+ {
1151
+ code: 6004,
1152
+ name: 'NoApplicationFound',
1153
+ msg: 'No application found',
1154
+ },
1155
+ {
1156
+ code: 6005,
1157
+ name: 'TimeIsNotYet',
1158
+ msg: 'Time is not yet',
1159
+ },
1160
+ {
1161
+ code: 6006,
1162
+ name: 'VaultEmpty',
1163
+ msg: 'Vault empty',
1164
+ },
1165
+ {
1166
+ code: 6007,
1167
+ name: 'NotStakePool',
1168
+ msg: 'Failed to deserialize stake pool account',
1169
+ },
1170
+ {
1171
+ code: 6008,
1172
+ name: 'StalePrice',
1173
+ msg: 'Stale price',
1174
+ },
1175
+ {
1176
+ code: 6009,
1177
+ name: 'NoClaimable',
1178
+ msg: 'Does not have claimable amount',
1179
+ },
1180
+ {
1181
+ code: 6010,
1182
+ name: 'NotStakingToken',
1183
+ msg: 'No staking token',
1184
+ },
1185
+ {
1186
+ code: 6011,
1187
+ name: 'PythError',
1188
+ msg: 'Could not load price account',
1189
+ },
1190
+ {
1191
+ code: 6012,
1192
+ name: 'SwitchboardError',
1193
+ msg: 'Invalid aggregator round',
1194
+ },
1195
+ {
1196
+ code: 6013,
1197
+ name: 'InvalidOracle',
1198
+ msg: 'Invalid pool oracle',
1199
+ },
1200
+ {
1201
+ code: 6014,
1202
+ name: 'AddressMismatch',
1203
+ msg: 'Address Mismatch',
1204
+ },
1205
+ {
1206
+ code: 6015,
1207
+ name: 'AddressNotWhiteListed',
1208
+ msg: 'Address not in white list',
1209
+ },
1210
+ {
1211
+ code: 6016,
1212
+ name: 'ProgramMismatch',
1213
+ msg: 'Program Mismatch',
1214
+ },
1215
+ {
1216
+ code: 6017,
1217
+ name: 'DiscriminatorMismatch',
1218
+ msg: 'Discriminator mismatch',
1219
+ },
1220
+ {
1221
+ code: 6018,
1222
+ name: 'UnknownInstruction',
1223
+ msg: 'Unknown Instruction',
1224
+ },
1225
+ {
1226
+ code: 6019,
1227
+ name: 'MissingSwapInstruction',
1228
+ msg: 'Missing swap ix',
1229
+ },
1230
+ {
1231
+ code: 6020,
1232
+ name: 'MissingBeforeInstruction',
1233
+ msg: 'Missing pre-swap ix',
1234
+ },
1235
+ {
1236
+ code: 6021,
1237
+ name: 'MissingAfterInstruction',
1238
+ msg: 'Missing post-swap ix',
1239
+ },
1240
+ {
1241
+ code: 6022,
1242
+ name: 'IncorrectAccount',
1243
+ msg: 'Incorrect account',
1244
+ },
1245
+ {
1246
+ code: 6023,
1247
+ name: 'InvalidAfterAmount',
1248
+ msg: 'Invalid post amount to after ix',
1249
+ },
1250
+ {
1251
+ code: 6024,
1252
+ name: 'InvalidAccountDiscriminator',
1253
+ msg: 'Invalid account discriminator',
1254
+ },
1255
+ {
1256
+ code: 6025,
1257
+ name: 'UnableToDeserializeAccount',
1258
+ msg: 'Unable to deserialize account',
1259
+ },
1260
+ ],
1261
+ };
1262
+ //# sourceMappingURL=stakingIdl.js.map