@wireio/stake 2.7.0 → 2.7.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireio/stake",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "description": "LIQ Staking Module for Wire Network",
5
5
  "homepage": "https://gitea.gitgo.app/Wire/sdk-stake",
6
6
  "license": "FSL-1.1-Apache-2.0",
@@ -7,6 +7,68 @@
7
7
  "description": "Created with Anchor"
8
8
  },
9
9
  "instructions": [
10
+ {
11
+ "name": "accumulate_unstake_request",
12
+ "docs": [
13
+ "Accumulate unstake requests to be processed in next allocation cycle",
14
+ "Multiple requests can be accumulated before calculating allocations",
15
+ "Returns the target epoch when this unstake request will be processed",
16
+ "We should not be able to call this without development feature enabled",
17
+ ""
18
+ ],
19
+ "discriminator": [
20
+ 24,
21
+ 73,
22
+ 69,
23
+ 139,
24
+ 36,
25
+ 209,
26
+ 105,
27
+ 252
28
+ ],
29
+ "accounts": [
30
+ {
31
+ "name": "admin",
32
+ "writable": true,
33
+ "signer": true
34
+ },
35
+ {
36
+ "name": "stake_allocation_state",
37
+ "docs": [
38
+ "Stake allocation state - to accumulate pending unstake requests"
39
+ ],
40
+ "writable": true
41
+ },
42
+ {
43
+ "name": "stake_metrics",
44
+ "docs": [
45
+ "Stake metrics - to validate total unstake amount is available"
46
+ ]
47
+ },
48
+ {
49
+ "name": "maintenance_ledger",
50
+ "docs": [
51
+ "Maintenance ledger - to determine target processing epoch"
52
+ ]
53
+ },
54
+ {
55
+ "name": "global_config",
56
+ "docs": [
57
+ "Global config for min_unstake_request setting"
58
+ ]
59
+ },
60
+ {
61
+ "name": "clock"
62
+ }
63
+ ],
64
+ "args": [
65
+ {
66
+ "name": "amount",
67
+ "type": "u64"
68
+ }
69
+ ],
70
+ "returns": "u64"
71
+ },
10
72
  {
11
73
  "name": "add_top_performers_batch",
12
74
  "docs": [
@@ -59,6 +121,74 @@
59
121
  ],
60
122
  "args": []
61
123
  },
124
+ {
125
+ "name": "add_validator_v2",
126
+ "docs": [
127
+ "Add a new validator bbypassing the looking at leaderboard and getting validators form there"
128
+ ],
129
+ "discriminator": [
130
+ 217,
131
+ 158,
132
+ 30,
133
+ 19,
134
+ 123,
135
+ 99,
136
+ 110,
137
+ 30
138
+ ],
139
+ "accounts": [
140
+ {
141
+ "name": "authority",
142
+ "writable": true,
143
+ "signer": true
144
+ },
145
+ {
146
+ "name": "active_list",
147
+ "docs": [
148
+ "Active list - will add the validator here"
149
+ ],
150
+ "writable": true
151
+ },
152
+ {
153
+ "name": "validator_info",
154
+ "docs": [
155
+ "Create the validator info account"
156
+ ],
157
+ "writable": true
158
+ },
159
+ {
160
+ "name": "validator_transient",
161
+ "docs": [
162
+ "Create the validator transient account"
163
+ ],
164
+ "writable": true
165
+ },
166
+ {
167
+ "name": "stake_allocation_state",
168
+ "docs": [
169
+ "Stake allocation state - to update total_active_vpp when adding validator"
170
+ ],
171
+ "writable": true
172
+ },
173
+ {
174
+ "name": "system_program"
175
+ }
176
+ ],
177
+ "args": [
178
+ {
179
+ "name": "vote_account",
180
+ "type": "pubkey"
181
+ },
182
+ {
183
+ "name": "name",
184
+ "type": "string"
185
+ },
186
+ {
187
+ "name": "performance_score",
188
+ "type": "u8"
189
+ }
190
+ ]
191
+ },
62
192
  {
63
193
  "name": "admin_force_unbond_role",
64
194
  "discriminator": [
@@ -142,6 +272,43 @@
142
272
  ],
143
273
  "args": []
144
274
  },
275
+ {
276
+ "name": "blacklist_validator",
277
+ "docs": [
278
+ "Blacklist a validator (user-facing, maintenance will handle graveyard movement)",
279
+ "UnderPerforming is set automatically when score is updated",
280
+ "Another serious emergency stop function"
281
+ ],
282
+ "discriminator": [
283
+ 125,
284
+ 42,
285
+ 36,
286
+ 229,
287
+ 27,
288
+ 38,
289
+ 226,
290
+ 62
291
+ ],
292
+ "accounts": [
293
+ {
294
+ "name": "validator_info",
295
+ "writable": true
296
+ },
297
+ {
298
+ "name": "stake_allocation_state",
299
+ "docs": [
300
+ "Stake allocation state - to update total_active_vpp when VPP changes"
301
+ ],
302
+ "writable": true
303
+ }
304
+ ],
305
+ "args": [
306
+ {
307
+ "name": "vote_account",
308
+ "type": "pubkey"
309
+ }
310
+ ]
311
+ },
145
312
  {
146
313
  "name": "bond_role",
147
314
  "discriminator": [
@@ -364,6 +531,9 @@
364
531
  },
365
532
  {
366
533
  "name": "token_program"
534
+ },
535
+ {
536
+ "name": "system_program"
367
537
  }
368
538
  ],
369
539
  "args": []
@@ -1767,6 +1937,69 @@
1767
1937
  }
1768
1938
  ]
1769
1939
  },
1940
+ {
1941
+ "name": "inject_test_yield",
1942
+ "discriminator": [
1943
+ 55,
1944
+ 41,
1945
+ 251,
1946
+ 228,
1947
+ 58,
1948
+ 191,
1949
+ 103,
1950
+ 248
1951
+ ],
1952
+ "accounts": [
1953
+ {
1954
+ "name": "admin",
1955
+ "signer": true
1956
+ },
1957
+ {
1958
+ "name": "global_config"
1959
+ },
1960
+ {
1961
+ "name": "global_state",
1962
+ "writable": true
1963
+ },
1964
+ {
1965
+ "name": "distribution_state",
1966
+ "writable": true
1967
+ },
1968
+ {
1969
+ "name": "liqsol_mint",
1970
+ "writable": true
1971
+ },
1972
+ {
1973
+ "name": "pool_authority"
1974
+ },
1975
+ {
1976
+ "name": "liqsol_pool_ata",
1977
+ "writable": true
1978
+ },
1979
+ {
1980
+ "name": "deposit_authority",
1981
+ "writable": true
1982
+ },
1983
+ {
1984
+ "name": "liqsol_program"
1985
+ },
1986
+ {
1987
+ "name": "liqsol_mint_authority"
1988
+ },
1989
+ {
1990
+ "name": "instructions_sysvar"
1991
+ },
1992
+ {
1993
+ "name": "token_program"
1994
+ }
1995
+ ],
1996
+ "args": [
1997
+ {
1998
+ "name": "amount",
1999
+ "type": "u64"
2000
+ }
2001
+ ]
2002
+ },
1770
2003
  {
1771
2004
  "name": "merge_activating_stakes",
1772
2005
  "docs": [
@@ -1942,6 +2175,43 @@
1942
2175
  }
1943
2176
  ]
1944
2177
  },
2178
+ {
2179
+ "name": "migrate_user_record",
2180
+ "discriminator": [
2181
+ 6,
2182
+ 118,
2183
+ 249,
2184
+ 178,
2185
+ 209,
2186
+ 106,
2187
+ 197,
2188
+ 25
2189
+ ],
2190
+ "accounts": [
2191
+ {
2192
+ "name": "admin",
2193
+ "writable": true,
2194
+ "signer": true
2195
+ },
2196
+ {
2197
+ "name": "global_config"
2198
+ },
2199
+ {
2200
+ "name": "user_ata"
2201
+ },
2202
+ {
2203
+ "name": "user_record",
2204
+ "writable": true
2205
+ },
2206
+ {
2207
+ "name": "distribution_state"
2208
+ },
2209
+ {
2210
+ "name": "system_program"
2211
+ }
2212
+ ],
2213
+ "args": []
2214
+ },
1945
2215
  {
1946
2216
  "name": "process_graveyard_validators_batch",
1947
2217
  "docs": [
@@ -2995,6 +3265,143 @@
2995
3265
  }
2996
3266
  ]
2997
3267
  },
3268
+ {
3269
+ "name": "reset_distribution_state",
3270
+ "discriminator": [
3271
+ 159,
3272
+ 183,
3273
+ 162,
3274
+ 74,
3275
+ 228,
3276
+ 135,
3277
+ 157,
3278
+ 79
3279
+ ],
3280
+ "accounts": [
3281
+ {
3282
+ "name": "admin",
3283
+ "signer": true
3284
+ },
3285
+ {
3286
+ "name": "distribution_state",
3287
+ "writable": true
3288
+ }
3289
+ ],
3290
+ "args": []
3291
+ },
3292
+ {
3293
+ "name": "reset_global_state",
3294
+ "discriminator": [
3295
+ 252,
3296
+ 41,
3297
+ 117,
3298
+ 110,
3299
+ 248,
3300
+ 165,
3301
+ 48,
3302
+ 88
3303
+ ],
3304
+ "accounts": [
3305
+ {
3306
+ "name": "admin",
3307
+ "signer": true
3308
+ },
3309
+ {
3310
+ "name": "global_config"
3311
+ },
3312
+ {
3313
+ "name": "global_state",
3314
+ "writable": true
3315
+ },
3316
+ {
3317
+ "name": "pool_authority"
3318
+ },
3319
+ {
3320
+ "name": "liqsol_mint"
3321
+ },
3322
+ {
3323
+ "name": "liqsol_pool_ata",
3324
+ "writable": true
3325
+ },
3326
+ {
3327
+ "name": "token_program"
3328
+ },
3329
+ {
3330
+ "name": "associated_token_program"
3331
+ }
3332
+ ],
3333
+ "args": []
3334
+ },
3335
+ {
3336
+ "name": "reset_price_history",
3337
+ "discriminator": [
3338
+ 213,
3339
+ 231,
3340
+ 155,
3341
+ 139,
3342
+ 248,
3343
+ 60,
3344
+ 67,
3345
+ 199
3346
+ ],
3347
+ "accounts": [
3348
+ {
3349
+ "name": "admin",
3350
+ "writable": true,
3351
+ "signer": true
3352
+ },
3353
+ {
3354
+ "name": "global_config"
3355
+ },
3356
+ {
3357
+ "name": "tranche_state",
3358
+ "writable": true
3359
+ },
3360
+ {
3361
+ "name": "price_history",
3362
+ "writable": true
3363
+ },
3364
+ {
3365
+ "name": "system_program"
3366
+ }
3367
+ ],
3368
+ "args": []
3369
+ },
3370
+ {
3371
+ "name": "reset_tranche_state",
3372
+ "discriminator": [
3373
+ 106,
3374
+ 102,
3375
+ 143,
3376
+ 40,
3377
+ 152,
3378
+ 173,
3379
+ 165,
3380
+ 168
3381
+ ],
3382
+ "accounts": [
3383
+ {
3384
+ "name": "admin",
3385
+ "writable": true,
3386
+ "signer": true
3387
+ },
3388
+ {
3389
+ "name": "global_config"
3390
+ },
3391
+ {
3392
+ "name": "tranche_state",
3393
+ "writable": true
3394
+ },
3395
+ {
3396
+ "name": "price_history",
3397
+ "writable": true
3398
+ },
3399
+ {
3400
+ "name": "system_program"
3401
+ }
3402
+ ],
3403
+ "args": []
3404
+ },
2998
3405
  {
2999
3406
  "name": "set_admin",
3000
3407
  "discriminator": [
@@ -3049,6 +3456,45 @@
3049
3456
  ],
3050
3457
  "args": []
3051
3458
  },
3459
+ {
3460
+ "name": "set_last_state_change_epoch",
3461
+ "docs": [
3462
+ "Admin function to directly set last_state_change_epoch (useful for testing cooldowns)"
3463
+ ],
3464
+ "discriminator": [
3465
+ 94,
3466
+ 57,
3467
+ 139,
3468
+ 195,
3469
+ 123,
3470
+ 224,
3471
+ 227,
3472
+ 106
3473
+ ],
3474
+ "accounts": [
3475
+ {
3476
+ "name": "validator_info",
3477
+ "writable": true
3478
+ },
3479
+ {
3480
+ "name": "stake_allocation_state",
3481
+ "docs": [
3482
+ "Stake allocation state - to update total_active_vpp when VPP changes"
3483
+ ],
3484
+ "writable": true
3485
+ }
3486
+ ],
3487
+ "args": [
3488
+ {
3489
+ "name": "vote_account",
3490
+ "type": "pubkey"
3491
+ },
3492
+ {
3493
+ "name": "epoch",
3494
+ "type": "u16"
3495
+ }
3496
+ ]
3497
+ },
3052
3498
  {
3053
3499
  "name": "set_paused",
3054
3500
  "discriminator": [
@@ -3537,6 +3983,34 @@
3537
3983
  }
3538
3984
  ]
3539
3985
  },
3986
+ {
3987
+ "name": "test_clear_active_list",
3988
+ "discriminator": [
3989
+ 17,
3990
+ 195,
3991
+ 59,
3992
+ 174,
3993
+ 184,
3994
+ 137,
3995
+ 149,
3996
+ 144
3997
+ ],
3998
+ "accounts": [
3999
+ {
4000
+ "name": "active_list",
4001
+ "writable": true
4002
+ },
4003
+ {
4004
+ "name": "processing_state",
4005
+ "writable": true
4006
+ },
4007
+ {
4008
+ "name": "authority",
4009
+ "signer": true
4010
+ }
4011
+ ],
4012
+ "args": []
4013
+ },
3540
4014
  {
3541
4015
  "name": "update_config_bool",
3542
4016
  "discriminator": [
@@ -4459,12 +4933,20 @@
4459
4933
  ],
4460
4934
  "type": "u8"
4461
4935
  },
4936
+ {
4937
+ "name": "aggregation_started_epoch",
4938
+ "docs": [
4939
+ "The epoch when the current aggregation batch started.",
4940
+ "Prevents stale partial accumulators from being committed if an epoch boundary is crossed mid-aggregation."
4941
+ ],
4942
+ "type": "u64"
4943
+ },
4462
4944
  {
4463
4945
  "name": "_reserved",
4464
4946
  "type": {
4465
4947
  "array": [
4466
4948
  "u8",
4467
- 31
4949
+ 23
4468
4950
  ]
4469
4951
  }
4470
4952
  }
@@ -6127,6 +6609,13 @@
6127
6609
  {
6128
6610
  "name": "bump",
6129
6611
  "type": "u8"
6612
+ },
6613
+ {
6614
+ "name": "tracked_balance",
6615
+ "docs": [
6616
+ "Last reconciled liqSOL token balance for this user ATA"
6617
+ ],
6618
+ "type": "u64"
6130
6619
  }
6131
6620
  ]
6132
6621
  }