@wireio/stake 0.1.0 → 0.1.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.
Files changed (104) hide show
  1. package/README.md +57 -0
  2. package/lib/stake.browser.js +11836 -4103
  3. package/lib/stake.browser.js.map +1 -1
  4. package/lib/stake.d.ts +374 -556
  5. package/lib/stake.js +12089 -4303
  6. package/lib/stake.js.map +1 -1
  7. package/lib/stake.m.js +11836 -4103
  8. package/lib/stake.m.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.dbg.json +4 -0
  11. package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.json +1153 -0
  12. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
  13. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.json +172 -0
  14. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
  15. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.json +39 -0
  16. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
  17. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.json +64 -0
  18. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthBurn.dbg.json +4 -0
  19. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthBurn.json +24 -0
  20. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthMint.dbg.json +4 -0
  21. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthMint.json +35 -0
  22. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
  23. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.json +213 -0
  24. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
  25. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.json +138 -0
  26. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
  27. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +70 -0
  28. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
  29. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +64 -0
  30. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
  31. package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.json +10 -0
  32. package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20.dbg.json +4 -0
  33. package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20.json +749 -0
  34. package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20Pausable.dbg.json +4 -0
  35. package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20Pausable.json +812 -0
  36. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.dbg.json +4 -0
  37. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.json +10 -0
  38. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.dbg.json +4 -0
  39. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.json +10 -0
  40. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.dbg.json +4 -0
  41. package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.json +225 -0
  42. package/src/assets/ethereum/ABI/liqEth/Yield.sol/BeaconRoots.dbg.json +4 -0
  43. package/src/assets/ethereum/ABI/liqEth/Yield.sol/BeaconRoots.json +10 -0
  44. package/src/assets/ethereum/ABI/liqEth/Yield.sol/SSZ.dbg.json +4 -0
  45. package/src/assets/ethereum/ABI/liqEth/Yield.sol/SSZ.json +10 -0
  46. package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.dbg.json +4 -0
  47. package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.json +813 -0
  48. package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.dbg.json +4 -0
  49. package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.json +651 -0
  50. package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.dbg.json +4 -0
  51. package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.json +1110 -0
  52. package/src/assets/ethereum/ABI/liqEth/liqEthBurn.sol/LiqEthBurn.dbg.json +4 -0
  53. package/src/assets/ethereum/ABI/liqEth/liqEthBurn.sol/LiqEthBurn.json +391 -0
  54. package/src/assets/ethereum/ABI/liqEth/liqEthMint.sol/LiqEthMint.dbg.json +4 -0
  55. package/src/assets/ethereum/ABI/liqEth/liqEthMint.sol/LiqEthMint.json +402 -0
  56. package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.dbg.json +4 -0
  57. package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.json +1225 -0
  58. package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +4 -0
  59. package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +927 -0
  60. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +4 -0
  61. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.json +10 -0
  62. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +4 -0
  63. package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.json +447 -0
  64. package/src/assets/solana/idl/liqsol_core.json +4239 -0
  65. package/src/assets/solana/idl/liqsol_token.json +183 -0
  66. package/src/assets/solana/idl/validator_leaderboard.json +270 -265
  67. package/src/assets/solana/types/liqsol_core.ts +4245 -0
  68. package/src/assets/solana/types/liqsol_token.ts +189 -0
  69. package/src/assets/solana/types/validator_leaderboard.ts +270 -265
  70. package/src/index.ts +1 -3
  71. package/src/networks/ethereum/contract.ts +101 -36
  72. package/src/networks/ethereum/ethereum.ts +141 -45
  73. package/src/networks/ethereum/types.ts +30 -2
  74. package/src/networks/solana/clients/deposit.client.ts +71 -109
  75. package/src/networks/solana/clients/distribution.client.ts +256 -383
  76. package/src/networks/solana/clients/leaderboard.client.ts +38 -133
  77. package/src/networks/solana/constants.ts +214 -130
  78. package/src/networks/solana/program.ts +25 -38
  79. package/src/networks/solana/solana.ts +120 -105
  80. package/src/networks/solana/types.ts +37 -47
  81. package/src/networks/solana/utils.ts +551 -0
  82. package/src/scripts/tsconfig.json +17 -0
  83. package/src/staker/staker.ts +10 -6
  84. package/src/staker/types.ts +14 -9
  85. package/src/assets/solana/idl/deposit.json +0 -296
  86. package/src/assets/solana/idl/distribution.json +0 -768
  87. package/src/assets/solana/idl/liq_sol_token.json +0 -298
  88. package/src/assets/solana/idl/mint_helper.json +0 -110
  89. package/src/assets/solana/idl/read_tracked_balance.json +0 -140
  90. package/src/assets/solana/idl/stake_controller.json +0 -2149
  91. package/src/assets/solana/idl/treasury.json +0 -110
  92. package/src/assets/solana/idl/validator_registry.json +0 -487
  93. package/src/assets/solana/idl/yield_oracle.json +0 -32
  94. package/src/assets/solana/types/deposit.ts +0 -302
  95. package/src/assets/solana/types/distribution.ts +0 -774
  96. package/src/assets/solana/types/liq_sol_token.ts +0 -304
  97. package/src/assets/solana/types/mint_helper.ts +0 -116
  98. package/src/assets/solana/types/read_tracked_balance.ts +0 -146
  99. package/src/assets/solana/types/stake_controller.ts +0 -2155
  100. package/src/assets/solana/types/stake_registry.ts +0 -441
  101. package/src/assets/solana/types/treasury.ts +0 -116
  102. package/src/assets/solana/types/validator_registry.ts +0 -493
  103. package/src/assets/solana/types/yield_oracle.ts +0 -38
  104. package/src/common/utils.ts +0 -9
@@ -1,296 +0,0 @@
1
- {
2
- "address": "GqksbjX3r7SHZ5e8c6nFyPecZNnBSUTYHbF8U2YDb5Qf",
3
- "metadata": {
4
- "name": "deposit",
5
- "version": "0.1.0",
6
- "spec": "0.1.0",
7
- "description": "Created with Anchor"
8
- },
9
- "instructions": [
10
- {
11
- "name": "deposit",
12
- "discriminator": [
13
- 242,
14
- 35,
15
- 198,
16
- 137,
17
- 82,
18
- 225,
19
- 242,
20
- 182
21
- ],
22
- "accounts": [
23
- {
24
- "name": "user",
25
- "writable": true,
26
- "signer": true
27
- },
28
- {
29
- "name": "program_authority",
30
- "writable": true,
31
- "pda": {
32
- "seeds": [
33
- {
34
- "kind": "const",
35
- "value": [
36
- 112,
37
- 114,
38
- 111,
39
- 103,
40
- 114,
41
- 97,
42
- 109,
43
- 95,
44
- 97,
45
- 117,
46
- 116,
47
- 104,
48
- 111,
49
- 114,
50
- 105,
51
- 116,
52
- 121
53
- ]
54
- }
55
- ]
56
- }
57
- },
58
- {
59
- "name": "system_program",
60
- "address": "11111111111111111111111111111111"
61
- },
62
- {
63
- "name": "token_program"
64
- },
65
- {
66
- "name": "associated_token_program",
67
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
68
- },
69
- {
70
- "name": "stake_controller_program",
71
- "address": "4Ab1SwV6RPUN5Btnf95qvQCyNVR3iHnXjnMYaKsgimTp"
72
- },
73
- {
74
- "name": "liqsol_program"
75
- },
76
- {
77
- "name": "pay_rate_history"
78
- },
79
- {
80
- "name": "stake_program",
81
- "address": "Stake11111111111111111111111111111111111111"
82
- },
83
- {
84
- "name": "distribution_program",
85
- "address": "26LF4typrWwBapujpvUPFpdfs4pBb6RwcWoBBy7Awf5j"
86
- },
87
- {
88
- "name": "liqsol_mint",
89
- "writable": true
90
- },
91
- {
92
- "name": "user_ata",
93
- "writable": true,
94
- "pda": {
95
- "seeds": [
96
- {
97
- "kind": "account",
98
- "path": "user"
99
- },
100
- {
101
- "kind": "account",
102
- "path": "token_program"
103
- },
104
- {
105
- "kind": "account",
106
- "path": "liqsol_mint"
107
- }
108
- ],
109
- "program": {
110
- "kind": "const",
111
- "value": [
112
- 140,
113
- 151,
114
- 37,
115
- 143,
116
- 78,
117
- 36,
118
- 137,
119
- 241,
120
- 187,
121
- 61,
122
- 16,
123
- 41,
124
- 20,
125
- 142,
126
- 13,
127
- 131,
128
- 11,
129
- 90,
130
- 19,
131
- 153,
132
- 218,
133
- 255,
134
- 16,
135
- 132,
136
- 4,
137
- 142,
138
- 123,
139
- 216,
140
- 219,
141
- 233,
142
- 248,
143
- 89
144
- ]
145
- }
146
- }
147
- },
148
- {
149
- "name": "liqsol_mint_authority"
150
- },
151
- {
152
- "name": "reserve_pool",
153
- "writable": true
154
- },
155
- {
156
- "name": "vault",
157
- "writable": true
158
- },
159
- {
160
- "name": "ephemeral_stake",
161
- "writable": true
162
- },
163
- {
164
- "name": "controller_state",
165
- "writable": true
166
- },
167
- {
168
- "name": "global_stake_info",
169
- "writable": true
170
- },
171
- {
172
- "name": "bucket_authority",
173
- "pda": {
174
- "seeds": [
175
- {
176
- "kind": "const",
177
- "value": [
178
- 108,
179
- 105,
180
- 113,
181
- 115,
182
- 111,
183
- 108,
184
- 95,
185
- 98,
186
- 117,
187
- 99,
188
- 107,
189
- 101,
190
- 116
191
- ]
192
- }
193
- ],
194
- "program": {
195
- "kind": "account",
196
- "path": "stake_controller_program"
197
- }
198
- }
199
- },
200
- {
201
- "name": "bucket_token_account",
202
- "docs": [
203
- "The bucket's associated token account"
204
- ],
205
- "writable": true
206
- },
207
- {
208
- "name": "user_record",
209
- "writable": true
210
- },
211
- {
212
- "name": "distribution_state",
213
- "writable": true
214
- },
215
- {
216
- "name": "instructions_sysvar",
217
- "address": "Sysvar1nstructions1111111111111111111111111"
218
- },
219
- {
220
- "name": "clock",
221
- "address": "SysvarC1ock11111111111111111111111111111111"
222
- },
223
- {
224
- "name": "stake_history",
225
- "address": "SysvarStakeHistory1111111111111111111111111"
226
- },
227
- {
228
- "name": "rent",
229
- "address": "SysvarRent111111111111111111111111111111111"
230
- }
231
- ],
232
- "args": [
233
- {
234
- "name": "amount",
235
- "type": "u64"
236
- },
237
- {
238
- "name": "seed",
239
- "type": "u32"
240
- }
241
- ]
242
- }
243
- ],
244
- "errors": [
245
- {
246
- "code": 6000,
247
- "name": "DepositTooSmall",
248
- "msg": "Deposit amount is below minimum required"
249
- },
250
- {
251
- "code": 6001,
252
- "name": "NotInitialized",
253
- "msg": "Deposit Router not initialized"
254
- },
255
- {
256
- "code": 6002,
257
- "name": "InvalidAuthority",
258
- "msg": "Invalid authority"
259
- },
260
- {
261
- "code": 6003,
262
- "name": "InsufficientFunds",
263
- "msg": "Insufficient funds"
264
- },
265
- {
266
- "code": 6004,
267
- "name": "Overflow",
268
- "msg": "Arithmetic overflow"
269
- },
270
- {
271
- "code": 6005,
272
- "name": "CalculationFailure",
273
- "msg": "Calculation failure"
274
- },
275
- {
276
- "code": 6006,
277
- "name": "NothingToMint",
278
- "msg": "Cannot mint zero tokens"
279
- },
280
- {
281
- "code": 6007,
282
- "name": "InvalidAccount",
283
- "msg": "Invalid account provided"
284
- },
285
- {
286
- "code": 6008,
287
- "name": "InsufficientFundsForStake",
288
- "msg": "Insufficient funds remaining after reserving fees to proceed with staking"
289
- },
290
- {
291
- "code": 6009,
292
- "name": "UnauthorizedProgram",
293
- "msg": "Unauthorized program attempting to call this instruction"
294
- }
295
- ]
296
- }