hedge-web3 0.2.33 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/declarations/Constants.d.ts +0 -12
  2. package/declarations/HedgeConstants.d.ts +76 -0
  3. package/declarations/idl/pyth.d.ts +1 -1
  4. package/declarations/idl/switchboard.d.ts +1 -1
  5. package/declarations/idl/vault.d.ts +2 -843
  6. package/declarations/index.d.ts +1 -12
  7. package/declarations/instructions/claimLiquidationPoolPosition.d.ts +1 -1
  8. package/declarations/instructions/claimStakingPoolPosition.d.ts +1 -1
  9. package/declarations/instructions/closeClaimedLiquidationPoolPosition.d.ts +1 -1
  10. package/declarations/instructions/closeLiquidationPoolPosition.d.ts +1 -1
  11. package/declarations/instructions/createReferralAccount.d.ts +1 -1
  12. package/declarations/instructions/createStakingPool.d.ts +1 -1
  13. package/declarations/instructions/createUserReferralAccount.d.ts +1 -1
  14. package/declarations/instructions/createVault.d.ts +1 -2
  15. package/declarations/instructions/depositLiquidationPool.d.ts +1 -2
  16. package/declarations/instructions/depositStakingPool.d.ts +1 -2
  17. package/declarations/instructions/depositVault.d.ts +1 -2
  18. package/declarations/instructions/initHedgeFoundation.d.ts +1 -1
  19. package/declarations/instructions/initHedgeFoundationTokens.d.ts +1 -1
  20. package/declarations/instructions/liquidateVault.d.ts +1 -1
  21. package/declarations/instructions/loanVault.d.ts +1 -2
  22. package/declarations/instructions/psmEditAccount.d.ts +1 -2
  23. package/declarations/instructions/psmMintUsh.d.ts +1 -2
  24. package/declarations/instructions/psmRedeemUsh.d.ts +1 -2
  25. package/declarations/instructions/redeemVault.d.ts +1 -2
  26. package/declarations/instructions/referralClaimFees.d.ts +1 -1
  27. package/declarations/instructions/refreshOraclePrice.d.ts +1 -1
  28. package/declarations/instructions/repayVault.d.ts +1 -2
  29. package/declarations/instructions/setHalted.d.ts +1 -1
  30. package/declarations/instructions/transferVault.d.ts +1 -1
  31. package/declarations/instructions/updateReferralAccount.d.ts +1 -2
  32. package/declarations/instructions/updateReferralState.d.ts +1 -2
  33. package/declarations/instructions/updateVaultType.d.ts +1 -2
  34. package/declarations/instructions/withdrawStakingPool.d.ts +1 -1
  35. package/declarations/instructions/withdrawVault.d.ts +1 -2
  36. package/declarations/state/VaultAccount.d.ts +2 -3
  37. package/declarations/utils/getLinkedListAccounts.d.ts +1 -2
  38. package/lib/Constants.js +27 -54
  39. package/lib/HedgeConstants.js +170 -0
  40. package/lib/HedgeDecimal.js +1 -2
  41. package/lib/StakingPools.js +5 -1
  42. package/lib/Vaults.js +5 -1
  43. package/lib/idl/vault.js +1 -842
  44. package/lib/index.js +6 -13
  45. package/lib/instructions/claimLiquidationPoolPosition.js +7 -8
  46. package/lib/instructions/claimStakingPoolPosition.js +7 -8
  47. package/lib/instructions/closeClaimedLiquidationPoolPosition.js +2 -3
  48. package/lib/instructions/closeLiquidationPoolPosition.js +16 -17
  49. package/lib/instructions/createReferralAccount.js +10 -11
  50. package/lib/instructions/createStakingPool.js +10 -11
  51. package/lib/instructions/createUserReferralAccount.js +9 -10
  52. package/lib/instructions/createVault.js +20 -21
  53. package/lib/instructions/depositLiquidationPool.js +12 -13
  54. package/lib/instructions/depositStakingPool.js +8 -9
  55. package/lib/instructions/depositVault.js +10 -11
  56. package/lib/instructions/initHedgeFoundation.js +10 -11
  57. package/lib/instructions/initHedgeFoundationTokens.js +7 -8
  58. package/lib/instructions/liquidateVault.js +12 -19
  59. package/lib/instructions/loanVault.js +16 -23
  60. package/lib/instructions/psmEditAccount.js +11 -11
  61. package/lib/instructions/psmMintUsh.js +18 -19
  62. package/lib/instructions/psmRedeemUsh.js +18 -19
  63. package/lib/instructions/redeemVault.js +10 -11
  64. package/lib/instructions/referralClaimFees.js +9 -10
  65. package/lib/instructions/refreshOraclePrice.js +9 -9
  66. package/lib/instructions/repayVault.js +12 -13
  67. package/lib/instructions/setHalted.js +4 -5
  68. package/lib/instructions/transferVault.js +2 -3
  69. package/lib/instructions/updateReferralAccount.js +6 -7
  70. package/lib/instructions/updateReferralState.js +6 -7
  71. package/lib/instructions/updateVaultType.js +5 -6
  72. package/lib/instructions/withdrawStakingPool.js +14 -15
  73. package/lib/instructions/withdrawVault.js +8 -9
  74. package/lib/state/VaultAccount.js +22 -8
  75. package/lib/state/VaultHistoryEvent.js +2 -2
  76. package/lib/utils/Errors.js +2 -3
  77. package/lib/utils/getLinkedListAccounts.js +2 -3
  78. package/lib/utils/sendAndConfirmWithDebug.js +1 -1
  79. package/package.json +9 -8
  80. package/src/{Constants.ts → HedgeConstants.ts} +13 -43
  81. package/src/idl/vault.ts +2342 -4024
  82. package/src/index.ts +3 -12
  83. package/src/instructions/claimLiquidationPoolPosition.ts +2 -2
  84. package/src/instructions/claimStakingPoolPosition.ts +2 -2
  85. package/src/instructions/closeClaimedLiquidationPoolPosition.ts +1 -1
  86. package/src/instructions/closeLiquidationPoolPosition.ts +2 -2
  87. package/src/instructions/createReferralAccount.ts +11 -8
  88. package/src/instructions/createStakingPool.ts +11 -4
  89. package/src/instructions/createUserReferralAccount.ts +2 -2
  90. package/src/instructions/createVault.ts +2 -2
  91. package/src/instructions/depositLiquidationPool.ts +2 -2
  92. package/src/instructions/depositStakingPool.ts +2 -2
  93. package/src/instructions/depositVault.ts +2 -2
  94. package/src/instructions/initHedgeFoundation.ts +2 -2
  95. package/src/instructions/initHedgeFoundationTokens.ts +2 -2
  96. package/src/instructions/liquidateVault.ts +29 -39
  97. package/src/instructions/loanVault.ts +23 -36
  98. package/src/instructions/psmEditAccount.ts +3 -3
  99. package/src/instructions/psmMintUsh.ts +3 -3
  100. package/src/instructions/psmRedeemUsh.ts +3 -3
  101. package/src/instructions/redeemVault.ts +2 -2
  102. package/src/instructions/referralClaimFees.ts +11 -9
  103. package/src/instructions/refreshOraclePrice.ts +4 -4
  104. package/src/instructions/repayVault.ts +2 -2
  105. package/src/instructions/setHalted.ts +2 -2
  106. package/src/instructions/transferVault.ts +1 -1
  107. package/src/instructions/updateReferralAccount.ts +2 -2
  108. package/src/instructions/updateReferralState.ts +2 -2
  109. package/src/instructions/updateVaultType.ts +2 -2
  110. package/src/instructions/withdrawStakingPool.ts +2 -2
  111. package/src/instructions/withdrawVault.ts +2 -2
  112. package/src/utils/Errors.ts +1 -1
  113. package/src/utils/getLinkedListAccounts.ts +1 -1
  114. package/declarations/instructions/adminWithdrawCol.d.ts +0 -5
  115. package/declarations/instructions/adminWithdrawUsh.d.ts +0 -5
  116. package/declarations/instructions/compoundCreateReferralAccount.d.ts +0 -17
  117. package/declarations/instructions/compoundReferralClaimFees.d.ts +0 -16
  118. package/declarations/instructions/createCompoundStakingPool.d.ts +0 -5
  119. package/declarations/instructions/createCompoundStakingPoolPosition.d.ts +0 -6
  120. package/declarations/instructions/depositCompoundStakingPoolPosition.d.ts +0 -6
  121. package/declarations/instructions/depositRewardsToCompoundPool.d.ts +0 -6
  122. package/declarations/instructions/setCompoundPoolActive.d.ts +0 -5
  123. package/declarations/instructions/setDelegateWallet.d.ts +0 -5
  124. package/declarations/instructions/setVaultTypeStatus.d.ts +0 -4
  125. package/declarations/instructions/withdrawCompoundStakingPoolPosition.d.ts +0 -6
  126. package/declarations/utils/Sender.d.ts +0 -2
  127. package/lib/instructions/adminWithdrawCol.js +0 -60
  128. package/lib/instructions/adminWithdrawUsh.js +0 -57
  129. package/lib/instructions/compoundCreateReferralAccount.js +0 -83
  130. package/lib/instructions/compoundReferralClaimFees.js +0 -87
  131. package/lib/instructions/createCompoundStakingPool.js +0 -58
  132. package/lib/instructions/createCompoundStakingPoolPosition.js +0 -56
  133. package/lib/instructions/depositCompoundStakingPoolPosition.js +0 -55
  134. package/lib/instructions/depositRewardsToCompoundPool.js +0 -64
  135. package/lib/instructions/setCompoundPoolActive.js +0 -43
  136. package/lib/instructions/setDelegateWallet.js +0 -43
  137. package/lib/instructions/setVaultTypeStatus.js +0 -38
  138. package/lib/instructions/withdrawCompoundStakingPoolPosition.js +0 -64
  139. package/lib/utils/Sender.js +0 -32
  140. package/src/instructions/adminWithdrawCol.ts +0 -87
  141. package/src/instructions/adminWithdrawUsh.ts +0 -78
  142. package/src/instructions/compoundCreateReferralAccount.ts +0 -119
  143. package/src/instructions/compoundReferralClaimFees.ts +0 -151
  144. package/src/instructions/createCompoundStakingPool.ts +0 -63
  145. package/src/instructions/createCompoundStakingPoolPosition.ts +0 -85
  146. package/src/instructions/depositCompoundStakingPoolPosition.ts +0 -78
  147. package/src/instructions/depositRewardsToCompoundPool.ts +0 -110
  148. package/src/instructions/setCompoundPoolActive.ts +0 -51
  149. package/src/instructions/setDelegateWallet.ts +0 -51
  150. package/src/instructions/withdrawCompoundStakingPoolPosition.ts +0 -100
package/lib/idl/vault.js CHANGED
@@ -2411,683 +2411,6 @@ exports.IDL = {
2411
2411
  "type": "publicKey"
2412
2412
  }
2413
2413
  ]
2414
- },
2415
- {
2416
- "name": "createCompoundStakingPool",
2417
- "accounts": [
2418
- {
2419
- "name": "signer",
2420
- "isMut": true,
2421
- "isSigner": true
2422
- },
2423
- {
2424
- "name": "vaultSystemState",
2425
- "isMut": true,
2426
- "isSigner": false
2427
- },
2428
- {
2429
- "name": "pool",
2430
- "isMut": true,
2431
- "isSigner": false
2432
- },
2433
- {
2434
- "name": "hedgeMint",
2435
- "isMut": true,
2436
- "isSigner": false
2437
- },
2438
- {
2439
- "name": "ushMint",
2440
- "isMut": false,
2441
- "isSigner": false
2442
- },
2443
- {
2444
- "name": "stakedTokenMint",
2445
- "isMut": false,
2446
- "isSigner": false
2447
- },
2448
- {
2449
- "name": "poolAssociatedStakedTokenAccount",
2450
- "isMut": true,
2451
- "isSigner": false
2452
- },
2453
- {
2454
- "name": "poolAssociatedUshTokenAccount",
2455
- "isMut": true,
2456
- "isSigner": false
2457
- },
2458
- {
2459
- "name": "associatedTokenProgram",
2460
- "isMut": false,
2461
- "isSigner": false
2462
- },
2463
- {
2464
- "name": "systemProgram",
2465
- "isMut": false,
2466
- "isSigner": false
2467
- },
2468
- {
2469
- "name": "tokenProgram",
2470
- "isMut": false,
2471
- "isSigner": false
2472
- },
2473
- {
2474
- "name": "rent",
2475
- "isMut": false,
2476
- "isSigner": false
2477
- }
2478
- ],
2479
- "args": [
2480
- {
2481
- "name": "overrideCurrentTime",
2482
- "type": "i64"
2483
- }
2484
- ]
2485
- },
2486
- {
2487
- "name": "createCompoundStakingPoolPosition",
2488
- "accounts": [
2489
- {
2490
- "name": "payer",
2491
- "isMut": true,
2492
- "isSigner": true
2493
- },
2494
- {
2495
- "name": "vaultSystemState",
2496
- "isMut": true,
2497
- "isSigner": false
2498
- },
2499
- {
2500
- "name": "pool",
2501
- "isMut": true,
2502
- "isSigner": false
2503
- },
2504
- {
2505
- "name": "stakedTokenMint",
2506
- "isMut": false,
2507
- "isSigner": false
2508
- },
2509
- {
2510
- "name": "poolPosition",
2511
- "isMut": true,
2512
- "isSigner": false
2513
- },
2514
- {
2515
- "name": "payerAssociatedStakedTokenAccount",
2516
- "isMut": true,
2517
- "isSigner": false
2518
- },
2519
- {
2520
- "name": "poolAssociatedStakedTokenAccount",
2521
- "isMut": true,
2522
- "isSigner": false
2523
- },
2524
- {
2525
- "name": "systemProgram",
2526
- "isMut": false,
2527
- "isSigner": false
2528
- },
2529
- {
2530
- "name": "tokenProgram",
2531
- "isMut": false,
2532
- "isSigner": false
2533
- },
2534
- {
2535
- "name": "rent",
2536
- "isMut": false,
2537
- "isSigner": false
2538
- }
2539
- ],
2540
- "args": [
2541
- {
2542
- "name": "amount",
2543
- "type": "u64"
2544
- },
2545
- {
2546
- "name": "overrideCurrentTime",
2547
- "type": "i64"
2548
- }
2549
- ]
2550
- },
2551
- {
2552
- "name": "depositCompoundStakingPoolPosition",
2553
- "accounts": [
2554
- {
2555
- "name": "payer",
2556
- "isMut": true,
2557
- "isSigner": true
2558
- },
2559
- {
2560
- "name": "vaultSystemState",
2561
- "isMut": true,
2562
- "isSigner": false
2563
- },
2564
- {
2565
- "name": "pool",
2566
- "isMut": true,
2567
- "isSigner": false
2568
- },
2569
- {
2570
- "name": "stakedTokenMint",
2571
- "isMut": false,
2572
- "isSigner": false
2573
- },
2574
- {
2575
- "name": "poolPosition",
2576
- "isMut": true,
2577
- "isSigner": false
2578
- },
2579
- {
2580
- "name": "payerAssociatedStakedTokenAccount",
2581
- "isMut": true,
2582
- "isSigner": false
2583
- },
2584
- {
2585
- "name": "poolAssociatedStakedTokenAccount",
2586
- "isMut": true,
2587
- "isSigner": false
2588
- },
2589
- {
2590
- "name": "systemProgram",
2591
- "isMut": false,
2592
- "isSigner": false
2593
- },
2594
- {
2595
- "name": "tokenProgram",
2596
- "isMut": false,
2597
- "isSigner": false
2598
- }
2599
- ],
2600
- "args": [
2601
- {
2602
- "name": "amount",
2603
- "type": "u64"
2604
- },
2605
- {
2606
- "name": "overrideCurrentTime",
2607
- "type": "i64"
2608
- }
2609
- ]
2610
- },
2611
- {
2612
- "name": "withdrawCompoundStakingPoolPosition",
2613
- "accounts": [
2614
- {
2615
- "name": "payer",
2616
- "isMut": true,
2617
- "isSigner": true
2618
- },
2619
- {
2620
- "name": "vaultSystemState",
2621
- "isMut": true,
2622
- "isSigner": false
2623
- },
2624
- {
2625
- "name": "pool",
2626
- "isMut": true,
2627
- "isSigner": false
2628
- },
2629
- {
2630
- "name": "poolPosition",
2631
- "isMut": true,
2632
- "isSigner": false
2633
- },
2634
- {
2635
- "name": "hedgeMint",
2636
- "isMut": true,
2637
- "isSigner": false
2638
- },
2639
- {
2640
- "name": "stakedTokenMint",
2641
- "isMut": true,
2642
- "isSigner": false
2643
- },
2644
- {
2645
- "name": "payerAssociatedStakedTokenAccount",
2646
- "isMut": true,
2647
- "isSigner": false
2648
- },
2649
- {
2650
- "name": "poolAssociatedStakedTokenAccount",
2651
- "isMut": true,
2652
- "isSigner": false
2653
- },
2654
- {
2655
- "name": "systemProgram",
2656
- "isMut": false,
2657
- "isSigner": false
2658
- },
2659
- {
2660
- "name": "tokenProgram",
2661
- "isMut": false,
2662
- "isSigner": false
2663
- }
2664
- ],
2665
- "args": [
2666
- {
2667
- "name": "overrideCurrentTime",
2668
- "type": "i64"
2669
- },
2670
- {
2671
- "name": "claimAmount",
2672
- "type": "u64"
2673
- }
2674
- ]
2675
- },
2676
- {
2677
- "name": "adminWithdrawColAta",
2678
- "accounts": [
2679
- {
2680
- "name": "payer",
2681
- "isMut": true,
2682
- "isSigner": true
2683
- },
2684
- {
2685
- "name": "vaultSystemState",
2686
- "isMut": true,
2687
- "isSigner": false
2688
- },
2689
- {
2690
- "name": "vaultTypeAccount",
2691
- "isMut": true,
2692
- "isSigner": false
2693
- },
2694
- {
2695
- "name": "stakedTokenMint",
2696
- "isMut": true,
2697
- "isSigner": false
2698
- },
2699
- {
2700
- "name": "pool",
2701
- "isMut": true,
2702
- "isSigner": false
2703
- },
2704
- {
2705
- "name": "poolAssociatedTokenAccount",
2706
- "isMut": true,
2707
- "isSigner": false
2708
- },
2709
- {
2710
- "name": "delegateAssociatedColAccount",
2711
- "isMut": true,
2712
- "isSigner": false
2713
- },
2714
- {
2715
- "name": "associatedTokenProgram",
2716
- "isMut": false,
2717
- "isSigner": false
2718
- },
2719
- {
2720
- "name": "systemProgram",
2721
- "isMut": false,
2722
- "isSigner": false
2723
- },
2724
- {
2725
- "name": "tokenProgram",
2726
- "isMut": false,
2727
- "isSigner": false
2728
- }
2729
- ],
2730
- "args": []
2731
- },
2732
- {
2733
- "name": "adminWithdrawUshAta",
2734
- "accounts": [
2735
- {
2736
- "name": "payer",
2737
- "isMut": true,
2738
- "isSigner": true
2739
- },
2740
- {
2741
- "name": "vaultSystemState",
2742
- "isMut": true,
2743
- "isSigner": false
2744
- },
2745
- {
2746
- "name": "stakedTokenMint",
2747
- "isMut": true,
2748
- "isSigner": false
2749
- },
2750
- {
2751
- "name": "pool",
2752
- "isMut": true,
2753
- "isSigner": false
2754
- },
2755
- {
2756
- "name": "ushMint",
2757
- "isMut": false,
2758
- "isSigner": false
2759
- },
2760
- {
2761
- "name": "poolAssociatedTokenAccount",
2762
- "isMut": true,
2763
- "isSigner": false
2764
- },
2765
- {
2766
- "name": "delegateAssociatedUshAccount",
2767
- "isMut": true,
2768
- "isSigner": false
2769
- },
2770
- {
2771
- "name": "associatedTokenProgram",
2772
- "isMut": false,
2773
- "isSigner": false
2774
- },
2775
- {
2776
- "name": "systemProgram",
2777
- "isMut": false,
2778
- "isSigner": false
2779
- },
2780
- {
2781
- "name": "tokenProgram",
2782
- "isMut": false,
2783
- "isSigner": false
2784
- }
2785
- ],
2786
- "args": []
2787
- },
2788
- {
2789
- "name": "depositRewardsToCompoundPool",
2790
- "accounts": [
2791
- {
2792
- "name": "payer",
2793
- "isMut": true,
2794
- "isSigner": true
2795
- },
2796
- {
2797
- "name": "vaultSystemState",
2798
- "isMut": true,
2799
- "isSigner": false
2800
- },
2801
- {
2802
- "name": "history",
2803
- "isMut": true,
2804
- "isSigner": true
2805
- },
2806
- {
2807
- "name": "hedgeMint",
2808
- "isMut": true,
2809
- "isSigner": false
2810
- },
2811
- {
2812
- "name": "stakedTokenMint",
2813
- "isMut": true,
2814
- "isSigner": false
2815
- },
2816
- {
2817
- "name": "compoundPool",
2818
- "isMut": true,
2819
- "isSigner": false
2820
- },
2821
- {
2822
- "name": "pool",
2823
- "isMut": true,
2824
- "isSigner": false
2825
- },
2826
- {
2827
- "name": "poolAssociatedHedgeAccount",
2828
- "isMut": true,
2829
- "isSigner": false
2830
- },
2831
- {
2832
- "name": "payerAssociatedHedgeAccount",
2833
- "isMut": true,
2834
- "isSigner": false
2835
- },
2836
- {
2837
- "name": "associatedTokenProgram",
2838
- "isMut": false,
2839
- "isSigner": false
2840
- },
2841
- {
2842
- "name": "systemProgram",
2843
- "isMut": false,
2844
- "isSigner": false
2845
- },
2846
- {
2847
- "name": "tokenProgram",
2848
- "isMut": false,
2849
- "isSigner": false
2850
- }
2851
- ],
2852
- "args": [
2853
- {
2854
- "name": "payerRewardsTokenDeposit",
2855
- "type": "u64"
2856
- },
2857
- {
2858
- "name": "overrideCurrentTime",
2859
- "type": "i64"
2860
- }
2861
- ]
2862
- },
2863
- {
2864
- "name": "setDelegateWallet",
2865
- "accounts": [
2866
- {
2867
- "name": "payer",
2868
- "isMut": true,
2869
- "isSigner": true
2870
- },
2871
- {
2872
- "name": "vaultSystemState",
2873
- "isMut": true,
2874
- "isSigner": false
2875
- },
2876
- {
2877
- "name": "pool",
2878
- "isMut": true,
2879
- "isSigner": false
2880
- },
2881
- {
2882
- "name": "stakedTokenMint",
2883
- "isMut": true,
2884
- "isSigner": false
2885
- }
2886
- ],
2887
- "args": [
2888
- {
2889
- "name": "delegateWallet",
2890
- "type": "publicKey"
2891
- }
2892
- ]
2893
- },
2894
- {
2895
- "name": "setCompoundPoolActive",
2896
- "accounts": [
2897
- {
2898
- "name": "payer",
2899
- "isMut": true,
2900
- "isSigner": true
2901
- },
2902
- {
2903
- "name": "vaultSystemState",
2904
- "isMut": true,
2905
- "isSigner": false
2906
- },
2907
- {
2908
- "name": "pool",
2909
- "isMut": true,
2910
- "isSigner": false
2911
- },
2912
- {
2913
- "name": "stakedTokenMint",
2914
- "isMut": true,
2915
- "isSigner": false
2916
- }
2917
- ],
2918
- "args": [
2919
- {
2920
- "name": "setActive",
2921
- "type": "bool"
2922
- }
2923
- ]
2924
- },
2925
- {
2926
- "name": "compoundCreateReferralAccount",
2927
- "accounts": [
2928
- {
2929
- "name": "signer",
2930
- "isMut": true,
2931
- "isSigner": true
2932
- },
2933
- {
2934
- "name": "vaultSystemState",
2935
- "isMut": true,
2936
- "isSigner": false
2937
- },
2938
- {
2939
- "name": "referralState",
2940
- "isMut": true,
2941
- "isSigner": false
2942
- },
2943
- {
2944
- "name": "referralAccount",
2945
- "isMut": true,
2946
- "isSigner": false
2947
- },
2948
- {
2949
- "name": "userReferralAccount",
2950
- "isMut": true,
2951
- "isSigner": false
2952
- },
2953
- {
2954
- "name": "poolPosition",
2955
- "isMut": true,
2956
- "isSigner": false
2957
- },
2958
- {
2959
- "name": "hedgeMint",
2960
- "isMut": true,
2961
- "isSigner": false
2962
- },
2963
- {
2964
- "name": "hdgAta",
2965
- "isMut": true,
2966
- "isSigner": false
2967
- },
2968
- {
2969
- "name": "pool",
2970
- "isMut": true,
2971
- "isSigner": false
2972
- },
2973
- {
2974
- "name": "stakedTokenMint",
2975
- "isMut": true,
2976
- "isSigner": false
2977
- },
2978
- {
2979
- "name": "systemProgram",
2980
- "isMut": false,
2981
- "isSigner": false
2982
- },
2983
- {
2984
- "name": "tokenProgram",
2985
- "isMut": false,
2986
- "isSigner": false
2987
- },
2988
- {
2989
- "name": "rent",
2990
- "isMut": false,
2991
- "isSigner": false
2992
- }
2993
- ],
2994
- "args": [
2995
- {
2996
- "name": "overrideCurrentTime",
2997
- "type": "i64"
2998
- }
2999
- ]
3000
- },
3001
- {
3002
- "name": "compoundReferralClaimFees",
3003
- "accounts": [
3004
- {
3005
- "name": "signer",
3006
- "isMut": true,
3007
- "isSigner": true
3008
- },
3009
- {
3010
- "name": "vaultSystemState",
3011
- "isMut": true,
3012
- "isSigner": false
3013
- },
3014
- {
3015
- "name": "referralState",
3016
- "isMut": true,
3017
- "isSigner": false
3018
- },
3019
- {
3020
- "name": "referralAccount",
3021
- "isMut": true,
3022
- "isSigner": false
3023
- },
3024
- {
3025
- "name": "poolPosition",
3026
- "isMut": true,
3027
- "isSigner": false
3028
- },
3029
- {
3030
- "name": "hedgeMint",
3031
- "isMut": true,
3032
- "isSigner": false
3033
- },
3034
- {
3035
- "name": "signerHdgAta",
3036
- "isMut": true,
3037
- "isSigner": false
3038
- },
3039
- {
3040
- "name": "ushMint",
3041
- "isMut": true,
3042
- "isSigner": false
3043
- },
3044
- {
3045
- "name": "signerUshAta",
3046
- "isMut": true,
3047
- "isSigner": false
3048
- },
3049
- {
3050
- "name": "communityAssociatedHedgeTokenAccount",
3051
- "isMut": true,
3052
- "isSigner": false
3053
- },
3054
- {
3055
- "name": "feePool",
3056
- "isMut": true,
3057
- "isSigner": false
3058
- },
3059
- {
3060
- "name": "feePoolAssociatedUshTokenAccount",
3061
- "isMut": true,
3062
- "isSigner": false
3063
- },
3064
- {
3065
- "name": "pool",
3066
- "isMut": true,
3067
- "isSigner": false
3068
- },
3069
- {
3070
- "name": "stakedTokenMint",
3071
- "isMut": false,
3072
- "isSigner": false
3073
- },
3074
- {
3075
- "name": "systemProgram",
3076
- "isMut": false,
3077
- "isSigner": false
3078
- },
3079
- {
3080
- "name": "tokenProgram",
3081
- "isMut": false,
3082
- "isSigner": false
3083
- },
3084
- {
3085
- "name": "rent",
3086
- "isMut": false,
3087
- "isSigner": false
3088
- }
3089
- ],
3090
- "args": []
3091
2414
  }
3092
2415
  ],
3093
2416
  "accounts": [
@@ -3162,98 +2485,6 @@ exports.IDL = {
3162
2485
  ]
3163
2486
  }
3164
2487
  },
3165
- {
3166
- "name": "poolHistoryEvent",
3167
- "type": {
3168
- "kind": "struct",
3169
- "fields": [
3170
- {
3171
- "name": "poolAccount",
3172
- "type": "publicKey"
3173
- },
3174
- {
3175
- "name": "accumRatio",
3176
- "type": "u128"
3177
- },
3178
- {
3179
- "name": "timestamp",
3180
- "type": "u64"
3181
- }
3182
- ]
3183
- }
3184
- },
3185
- {
3186
- "name": "compoundStakingPoolPosition",
3187
- "type": {
3188
- "kind": "struct",
3189
- "fields": [
3190
- {
3191
- "name": "owner",
3192
- "type": "publicKey"
3193
- },
3194
- {
3195
- "name": "pool",
3196
- "type": "publicKey"
3197
- },
3198
- {
3199
- "name": "timestampOpened",
3200
- "type": "u64"
3201
- },
3202
- {
3203
- "name": "denormalizedDeposited",
3204
- "type": "u64"
3205
- },
3206
- {
3207
- "name": "timelockPeriod",
3208
- "type": "u64"
3209
- },
3210
- {
3211
- "name": "state",
3212
- "type": {
3213
- "defined": "PositionState"
3214
- }
3215
- },
3216
- {
3217
- "name": "stakeType",
3218
- "type": {
3219
- "defined": "StakingType"
3220
- }
3221
- },
3222
- {
3223
- "name": "bump",
3224
- "type": "u8"
3225
- }
3226
- ]
3227
- }
3228
- },
3229
- {
3230
- "name": "compoundStakingPool",
3231
- "type": {
3232
- "kind": "struct",
3233
- "fields": [
3234
- {
3235
- "name": "hedgeRewardAccumulator",
3236
- "type": "u128"
3237
- },
3238
- {
3239
- "name": "minStakingPeriod",
3240
- "type": "u64"
3241
- },
3242
- {
3243
- "name": "deposits",
3244
- "type": "u64"
3245
- },
3246
- {
3247
- "name": "startTime",
3248
- "type": "u64"
3249
- },
3250
- {
3251
- "name": "stakedTokenMint",
3252
- "type": "publicKey"
3253
- }
3254
- ]
3255
- }
3256
- },
3257
2488
  {
3258
2489
  "name": "liquidationPoolEra",
3259
2490
  "type": {
@@ -3759,31 +2990,6 @@ exports.IDL = {
3759
2990
  {
3760
2991
  "name": "bump",
3761
2992
  "type": "u8"
3762
- },
3763
- {
3764
- "name": "compoundPoolActive",
3765
- "type": "bool"
3766
- },
3767
- {
3768
- "name": "pad",
3769
- "type": {
3770
- "array": [
3771
- "u8",
3772
- 6
3773
- ]
3774
- }
3775
- },
3776
- {
3777
- "name": "ushDepositCounter",
3778
- "type": "u64"
3779
- },
3780
- {
3781
- "name": "totalUshDepositCounter",
3782
- "type": "u64"
3783
- },
3784
- {
3785
- "name": "compoundPoolDelegateWallet",
3786
- "type": "publicKey"
3787
2993
  }
3788
2994
  ]
3789
2995
  }
@@ -4026,14 +3232,6 @@ exports.IDL = {
4026
3232
  {
4027
3233
  "name": "lastRedeemTimestamp",
4028
3234
  "type": "u64"
4029
- },
4030
- {
4031
- "name": "colFeeCounter",
4032
- "type": "u64"
4033
- },
4034
- {
4035
- "name": "totalColFeeCounter",
4036
- "type": "u64"
4037
3235
  }
4038
3236
  ]
4039
3237
  }
@@ -4384,20 +3582,6 @@ exports.IDL = {
4384
3582
  ]
4385
3583
  }
4386
3584
  },
4387
- {
4388
- "name": "StakingType",
4389
- "type": {
4390
- "kind": "enum",
4391
- "variants": [
4392
- {
4393
- "name": "Standard"
4394
- },
4395
- {
4396
- "name": "Timelocked"
4397
- }
4398
- ]
4399
- }
4400
- },
4401
3585
  {
4402
3586
  "name": "CurrencyType",
4403
3587
  "type": {
@@ -4631,16 +3815,6 @@ exports.IDL = {
4631
3815
  "index": false
4632
3816
  }
4633
3817
  ]
4634
- },
4635
- {
4636
- "name": "PoolDepositRatioEvent",
4637
- "fields": [
4638
- {
4639
- "name": "poolDepositRatio",
4640
- "type": "u128",
4641
- "index": false
4642
- }
4643
- ]
4644
3818
  }
4645
3819
  ],
4646
3820
  "errors": [
@@ -4726,7 +3900,7 @@ exports.IDL = {
4726
3900
  },
4727
3901
  {
4728
3902
  "code": 6016,
4729
- "name": "PoolPositionNotYetClosed",
3903
+ "name": "PoolPositionNoYetClosed",
4730
3904
  "msg": "Pool position must be closed to claim reward"
4731
3905
  },
4732
3906
  {
@@ -4838,21 +4012,6 @@ exports.IDL = {
4838
4012
  "code": 6038,
4839
4013
  "name": "OracleUpdateFailed",
4840
4014
  "msg": "OracleUpdateFailed"
4841
- },
4842
- {
4843
- "code": 6039,
4844
- "name": "PoolPositionTimelockPeriodNotExpired",
4845
- "msg": "Staking Pool Position timelock not expired"
4846
- },
4847
- {
4848
- "code": 6040,
4849
- "name": "PoolPositionOverClaim",
4850
- "msg": "Cannot overclaim pool positon."
4851
- },
4852
- {
4853
- "code": 6041,
4854
- "name": "PoolPositionNotOpen",
4855
- "msg": "Pool Position not open"
4856
4015
  }
4857
4016
  ]
4858
4017
  };