@dhedge/v2-sdk 1.9.8 → 1.9.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhedge/v2-sdk",
3
- "version": "1.9.8",
3
+ "version": "1.9.9",
4
4
  "license": "MIT",
5
5
  "description": "🛠 An SDK for building applications on top of dHEDGE V2",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,547 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "inputs": [
9
+ {
10
+ "internalType": "uint256",
11
+ "name": "amount",
12
+ "type": "uint256"
13
+ },
14
+ {
15
+ "internalType": "uint256",
16
+ "name": "minAmount",
17
+ "type": "uint256"
18
+ }
19
+ ],
20
+ "name": "AmountTooSmall",
21
+ "type": "error"
22
+ },
23
+ {
24
+ "inputs": [
25
+ {
26
+ "internalType": "uint256",
27
+ "name": "executableTime",
28
+ "type": "uint256"
29
+ }
30
+ ],
31
+ "name": "ExecutableTimeNotReached",
32
+ "type": "error"
33
+ },
34
+ {
35
+ "inputs": [
36
+ {
37
+ "internalType": "uint256",
38
+ "name": "supplied",
39
+ "type": "uint256"
40
+ },
41
+ {
42
+ "internalType": "uint256",
43
+ "name": "accepted",
44
+ "type": "uint256"
45
+ }
46
+ ],
47
+ "name": "HighSlippage",
48
+ "type": "error"
49
+ },
50
+ {
51
+ "inputs": [
52
+ {
53
+ "internalType": "uint256",
54
+ "name": "fee",
55
+ "type": "uint256"
56
+ }
57
+ ],
58
+ "name": "InvalidFee",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "inputs": [
63
+ {
64
+ "internalType": "string",
65
+ "name": "variableName",
66
+ "type": "string"
67
+ }
68
+ ],
69
+ "name": "InvariantViolation",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [
74
+ {
75
+ "internalType": "uint256",
76
+ "name": "maxFillPrice",
77
+ "type": "uint256"
78
+ },
79
+ {
80
+ "internalType": "uint256",
81
+ "name": "currentPrice",
82
+ "type": "uint256"
83
+ }
84
+ ],
85
+ "name": "MaxFillPriceTooLow",
86
+ "type": "error"
87
+ },
88
+ {
89
+ "inputs": [
90
+ {
91
+ "internalType": "uint256",
92
+ "name": "minFillPrice",
93
+ "type": "uint256"
94
+ },
95
+ {
96
+ "internalType": "uint256",
97
+ "name": "currentPrice",
98
+ "type": "uint256"
99
+ }
100
+ ],
101
+ "name": "MinFillPriceTooHigh",
102
+ "type": "error"
103
+ },
104
+ {
105
+ "inputs": [],
106
+ "name": "ModuleKeyEmpty",
107
+ "type": "error"
108
+ },
109
+ {
110
+ "inputs": [
111
+ {
112
+ "internalType": "address",
113
+ "name": "account",
114
+ "type": "address"
115
+ },
116
+ {
117
+ "internalType": "uint256",
118
+ "name": "totalBalance",
119
+ "type": "uint256"
120
+ },
121
+ {
122
+ "internalType": "uint256",
123
+ "name": "withdrawAmount",
124
+ "type": "uint256"
125
+ }
126
+ ],
127
+ "name": "NotEnoughBalanceForWithdraw",
128
+ "type": "error"
129
+ },
130
+ {
131
+ "inputs": [
132
+ {
133
+ "internalType": "int256",
134
+ "name": "marginAmount",
135
+ "type": "int256"
136
+ },
137
+ {
138
+ "internalType": "uint256",
139
+ "name": "feeAmount",
140
+ "type": "uint256"
141
+ }
142
+ ],
143
+ "name": "NotEnoughMarginForFees",
144
+ "type": "error"
145
+ },
146
+ {
147
+ "inputs": [
148
+ {
149
+ "internalType": "uint256",
150
+ "name": "tokenId",
151
+ "type": "uint256"
152
+ },
153
+ {
154
+ "internalType": "address",
155
+ "name": "msgSender",
156
+ "type": "address"
157
+ }
158
+ ],
159
+ "name": "NotTokenOwner",
160
+ "type": "error"
161
+ },
162
+ {
163
+ "inputs": [
164
+ {
165
+ "internalType": "address",
166
+ "name": "msgSender",
167
+ "type": "address"
168
+ }
169
+ ],
170
+ "name": "OnlyOwner",
171
+ "type": "error"
172
+ },
173
+ {
174
+ "inputs": [],
175
+ "name": "OrderHasExpired",
176
+ "type": "error"
177
+ },
178
+ {
179
+ "inputs": [],
180
+ "name": "OrderHasNotExpired",
181
+ "type": "error"
182
+ },
183
+ {
184
+ "inputs": [
185
+ {
186
+ "internalType": "bytes32",
187
+ "name": "moduleKey",
188
+ "type": "bytes32"
189
+ }
190
+ ],
191
+ "name": "Paused",
192
+ "type": "error"
193
+ },
194
+ {
195
+ "inputs": [],
196
+ "name": "PositionCreatesBadDebt",
197
+ "type": "error"
198
+ },
199
+ {
200
+ "inputs": [
201
+ {
202
+ "internalType": "string",
203
+ "name": "variableName",
204
+ "type": "string"
205
+ }
206
+ ],
207
+ "name": "ValueNotPositive",
208
+ "type": "error"
209
+ },
210
+ {
211
+ "inputs": [
212
+ {
213
+ "internalType": "uint256",
214
+ "name": "withdrawAmount",
215
+ "type": "uint256"
216
+ },
217
+ {
218
+ "internalType": "uint256",
219
+ "name": "keeperFee",
220
+ "type": "uint256"
221
+ }
222
+ ],
223
+ "name": "WithdrawalTooSmall",
224
+ "type": "error"
225
+ },
226
+ {
227
+ "inputs": [
228
+ {
229
+ "internalType": "string",
230
+ "name": "variableName",
231
+ "type": "string"
232
+ }
233
+ ],
234
+ "name": "ZeroAddress",
235
+ "type": "error"
236
+ },
237
+ {
238
+ "inputs": [
239
+ {
240
+ "internalType": "string",
241
+ "name": "variableName",
242
+ "type": "string"
243
+ }
244
+ ],
245
+ "name": "ZeroValue",
246
+ "type": "error"
247
+ },
248
+ {
249
+ "anonymous": false,
250
+ "inputs": [
251
+ {
252
+ "indexed": false,
253
+ "internalType": "uint8",
254
+ "name": "version",
255
+ "type": "uint8"
256
+ }
257
+ ],
258
+ "name": "Initialized",
259
+ "type": "event"
260
+ },
261
+ {
262
+ "inputs": [],
263
+ "name": "MIN_DEPOSIT",
264
+ "outputs": [
265
+ {
266
+ "internalType": "uint256",
267
+ "name": "",
268
+ "type": "uint256"
269
+ }
270
+ ],
271
+ "stateMutability": "view",
272
+ "type": "function"
273
+ },
274
+ {
275
+ "inputs": [],
276
+ "name": "MODULE_KEY",
277
+ "outputs": [
278
+ {
279
+ "internalType": "bytes32",
280
+ "name": "",
281
+ "type": "bytes32"
282
+ }
283
+ ],
284
+ "stateMutability": "view",
285
+ "type": "function"
286
+ },
287
+ {
288
+ "inputs": [
289
+ {
290
+ "internalType": "uint256",
291
+ "name": "tokenId",
292
+ "type": "uint256"
293
+ },
294
+ {
295
+ "internalType": "int256",
296
+ "name": "marginAdjustment",
297
+ "type": "int256"
298
+ },
299
+ {
300
+ "internalType": "int256",
301
+ "name": "additionalSizeAdjustment",
302
+ "type": "int256"
303
+ },
304
+ {
305
+ "internalType": "uint256",
306
+ "name": "fillPrice",
307
+ "type": "uint256"
308
+ },
309
+ {
310
+ "internalType": "uint256",
311
+ "name": "keeperFee",
312
+ "type": "uint256"
313
+ }
314
+ ],
315
+ "name": "announceLeverageAdjust",
316
+ "outputs": [],
317
+ "stateMutability": "nonpayable",
318
+ "type": "function"
319
+ },
320
+ {
321
+ "inputs": [
322
+ {
323
+ "internalType": "uint256",
324
+ "name": "tokenId",
325
+ "type": "uint256"
326
+ },
327
+ {
328
+ "internalType": "uint256",
329
+ "name": "minFillPrice",
330
+ "type": "uint256"
331
+ },
332
+ {
333
+ "internalType": "uint256",
334
+ "name": "keeperFee",
335
+ "type": "uint256"
336
+ }
337
+ ],
338
+ "name": "announceLeverageClose",
339
+ "outputs": [],
340
+ "stateMutability": "nonpayable",
341
+ "type": "function"
342
+ },
343
+ {
344
+ "inputs": [
345
+ {
346
+ "internalType": "uint256",
347
+ "name": "margin",
348
+ "type": "uint256"
349
+ },
350
+ {
351
+ "internalType": "uint256",
352
+ "name": "additionalSize",
353
+ "type": "uint256"
354
+ },
355
+ {
356
+ "internalType": "uint256",
357
+ "name": "maxFillPrice",
358
+ "type": "uint256"
359
+ },
360
+ {
361
+ "internalType": "uint256",
362
+ "name": "keeperFee",
363
+ "type": "uint256"
364
+ }
365
+ ],
366
+ "name": "announceLeverageOpen",
367
+ "outputs": [],
368
+ "stateMutability": "nonpayable",
369
+ "type": "function"
370
+ },
371
+ {
372
+ "inputs": [
373
+ {
374
+ "internalType": "uint256",
375
+ "name": "depositAmount",
376
+ "type": "uint256"
377
+ },
378
+ {
379
+ "internalType": "uint256",
380
+ "name": "minAmountOut",
381
+ "type": "uint256"
382
+ },
383
+ {
384
+ "internalType": "uint256",
385
+ "name": "keeperFee",
386
+ "type": "uint256"
387
+ }
388
+ ],
389
+ "name": "announceStableDeposit",
390
+ "outputs": [],
391
+ "stateMutability": "nonpayable",
392
+ "type": "function"
393
+ },
394
+ {
395
+ "inputs": [
396
+ {
397
+ "internalType": "uint256",
398
+ "name": "withdrawAmount",
399
+ "type": "uint256"
400
+ },
401
+ {
402
+ "internalType": "uint256",
403
+ "name": "minAmountOut",
404
+ "type": "uint256"
405
+ },
406
+ {
407
+ "internalType": "uint256",
408
+ "name": "keeperFee",
409
+ "type": "uint256"
410
+ }
411
+ ],
412
+ "name": "announceStableWithdraw",
413
+ "outputs": [],
414
+ "stateMutability": "nonpayable",
415
+ "type": "function"
416
+ },
417
+ {
418
+ "inputs": [
419
+ {
420
+ "internalType": "address",
421
+ "name": "account",
422
+ "type": "address"
423
+ }
424
+ ],
425
+ "name": "cancelExistingOrder",
426
+ "outputs": [],
427
+ "stateMutability": "nonpayable",
428
+ "type": "function"
429
+ },
430
+ {
431
+ "inputs": [
432
+ {
433
+ "internalType": "address",
434
+ "name": "account",
435
+ "type": "address"
436
+ },
437
+ {
438
+ "internalType": "bytes[]",
439
+ "name": "priceUpdateData",
440
+ "type": "bytes[]"
441
+ }
442
+ ],
443
+ "name": "executeOrder",
444
+ "outputs": [],
445
+ "stateMutability": "payable",
446
+ "type": "function"
447
+ },
448
+ {
449
+ "inputs": [
450
+ {
451
+ "internalType": "address",
452
+ "name": "account",
453
+ "type": "address"
454
+ }
455
+ ],
456
+ "name": "getAnnouncedOrder",
457
+ "outputs": [
458
+ {
459
+ "components": [
460
+ {
461
+ "internalType": "enum FlatcoinStructs.OrderType",
462
+ "name": "orderType",
463
+ "type": "uint8"
464
+ },
465
+ {
466
+ "internalType": "uint256",
467
+ "name": "keeperFee",
468
+ "type": "uint256"
469
+ },
470
+ {
471
+ "internalType": "uint64",
472
+ "name": "executableAtTime",
473
+ "type": "uint64"
474
+ },
475
+ {
476
+ "internalType": "bytes",
477
+ "name": "orderData",
478
+ "type": "bytes"
479
+ }
480
+ ],
481
+ "internalType": "struct FlatcoinStructs.Order",
482
+ "name": "order",
483
+ "type": "tuple"
484
+ }
485
+ ],
486
+ "stateMutability": "view",
487
+ "type": "function"
488
+ },
489
+ {
490
+ "inputs": [
491
+ {
492
+ "internalType": "address",
493
+ "name": "account",
494
+ "type": "address"
495
+ }
496
+ ],
497
+ "name": "hasOrderExpired",
498
+ "outputs": [
499
+ {
500
+ "internalType": "bool",
501
+ "name": "expired",
502
+ "type": "bool"
503
+ }
504
+ ],
505
+ "stateMutability": "view",
506
+ "type": "function"
507
+ },
508
+ {
509
+ "inputs": [
510
+ {
511
+ "internalType": "contract IFlatcoinVault",
512
+ "name": "_vault",
513
+ "type": "address"
514
+ }
515
+ ],
516
+ "name": "initialize",
517
+ "outputs": [],
518
+ "stateMutability": "nonpayable",
519
+ "type": "function"
520
+ },
521
+ {
522
+ "inputs": [
523
+ {
524
+ "internalType": "contract IFlatcoinVault",
525
+ "name": "_vault",
526
+ "type": "address"
527
+ }
528
+ ],
529
+ "name": "setVault",
530
+ "outputs": [],
531
+ "stateMutability": "nonpayable",
532
+ "type": "function"
533
+ },
534
+ {
535
+ "inputs": [],
536
+ "name": "vault",
537
+ "outputs": [
538
+ {
539
+ "internalType": "contract IFlatcoinVault",
540
+ "name": "",
541
+ "type": "address"
542
+ }
543
+ ],
544
+ "stateMutability": "view",
545
+ "type": "function"
546
+ }
547
+ ]