@steerprotocol/strategy-utils 3.1.1 → 3.2.0
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/.github/workflows/nodejs.yml +12 -12
- package/.vscode/settings.json +6 -0
- package/CHANGELOG.md +3 -45
- package/asconfig.json +11 -9
- package/assembly/index.ts +1 -0
- package/assembly/panoptic/host.ts +285 -0
- package/assembly/panoptic/index.ts +3 -0
- package/assembly/panoptic/methods.ts +64 -0
- package/assembly/panoptic/types.ts +911 -0
- package/assembly/utils/Math.ts +12 -17
- package/assembly/utils/MovingAverages.ts +26 -19
- package/assembly/utils/Ranges.ts +15 -15
- package/assembly/utils/UniswapLiquidityUtils.ts +48 -0
- package/assembly/utils/index.ts +1 -3
- package/assembly/utils/types/Position.ts +0 -3
- package/assembly/utils/types/Price.ts +54 -0
- package/assembly/utils/types/index.ts +1 -4
- package/index.js +3 -14
- package/package.json +10 -14
- package/scripts/build-docs.js +68 -0
- package/tests/fixtures/json-compat.ts +30 -0
- package/tests/fixtures/panoptic-consumer.ts +24 -0
- package/tests/index.test.ts +55 -227
- package/assembly/utils/CandleGenerator.ts +0 -60
- package/assembly/utils/MarketFeedAggregator.ts +0 -140
- package/assembly/utils/SlidingWindow.ts +0 -59
- package/assembly/utils/env.ts +0 -23
- package/assembly/utils/triggers.ts +0 -438
- package/assembly/utils/types/Candle.ts +0 -39
- package/assembly/utils/types/DataConnectorConfig.ts +0 -7
- package/assembly/utils/types/ExecutionContext.ts +0 -11
- package/assembly/utils/types/RawTradeData.ts +0 -14
- package/index.html +0 -10
- package/readme.md +0 -387
- package/tests/debug.wasm +0 -0
- package/tests/utils.ts +0 -607
|
@@ -0,0 +1,911 @@
|
|
|
1
|
+
@serializable
|
|
2
|
+
export class PanopticContextDto {
|
|
3
|
+
chainId: string = "";
|
|
4
|
+
sourceId: string = "";
|
|
5
|
+
blockNumber: string = "";
|
|
6
|
+
account: string = "";
|
|
7
|
+
panopticSubgraphId: string = "";
|
|
8
|
+
rpcUrl: string = "";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@serializable
|
|
12
|
+
export class PanopticSourceMetaDto {
|
|
13
|
+
chainId: string = "";
|
|
14
|
+
blockNumber: string = "";
|
|
15
|
+
preflightBlockNumber: string = "";
|
|
16
|
+
rpcSourceId: string = "";
|
|
17
|
+
subgraphSourceId: string = "";
|
|
18
|
+
subgraphBlockNumber: string = "";
|
|
19
|
+
blockNumberRole: string = "";
|
|
20
|
+
reconciled: bool = false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@serializable
|
|
24
|
+
export class PanopticEmptyArgsDto {}
|
|
25
|
+
|
|
26
|
+
@serializable
|
|
27
|
+
export class PanopticErrorDto {
|
|
28
|
+
code: string = "";
|
|
29
|
+
message: string = "";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@serializable
|
|
33
|
+
export class PanopticStringEnvelopeDto {
|
|
34
|
+
ok: bool = false;
|
|
35
|
+
result: string = "";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@serializable
|
|
39
|
+
export class PanopticStringArrayEnvelopeDto {
|
|
40
|
+
ok: bool = false;
|
|
41
|
+
result: string[] = [];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@serializable
|
|
45
|
+
export class PanopticPoolMetadataDto {
|
|
46
|
+
poolKeyBytes: string = "";
|
|
47
|
+
poolId: string = "";
|
|
48
|
+
collateralToken0Address: string = "";
|
|
49
|
+
collateralToken1Address: string = "";
|
|
50
|
+
riskEngineAddress: string = "";
|
|
51
|
+
token0Asset: string = "";
|
|
52
|
+
token1Asset: string = "";
|
|
53
|
+
token0Symbol: string = "";
|
|
54
|
+
token1Symbol: string = "";
|
|
55
|
+
token0Decimals: string = "";
|
|
56
|
+
token1Decimals: string = "";
|
|
57
|
+
token0Name: string = "";
|
|
58
|
+
token1Name: string = "";
|
|
59
|
+
underlyingPoolId: string = "";
|
|
60
|
+
isV4: bool = false;
|
|
61
|
+
tickSpacing: string = "";
|
|
62
|
+
fee: string = "";
|
|
63
|
+
sfpmAddress: string = "";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@serializable
|
|
67
|
+
export class PanopticPoolAddressesDto {
|
|
68
|
+
collateralToken0: string = "";
|
|
69
|
+
collateralToken1: string = "";
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@serializable
|
|
73
|
+
export class PanopticPoolReadArgsDto {
|
|
74
|
+
poolAddress: string = "";
|
|
75
|
+
poolMetadata: PanopticPoolMetadataDto | null = null;
|
|
76
|
+
stateViewAddress: string = "";
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@serializable
|
|
80
|
+
export class PanopticPoolReadRequestDto {
|
|
81
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
82
|
+
args: PanopticPoolReadArgsDto = new PanopticPoolReadArgsDto();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@serializable
|
|
86
|
+
export class PanopticPoolResultDto {
|
|
87
|
+
poolId: string = "";
|
|
88
|
+
token0: string = "";
|
|
89
|
+
token1: string = "";
|
|
90
|
+
currentTick: string = "";
|
|
91
|
+
source: PanopticSourceMetaDto | null = null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@serializable
|
|
95
|
+
export class PanopticPoolEnvelopeDto {
|
|
96
|
+
ok: bool = false;
|
|
97
|
+
result: PanopticPoolResultDto = new PanopticPoolResultDto();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@serializable
|
|
101
|
+
export class PoolGetTickSpacingArgsDto {
|
|
102
|
+
feeBps: string = "";
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@serializable
|
|
106
|
+
export class PoolGetTickSpacingRequestDto {
|
|
107
|
+
args: PoolGetTickSpacingArgsDto = new PoolGetTickSpacingArgsDto();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@serializable
|
|
111
|
+
export class PoolGetPricesAtTickArgsDto {
|
|
112
|
+
tick: string = "";
|
|
113
|
+
decimals0: string = "";
|
|
114
|
+
decimals1: string = "";
|
|
115
|
+
precision: string = "";
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@serializable
|
|
119
|
+
export class PoolGetPricesAtTickRequestDto {
|
|
120
|
+
args: PoolGetPricesAtTickArgsDto = new PoolGetPricesAtTickArgsDto();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@serializable
|
|
124
|
+
export class PoolPricesAtTickResultDto {
|
|
125
|
+
price0: string = "";
|
|
126
|
+
price1: string = "";
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@serializable
|
|
130
|
+
export class PoolPricesAtTickEnvelopeDto {
|
|
131
|
+
ok: bool = false;
|
|
132
|
+
result: PoolPricesAtTickResultDto = new PoolPricesAtTickResultDto();
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@serializable
|
|
136
|
+
export class PoolRiskParametersArgsDto {
|
|
137
|
+
poolAddress: string = "";
|
|
138
|
+
builderCode: string = "";
|
|
139
|
+
riskEngineAddress: string = "";
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@serializable
|
|
143
|
+
export class PoolRiskParametersRequestDto {
|
|
144
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
145
|
+
args: PoolRiskParametersArgsDto = new PoolRiskParametersArgsDto();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@serializable
|
|
149
|
+
export class PoolUtilizationArgsDto {
|
|
150
|
+
poolAddress: string = "";
|
|
151
|
+
collateralAddresses: PanopticPoolAddressesDto = new PanopticPoolAddressesDto();
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@serializable
|
|
155
|
+
export class PoolUtilizationRequestDto {
|
|
156
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
157
|
+
args: PoolUtilizationArgsDto = new PoolUtilizationArgsDto();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@serializable
|
|
161
|
+
export class PoolMetadataEnvelopeDto {
|
|
162
|
+
ok: bool = false;
|
|
163
|
+
result: PanopticPoolMetadataDto = new PanopticPoolMetadataDto();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@serializable
|
|
167
|
+
export class AccountBaseArgsDto {
|
|
168
|
+
poolAddress: string = "";
|
|
169
|
+
poolMetadata: PanopticPoolMetadataDto | null = null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@serializable
|
|
173
|
+
export class AccountTokenIdArgsDto extends AccountBaseArgsDto {
|
|
174
|
+
tokenId: string = "";
|
|
175
|
+
atTick: string = "";
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@serializable
|
|
179
|
+
export class AccountTokenIdsArgsDto extends AccountBaseArgsDto {
|
|
180
|
+
tokenIds: string[] = [];
|
|
181
|
+
queryAddress: string = "";
|
|
182
|
+
atTick: string = "";
|
|
183
|
+
atTicks: string[] = [];
|
|
184
|
+
includePendingPremium: bool = false;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@serializable
|
|
188
|
+
export class AccountOpenPositionIdsArgsDto extends AccountBaseArgsDto {
|
|
189
|
+
lastDispatchTxHash: string = "";
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@serializable
|
|
193
|
+
export class AccountCollateralArgsDto extends AccountBaseArgsDto {
|
|
194
|
+
collateralAddresses: PanopticPoolAddressesDto = new PanopticPoolAddressesDto();
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@serializable
|
|
198
|
+
export class AccountTokenIdRequestDto {
|
|
199
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
200
|
+
args: AccountTokenIdArgsDto = new AccountTokenIdArgsDto();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@serializable
|
|
204
|
+
export class AccountTokenIdsRequestDto {
|
|
205
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
206
|
+
args: AccountTokenIdsArgsDto = new AccountTokenIdsArgsDto();
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@serializable
|
|
210
|
+
export class AccountOpenPositionIdsRequestDto {
|
|
211
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
212
|
+
args: AccountOpenPositionIdsArgsDto = new AccountOpenPositionIdsArgsDto();
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@serializable
|
|
216
|
+
export class AccountCollateralRequestDto {
|
|
217
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
218
|
+
args: AccountCollateralArgsDto = new AccountCollateralArgsDto();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@serializable
|
|
222
|
+
export class AccountPositionDto {
|
|
223
|
+
tokenId: string = "";
|
|
224
|
+
positionSize: string = "";
|
|
225
|
+
tickAtMint: string = "";
|
|
226
|
+
source: PanopticSourceMetaDto | null = null;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@serializable
|
|
230
|
+
export class AccountPositionEnvelopeDto {
|
|
231
|
+
ok: bool = false;
|
|
232
|
+
result: AccountPositionDto = new AccountPositionDto();
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@serializable
|
|
236
|
+
export class AccountPositionsResultDto {
|
|
237
|
+
positions: AccountPositionDto[] = [];
|
|
238
|
+
source: PanopticSourceMetaDto | null = null;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@serializable
|
|
242
|
+
export class AccountPositionsEnvelopeDto {
|
|
243
|
+
ok: bool = false;
|
|
244
|
+
result: AccountPositionsResultDto = new AccountPositionsResultDto();
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@serializable
|
|
248
|
+
export class AccountOpenPositionIdsResultDto {
|
|
249
|
+
tokenIds: string[] = [];
|
|
250
|
+
source: PanopticSourceMetaDto | null = null;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@serializable
|
|
254
|
+
export class AccountOpenPositionIdsEnvelopeDto {
|
|
255
|
+
ok: bool = false;
|
|
256
|
+
result: AccountOpenPositionIdsResultDto = new AccountOpenPositionIdsResultDto();
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@serializable
|
|
260
|
+
export class TokenIdLegDto {
|
|
261
|
+
index: string = "";
|
|
262
|
+
asset: string = "";
|
|
263
|
+
optionRatio: string = "";
|
|
264
|
+
isLong: bool = false;
|
|
265
|
+
tokenType: string = "";
|
|
266
|
+
riskPartner: string = "";
|
|
267
|
+
strike: string = "";
|
|
268
|
+
width: string = "";
|
|
269
|
+
tickLower: string = "";
|
|
270
|
+
tickUpper: string = "";
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@serializable
|
|
274
|
+
export class GreeksPositionInputDto {
|
|
275
|
+
tokenId: string = "";
|
|
276
|
+
legs: TokenIdLegDto[] = [];
|
|
277
|
+
tickAtMint: string = "";
|
|
278
|
+
positionSize: string = "";
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@serializable
|
|
282
|
+
export class GreeksCalculatePositionArgsDto {
|
|
283
|
+
legs: TokenIdLegDto[] = [];
|
|
284
|
+
currentTick: string = "";
|
|
285
|
+
mintTick: string = "";
|
|
286
|
+
positionSize: string = "";
|
|
287
|
+
poolTickSpacing: string = "";
|
|
288
|
+
swapAtMint: bool = false;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@serializable
|
|
292
|
+
export class GreeksCalculatePositionRequestDto {
|
|
293
|
+
args: GreeksCalculatePositionArgsDto = new GreeksCalculatePositionArgsDto();
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
@serializable
|
|
297
|
+
export class GreeksCalculateAccountArgsDto {
|
|
298
|
+
positions: GreeksPositionInputDto[] = [];
|
|
299
|
+
tickSpacing: string = "";
|
|
300
|
+
atTicks: string[] = [];
|
|
301
|
+
collateralAssets: string[] = [];
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
@serializable
|
|
305
|
+
export class GreeksCalculateAccountRequestDto {
|
|
306
|
+
args: GreeksCalculateAccountArgsDto = new GreeksCalculateAccountArgsDto();
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@serializable
|
|
310
|
+
export class GreeksResultDto {
|
|
311
|
+
value: string = "";
|
|
312
|
+
delta: string = "";
|
|
313
|
+
gamma: string = "";
|
|
314
|
+
totalValue: string[] = [];
|
|
315
|
+
positionCount: string = "";
|
|
316
|
+
source: PanopticSourceMetaDto | null = null;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
@serializable
|
|
320
|
+
export class GreeksEnvelopeDto {
|
|
321
|
+
ok: bool = false;
|
|
322
|
+
result: GreeksResultDto = new GreeksResultDto();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
@serializable
|
|
326
|
+
export class DynamicJobFragmentDto {
|
|
327
|
+
target: string = "";
|
|
328
|
+
userProvidedData: string = "";
|
|
329
|
+
strategyProvidedData: string = "";
|
|
330
|
+
value: string = "0";
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
@serializable
|
|
334
|
+
export class DynamicJobFragmentEnvelopeDto {
|
|
335
|
+
ok: bool = false;
|
|
336
|
+
result: DynamicJobFragmentDto = new DynamicJobFragmentDto();
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
@serializable
|
|
340
|
+
export class CalldataPartsDto {
|
|
341
|
+
functionName: string = "";
|
|
342
|
+
calldata: string = "";
|
|
343
|
+
userProvidedData: string = "";
|
|
344
|
+
strategyProvidedData: string = "";
|
|
345
|
+
value: string = "0";
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@serializable
|
|
349
|
+
export class CalldataPartsEnvelopeDto {
|
|
350
|
+
ok: bool = false;
|
|
351
|
+
result: CalldataPartsDto = new CalldataPartsDto();
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@serializable
|
|
355
|
+
export class PanopticDispatchArgsDto {
|
|
356
|
+
poolAddress: string = "";
|
|
357
|
+
existingPositionIds: string[] = [];
|
|
358
|
+
tokenId: string = "";
|
|
359
|
+
positionSize: string = "";
|
|
360
|
+
tickLimitLow: string = "";
|
|
361
|
+
tickLimitHigh: string = "";
|
|
362
|
+
spreadLimit: string = "";
|
|
363
|
+
swapAtMint: bool = false;
|
|
364
|
+
usePremiaAsCollateral: bool = false;
|
|
365
|
+
builderCode: string = "";
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
@serializable
|
|
369
|
+
export class PanopticDispatchRequestDto {
|
|
370
|
+
args: PanopticDispatchArgsDto = new PanopticDispatchArgsDto();
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
@serializable
|
|
374
|
+
export class PanopticDispatchExplicitArgsDto {
|
|
375
|
+
poolAddress: string = "";
|
|
376
|
+
positionIdList: string[] = [];
|
|
377
|
+
finalPositionIdList: string[] = [];
|
|
378
|
+
positionSizes: string[] = [];
|
|
379
|
+
tickAndSpreadLimits: string[][] = [];
|
|
380
|
+
usePremiaAsCollateral: bool = false;
|
|
381
|
+
builderCode: string = "";
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
@serializable
|
|
385
|
+
export class PanopticDispatchExplicitRequestDto {
|
|
386
|
+
args: PanopticDispatchExplicitArgsDto = new PanopticDispatchExplicitArgsDto();
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
@serializable
|
|
390
|
+
export class Erc20ApproveFragmentArgsDto {
|
|
391
|
+
token: string = "";
|
|
392
|
+
spender: string = "";
|
|
393
|
+
amount: string = "";
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
@serializable
|
|
397
|
+
export class Erc20ApproveFragmentRequestDto {
|
|
398
|
+
args: Erc20ApproveFragmentArgsDto = new Erc20ApproveFragmentArgsDto();
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
@serializable
|
|
402
|
+
export class Permit2ApproveFragmentArgsDto {
|
|
403
|
+
permit2: string = "";
|
|
404
|
+
token: string = "";
|
|
405
|
+
spender: string = "";
|
|
406
|
+
amount: string = "";
|
|
407
|
+
expiration: string = "";
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
@serializable
|
|
411
|
+
export class Permit2ApproveFragmentRequestDto {
|
|
412
|
+
args: Permit2ApproveFragmentArgsDto = new Permit2ApproveFragmentArgsDto();
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
@serializable
|
|
416
|
+
export class CollateralDepositFragmentArgsDto {
|
|
417
|
+
collateralTracker: string = "";
|
|
418
|
+
assets: string = "";
|
|
419
|
+
receiver: string = "";
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
@serializable
|
|
423
|
+
export class CollateralDepositFragmentRequestDto {
|
|
424
|
+
args: CollateralDepositFragmentArgsDto = new CollateralDepositFragmentArgsDto();
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
@serializable
|
|
428
|
+
export class CollateralWithdrawFragmentArgsDto {
|
|
429
|
+
collateralTracker: string = "";
|
|
430
|
+
assets: string = "";
|
|
431
|
+
receiver: string = "";
|
|
432
|
+
owner: string = "";
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
@serializable
|
|
436
|
+
export class CollateralWithdrawFragmentRequestDto {
|
|
437
|
+
args: CollateralWithdrawFragmentArgsDto = new CollateralWithdrawFragmentArgsDto();
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
@serializable
|
|
441
|
+
export class CollateralWithdrawWithPositionsFragmentArgsDto extends CollateralWithdrawFragmentArgsDto {
|
|
442
|
+
positionIdList: string[] = [];
|
|
443
|
+
usePremiaAsCollateral: bool = false;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
@serializable
|
|
447
|
+
export class CollateralWithdrawWithPositionsFragmentRequestDto {
|
|
448
|
+
args: CollateralWithdrawWithPositionsFragmentArgsDto = new CollateralWithdrawWithPositionsFragmentArgsDto();
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
@serializable
|
|
452
|
+
export class WethAmountArgsDto {
|
|
453
|
+
amount: string = "";
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
@serializable
|
|
457
|
+
export class WethAmountRequestDto {
|
|
458
|
+
args: WethAmountArgsDto = new WethAmountArgsDto();
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
@serializable
|
|
462
|
+
export class HypovaultWethInnerCallArgsDto {
|
|
463
|
+
weth: string = "";
|
|
464
|
+
amount: string = "";
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
@serializable
|
|
468
|
+
export class HypovaultWethInnerCallRequestDto {
|
|
469
|
+
args: HypovaultWethInnerCallArgsDto = new HypovaultWethInnerCallArgsDto();
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
@serializable
|
|
473
|
+
export class HypovaultInnerCallDto {
|
|
474
|
+
functionName: string = "";
|
|
475
|
+
target: string = "";
|
|
476
|
+
data: string = "";
|
|
477
|
+
value: string = "";
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
@serializable
|
|
481
|
+
export class HypovaultInnerCallEnvelopeDto {
|
|
482
|
+
ok: bool = false;
|
|
483
|
+
result: HypovaultInnerCallDto = new HypovaultInnerCallDto();
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
@serializable
|
|
487
|
+
export class HypovaultFulfillDepositsArgsDto {
|
|
488
|
+
vaultManager: string = "";
|
|
489
|
+
assetsToFulfill: string = "";
|
|
490
|
+
managerInput: string = "";
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
@serializable
|
|
494
|
+
export class HypovaultFulfillDepositsRequestDto {
|
|
495
|
+
args: HypovaultFulfillDepositsArgsDto = new HypovaultFulfillDepositsArgsDto();
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
@serializable
|
|
499
|
+
export class HypovaultFulfillWithdrawalsArgsDto {
|
|
500
|
+
vaultManager: string = "";
|
|
501
|
+
sharesToFulfill: string = "";
|
|
502
|
+
maxAssetsReceived: string = "";
|
|
503
|
+
managerInput: string = "";
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
@serializable
|
|
507
|
+
export class HypovaultFulfillWithdrawalsRequestDto {
|
|
508
|
+
args: HypovaultFulfillWithdrawalsArgsDto = new HypovaultFulfillWithdrawalsArgsDto();
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
@serializable
|
|
512
|
+
export class HypovaultManageCalldataPartsArgsDto {
|
|
513
|
+
innerTarget: string = "";
|
|
514
|
+
innerData: string = "";
|
|
515
|
+
value: string = "";
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
@serializable
|
|
519
|
+
export class HypovaultManageCalldataPartsRequestDto {
|
|
520
|
+
args: HypovaultManageCalldataPartsArgsDto = new HypovaultManageCalldataPartsArgsDto();
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
@serializable
|
|
524
|
+
export class HypovaultManageArgsDto extends HypovaultManageCalldataPartsArgsDto {
|
|
525
|
+
manager: string = "";
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
@serializable
|
|
529
|
+
export class HypovaultManageRequestDto {
|
|
530
|
+
args: HypovaultManageArgsDto = new HypovaultManageArgsDto();
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
@serializable
|
|
534
|
+
export class HypovaultPoolInfoDto {
|
|
535
|
+
pool: string = "";
|
|
536
|
+
token0: string = "";
|
|
537
|
+
token1: string = "";
|
|
538
|
+
maxPriceDeviation: i32 = 0;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
@serializable
|
|
542
|
+
export class HypovaultBuildVaultManagerInputArgsDto {
|
|
543
|
+
vaultAddress: string = "";
|
|
544
|
+
underlyingToken: string = "";
|
|
545
|
+
poolInfos: HypovaultPoolInfoDto[] = [];
|
|
546
|
+
tokenIds: string[][] = [];
|
|
547
|
+
wethAddress: string = "";
|
|
548
|
+
erc4626Vaults: string[] = [];
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
@serializable
|
|
552
|
+
export class HypovaultBuildVaultManagerInputRequestDto {
|
|
553
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
554
|
+
args: HypovaultBuildVaultManagerInputArgsDto = new HypovaultBuildVaultManagerInputArgsDto();
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
@serializable
|
|
558
|
+
export class HypovaultBuildVaultManagerInputResultDto {
|
|
559
|
+
managerInput: string = "";
|
|
560
|
+
source: PanopticSourceMetaDto | null = null;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
@serializable
|
|
564
|
+
export class HypovaultBuildVaultManagerInputEnvelopeDto {
|
|
565
|
+
ok: bool = false;
|
|
566
|
+
result: HypovaultBuildVaultManagerInputResultDto = new HypovaultBuildVaultManagerInputResultDto();
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
@serializable
|
|
570
|
+
export class HypovaultCandidatesByPoolDto {
|
|
571
|
+
poolAddress: string = "";
|
|
572
|
+
candidates: string[] = [];
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
@serializable
|
|
576
|
+
export class HypovaultVerifyOpenTokenIdsArgsDto {
|
|
577
|
+
vaultAddress: string = "";
|
|
578
|
+
candidatesByPool: HypovaultCandidatesByPoolDto[] = [];
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
@serializable
|
|
582
|
+
export class HypovaultVerifyOpenTokenIdsRequestDto {
|
|
583
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
584
|
+
args: HypovaultVerifyOpenTokenIdsArgsDto = new HypovaultVerifyOpenTokenIdsArgsDto();
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
@serializable
|
|
588
|
+
export class HypovaultVerifyOpenTokenIdsResultDto {
|
|
589
|
+
tokenIdsByPool: string[][] = [];
|
|
590
|
+
source: PanopticSourceMetaDto | null = null;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
@serializable
|
|
594
|
+
export class HypovaultVerifyOpenTokenIdsEnvelopeDto {
|
|
595
|
+
ok: bool = false;
|
|
596
|
+
result: HypovaultVerifyOpenTokenIdsResultDto = new HypovaultVerifyOpenTokenIdsResultDto();
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
@serializable
|
|
600
|
+
export class HypovaultEpochContextArgsDto {
|
|
601
|
+
vaultAddress: string = "";
|
|
602
|
+
account: string = "";
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
@serializable
|
|
606
|
+
export class HypovaultEpochContextRequestDto {
|
|
607
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
608
|
+
args: HypovaultEpochContextArgsDto = new HypovaultEpochContextArgsDto();
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
@serializable
|
|
612
|
+
export class HypovaultDepositSnapshotDto {
|
|
613
|
+
epoch: string = "";
|
|
614
|
+
assetsDeposited: string = "";
|
|
615
|
+
assetsFulfilled: string = "";
|
|
616
|
+
sharesReceived: string = "";
|
|
617
|
+
pendingValue: string = "";
|
|
618
|
+
queuedDeposit: string = "";
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
@serializable
|
|
622
|
+
export class HypovaultQueuedWithdrawalDto {
|
|
623
|
+
amount: string = "";
|
|
624
|
+
basis: string = "";
|
|
625
|
+
shouldRedeposit: bool = false;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
@serializable
|
|
629
|
+
export class HypovaultWithdrawalSnapshotDto {
|
|
630
|
+
epoch: string = "";
|
|
631
|
+
sharesWithdrawn: string = "";
|
|
632
|
+
sharesFulfilled: string = "";
|
|
633
|
+
assetsPaid: string = "";
|
|
634
|
+
pendingShares: string = "";
|
|
635
|
+
queuedWithdrawal: HypovaultQueuedWithdrawalDto = new HypovaultQueuedWithdrawalDto();
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
@serializable
|
|
639
|
+
export class HypovaultEpochContextResultDto {
|
|
640
|
+
vaultAddress: string = "";
|
|
641
|
+
account: string = "";
|
|
642
|
+
totalSupply: string = "";
|
|
643
|
+
currentTimestamp: string = "";
|
|
644
|
+
deposit: HypovaultDepositSnapshotDto = new HypovaultDepositSnapshotDto();
|
|
645
|
+
withdrawal: HypovaultWithdrawalSnapshotDto = new HypovaultWithdrawalSnapshotDto();
|
|
646
|
+
source: PanopticSourceMetaDto | null = null;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
@serializable
|
|
650
|
+
export class HypovaultEpochContextEnvelopeDto {
|
|
651
|
+
ok: bool = false;
|
|
652
|
+
result: HypovaultEpochContextResultDto = new HypovaultEpochContextResultDto();
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
@serializable
|
|
656
|
+
export class HypovaultPositionsHashStatusArgsDto {
|
|
657
|
+
poolAddress: string = "";
|
|
658
|
+
tokenIds: string[] = [];
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
@serializable
|
|
662
|
+
export class HypovaultPositionsHashStatusRequestDto {
|
|
663
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
664
|
+
args: HypovaultPositionsHashStatusArgsDto = new HypovaultPositionsHashStatusArgsDto();
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
@serializable
|
|
668
|
+
export class HypovaultPositionsHashStatusResultDto {
|
|
669
|
+
account: string = "";
|
|
670
|
+
poolAddress: string = "";
|
|
671
|
+
positionsHash: string = "";
|
|
672
|
+
tokenIds: string[] = [];
|
|
673
|
+
computedHash: string = "";
|
|
674
|
+
valid: bool = false;
|
|
675
|
+
source: PanopticSourceMetaDto | null = null;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
@serializable
|
|
679
|
+
export class HypovaultPositionsHashStatusEnvelopeDto {
|
|
680
|
+
ok: bool = false;
|
|
681
|
+
result: HypovaultPositionsHashStatusResultDto = new HypovaultPositionsHashStatusResultDto();
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
@serializable
|
|
685
|
+
export class MerkleLeafDto {
|
|
686
|
+
Action: string = "";
|
|
687
|
+
Description: string = "";
|
|
688
|
+
LeafDigest: string = "";
|
|
689
|
+
DecoderAndSanitizerAddress: string = "";
|
|
690
|
+
TargetAddress: string = "";
|
|
691
|
+
FunctionSignature: string = "";
|
|
692
|
+
FunctionSelector: string = "";
|
|
693
|
+
CanSendValue: bool = false;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
@serializable
|
|
697
|
+
export class MerkleArtifactDto {
|
|
698
|
+
leafs: MerkleLeafDto[] = [];
|
|
699
|
+
proofsByAction: Map<string, string[]> = new Map<string, string[]>();
|
|
700
|
+
proofsByDigest: Map<string, string[]> = new Map<string, string[]>();
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
@serializable
|
|
704
|
+
export class MerkleFindLeafArgsDto {
|
|
705
|
+
artifact: MerkleArtifactDto = new MerkleArtifactDto();
|
|
706
|
+
description: string = "";
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
@serializable
|
|
710
|
+
export class MerkleFindLeafRequestDto {
|
|
711
|
+
args: MerkleFindLeafArgsDto = new MerkleFindLeafArgsDto();
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
@serializable
|
|
715
|
+
export class MerkleFoundLeafDto {
|
|
716
|
+
action: string = "";
|
|
717
|
+
description: string = "";
|
|
718
|
+
leafDigest: string = "";
|
|
719
|
+
decoder: string = "";
|
|
720
|
+
target: string = "";
|
|
721
|
+
functionSignature: string = "";
|
|
722
|
+
functionSelector: string = "";
|
|
723
|
+
canSendValue: bool = false;
|
|
724
|
+
proof: string[] = [];
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
@serializable
|
|
728
|
+
export class MerkleFindLeafEnvelopeDto {
|
|
729
|
+
ok: bool = false;
|
|
730
|
+
result: MerkleFoundLeafDto = new MerkleFoundLeafDto();
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
@serializable
|
|
734
|
+
export class MerkleBuildManageActionDto {
|
|
735
|
+
description: string = "";
|
|
736
|
+
data: string = "";
|
|
737
|
+
value: string = "";
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
@serializable
|
|
741
|
+
export class MerkleBuildManageArgsDto {
|
|
742
|
+
artifact: MerkleArtifactDto = new MerkleArtifactDto();
|
|
743
|
+
actions: MerkleBuildManageActionDto[] = [];
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
@serializable
|
|
747
|
+
export class MerkleBuildManageRequestDto {
|
|
748
|
+
args: MerkleBuildManageArgsDto = new MerkleBuildManageArgsDto();
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
@serializable
|
|
752
|
+
export class MerkleBuildManageResultDto {
|
|
753
|
+
proofs: string[][] = [];
|
|
754
|
+
decoders: string[] = [];
|
|
755
|
+
innerTargets: string[] = [];
|
|
756
|
+
innerDatas: string[] = [];
|
|
757
|
+
values: string[] = [];
|
|
758
|
+
leaves: MerkleFoundLeafDto[] = [];
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
@serializable
|
|
762
|
+
export class MerkleBuildManageEnvelopeDto {
|
|
763
|
+
ok: bool = false;
|
|
764
|
+
result: MerkleBuildManageResultDto = new MerkleBuildManageResultDto();
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
@serializable
|
|
768
|
+
export class MerkleManageVaultWithVerificationFragmentArgsDto {
|
|
769
|
+
manager: string = "";
|
|
770
|
+
proofs: string[][] = [];
|
|
771
|
+
decoders: string[] = [];
|
|
772
|
+
innerTargets: string[] = [];
|
|
773
|
+
innerDatas: string[] = [];
|
|
774
|
+
values: string[] = [];
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
@serializable
|
|
778
|
+
export class MerkleManageVaultWithVerificationFragmentRequestDto {
|
|
779
|
+
args: MerkleManageVaultWithVerificationFragmentArgsDto = new MerkleManageVaultWithVerificationFragmentArgsDto();
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
@serializable
|
|
783
|
+
export class UniswapAddressesDto {
|
|
784
|
+
universalRouter: string = "";
|
|
785
|
+
quoter: string = "";
|
|
786
|
+
permit2: string = "";
|
|
787
|
+
weth: string = "";
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
@serializable
|
|
791
|
+
export class UniswapRouteArgsDto {
|
|
792
|
+
poolAddress: string = "";
|
|
793
|
+
tokenIn: string = "";
|
|
794
|
+
amountIn: string = "";
|
|
795
|
+
amountOut: string = "";
|
|
796
|
+
slippageBps: string = "";
|
|
797
|
+
addresses: UniswapAddressesDto | null = null;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
@serializable
|
|
801
|
+
export class UniswapRouteRequestDto {
|
|
802
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
803
|
+
args: UniswapRouteArgsDto = new UniswapRouteArgsDto();
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
@serializable
|
|
807
|
+
export class UniswapQuoteResultDto {
|
|
808
|
+
success: bool = false;
|
|
809
|
+
amountIn: string = "";
|
|
810
|
+
amountOut: string = "";
|
|
811
|
+
tokenIn: string = "";
|
|
812
|
+
tokenOut: string = "";
|
|
813
|
+
zeroForOne: bool = false;
|
|
814
|
+
source: PanopticSourceMetaDto | null = null;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
@serializable
|
|
818
|
+
export class UniswapQuoteEnvelopeDto {
|
|
819
|
+
ok: bool = false;
|
|
820
|
+
result: UniswapQuoteResultDto = new UniswapQuoteResultDto();
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
@serializable
|
|
824
|
+
export class UniswapRouterApprovalArgsDto {
|
|
825
|
+
tokenIn: string = "";
|
|
826
|
+
owner: string = "";
|
|
827
|
+
amount: string = "";
|
|
828
|
+
addresses: UniswapAddressesDto | null = null;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
@serializable
|
|
832
|
+
export class UniswapRouterApprovalRequestDto {
|
|
833
|
+
context: PanopticContextDto = new PanopticContextDto();
|
|
834
|
+
args: UniswapRouterApprovalArgsDto = new UniswapRouterApprovalArgsDto();
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
@serializable
|
|
838
|
+
export class UniswapRouterApprovalResultDto {
|
|
839
|
+
needsErc20Approval: bool = false;
|
|
840
|
+
needsPermit2Approval: bool = false;
|
|
841
|
+
source: PanopticSourceMetaDto | null = null;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
@serializable
|
|
845
|
+
export class UniswapRouterApprovalEnvelopeDto {
|
|
846
|
+
ok: bool = false;
|
|
847
|
+
result: UniswapRouterApprovalResultDto = new UniswapRouterApprovalResultDto();
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
@serializable
|
|
851
|
+
export class UniswapV3ExactInArgsDto {
|
|
852
|
+
router: string = "";
|
|
853
|
+
tokenIn: string = "";
|
|
854
|
+
tokenOut: string = "";
|
|
855
|
+
fee: string = "";
|
|
856
|
+
recipient: string = "";
|
|
857
|
+
amountIn: string = "";
|
|
858
|
+
amountOutMin: string = "";
|
|
859
|
+
payerIsUser: bool = false;
|
|
860
|
+
deadline: string = "";
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
@serializable
|
|
864
|
+
export class UniswapV3ExactInRequestDto {
|
|
865
|
+
args: UniswapV3ExactInArgsDto = new UniswapV3ExactInArgsDto();
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
@serializable
|
|
869
|
+
export class DynamicJobsRenderArgsDto {
|
|
870
|
+
fragments: DynamicJobFragmentDto[] = [];
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
@serializable
|
|
874
|
+
export class DynamicJobsRenderRequestDto {
|
|
875
|
+
args: DynamicJobsRenderArgsDto = new DynamicJobsRenderArgsDto();
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
@serializable
|
|
879
|
+
export class DynamicJobsExecutePayloadDto {
|
|
880
|
+
functionName: string = "";
|
|
881
|
+
typesArray: string[] = [];
|
|
882
|
+
valuesArray: string[][] = [];
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
@serializable
|
|
886
|
+
export class DynamicJobsRenderEnvelopeDto {
|
|
887
|
+
ok: bool = false;
|
|
888
|
+
result: DynamicJobsExecutePayloadDto = new DynamicJobsExecutePayloadDto();
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
@serializable
|
|
892
|
+
export class PanopticSdkRecordResultDto {
|
|
893
|
+
source: PanopticSourceMetaDto | null = null;
|
|
894
|
+
poolId: string = "";
|
|
895
|
+
tokenId: string = "";
|
|
896
|
+
value: string = "";
|
|
897
|
+
balance0: string = "";
|
|
898
|
+
balance1: string = "";
|
|
899
|
+
utilization0: string = "";
|
|
900
|
+
utilization1: string = "";
|
|
901
|
+
currentTick: string = "";
|
|
902
|
+
oracleTick: string = "";
|
|
903
|
+
lower: string = "";
|
|
904
|
+
upper: string = "";
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
@serializable
|
|
908
|
+
export class PanopticSdkRecordEnvelopeDto {
|
|
909
|
+
ok: bool = false;
|
|
910
|
+
result: PanopticSdkRecordResultDto = new PanopticSdkRecordResultDto();
|
|
911
|
+
}
|