@sonarwatch/portfolio-plugins 0.12.116 → 0.12.117

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/CHANGELOG.md +2176 -2172
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/index.js +4 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/flowx/stakingFetcher.js +1 -1
  8. package/src/plugins/picasso/constants.d.ts +10 -0
  9. package/src/plugins/picasso/constants.js +24 -0
  10. package/src/plugins/picasso/constants.js.map +1 -0
  11. package/src/plugins/picasso/helpers.d.ts +6 -0
  12. package/src/plugins/picasso/helpers.js +69 -0
  13. package/src/plugins/picasso/helpers.js.map +1 -0
  14. package/src/plugins/picasso/idl.d.ts +145 -0
  15. package/src/plugins/picasso/idl.js +1019 -0
  16. package/src/plugins/picasso/idl.js.map +1 -0
  17. package/src/plugins/picasso/index.d.ts +6 -0
  18. package/src/plugins/picasso/index.js +13 -0
  19. package/src/plugins/picasso/index.js.map +1 -0
  20. package/src/plugins/picasso/types.d.ts +17 -0
  21. package/src/plugins/picasso/types.js +3 -0
  22. package/src/plugins/picasso/types.js.map +1 -0
  23. package/src/plugins/picasso/unstakingNftsJob.d.ts +3 -0
  24. package/src/plugins/picasso/unstakingNftsJob.js +60 -0
  25. package/src/plugins/picasso/unstakingNftsJob.js.map +1 -0
  26. package/src/plugins/picasso/unstakingPositionsFetcher.d.ts +3 -0
  27. package/src/plugins/picasso/unstakingPositionsFetcher.js +75 -0
  28. package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -0
  29. package/src/plugins/sushiswap/helpers.js +24 -24
  30. package/src/plugins/tokens/fetchers/solana-nfts-underlyings.js +9 -2
  31. package/src/plugins/tokens/fetchers/solana-nfts-underlyings.js.map +1 -1
  32. package/src/plugins/uniswap-v2/helpers.js +22 -22
  33. package/src/utils/sei/constants.js +8 -8
  34. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -0,0 +1,1019 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.restakingIdl = void 0;
4
+ exports.restakingIdl = {
5
+ version: '0.1.0',
6
+ name: 'restaking',
7
+ instructions: [
8
+ {
9
+ name: 'initialize',
10
+ accounts: [
11
+ {
12
+ name: 'admin',
13
+ isMut: !0,
14
+ isSigner: !0,
15
+ },
16
+ {
17
+ name: 'stakingParams',
18
+ isMut: !0,
19
+ isSigner: !1,
20
+ },
21
+ {
22
+ name: 'rewardsTokenMint',
23
+ isMut: !1,
24
+ isSigner: !1,
25
+ },
26
+ {
27
+ name: 'rewardsTokenAccount',
28
+ isMut: !0,
29
+ isSigner: !1,
30
+ },
31
+ {
32
+ name: 'tokenProgram',
33
+ isMut: !1,
34
+ isSigner: !1,
35
+ },
36
+ {
37
+ name: 'systemProgram',
38
+ isMut: !1,
39
+ isSigner: !1,
40
+ },
41
+ ],
42
+ args: [
43
+ {
44
+ name: 'whitelistedTokens',
45
+ type: {
46
+ vec: 'publicKey',
47
+ },
48
+ },
49
+ {
50
+ name: 'stakingCap',
51
+ type: 'u128',
52
+ },
53
+ ],
54
+ },
55
+ {
56
+ name: 'deposit',
57
+ docs: [
58
+ 'Stakes the amount in the vault and if guest chain is initialized, a CPI call to the service is being',
59
+ 'made to update the stake.',
60
+ '',
61
+ 'We are sending the accounts needed for making CPI call to guest blockchain as [`remaining_accounts`]',
62
+ 'since we were running out of stack memory. Note that these accounts dont need to be sent until the',
63
+ 'guest chain is initialized since CPI calls wont be made during that period.',
64
+ 'Since remaining accounts are not named, they have to be',
65
+ 'sent in the same order as given below',
66
+ '- Chain Data',
67
+ '- trie',
68
+ '- Guest blockchain program ID',
69
+ ],
70
+ accounts: [
71
+ {
72
+ name: 'depositor',
73
+ isMut: !0,
74
+ isSigner: !0,
75
+ },
76
+ {
77
+ name: 'vaultParams',
78
+ isMut: !0,
79
+ isSigner: !1,
80
+ },
81
+ {
82
+ name: 'stakingParams',
83
+ isMut: !0,
84
+ isSigner: !1,
85
+ },
86
+ {
87
+ name: 'tokenMint',
88
+ isMut: !0,
89
+ isSigner: !1,
90
+ docs: [
91
+ 'Only token mint with 9 decimals can be staked for now since',
92
+ 'the guest chain expects that. If a whitelisted token has 6',
93
+ 'decimals, it would just be invalid.',
94
+ ],
95
+ },
96
+ {
97
+ name: 'depositorTokenAccount',
98
+ isMut: !0,
99
+ isSigner: !1,
100
+ },
101
+ {
102
+ name: 'vaultTokenAccount',
103
+ isMut: !0,
104
+ isSigner: !1,
105
+ },
106
+ {
107
+ name: 'receiptTokenMint',
108
+ isMut: !0,
109
+ isSigner: !0,
110
+ },
111
+ {
112
+ name: 'receiptTokenAccount',
113
+ isMut: !0,
114
+ isSigner: !1,
115
+ },
116
+ {
117
+ name: 'metadataProgram',
118
+ isMut: !1,
119
+ isSigner: !1,
120
+ },
121
+ {
122
+ name: 'tokenProgram',
123
+ isMut: !1,
124
+ isSigner: !1,
125
+ },
126
+ {
127
+ name: 'associatedTokenProgram',
128
+ isMut: !1,
129
+ isSigner: !1,
130
+ },
131
+ {
132
+ name: 'systemProgram',
133
+ isMut: !1,
134
+ isSigner: !1,
135
+ },
136
+ {
137
+ name: 'rent',
138
+ isMut: !1,
139
+ isSigner: !1,
140
+ },
141
+ {
142
+ name: 'instruction',
143
+ isMut: !1,
144
+ isSigner: !1,
145
+ },
146
+ {
147
+ name: 'masterEditionAccount',
148
+ isMut: !0,
149
+ isSigner: !1,
150
+ },
151
+ {
152
+ name: 'nftMetadata',
153
+ isMut: !0,
154
+ isSigner: !1,
155
+ },
156
+ ],
157
+ args: [
158
+ {
159
+ name: 'service',
160
+ type: {
161
+ defined: 'Service',
162
+ },
163
+ },
164
+ {
165
+ name: 'amount',
166
+ type: 'u64',
167
+ },
168
+ ],
169
+ },
170
+ {
171
+ name: 'withdrawalRequest',
172
+ docs: [
173
+ 'Creates a withdrawal request by escrowing the receipt token. Once the unbonding',
174
+ 'period ends, the token from the escrow would be burnt and returned to the user.',
175
+ '',
176
+ 'This method transfers all the pending rewards to the user. The stake on the',
177
+ 'guest chain is only updated after unbonding period ends in `withdraw` method.',
178
+ '',
179
+ 'Closes the receipt token account.',
180
+ ],
181
+ accounts: [
182
+ {
183
+ name: 'withdrawer',
184
+ isMut: !0,
185
+ isSigner: !0,
186
+ },
187
+ {
188
+ name: 'vaultParams',
189
+ isMut: !0,
190
+ isSigner: !1,
191
+ },
192
+ {
193
+ name: 'stakingParams',
194
+ isMut: !0,
195
+ isSigner: !1,
196
+ },
197
+ {
198
+ name: 'guestChain',
199
+ isMut: !0,
200
+ isSigner: !1,
201
+ },
202
+ {
203
+ name: 'trie',
204
+ isMut: !0,
205
+ isSigner: !1,
206
+ },
207
+ {
208
+ name: 'tokenMint',
209
+ isMut: !1,
210
+ isSigner: !1,
211
+ },
212
+ {
213
+ name: 'withdrawerTokenAccount',
214
+ isMut: !0,
215
+ isSigner: !1,
216
+ },
217
+ {
218
+ name: 'vaultTokenAccount',
219
+ isMut: !0,
220
+ isSigner: !1,
221
+ },
222
+ {
223
+ name: 'rewardsTokenMint',
224
+ isMut: !1,
225
+ isSigner: !1,
226
+ },
227
+ {
228
+ name: 'depositorRewardsTokenAccount',
229
+ isMut: !0,
230
+ isSigner: !1,
231
+ },
232
+ {
233
+ name: 'platformRewardsTokenAccount',
234
+ isMut: !0,
235
+ isSigner: !1,
236
+ },
237
+ {
238
+ name: 'receiptTokenMint',
239
+ isMut: !0,
240
+ isSigner: !1,
241
+ },
242
+ {
243
+ name: 'receiptTokenAccount',
244
+ isMut: !0,
245
+ isSigner: !1,
246
+ },
247
+ {
248
+ name: 'escrowReceiptTokenAccount',
249
+ isMut: !0,
250
+ isSigner: !1,
251
+ docs: [
252
+ 'Account which stores the receipt token until unbonding period ends.',
253
+ ],
254
+ },
255
+ {
256
+ name: 'guestChainProgram',
257
+ isMut: !1,
258
+ isSigner: !1,
259
+ },
260
+ {
261
+ name: 'tokenProgram',
262
+ isMut: !1,
263
+ isSigner: !1,
264
+ },
265
+ {
266
+ name: 'associatedTokenProgram',
267
+ isMut: !1,
268
+ isSigner: !1,
269
+ },
270
+ {
271
+ name: 'systemProgram',
272
+ isMut: !1,
273
+ isSigner: !1,
274
+ },
275
+ {
276
+ name: 'metadataProgram',
277
+ isMut: !1,
278
+ isSigner: !1,
279
+ },
280
+ {
281
+ name: 'rent',
282
+ isMut: !1,
283
+ isSigner: !1,
284
+ },
285
+ {
286
+ name: 'masterEditionAccount',
287
+ isMut: !0,
288
+ isSigner: !1,
289
+ },
290
+ {
291
+ name: 'nftMetadata',
292
+ isMut: !0,
293
+ isSigner: !1,
294
+ },
295
+ {
296
+ name: 'instruction',
297
+ isMut: !1,
298
+ isSigner: !1,
299
+ },
300
+ ],
301
+ args: [],
302
+ },
303
+ {
304
+ name: 'cancelWithdrawalRequest',
305
+ docs: [
306
+ 'Cancels the withdraw request and returns the receipt NFT.',
307
+ '',
308
+ 'Even if the unbonding period is over and the withdraw is pending,',
309
+ 'this method would cancel the withdrawal request and return back the',
310
+ 'receipt NFT',
311
+ ],
312
+ accounts: [
313
+ {
314
+ name: 'withdrawer',
315
+ isMut: !0,
316
+ isSigner: !0,
317
+ },
318
+ {
319
+ name: 'vaultParams',
320
+ isMut: !0,
321
+ isSigner: !1,
322
+ },
323
+ {
324
+ name: 'stakingParams',
325
+ isMut: !0,
326
+ isSigner: !1,
327
+ },
328
+ {
329
+ name: 'receiptTokenMint',
330
+ isMut: !0,
331
+ isSigner: !1,
332
+ },
333
+ {
334
+ name: 'receiptTokenAccount',
335
+ isMut: !0,
336
+ isSigner: !1,
337
+ },
338
+ {
339
+ name: 'escrowReceiptTokenAccount',
340
+ isMut: !0,
341
+ isSigner: !1,
342
+ docs: [
343
+ 'Account which stores the receipt token until unbonding period ends.',
344
+ ],
345
+ },
346
+ {
347
+ name: 'tokenProgram',
348
+ isMut: !1,
349
+ isSigner: !1,
350
+ },
351
+ {
352
+ name: 'associatedTokenProgram',
353
+ isMut: !1,
354
+ isSigner: !1,
355
+ },
356
+ {
357
+ name: 'systemProgram',
358
+ isMut: !1,
359
+ isSigner: !1,
360
+ },
361
+ {
362
+ name: 'metadataProgram',
363
+ isMut: !1,
364
+ isSigner: !1,
365
+ },
366
+ {
367
+ name: 'rent',
368
+ isMut: !1,
369
+ isSigner: !1,
370
+ },
371
+ {
372
+ name: 'masterEditionAccount',
373
+ isMut: !0,
374
+ isSigner: !1,
375
+ },
376
+ {
377
+ name: 'nftMetadata',
378
+ isMut: !0,
379
+ isSigner: !1,
380
+ },
381
+ ],
382
+ args: [],
383
+ },
384
+ {
385
+ name: 'withdraw',
386
+ docs: [
387
+ 'Withdraws the staked token and burns the receipt NFT once the',
388
+ 'unbonding period has ended.',
389
+ '',
390
+ 'This method should only be called once the `WithdrawalRequest` method',
391
+ 'is called and unbonding period is over.',
392
+ '',
393
+ 'This method can be called by anybody and if the unbonding period is',
394
+ 'over, then the tokens would be withdrawn to the account set during',
395
+ 'withdrawal request. This is done so that we can enable automatic withdrawal',
396
+ 'after unbonding period. The amount is withdrawn to the account set during',
397
+ 'the request and the `vault_params` and `escrow_receipt_token_account` are',
398
+ 'closed.',
399
+ ],
400
+ accounts: [
401
+ {
402
+ name: 'signer',
403
+ isMut: !0,
404
+ isSigner: !0,
405
+ },
406
+ {
407
+ name: 'withdrawer',
408
+ isMut: !0,
409
+ isSigner: !1,
410
+ docs: ['Account which requested withdrawal', ''],
411
+ },
412
+ {
413
+ name: 'vaultParams',
414
+ isMut: !0,
415
+ isSigner: !1,
416
+ },
417
+ {
418
+ name: 'stakingParams',
419
+ isMut: !0,
420
+ isSigner: !1,
421
+ },
422
+ {
423
+ name: 'guestChain',
424
+ isMut: !0,
425
+ isSigner: !1,
426
+ },
427
+ {
428
+ name: 'trie',
429
+ isMut: !0,
430
+ isSigner: !1,
431
+ },
432
+ {
433
+ name: 'tokenMint',
434
+ isMut: !1,
435
+ isSigner: !1,
436
+ },
437
+ {
438
+ name: 'withdrawerTokenAccount',
439
+ isMut: !0,
440
+ isSigner: !1,
441
+ },
442
+ {
443
+ name: 'vaultTokenAccount',
444
+ isMut: !0,
445
+ isSigner: !1,
446
+ },
447
+ {
448
+ name: 'receiptTokenMint',
449
+ isMut: !0,
450
+ isSigner: !1,
451
+ },
452
+ {
453
+ name: 'escrowReceiptTokenAccount',
454
+ isMut: !0,
455
+ isSigner: !1,
456
+ },
457
+ {
458
+ name: 'guestChainProgram',
459
+ isMut: !1,
460
+ isSigner: !1,
461
+ },
462
+ {
463
+ name: 'tokenProgram',
464
+ isMut: !1,
465
+ isSigner: !1,
466
+ },
467
+ {
468
+ name: 'systemProgram',
469
+ isMut: !1,
470
+ isSigner: !1,
471
+ },
472
+ {
473
+ name: 'metadataProgram',
474
+ isMut: !1,
475
+ isSigner: !1,
476
+ },
477
+ {
478
+ name: 'rent',
479
+ isMut: !1,
480
+ isSigner: !1,
481
+ },
482
+ {
483
+ name: 'masterEditionAccount',
484
+ isMut: !0,
485
+ isSigner: !1,
486
+ },
487
+ {
488
+ name: 'nftMetadata',
489
+ isMut: !0,
490
+ isSigner: !1,
491
+ },
492
+ {
493
+ name: 'instruction',
494
+ isMut: !1,
495
+ isSigner: !1,
496
+ },
497
+ ],
498
+ args: [],
499
+ },
500
+ {
501
+ name: 'updateTokenWhitelist',
502
+ docs: [
503
+ 'Whitelists new tokens',
504
+ '',
505
+ 'This method checks if any of the new token mints which are to be whitelisted',
506
+ 'are already whitelisted. If they are the method fails to update the',
507
+ 'whitelisted token list.',
508
+ ],
509
+ accounts: [
510
+ {
511
+ name: 'admin',
512
+ isMut: !0,
513
+ isSigner: !0,
514
+ },
515
+ {
516
+ name: 'stakingParams',
517
+ isMut: !0,
518
+ isSigner: !1,
519
+ },
520
+ ],
521
+ args: [
522
+ {
523
+ name: 'newTokenMints',
524
+ type: {
525
+ vec: 'publicKey',
526
+ },
527
+ },
528
+ ],
529
+ },
530
+ {
531
+ name: 'updateGuestChainInitialization',
532
+ docs: [
533
+ 'Sets guest chain program ID',
534
+ '',
535
+ 'After this method is called, CPI calls would be made to guest chain during deposit and stake would be',
536
+ 'set to the validators. Users can also claim rewards or withdraw their stake',
537
+ 'when the chain is initialized.',
538
+ ],
539
+ accounts: [
540
+ {
541
+ name: 'admin',
542
+ isMut: !0,
543
+ isSigner: !0,
544
+ },
545
+ {
546
+ name: 'stakingParams',
547
+ isMut: !0,
548
+ isSigner: !1,
549
+ },
550
+ ],
551
+ args: [
552
+ {
553
+ name: 'guestChainProgramId',
554
+ type: 'publicKey',
555
+ },
556
+ ],
557
+ },
558
+ {
559
+ name: 'changeAdminProposal',
560
+ docs: [
561
+ 'Updating admin proposal created by the existing admin. Admin would only be changed',
562
+ 'if the new admin accepts it in `accept_admin_change` instruction.',
563
+ ],
564
+ accounts: [
565
+ {
566
+ name: 'admin',
567
+ isMut: !0,
568
+ isSigner: !0,
569
+ },
570
+ {
571
+ name: 'stakingParams',
572
+ isMut: !0,
573
+ isSigner: !1,
574
+ },
575
+ ],
576
+ args: [
577
+ {
578
+ name: 'newAdmin',
579
+ type: 'publicKey',
580
+ },
581
+ ],
582
+ },
583
+ {
584
+ name: 'acceptAdminChange',
585
+ docs: [
586
+ 'Accepting new admin change signed by the proposed admin. Admin would be changed if the',
587
+ 'proposed admin calls the method. Would fail if there is no proposed admin and if the',
588
+ 'signer is not the proposed admin.',
589
+ ],
590
+ accounts: [
591
+ {
592
+ name: 'newAdmin',
593
+ isMut: !0,
594
+ isSigner: !0,
595
+ },
596
+ {
597
+ name: 'stakingParams',
598
+ isMut: !0,
599
+ isSigner: !1,
600
+ docs: ['Validation would be done in the method'],
601
+ },
602
+ ],
603
+ args: [],
604
+ },
605
+ {
606
+ name: 'claimRewards',
607
+ accounts: [
608
+ {
609
+ name: 'claimer',
610
+ isMut: !0,
611
+ isSigner: !0,
612
+ },
613
+ {
614
+ name: 'vaultParams',
615
+ isMut: !0,
616
+ isSigner: !1,
617
+ },
618
+ {
619
+ name: 'stakingParams',
620
+ isMut: !0,
621
+ isSigner: !1,
622
+ },
623
+ {
624
+ name: 'guestChain',
625
+ isMut: !0,
626
+ isSigner: !1,
627
+ },
628
+ {
629
+ name: 'rewardsTokenMint',
630
+ isMut: !1,
631
+ isSigner: !1,
632
+ },
633
+ {
634
+ name: 'depositorRewardsTokenAccount',
635
+ isMut: !0,
636
+ isSigner: !1,
637
+ },
638
+ {
639
+ name: 'platformRewardsTokenAccount',
640
+ isMut: !0,
641
+ isSigner: !1,
642
+ },
643
+ {
644
+ name: 'receiptTokenMint',
645
+ isMut: !0,
646
+ isSigner: !1,
647
+ },
648
+ {
649
+ name: 'receiptTokenAccount',
650
+ isMut: !0,
651
+ isSigner: !1,
652
+ },
653
+ {
654
+ name: 'guestChainProgram',
655
+ isMut: !1,
656
+ isSigner: !1,
657
+ },
658
+ {
659
+ name: 'tokenProgram',
660
+ isMut: !1,
661
+ isSigner: !1,
662
+ },
663
+ {
664
+ name: 'associatedTokenProgram',
665
+ isMut: !1,
666
+ isSigner: !1,
667
+ },
668
+ {
669
+ name: 'systemProgram',
670
+ isMut: !1,
671
+ isSigner: !1,
672
+ },
673
+ ],
674
+ args: [],
675
+ },
676
+ {
677
+ name: 'setService',
678
+ docs: [
679
+ 'This method sets the service for the stake which was deposited before guest chain',
680
+ 'initialization',
681
+ '',
682
+ 'This method can only be called if the service was not set during the depositing and',
683
+ 'can only be called once. Calling otherwise would panic.',
684
+ '',
685
+ 'The accounts for CPI are sent as remaining accounts similar to `deposit` method.',
686
+ ],
687
+ accounts: [
688
+ {
689
+ name: 'depositor',
690
+ isMut: !0,
691
+ isSigner: !0,
692
+ },
693
+ {
694
+ name: 'vaultParams',
695
+ isMut: !0,
696
+ isSigner: !1,
697
+ },
698
+ {
699
+ name: 'stakingParams',
700
+ isMut: !0,
701
+ isSigner: !1,
702
+ },
703
+ {
704
+ name: 'receiptTokenMint',
705
+ isMut: !0,
706
+ isSigner: !1,
707
+ },
708
+ {
709
+ name: 'receiptTokenAccount',
710
+ isMut: !0,
711
+ isSigner: !1,
712
+ },
713
+ {
714
+ name: 'stakeMint',
715
+ isMut: !0,
716
+ isSigner: !1,
717
+ },
718
+ {
719
+ name: 'instruction',
720
+ isMut: !1,
721
+ isSigner: !1,
722
+ },
723
+ {
724
+ name: 'systemProgram',
725
+ isMut: !1,
726
+ isSigner: !1,
727
+ },
728
+ ],
729
+ args: [
730
+ {
731
+ name: 'service',
732
+ type: {
733
+ defined: 'Service',
734
+ },
735
+ },
736
+ ],
737
+ },
738
+ {
739
+ name: 'withdrawRewardFunds',
740
+ docs: [
741
+ 'This method would only be called by `Admin` to withdraw all the funds from the rewards account',
742
+ '',
743
+ 'This would usually be called when a wrong amount of funds are transferred in the rewards account.',
744
+ 'This is a safety measure and should only be called on emergency.',
745
+ ],
746
+ accounts: [
747
+ {
748
+ name: 'admin',
749
+ isMut: !0,
750
+ isSigner: !0,
751
+ },
752
+ {
753
+ name: 'stakingParams',
754
+ isMut: !0,
755
+ isSigner: !1,
756
+ },
757
+ {
758
+ name: 'rewardsTokenMint',
759
+ isMut: !1,
760
+ isSigner: !1,
761
+ },
762
+ {
763
+ name: 'rewardsTokenAccount',
764
+ isMut: !0,
765
+ isSigner: !1,
766
+ },
767
+ {
768
+ name: 'adminRewardsTokenAccount',
769
+ isMut: !1,
770
+ isSigner: !1,
771
+ },
772
+ {
773
+ name: 'tokenProgram',
774
+ isMut: !1,
775
+ isSigner: !1,
776
+ },
777
+ ],
778
+ args: [],
779
+ },
780
+ {
781
+ name: 'updateStakingCap',
782
+ accounts: [
783
+ {
784
+ name: 'admin',
785
+ isMut: !0,
786
+ isSigner: !0,
787
+ },
788
+ {
789
+ name: 'stakingParams',
790
+ isMut: !0,
791
+ isSigner: !1,
792
+ },
793
+ ],
794
+ args: [
795
+ {
796
+ name: 'newStakingCap',
797
+ type: 'u128',
798
+ },
799
+ ],
800
+ },
801
+ ],
802
+ accounts: [
803
+ {
804
+ name: 'stakingParams',
805
+ type: {
806
+ kind: 'struct',
807
+ fields: [
808
+ {
809
+ name: 'admin',
810
+ type: 'publicKey',
811
+ },
812
+ {
813
+ name: 'whitelistedTokens',
814
+ type: {
815
+ vec: 'publicKey',
816
+ },
817
+ },
818
+ {
819
+ name: 'guestChainProgramId',
820
+ docs: ['None means the guest chain is not initialized yet.'],
821
+ type: {
822
+ option: 'publicKey',
823
+ },
824
+ },
825
+ {
826
+ name: 'rewardsTokenMint',
827
+ type: 'publicKey',
828
+ },
829
+ {
830
+ name: 'stakingCap',
831
+ type: 'u128',
832
+ },
833
+ {
834
+ name: 'totalDepositedAmount',
835
+ type: 'u128',
836
+ },
837
+ {
838
+ name: 'newAdminProposal',
839
+ type: {
840
+ option: 'publicKey',
841
+ },
842
+ },
843
+ ],
844
+ },
845
+ },
846
+ {
847
+ name: 'vault',
848
+ type: {
849
+ kind: 'struct',
850
+ fields: [
851
+ {
852
+ name: 'stakeTimestampSec',
853
+ type: 'i64',
854
+ },
855
+ {
856
+ name: 'service',
857
+ type: {
858
+ option: {
859
+ defined: 'Service',
860
+ },
861
+ },
862
+ },
863
+ {
864
+ name: 'stakeAmount',
865
+ type: 'u64',
866
+ },
867
+ {
868
+ name: 'stakeMint',
869
+ type: 'publicKey',
870
+ },
871
+ {
872
+ name: 'lastReceivedRewardsHeight',
873
+ docs: ['is 0 initially'],
874
+ type: 'u64',
875
+ },
876
+ {
877
+ name: 'withdrawalRequest',
878
+ type: {
879
+ option: {
880
+ defined: 'WithdrawalRequestParams',
881
+ },
882
+ },
883
+ },
884
+ ],
885
+ },
886
+ },
887
+ ],
888
+ types: [
889
+ {
890
+ name: 'WithdrawalRequestParams',
891
+ type: {
892
+ kind: 'struct',
893
+ fields: [
894
+ {
895
+ name: 'timestampInSec',
896
+ docs: ['Timestamp when withdrawal was requested'],
897
+ type: 'u64',
898
+ },
899
+ {
900
+ name: 'owner',
901
+ docs: ['Account which requested the withdrawal'],
902
+ type: 'publicKey',
903
+ },
904
+ {
905
+ name: 'tokenAccount',
906
+ docs: ['Token account to which the tokens would withdrew to'],
907
+ type: 'publicKey',
908
+ },
909
+ ],
910
+ },
911
+ },
912
+ {
913
+ name: 'Service',
914
+ docs: ['Unused for now'],
915
+ type: {
916
+ kind: 'enum',
917
+ variants: [
918
+ {
919
+ name: 'GuestChain',
920
+ fields: [
921
+ {
922
+ name: 'validator',
923
+ type: 'publicKey',
924
+ },
925
+ ],
926
+ },
927
+ ],
928
+ },
929
+ },
930
+ ],
931
+ errors: [
932
+ {
933
+ code: 6e3,
934
+ name: 'TokenAlreadyWhitelisted',
935
+ msg: 'Token is already whitelisted',
936
+ },
937
+ {
938
+ code: 6001,
939
+ name: 'TokenNotWhitelisted',
940
+ msg: 'Can only stake whitelisted tokens',
941
+ },
942
+ {
943
+ code: 6002,
944
+ name: 'OperationNotAllowed',
945
+ msg: 'This operation is not allowed until the guest chain is initialized',
946
+ },
947
+ {
948
+ code: 6003,
949
+ name: 'SubtractionOverflow',
950
+ msg: 'Subtraction overflow',
951
+ },
952
+ {
953
+ code: 6004,
954
+ name: 'InvalidTokenMint',
955
+ msg: 'Invalid Token Mint',
956
+ },
957
+ {
958
+ code: 6005,
959
+ name: 'InsufficientReceiptTokenBalance',
960
+ msg: 'Insufficient receipt token balance, expected balance 1',
961
+ },
962
+ {
963
+ code: 6006,
964
+ name: 'MissingService',
965
+ msg: 'Service is missing. Make sure you have assigned your stake to a \\\n service',
966
+ },
967
+ {
968
+ code: 6007,
969
+ name: 'StakingCapExceeded',
970
+ msg: 'Staking cap has reached. You can stake only when the staking cap is \\\n increased',
971
+ },
972
+ {
973
+ code: 6008,
974
+ name: 'NewStakingCapShouldBeMoreThanExistingOne',
975
+ msg: 'New staking cap should be more than existing one',
976
+ },
977
+ {
978
+ code: 6009,
979
+ name: 'GuestChainAlreadyInitialized',
980
+ msg: 'Guest chain can only be initialized once',
981
+ },
982
+ {
983
+ code: 6010,
984
+ name: 'AccountValidationFailedForCPI',
985
+ msg: 'Account validation for CPI call to the guest chain',
986
+ },
987
+ {
988
+ code: 6011,
989
+ name: 'ServiceAlreadySet',
990
+ msg: 'Service is already set.',
991
+ },
992
+ {
993
+ code: 6012,
994
+ name: 'NoProposedAdmin',
995
+ msg: 'There is no proposal for changing admin',
996
+ },
997
+ {
998
+ code: 6013,
999
+ name: 'CannotWithdrawDuringUnbondingPeriod',
1000
+ msg: 'Cannot withdraw during unbonding period.',
1001
+ },
1002
+ {
1003
+ code: 6014,
1004
+ name: 'NoWithdrawalRequest',
1005
+ msg: 'No withdrawal request exists. Try to request for withdraw and you \\\n can withdraw after unbonding period ends',
1006
+ },
1007
+ {
1008
+ code: 6015,
1009
+ name: 'InvalidTokenAccount',
1010
+ msg: 'Invalid token account',
1011
+ },
1012
+ {
1013
+ code: 6016,
1014
+ name: 'InvalidWithdrawer',
1015
+ msg: 'When the account which requested for withdraw is not passed during \\\n withdrawal',
1016
+ },
1017
+ ],
1018
+ };
1019
+ //# sourceMappingURL=idl.js.map