@wireio/stake 0.1.0 → 0.1.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 (50) hide show
  1. package/README.md +57 -0
  2. package/lib/stake.browser.js +4623 -3451
  3. package/lib/stake.browser.js.map +1 -1
  4. package/lib/stake.d.ts +372 -537
  5. package/lib/stake.js +4801 -3574
  6. package/lib/stake.js.map +1 -1
  7. package/lib/stake.m.js +4623 -3451
  8. package/lib/stake.m.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/assets/solana/idl/liqsol_core.json +4239 -0
  11. package/src/assets/solana/idl/liqsol_token.json +183 -0
  12. package/src/assets/solana/idl/validator_leaderboard.json +270 -265
  13. package/src/assets/solana/types/liqsol_core.ts +4245 -0
  14. package/src/assets/solana/types/liqsol_token.ts +189 -0
  15. package/src/assets/solana/types/validator_leaderboard.ts +270 -265
  16. package/src/index.ts +1 -3
  17. package/src/networks/ethereum/contract.ts +138 -36
  18. package/src/networks/ethereum/ethereum.ts +167 -38
  19. package/src/networks/ethereum/types.ts +32 -1
  20. package/src/networks/solana/clients/deposit.client.ts +71 -109
  21. package/src/networks/solana/clients/distribution.client.ts +256 -383
  22. package/src/networks/solana/clients/leaderboard.client.ts +38 -133
  23. package/src/networks/solana/constants.ts +214 -130
  24. package/src/networks/solana/program.ts +25 -38
  25. package/src/networks/solana/solana.ts +100 -89
  26. package/src/networks/solana/types.ts +37 -47
  27. package/src/networks/solana/utils.ts +551 -0
  28. package/src/scripts/tsconfig.json +17 -0
  29. package/src/staker/staker.ts +5 -4
  30. package/src/staker/types.ts +2 -2
  31. package/src/assets/solana/idl/deposit.json +0 -296
  32. package/src/assets/solana/idl/distribution.json +0 -768
  33. package/src/assets/solana/idl/liq_sol_token.json +0 -298
  34. package/src/assets/solana/idl/mint_helper.json +0 -110
  35. package/src/assets/solana/idl/read_tracked_balance.json +0 -140
  36. package/src/assets/solana/idl/stake_controller.json +0 -2149
  37. package/src/assets/solana/idl/treasury.json +0 -110
  38. package/src/assets/solana/idl/validator_registry.json +0 -487
  39. package/src/assets/solana/idl/yield_oracle.json +0 -32
  40. package/src/assets/solana/types/deposit.ts +0 -302
  41. package/src/assets/solana/types/distribution.ts +0 -774
  42. package/src/assets/solana/types/liq_sol_token.ts +0 -304
  43. package/src/assets/solana/types/mint_helper.ts +0 -116
  44. package/src/assets/solana/types/read_tracked_balance.ts +0 -146
  45. package/src/assets/solana/types/stake_controller.ts +0 -2155
  46. package/src/assets/solana/types/stake_registry.ts +0 -441
  47. package/src/assets/solana/types/treasury.ts +0 -116
  48. package/src/assets/solana/types/validator_registry.ts +0 -493
  49. package/src/assets/solana/types/yield_oracle.ts +0 -38
  50. package/src/common/utils.ts +0 -9
@@ -0,0 +1,183 @@
1
+ {
2
+ "address": "AY6sWK1dt23rkAiqiETwaEcbjhJCwb5cNC6hVWadZLFf",
3
+ "metadata": {
4
+ "name": "liqsol_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
+ },
31
+ {
32
+ "name": "receiver"
33
+ },
34
+ {
35
+ "name": "mint",
36
+ "docs": [
37
+ "The mint PDA - deterministic address for liqSOL token"
38
+ ],
39
+ "writable": true
40
+ },
41
+ {
42
+ "name": "mint_token_account",
43
+ "writable": true
44
+ },
45
+ {
46
+ "name": "system_program"
47
+ },
48
+ {
49
+ "name": "associated_token_program"
50
+ },
51
+ {
52
+ "name": "token_program"
53
+ }
54
+ ],
55
+ "args": [
56
+ {
57
+ "name": "args",
58
+ "type": {
59
+ "defined": {
60
+ "name": "CreateMintAccountArgs"
61
+ }
62
+ }
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "mint_for_authorized_program",
68
+ "discriminator": [
69
+ 116,
70
+ 208,
71
+ 64,
72
+ 189,
73
+ 2,
74
+ 60,
75
+ 50,
76
+ 41
77
+ ],
78
+ "accounts": [
79
+ {
80
+ "name": "mint",
81
+ "writable": true
82
+ },
83
+ {
84
+ "name": "recipient_token_account",
85
+ "writable": true
86
+ },
87
+ {
88
+ "name": "program_authority",
89
+ "docs": [
90
+ "The calling program's authority PDA that proves authorization to mint"
91
+ ],
92
+ "writable": true,
93
+ "signer": true
94
+ },
95
+ {
96
+ "name": "mint_authority"
97
+ },
98
+ {
99
+ "name": "instructions"
100
+ },
101
+ {
102
+ "name": "token_program"
103
+ }
104
+ ],
105
+ "args": [
106
+ {
107
+ "name": "args",
108
+ "type": {
109
+ "defined": {
110
+ "name": "MintTokenArgs"
111
+ }
112
+ }
113
+ }
114
+ ]
115
+ }
116
+ ],
117
+ "errors": [
118
+ {
119
+ "code": 6000,
120
+ "name": "InvalidMintAuthority",
121
+ "msg": "Invalid mint authority"
122
+ },
123
+ {
124
+ "code": 6001,
125
+ "name": "UnauthorizedProgram",
126
+ "msg": "Unauthorized program attempting to mint"
127
+ },
128
+ {
129
+ "code": 6002,
130
+ "name": "CannotDetermineCallingProgram",
131
+ "msg": "Cannot determine calling program"
132
+ },
133
+ {
134
+ "code": 6003,
135
+ "name": "DirectCallNotAllowed",
136
+ "msg": "Direct calls not allowed, must be called via CPI"
137
+ },
138
+ {
139
+ "code": 6004,
140
+ "name": "InvalidProgramId",
141
+ "msg": "Invalid program ID"
142
+ },
143
+ {
144
+ "code": 6005,
145
+ "name": "UnauthorizedAuthority",
146
+ "msg": "Unauthorized authority PDA"
147
+ }
148
+ ],
149
+ "types": [
150
+ {
151
+ "name": "CreateMintAccountArgs",
152
+ "type": {
153
+ "kind": "struct",
154
+ "fields": [
155
+ {
156
+ "name": "name",
157
+ "type": "string"
158
+ },
159
+ {
160
+ "name": "symbol",
161
+ "type": "string"
162
+ },
163
+ {
164
+ "name": "uri",
165
+ "type": "string"
166
+ }
167
+ ]
168
+ }
169
+ },
170
+ {
171
+ "name": "MintTokenArgs",
172
+ "type": {
173
+ "kind": "struct",
174
+ "fields": [
175
+ {
176
+ "name": "amount",
177
+ "type": "u64"
178
+ }
179
+ ]
180
+ }
181
+ }
182
+ ]
183
+ }