@strkfarm/sdk 1.0.17 → 1.0.19
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/dist/cli.js +276 -90
- package/dist/cli.mjs +270 -84
- package/dist/index.browser.global.js +27175 -18059
- package/dist/index.browser.mjs +8078 -1370
- package/dist/index.d.ts +211 -25
- package/dist/index.js +7773 -1035
- package/dist/index.mjs +8146 -1417
- package/package.json +4 -1
- package/src/data/cl-vault.abi.json +1434 -0
- package/src/data/ekubo-math.abi.json +333 -0
- package/src/data/ekubo-positions.abi.json +1594 -0
- package/src/data/erc20.abi.json +1122 -0
- package/src/data/erc4626.abi.json +1530 -0
- package/src/dataTypes/_bignumber.ts +53 -0
- package/src/dataTypes/address.ts +4 -0
- package/src/dataTypes/bignumber.browser.ts +8 -0
- package/src/dataTypes/bignumber.node.ts +22 -0
- package/src/dataTypes/bignumber.ts +1 -55
- package/src/dataTypes/index.ts +1 -1
- package/src/global.ts +54 -4
- package/src/interfaces/common.ts +64 -10
- package/src/interfaces/lending.ts +1 -1
- package/src/modules/avnu.ts +93 -0
- package/src/modules/erc20.ts +23 -0
- package/src/modules/index.ts +2 -0
- package/src/modules/pricer.ts +1 -1
- package/src/modules/zkLend.ts +2 -2
- package/src/node/headless.browser.ts +9 -0
- package/src/node/headless.node.ts +36 -0
- package/src/node/headless.ts +1 -0
- package/src/node/index.ts +2 -1
- package/src/strategies/base-strategy.ts +47 -0
- package/src/strategies/ekubo-cl-vault.ts +535 -0
- package/src/strategies/index.ts +2 -1
- package/src/strategies/vesu-rebalance.ts +123 -35
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "MathLibImpl",
|
|
4
|
+
"type": "impl",
|
|
5
|
+
"interface_name": "ekubo::interfaces::mathlib::IMathLib"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "core::integer::u256",
|
|
9
|
+
"type": "struct",
|
|
10
|
+
"members": [
|
|
11
|
+
{
|
|
12
|
+
"name": "low",
|
|
13
|
+
"type": "core::integer::u128"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "high",
|
|
17
|
+
"type": "core::integer::u128"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "core::bool",
|
|
23
|
+
"type": "enum",
|
|
24
|
+
"variants": [
|
|
25
|
+
{
|
|
26
|
+
"name": "False",
|
|
27
|
+
"type": "()"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "True",
|
|
31
|
+
"type": "()"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "ekubo::types::i129::i129",
|
|
37
|
+
"type": "struct",
|
|
38
|
+
"members": [
|
|
39
|
+
{
|
|
40
|
+
"name": "mag",
|
|
41
|
+
"type": "core::integer::u128"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "sign",
|
|
45
|
+
"type": "core::bool"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "ekubo::types::delta::Delta",
|
|
51
|
+
"type": "struct",
|
|
52
|
+
"members": [
|
|
53
|
+
{
|
|
54
|
+
"name": "amount0",
|
|
55
|
+
"type": "ekubo::types::i129::i129"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "amount1",
|
|
59
|
+
"type": "ekubo::types::i129::i129"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "core::option::Option::<core::integer::u256>",
|
|
65
|
+
"type": "enum",
|
|
66
|
+
"variants": [
|
|
67
|
+
{
|
|
68
|
+
"name": "Some",
|
|
69
|
+
"type": "core::integer::u256"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "None",
|
|
73
|
+
"type": "()"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "ekubo::interfaces::mathlib::IMathLib",
|
|
79
|
+
"type": "interface",
|
|
80
|
+
"items": [
|
|
81
|
+
{
|
|
82
|
+
"name": "amount0_delta",
|
|
83
|
+
"type": "function",
|
|
84
|
+
"inputs": [
|
|
85
|
+
{
|
|
86
|
+
"name": "sqrt_ratio_a",
|
|
87
|
+
"type": "core::integer::u256"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "sqrt_ratio_b",
|
|
91
|
+
"type": "core::integer::u256"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "liquidity",
|
|
95
|
+
"type": "core::integer::u128"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "round_up",
|
|
99
|
+
"type": "core::bool"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"outputs": [
|
|
103
|
+
{
|
|
104
|
+
"type": "core::integer::u128"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"state_mutability": "view"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "amount1_delta",
|
|
111
|
+
"type": "function",
|
|
112
|
+
"inputs": [
|
|
113
|
+
{
|
|
114
|
+
"name": "sqrt_ratio_a",
|
|
115
|
+
"type": "core::integer::u256"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "sqrt_ratio_b",
|
|
119
|
+
"type": "core::integer::u256"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "liquidity",
|
|
123
|
+
"type": "core::integer::u128"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "round_up",
|
|
127
|
+
"type": "core::bool"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"outputs": [
|
|
131
|
+
{
|
|
132
|
+
"type": "core::integer::u128"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"state_mutability": "view"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "liquidity_delta_to_amount_delta",
|
|
139
|
+
"type": "function",
|
|
140
|
+
"inputs": [
|
|
141
|
+
{
|
|
142
|
+
"name": "sqrt_ratio",
|
|
143
|
+
"type": "core::integer::u256"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "liquidity_delta",
|
|
147
|
+
"type": "ekubo::types::i129::i129"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "sqrt_ratio_lower",
|
|
151
|
+
"type": "core::integer::u256"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "sqrt_ratio_upper",
|
|
155
|
+
"type": "core::integer::u256"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"outputs": [
|
|
159
|
+
{
|
|
160
|
+
"type": "ekubo::types::delta::Delta"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"state_mutability": "view"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "max_liquidity_for_token0",
|
|
167
|
+
"type": "function",
|
|
168
|
+
"inputs": [
|
|
169
|
+
{
|
|
170
|
+
"name": "sqrt_ratio_lower",
|
|
171
|
+
"type": "core::integer::u256"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "sqrt_ratio_upper",
|
|
175
|
+
"type": "core::integer::u256"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "amount",
|
|
179
|
+
"type": "core::integer::u128"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"outputs": [
|
|
183
|
+
{
|
|
184
|
+
"type": "core::integer::u128"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"state_mutability": "view"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "max_liquidity_for_token1",
|
|
191
|
+
"type": "function",
|
|
192
|
+
"inputs": [
|
|
193
|
+
{
|
|
194
|
+
"name": "sqrt_ratio_lower",
|
|
195
|
+
"type": "core::integer::u256"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "sqrt_ratio_upper",
|
|
199
|
+
"type": "core::integer::u256"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "amount",
|
|
203
|
+
"type": "core::integer::u128"
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"outputs": [
|
|
207
|
+
{
|
|
208
|
+
"type": "core::integer::u128"
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"state_mutability": "view"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "max_liquidity",
|
|
215
|
+
"type": "function",
|
|
216
|
+
"inputs": [
|
|
217
|
+
{
|
|
218
|
+
"name": "sqrt_ratio",
|
|
219
|
+
"type": "core::integer::u256"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "sqrt_ratio_lower",
|
|
223
|
+
"type": "core::integer::u256"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "sqrt_ratio_upper",
|
|
227
|
+
"type": "core::integer::u256"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "amount0",
|
|
231
|
+
"type": "core::integer::u128"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "amount1",
|
|
235
|
+
"type": "core::integer::u128"
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"outputs": [
|
|
239
|
+
{
|
|
240
|
+
"type": "core::integer::u128"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"state_mutability": "view"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "next_sqrt_ratio_from_amount0",
|
|
247
|
+
"type": "function",
|
|
248
|
+
"inputs": [
|
|
249
|
+
{
|
|
250
|
+
"name": "sqrt_ratio",
|
|
251
|
+
"type": "core::integer::u256"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "liquidity",
|
|
255
|
+
"type": "core::integer::u128"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "amount",
|
|
259
|
+
"type": "ekubo::types::i129::i129"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"outputs": [
|
|
263
|
+
{
|
|
264
|
+
"type": "core::option::Option::<core::integer::u256>"
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"state_mutability": "view"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "next_sqrt_ratio_from_amount1",
|
|
271
|
+
"type": "function",
|
|
272
|
+
"inputs": [
|
|
273
|
+
{
|
|
274
|
+
"name": "sqrt_ratio",
|
|
275
|
+
"type": "core::integer::u256"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "liquidity",
|
|
279
|
+
"type": "core::integer::u128"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "amount",
|
|
283
|
+
"type": "ekubo::types::i129::i129"
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"outputs": [
|
|
287
|
+
{
|
|
288
|
+
"type": "core::option::Option::<core::integer::u256>"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"state_mutability": "view"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "tick_to_sqrt_ratio",
|
|
295
|
+
"type": "function",
|
|
296
|
+
"inputs": [
|
|
297
|
+
{
|
|
298
|
+
"name": "tick",
|
|
299
|
+
"type": "ekubo::types::i129::i129"
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
"outputs": [
|
|
303
|
+
{
|
|
304
|
+
"type": "core::integer::u256"
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"state_mutability": "view"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "sqrt_ratio_to_tick",
|
|
311
|
+
"type": "function",
|
|
312
|
+
"inputs": [
|
|
313
|
+
{
|
|
314
|
+
"name": "sqrt_ratio",
|
|
315
|
+
"type": "core::integer::u256"
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
"outputs": [
|
|
319
|
+
{
|
|
320
|
+
"type": "ekubo::types::i129::i129"
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
"state_mutability": "view"
|
|
324
|
+
}
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"kind": "enum",
|
|
329
|
+
"name": "ekubo::mathlib::MathLib::Event",
|
|
330
|
+
"type": "event",
|
|
331
|
+
"variants": []
|
|
332
|
+
}
|
|
333
|
+
]
|