@wireio/stake 0.7.3 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,68 +13,6 @@ export type LiqsolCore = {
13
13
  "description": "Created with Anchor"
14
14
  },
15
15
  "instructions": [
16
- {
17
- "name": "accumulateUnstakeRequest",
18
- "docs": [
19
- "Accumulate unstake requests to be processed in next allocation cycle",
20
- "Multiple requests can be accumulated before calculating allocations",
21
- "Returns the target epoch when this unstake request will be processed",
22
- "We should not be able to call this without development feature enabled",
23
- ""
24
- ],
25
- "discriminator": [
26
- 24,
27
- 73,
28
- 69,
29
- 139,
30
- 36,
31
- 209,
32
- 105,
33
- 252
34
- ],
35
- "accounts": [
36
- {
37
- "name": "admin",
38
- "writable": true,
39
- "signer": true
40
- },
41
- {
42
- "name": "stakeAllocationState",
43
- "docs": [
44
- "Stake allocation state - to accumulate pending unstake requests"
45
- ],
46
- "writable": true
47
- },
48
- {
49
- "name": "stakeMetrics",
50
- "docs": [
51
- "Stake metrics - to validate total unstake amount is available"
52
- ]
53
- },
54
- {
55
- "name": "maintenanceLedger",
56
- "docs": [
57
- "Maintenance ledger - to determine target processing epoch"
58
- ]
59
- },
60
- {
61
- "name": "globalConfig",
62
- "docs": [
63
- "Global config for min_unstake_request setting"
64
- ]
65
- },
66
- {
67
- "name": "clock"
68
- }
69
- ],
70
- "args": [
71
- {
72
- "name": "amount",
73
- "type": "u64"
74
- }
75
- ],
76
- "returns": "u64"
77
- },
78
16
  {
79
17
  "name": "addTopPerformersBatch",
80
18
  "docs": [
@@ -127,74 +65,6 @@ export type LiqsolCore = {
127
65
  ],
128
66
  "args": []
129
67
  },
130
- {
131
- "name": "addValidatorV2",
132
- "docs": [
133
- "Add a new validator bbypassing the looking at leaderboard and getting validators form there"
134
- ],
135
- "discriminator": [
136
- 217,
137
- 158,
138
- 30,
139
- 19,
140
- 123,
141
- 99,
142
- 110,
143
- 30
144
- ],
145
- "accounts": [
146
- {
147
- "name": "authority",
148
- "writable": true,
149
- "signer": true
150
- },
151
- {
152
- "name": "activeList",
153
- "docs": [
154
- "Active list - will add the validator here"
155
- ],
156
- "writable": true
157
- },
158
- {
159
- "name": "validatorInfo",
160
- "docs": [
161
- "Create the validator info account"
162
- ],
163
- "writable": true
164
- },
165
- {
166
- "name": "validatorTransient",
167
- "docs": [
168
- "Create the validator transient account"
169
- ],
170
- "writable": true
171
- },
172
- {
173
- "name": "stakeAllocationState",
174
- "docs": [
175
- "Stake allocation state - to update total_active_vpp when adding validator"
176
- ],
177
- "writable": true
178
- },
179
- {
180
- "name": "systemProgram"
181
- }
182
- ],
183
- "args": [
184
- {
185
- "name": "voteAccount",
186
- "type": "pubkey"
187
- },
188
- {
189
- "name": "name",
190
- "type": "string"
191
- },
192
- {
193
- "name": "performanceScore",
194
- "type": "u8"
195
- }
196
- ]
197
- },
198
68
  {
199
69
  "name": "aggregateStakeMetrics",
200
70
  "docs": [
@@ -233,43 +103,6 @@ export type LiqsolCore = {
233
103
  ],
234
104
  "args": []
235
105
  },
236
- {
237
- "name": "blacklistValidator",
238
- "docs": [
239
- "Blacklist a validator (user-facing, maintenance will handle graveyard movement)",
240
- "UnderPerforming is set automatically when score is updated",
241
- "Another serious emergency stop function"
242
- ],
243
- "discriminator": [
244
- 125,
245
- 42,
246
- 36,
247
- 229,
248
- 27,
249
- 38,
250
- 226,
251
- 62
252
- ],
253
- "accounts": [
254
- {
255
- "name": "validatorInfo",
256
- "writable": true
257
- },
258
- {
259
- "name": "stakeAllocationState",
260
- "docs": [
261
- "Stake allocation state - to update total_active_vpp when VPP changes"
262
- ],
263
- "writable": true
264
- }
265
- ],
266
- "args": [
267
- {
268
- "name": "voteAccount",
269
- "type": "pubkey"
270
- }
271
- ]
272
- },
273
106
  {
274
107
  "name": "bondRole",
275
108
  "discriminator": [
@@ -2823,143 +2656,6 @@ export type LiqsolCore = {
2823
2656
  }
2824
2657
  ]
2825
2658
  },
2826
- {
2827
- "name": "resetDistributionState",
2828
- "discriminator": [
2829
- 159,
2830
- 183,
2831
- 162,
2832
- 74,
2833
- 228,
2834
- 135,
2835
- 157,
2836
- 79
2837
- ],
2838
- "accounts": [
2839
- {
2840
- "name": "admin",
2841
- "signer": true
2842
- },
2843
- {
2844
- "name": "distributionState",
2845
- "writable": true
2846
- }
2847
- ],
2848
- "args": []
2849
- },
2850
- {
2851
- "name": "resetGlobalState",
2852
- "discriminator": [
2853
- 252,
2854
- 41,
2855
- 117,
2856
- 110,
2857
- 248,
2858
- 165,
2859
- 48,
2860
- 88
2861
- ],
2862
- "accounts": [
2863
- {
2864
- "name": "admin",
2865
- "signer": true
2866
- },
2867
- {
2868
- "name": "globalConfig"
2869
- },
2870
- {
2871
- "name": "globalState",
2872
- "writable": true
2873
- },
2874
- {
2875
- "name": "poolAuthority"
2876
- },
2877
- {
2878
- "name": "liqsolMint"
2879
- },
2880
- {
2881
- "name": "liqsolPoolAta",
2882
- "writable": true
2883
- },
2884
- {
2885
- "name": "tokenProgram"
2886
- },
2887
- {
2888
- "name": "associatedTokenProgram"
2889
- }
2890
- ],
2891
- "args": []
2892
- },
2893
- {
2894
- "name": "resetPriceHistory",
2895
- "discriminator": [
2896
- 213,
2897
- 231,
2898
- 155,
2899
- 139,
2900
- 248,
2901
- 60,
2902
- 67,
2903
- 199
2904
- ],
2905
- "accounts": [
2906
- {
2907
- "name": "admin",
2908
- "writable": true,
2909
- "signer": true
2910
- },
2911
- {
2912
- "name": "globalConfig"
2913
- },
2914
- {
2915
- "name": "trancheState",
2916
- "writable": true
2917
- },
2918
- {
2919
- "name": "priceHistory",
2920
- "writable": true
2921
- },
2922
- {
2923
- "name": "systemProgram"
2924
- }
2925
- ],
2926
- "args": []
2927
- },
2928
- {
2929
- "name": "resetTrancheState",
2930
- "discriminator": [
2931
- 106,
2932
- 102,
2933
- 143,
2934
- 40,
2935
- 152,
2936
- 173,
2937
- 165,
2938
- 168
2939
- ],
2940
- "accounts": [
2941
- {
2942
- "name": "admin",
2943
- "writable": true,
2944
- "signer": true
2945
- },
2946
- {
2947
- "name": "globalConfig"
2948
- },
2949
- {
2950
- "name": "trancheState",
2951
- "writable": true
2952
- },
2953
- {
2954
- "name": "priceHistory",
2955
- "writable": true
2956
- },
2957
- {
2958
- "name": "systemProgram"
2959
- }
2960
- ],
2961
- "args": []
2962
- },
2963
2659
  {
2964
2660
  "name": "setAdmin",
2965
2661
  "discriminator": [
@@ -2982,8 +2678,7 @@ export type LiqsolCore = {
2982
2678
  "signer": true
2983
2679
  },
2984
2680
  {
2985
- "name": "newAuthority",
2986
- "signer": true
2681
+ "name": "newAuthority"
2987
2682
  }
2988
2683
  ],
2989
2684
  "args": []
@@ -3010,51 +2705,11 @@ export type LiqsolCore = {
3010
2705
  "signer": true
3011
2706
  },
3012
2707
  {
3013
- "name": "newAuthority",
3014
- "signer": true
2708
+ "name": "newAuthority"
3015
2709
  }
3016
2710
  ],
3017
2711
  "args": []
3018
2712
  },
3019
- {
3020
- "name": "setLastStateChangeEpoch",
3021
- "docs": [
3022
- "Admin function to directly set last_state_change_epoch (useful for testing cooldowns)"
3023
- ],
3024
- "discriminator": [
3025
- 94,
3026
- 57,
3027
- 139,
3028
- 195,
3029
- 123,
3030
- 224,
3031
- 227,
3032
- 106
3033
- ],
3034
- "accounts": [
3035
- {
3036
- "name": "validatorInfo",
3037
- "writable": true
3038
- },
3039
- {
3040
- "name": "stakeAllocationState",
3041
- "docs": [
3042
- "Stake allocation state - to update total_active_vpp when VPP changes"
3043
- ],
3044
- "writable": true
3045
- }
3046
- ],
3047
- "args": [
3048
- {
3049
- "name": "voteAccount",
3050
- "type": "pubkey"
3051
- },
3052
- {
3053
- "name": "epoch",
3054
- "type": "u16"
3055
- }
3056
- ]
3057
- },
3058
2713
  {
3059
2714
  "name": "setPaused",
3060
2715
  "discriminator": [
@@ -3538,34 +3193,6 @@ export type LiqsolCore = {
3538
3193
  }
3539
3194
  ]
3540
3195
  },
3541
- {
3542
- "name": "testClearActiveList",
3543
- "discriminator": [
3544
- 17,
3545
- 195,
3546
- 59,
3547
- 174,
3548
- 184,
3549
- 137,
3550
- 149,
3551
- 144
3552
- ],
3553
- "accounts": [
3554
- {
3555
- "name": "activeList",
3556
- "writable": true
3557
- },
3558
- {
3559
- "name": "processingState",
3560
- "writable": true
3561
- },
3562
- {
3563
- "name": "authority",
3564
- "signer": true
3565
- }
3566
- ],
3567
- "args": []
3568
- },
3569
3196
  {
3570
3197
  "name": "updateConfigBool",
3571
3198
  "discriminator": [
@@ -4243,8 +3870,118 @@ export type LiqsolCore = {
4243
3870
  "errors": [
4244
3871
  {
4245
3872
  "code": 6000,
4246
- "name": "accountBorrowFailed",
4247
- "msg": "Util Acc borrow Failed"
3873
+ "name": "destinationAccountDoesNotExist",
3874
+ "msg": "Destination stake account does not exist"
3875
+ },
3876
+ {
3877
+ "code": 6001,
3878
+ "name": "sourceAccountDoesNotExist",
3879
+ "msg": "Source stake account does not exist"
3880
+ },
3881
+ {
3882
+ "code": 6002,
3883
+ "name": "invalidDestinationOwner",
3884
+ "msg": "Destination account not owned by stake program"
3885
+ },
3886
+ {
3887
+ "code": 6003,
3888
+ "name": "invalidSourceOwner",
3889
+ "msg": "Source account not owned by stake program"
3890
+ },
3891
+ {
3892
+ "code": 6004,
3893
+ "name": "clockBorrowFailed",
3894
+ "msg": "Failed to borrow clock data"
3895
+ },
3896
+ {
3897
+ "code": 6005,
3898
+ "name": "clockDeserializeFailed",
3899
+ "msg": "Failed to deserialize clock"
3900
+ },
3901
+ {
3902
+ "code": 6006,
3903
+ "name": "destinationAnalysisFailed",
3904
+ "msg": "Failed to analyze destination stake account"
3905
+ },
3906
+ {
3907
+ "code": 6007,
3908
+ "name": "sourceAnalysisFailed",
3909
+ "msg": "Failed to analyze source stake account"
3910
+ },
3911
+ {
3912
+ "code": 6008,
3913
+ "name": "destinationStillActivating",
3914
+ "msg": "Destination stake is still activating"
3915
+ },
3916
+ {
3917
+ "code": 6009,
3918
+ "name": "destinationDeactivating",
3919
+ "msg": "Destination stake is deactivating"
3920
+ },
3921
+ {
3922
+ "code": 6010,
3923
+ "name": "sourceStillActivating",
3924
+ "msg": "Source stake is still activating"
3925
+ },
3926
+ {
3927
+ "code": 6011,
3928
+ "name": "sourceDeactivating",
3929
+ "msg": "Source stake is deactivating"
3930
+ },
3931
+ {
3932
+ "code": 6012,
3933
+ "name": "destinationBorrowFailed",
3934
+ "msg": "Failed to borrow destination account data"
3935
+ },
3936
+ {
3937
+ "code": 6013,
3938
+ "name": "destinationParseFailed",
3939
+ "msg": "Failed to parse destination stake state"
3940
+ },
3941
+ {
3942
+ "code": 6014,
3943
+ "name": "sourceBorrowFailed",
3944
+ "msg": "Failed to borrow source account data"
3945
+ },
3946
+ {
3947
+ "code": 6015,
3948
+ "name": "sourceParseFailed",
3949
+ "msg": "Failed to parse source stake state"
3950
+ },
3951
+ {
3952
+ "code": 6016,
3953
+ "name": "differentValidators",
3954
+ "msg": "Stakes are delegated to different validators"
3955
+ },
3956
+ {
3957
+ "code": 6017,
3958
+ "name": "differentStakers",
3959
+ "msg": "Stakes have different staker authorities"
3960
+ },
3961
+ {
3962
+ "code": 6018,
3963
+ "name": "differentWithdrawers",
3964
+ "msg": "Stakes have different withdrawer authorities"
3965
+ },
3966
+ {
3967
+ "code": 6019,
3968
+ "name": "authoritiesNotFound",
3969
+ "msg": "Could not extract authorities from accounts"
3970
+ },
3971
+ {
3972
+ "code": 6020,
3973
+ "name": "mergeInstructionFailed",
3974
+ "msg": "Merge instruction failed"
3975
+ },
3976
+ {
3977
+ "code": 6021,
3978
+ "name": "epochRewardsActive",
3979
+ "msg": "Epoch rewards distribution is active - stake operations blocked"
3980
+ },
3981
+ {
3982
+ "code": 6022,
3983
+ "name": "differentCreditsObserved",
3984
+ "msg": "Stakes have different credits_observed - cannot merge until both earn same rewards"
4248
3985
  }
4249
3986
  ],
4250
3987
  "types": [
@@ -69,152 +69,6 @@ export type ValidatorLeaderboard = {
69
69
  ],
70
70
  "args": []
71
71
  },
72
- {
73
- "name": "testClearLeaderboard",
74
- "discriminator": [
75
- 118,
76
- 207,
77
- 26,
78
- 205,
79
- 180,
80
- 7,
81
- 75,
82
- 244
83
- ],
84
- "accounts": [
85
- {
86
- "name": "leaderboardState",
87
- "writable": true
88
- },
89
- {
90
- "name": "authority",
91
- "signer": true
92
- }
93
- ],
94
- "args": []
95
- },
96
- {
97
- "name": "testForceRegisterValidator",
98
- "discriminator": [
99
- 136,
100
- 156,
101
- 132,
102
- 32,
103
- 96,
104
- 240,
105
- 7,
106
- 115
107
- ],
108
- "accounts": [
109
- {
110
- "name": "registrant",
111
- "writable": true,
112
- "signer": true
113
- },
114
- {
115
- "name": "voteAccount"
116
- },
117
- {
118
- "name": "validatorRecord",
119
- "writable": true
120
- },
121
- {
122
- "name": "leaderboardState",
123
- "writable": true
124
- },
125
- {
126
- "name": "systemProgram"
127
- },
128
- {
129
- "name": "clock"
130
- }
131
- ],
132
- "args": [
133
- {
134
- "name": "vpp",
135
- "type": "u8"
136
- }
137
- ]
138
- },
139
- {
140
- "name": "testForceUpdateVpp",
141
- "discriminator": [
142
- 67,
143
- 51,
144
- 28,
145
- 174,
146
- 200,
147
- 214,
148
- 203,
149
- 162
150
- ],
151
- "accounts": [
152
- {
153
- "name": "registrant",
154
- "writable": true,
155
- "signer": true
156
- },
157
- {
158
- "name": "voteAccount"
159
- },
160
- {
161
- "name": "validatorRecord",
162
- "writable": true
163
- },
164
- {
165
- "name": "leaderboardState",
166
- "writable": true
167
- }
168
- ],
169
- "args": [
170
- {
171
- "name": "vpp",
172
- "type": "u8"
173
- }
174
- ]
175
- },
176
- {
177
- "name": "testSeedRandomValidators",
178
- "discriminator": [
179
- 48,
180
- 155,
181
- 181,
182
- 112,
183
- 163,
184
- 242,
185
- 43,
186
- 146
187
- ],
188
- "accounts": [
189
- {
190
- "name": "registrant",
191
- "writable": true,
192
- "signer": true
193
- },
194
- {
195
- "name": "leaderboardState",
196
- "writable": true
197
- }
198
- ],
199
- "args": [
200
- {
201
- "name": "count",
202
- "type": "u16"
203
- },
204
- {
205
- "name": "seed",
206
- "type": "u64"
207
- },
208
- {
209
- "name": "minVpp",
210
- "type": "u8"
211
- },
212
- {
213
- "name": "maxVpp",
214
- "type": "u8"
215
- }
216
- ]
217
- },
218
72
  {
219
73
  "name": "updateCommission",
220
74
  "discriminator": [