@wireio/stake 0.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.
Files changed (48) hide show
  1. package/LICENSE.md +114 -0
  2. package/README.md +28 -0
  3. package/lib/stake.browser.js +6875 -0
  4. package/lib/stake.browser.js.map +1 -0
  5. package/lib/stake.d.ts +6759 -0
  6. package/lib/stake.js +7178 -0
  7. package/lib/stake.js.map +1 -0
  8. package/lib/stake.m.js +6875 -0
  9. package/lib/stake.m.js.map +1 -0
  10. package/package.json +102 -0
  11. package/src/assets/ethereum/ABI/token/ERC1155Token.sol/ERC1155Token.dbg.json +4 -0
  12. package/src/assets/ethereum/ABI/token/ERC1155Token.sol/ERC1155Token.json +472 -0
  13. package/src/assets/ethereum/ABI/token/ERC20Token.sol/ERC20Token.dbg.json +4 -0
  14. package/src/assets/ethereum/ABI/token/ERC20Token.sol/ERC20Token.json +330 -0
  15. package/src/assets/ethereum/ABI/token/ERC721Token.sol/ERC721Token.dbg.json +4 -0
  16. package/src/assets/ethereum/ABI/token/ERC721Token.sol/ERC721Token.json +449 -0
  17. package/src/assets/solana/idl/deposit.json +260 -0
  18. package/src/assets/solana/idl/distribution.json +736 -0
  19. package/src/assets/solana/idl/liq_sol_token.json +275 -0
  20. package/src/assets/solana/idl/stake_controller.json +1788 -0
  21. package/src/assets/solana/idl/stake_registry.json +435 -0
  22. package/src/assets/solana/idl/treasury.json +336 -0
  23. package/src/assets/solana/idl/validator_leaderboard.json +528 -0
  24. package/src/assets/solana/idl/validator_registry.json +418 -0
  25. package/src/assets/solana/idl/yield_oracle.json +32 -0
  26. package/src/assets/solana/types/deposit.ts +266 -0
  27. package/src/assets/solana/types/distribution.ts +742 -0
  28. package/src/assets/solana/types/liq_sol_token.ts +281 -0
  29. package/src/assets/solana/types/stake_controller.ts +1794 -0
  30. package/src/assets/solana/types/stake_registry.ts +441 -0
  31. package/src/assets/solana/types/treasury.ts +342 -0
  32. package/src/assets/solana/types/validator_leaderboard.ts +534 -0
  33. package/src/assets/solana/types/validator_registry.ts +424 -0
  34. package/src/assets/solana/types/yield_oracle.ts +38 -0
  35. package/src/index.ts +21 -0
  36. package/src/networks/ethereum/contract.ts +167 -0
  37. package/src/networks/ethereum/ethereum.ts +64 -0
  38. package/src/networks/ethereum/types.ts +6 -0
  39. package/src/networks/solana/clients/deposit.client.ts +178 -0
  40. package/src/networks/solana/clients/distribution.client.ts +230 -0
  41. package/src/networks/solana/clients/leaderboard.client.ts +179 -0
  42. package/src/networks/solana/constants.ts +73 -0
  43. package/src/networks/solana/program.ts +113 -0
  44. package/src/networks/solana/solana.ts +84 -0
  45. package/src/networks/solana/utils.ts +122 -0
  46. package/src/staker/staker.ts +38 -0
  47. package/src/staker/types.ts +26 -0
  48. package/src/utils.ts +9 -0
@@ -0,0 +1,275 @@
1
+ {
2
+ "address": "4XtXy6aa2VCi6GN2Vnj3F5GfGG2qbVhBz2DpDSy8MF4X",
3
+ "metadata": {
4
+ "name": "liq_sol_token",
5
+ "version": "0.1.0",
6
+ "spec": "0.1.0",
7
+ "description": "Liquidity Staking Token Program"
8
+ },
9
+ "instructions": [
10
+ {
11
+ "name": "create_mint_account",
12
+ "discriminator": [
13
+ 76,
14
+ 184,
15
+ 50,
16
+ 62,
17
+ 162,
18
+ 141,
19
+ 47,
20
+ 103
21
+ ],
22
+ "accounts": [
23
+ {
24
+ "name": "payer",
25
+ "writable": true,
26
+ "signer": true
27
+ },
28
+ {
29
+ "name": "mint_authority",
30
+ "pda": {
31
+ "seeds": [
32
+ {
33
+ "kind": "const",
34
+ "value": [
35
+ 109,
36
+ 105,
37
+ 110,
38
+ 116,
39
+ 95,
40
+ 97,
41
+ 117,
42
+ 116,
43
+ 104,
44
+ 111,
45
+ 114,
46
+ 105,
47
+ 116,
48
+ 121
49
+ ]
50
+ }
51
+ ]
52
+ }
53
+ },
54
+ {
55
+ "name": "receiver"
56
+ },
57
+ {
58
+ "name": "mint",
59
+ "writable": true,
60
+ "signer": true
61
+ },
62
+ {
63
+ "name": "mint_token_account",
64
+ "writable": true,
65
+ "pda": {
66
+ "seeds": [
67
+ {
68
+ "kind": "account",
69
+ "path": "receiver"
70
+ },
71
+ {
72
+ "kind": "account",
73
+ "path": "token_program"
74
+ },
75
+ {
76
+ "kind": "account",
77
+ "path": "mint"
78
+ }
79
+ ],
80
+ "program": {
81
+ "kind": "const",
82
+ "value": [
83
+ 140,
84
+ 151,
85
+ 37,
86
+ 143,
87
+ 78,
88
+ 36,
89
+ 137,
90
+ 241,
91
+ 187,
92
+ 61,
93
+ 16,
94
+ 41,
95
+ 20,
96
+ 142,
97
+ 13,
98
+ 131,
99
+ 11,
100
+ 90,
101
+ 19,
102
+ 153,
103
+ 218,
104
+ 255,
105
+ 16,
106
+ 132,
107
+ 4,
108
+ 142,
109
+ 123,
110
+ 216,
111
+ 219,
112
+ 233,
113
+ 248,
114
+ 89
115
+ ]
116
+ }
117
+ }
118
+ },
119
+ {
120
+ "name": "system_program",
121
+ "address": "11111111111111111111111111111111"
122
+ },
123
+ {
124
+ "name": "associated_token_program",
125
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
126
+ },
127
+ {
128
+ "name": "token_program",
129
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
130
+ }
131
+ ],
132
+ "args": [
133
+ {
134
+ "name": "args",
135
+ "type": {
136
+ "defined": {
137
+ "name": "CreateMintAccountArgs"
138
+ }
139
+ }
140
+ }
141
+ ]
142
+ },
143
+ {
144
+ "name": "mint_for_authorized_program",
145
+ "discriminator": [
146
+ 116,
147
+ 208,
148
+ 64,
149
+ 189,
150
+ 2,
151
+ 60,
152
+ 50,
153
+ 41
154
+ ],
155
+ "accounts": [
156
+ {
157
+ "name": "mint",
158
+ "writable": true
159
+ },
160
+ {
161
+ "name": "recipient_token_account",
162
+ "writable": true
163
+ },
164
+ {
165
+ "name": "program_authority",
166
+ "docs": [
167
+ "This must be a PDA controlled by the calling program (deposit or distribution)"
168
+ ],
169
+ "writable": true,
170
+ "signer": true
171
+ },
172
+ {
173
+ "name": "mint_authority",
174
+ "pda": {
175
+ "seeds": [
176
+ {
177
+ "kind": "const",
178
+ "value": [
179
+ 109,
180
+ 105,
181
+ 110,
182
+ 116,
183
+ 95,
184
+ 97,
185
+ 117,
186
+ 116,
187
+ 104,
188
+ 111,
189
+ 114,
190
+ 105,
191
+ 116,
192
+ 121
193
+ ]
194
+ }
195
+ ]
196
+ }
197
+ },
198
+ {
199
+ "name": "instructions",
200
+ "address": "Sysvar1nstructions1111111111111111111111111"
201
+ },
202
+ {
203
+ "name": "token_program",
204
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
205
+ }
206
+ ],
207
+ "args": [
208
+ {
209
+ "name": "args",
210
+ "type": {
211
+ "defined": {
212
+ "name": "MintTokenArgs"
213
+ }
214
+ }
215
+ }
216
+ ]
217
+ }
218
+ ],
219
+ "errors": [
220
+ {
221
+ "code": 6000,
222
+ "name": "InvalidMintAuthority",
223
+ "msg": "Invalid mint authority"
224
+ },
225
+ {
226
+ "code": 6001,
227
+ "name": "UnauthorizedProgram",
228
+ "msg": "Unauthorized program attempting to mint"
229
+ },
230
+ {
231
+ "code": 6002,
232
+ "name": "CannotDetermineCallingProgram",
233
+ "msg": "Cannot determine calling program"
234
+ },
235
+ {
236
+ "code": 6003,
237
+ "name": "DirectCallNotAllowed",
238
+ "msg": "Direct calls not allowed, must be called via CPI"
239
+ }
240
+ ],
241
+ "types": [
242
+ {
243
+ "name": "CreateMintAccountArgs",
244
+ "type": {
245
+ "kind": "struct",
246
+ "fields": [
247
+ {
248
+ "name": "name",
249
+ "type": "string"
250
+ },
251
+ {
252
+ "name": "symbol",
253
+ "type": "string"
254
+ },
255
+ {
256
+ "name": "uri",
257
+ "type": "string"
258
+ }
259
+ ]
260
+ }
261
+ },
262
+ {
263
+ "name": "MintTokenArgs",
264
+ "type": {
265
+ "kind": "struct",
266
+ "fields": [
267
+ {
268
+ "name": "amount",
269
+ "type": "u64"
270
+ }
271
+ ]
272
+ }
273
+ }
274
+ ]
275
+ }