timelock-sdk 0.0.134 → 0.0.136

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 (42) hide show
  1. package/dist/abis.cjs +602 -3
  2. package/dist/abis.cjs.map +1 -0
  3. package/dist/abis.d.cts +354 -90
  4. package/dist/abis.d.ts +354 -90
  5. package/dist/abis.js +602 -3
  6. package/dist/abis.js.map +1 -0
  7. package/dist/{client-CJcTIGGv.d.cts → client-B7kKAk49.d.cts} +44622 -34761
  8. package/dist/{client-CZdmjIOb.d.ts → client-D4EJlSs_.d.ts} +44623 -34762
  9. package/dist/client.cjs +88 -74
  10. package/dist/client.cjs.map +1 -1
  11. package/dist/client.d.cts +3 -3
  12. package/dist/client.d.ts +3 -3
  13. package/dist/client.js +87 -75
  14. package/dist/client.js.map +1 -1
  15. package/dist/optionUtils-B0rlRtfb.js +1401 -0
  16. package/dist/optionUtils-B0rlRtfb.js.map +1 -0
  17. package/dist/{optionUtils-OfLzCR6R.cjs → optionUtils-pH0o9gTm.cjs} +1069 -37
  18. package/dist/optionUtils-pH0o9gTm.cjs.map +1 -0
  19. package/dist/{optionsMarket-B2IsvbeA.js → optionsMarket-CjlRzn2K.js} +213 -21
  20. package/dist/optionsMarket-CjlRzn2K.js.map +1 -0
  21. package/dist/{optionsMarket-C6K82im8.cjs → optionsMarket-iZiYJCuW.cjs} +213 -21
  22. package/dist/optionsMarket-iZiYJCuW.cjs.map +1 -0
  23. package/dist/package.cjs +5 -6
  24. package/dist/package.d.cts +3 -3
  25. package/dist/package.d.ts +3 -3
  26. package/dist/package.js +3 -3
  27. package/dist/singleOwnerVault-BJyEs_D_.js +847 -0
  28. package/dist/singleOwnerVault-BJyEs_D_.js.map +1 -0
  29. package/dist/singleOwnerVault-GCpQV7pN.cjs +853 -0
  30. package/dist/singleOwnerVault-GCpQV7pN.cjs.map +1 -0
  31. package/dist/{uniswapMathLens-DHfzEjej.d.ts → uniswapMathLens-B0xWynAN.d.cts} +182 -21
  32. package/dist/{uniswapMathLens-Be6lFJcD.d.cts → uniswapMathLens-DAI2a8aU.d.ts} +182 -21
  33. package/package.json +38 -38
  34. package/dist/optionUtils-CQzUsKpO.js +0 -369
  35. package/dist/optionUtils-CQzUsKpO.js.map +0 -1
  36. package/dist/optionUtils-OfLzCR6R.cjs.map +0 -1
  37. package/dist/optionsMarket-B2IsvbeA.js.map +0 -1
  38. package/dist/optionsMarket-C6K82im8.cjs.map +0 -1
  39. package/dist/singleOwnerVault-gf2zNZVk.cjs +0 -1131
  40. package/dist/singleOwnerVault-gf2zNZVk.cjs.map +0 -1
  41. package/dist/singleOwnerVault-p81IjmWe.js +0 -1119
  42. package/dist/singleOwnerVault-p81IjmWe.js.map +0 -1
@@ -0,0 +1,853 @@
1
+
2
+ //#region src/abis/singleOwnerVault.ts
3
+ const singleOwnerVaultAbi = [
4
+ {
5
+ type: "constructor",
6
+ inputs: [{
7
+ name: "_poolManager",
8
+ type: "address",
9
+ internalType: "contract IPoolManager"
10
+ }, {
11
+ name: "_poolKey",
12
+ type: "tuple",
13
+ internalType: "struct PoolKey",
14
+ components: [
15
+ {
16
+ name: "currency0",
17
+ type: "address",
18
+ internalType: "Currency"
19
+ },
20
+ {
21
+ name: "currency1",
22
+ type: "address",
23
+ internalType: "Currency"
24
+ },
25
+ {
26
+ name: "fee",
27
+ type: "uint24",
28
+ internalType: "uint24"
29
+ },
30
+ {
31
+ name: "tickSpacing",
32
+ type: "int24",
33
+ internalType: "int24"
34
+ },
35
+ {
36
+ name: "hooks",
37
+ type: "address",
38
+ internalType: "contract IHooks"
39
+ }
40
+ ]
41
+ }],
42
+ stateMutability: "nonpayable"
43
+ },
44
+ {
45
+ type: "function",
46
+ name: "BORROW",
47
+ inputs: [],
48
+ outputs: [{
49
+ name: "",
50
+ type: "uint8",
51
+ internalType: "uint8"
52
+ }],
53
+ stateMutability: "view"
54
+ },
55
+ {
56
+ type: "function",
57
+ name: "BURN",
58
+ inputs: [],
59
+ outputs: [{
60
+ name: "",
61
+ type: "uint8",
62
+ internalType: "uint8"
63
+ }],
64
+ stateMutability: "view"
65
+ },
66
+ {
67
+ type: "function",
68
+ name: "MINT",
69
+ inputs: [],
70
+ outputs: [{
71
+ name: "",
72
+ type: "uint8",
73
+ internalType: "uint8"
74
+ }],
75
+ stateMutability: "view"
76
+ },
77
+ {
78
+ type: "function",
79
+ name: "REPAY",
80
+ inputs: [],
81
+ outputs: [{
82
+ name: "",
83
+ type: "uint8",
84
+ internalType: "uint8"
85
+ }],
86
+ stateMutability: "view"
87
+ },
88
+ {
89
+ type: "function",
90
+ name: "blocks",
91
+ inputs: [{
92
+ name: "",
93
+ type: "int24",
94
+ internalType: "int24"
95
+ }],
96
+ outputs: [
97
+ {
98
+ name: "tickLower",
99
+ type: "int24",
100
+ internalType: "int24"
101
+ },
102
+ {
103
+ name: "tickUpper",
104
+ type: "int24",
105
+ internalType: "int24"
106
+ },
107
+ {
108
+ name: "prevTickLower",
109
+ type: "int24",
110
+ internalType: "int24"
111
+ },
112
+ {
113
+ name: "totalLiquidity",
114
+ type: "uint128",
115
+ internalType: "uint128"
116
+ },
117
+ {
118
+ name: "borrowedLiquidity",
119
+ type: "uint128",
120
+ internalType: "uint128"
121
+ }
122
+ ],
123
+ stateMutability: "view"
124
+ },
125
+ {
126
+ type: "function",
127
+ name: "blocksCount",
128
+ inputs: [],
129
+ outputs: [{
130
+ name: "",
131
+ type: "uint256",
132
+ internalType: "uint256"
133
+ }],
134
+ stateMutability: "view"
135
+ },
136
+ {
137
+ type: "function",
138
+ name: "borrow",
139
+ inputs: [
140
+ {
141
+ name: "tickLower",
142
+ type: "int24",
143
+ internalType: "int24"
144
+ },
145
+ {
146
+ name: "tickUpper",
147
+ type: "int24",
148
+ internalType: "int24"
149
+ },
150
+ {
151
+ name: "liquidity",
152
+ type: "uint128",
153
+ internalType: "uint128"
154
+ },
155
+ {
156
+ name: "refTick",
157
+ type: "int24",
158
+ internalType: "int24"
159
+ }
160
+ ],
161
+ outputs: [{
162
+ name: "delta0",
163
+ type: "int256",
164
+ internalType: "int256"
165
+ }, {
166
+ name: "delta1",
167
+ type: "int256",
168
+ internalType: "int256"
169
+ }],
170
+ stateMutability: "nonpayable"
171
+ },
172
+ {
173
+ type: "function",
174
+ name: "borrowerWhitelist",
175
+ inputs: [{
176
+ name: "",
177
+ type: "address",
178
+ internalType: "address"
179
+ }],
180
+ outputs: [{
181
+ name: "",
182
+ type: "bool",
183
+ internalType: "bool"
184
+ }],
185
+ stateMutability: "view"
186
+ },
187
+ {
188
+ type: "function",
189
+ name: "burn",
190
+ inputs: [
191
+ {
192
+ name: "tickLower",
193
+ type: "int24",
194
+ internalType: "int24"
195
+ },
196
+ {
197
+ name: "tickUpper",
198
+ type: "int24",
199
+ internalType: "int24"
200
+ },
201
+ {
202
+ name: "liquidity",
203
+ type: "uint128",
204
+ internalType: "uint128"
205
+ },
206
+ {
207
+ name: "refTick",
208
+ type: "int24",
209
+ internalType: "int24"
210
+ }
211
+ ],
212
+ outputs: [
213
+ {
214
+ name: "amount0",
215
+ type: "int256",
216
+ internalType: "int256"
217
+ },
218
+ {
219
+ name: "amount1",
220
+ type: "int256",
221
+ internalType: "int256"
222
+ },
223
+ {
224
+ name: "fees0",
225
+ type: "uint256",
226
+ internalType: "uint256"
227
+ },
228
+ {
229
+ name: "fees1",
230
+ type: "uint256",
231
+ internalType: "uint256"
232
+ }
233
+ ],
234
+ stateMutability: "nonpayable"
235
+ },
236
+ {
237
+ type: "function",
238
+ name: "getBlock",
239
+ inputs: [{
240
+ name: "tickLower",
241
+ type: "int24",
242
+ internalType: "int24"
243
+ }, {
244
+ name: "refTick",
245
+ type: "int24",
246
+ internalType: "int24"
247
+ }],
248
+ outputs: [{
249
+ name: "",
250
+ type: "tuple",
251
+ internalType: "struct TimelockVaultCore.LiquidityBlock",
252
+ components: [
253
+ {
254
+ name: "tickLower",
255
+ type: "int24",
256
+ internalType: "int24"
257
+ },
258
+ {
259
+ name: "tickUpper",
260
+ type: "int24",
261
+ internalType: "int24"
262
+ },
263
+ {
264
+ name: "prevTickLower",
265
+ type: "int24",
266
+ internalType: "int24"
267
+ },
268
+ {
269
+ name: "totalLiquidity",
270
+ type: "uint128",
271
+ internalType: "uint128"
272
+ },
273
+ {
274
+ name: "borrowedLiquidity",
275
+ type: "uint128",
276
+ internalType: "uint128"
277
+ }
278
+ ]
279
+ }],
280
+ stateMutability: "view"
281
+ },
282
+ {
283
+ type: "function",
284
+ name: "highestTick",
285
+ inputs: [],
286
+ outputs: [{
287
+ name: "",
288
+ type: "int24",
289
+ internalType: "int24"
290
+ }],
291
+ stateMutability: "view"
292
+ },
293
+ {
294
+ type: "function",
295
+ name: "lowestTick",
296
+ inputs: [],
297
+ outputs: [{
298
+ name: "",
299
+ type: "int24",
300
+ internalType: "int24"
301
+ }],
302
+ stateMutability: "view"
303
+ },
304
+ {
305
+ type: "function",
306
+ name: "mint",
307
+ inputs: [
308
+ {
309
+ name: "tickLower",
310
+ type: "int24",
311
+ internalType: "int24"
312
+ },
313
+ {
314
+ name: "tickUpper",
315
+ type: "int24",
316
+ internalType: "int24"
317
+ },
318
+ {
319
+ name: "liquidity",
320
+ type: "uint128",
321
+ internalType: "uint128"
322
+ },
323
+ {
324
+ name: "refTick",
325
+ type: "int24",
326
+ internalType: "int24"
327
+ }
328
+ ],
329
+ outputs: [
330
+ {
331
+ name: "amount0",
332
+ type: "int256",
333
+ internalType: "int256"
334
+ },
335
+ {
336
+ name: "amount1",
337
+ type: "int256",
338
+ internalType: "int256"
339
+ },
340
+ {
341
+ name: "fees0",
342
+ type: "uint256",
343
+ internalType: "uint256"
344
+ },
345
+ {
346
+ name: "fees1",
347
+ type: "uint256",
348
+ internalType: "uint256"
349
+ }
350
+ ],
351
+ stateMutability: "nonpayable"
352
+ },
353
+ {
354
+ type: "function",
355
+ name: "multicall",
356
+ inputs: [{
357
+ name: "data",
358
+ type: "bytes[]",
359
+ internalType: "bytes[]"
360
+ }],
361
+ outputs: [{
362
+ name: "results",
363
+ type: "bytes[]",
364
+ internalType: "bytes[]"
365
+ }],
366
+ stateMutability: "nonpayable"
367
+ },
368
+ {
369
+ type: "function",
370
+ name: "owner",
371
+ inputs: [],
372
+ outputs: [{
373
+ name: "",
374
+ type: "address",
375
+ internalType: "address"
376
+ }],
377
+ stateMutability: "view"
378
+ },
379
+ {
380
+ type: "function",
381
+ name: "poolKey",
382
+ inputs: [],
383
+ outputs: [{
384
+ name: "",
385
+ type: "tuple",
386
+ internalType: "struct PoolKey",
387
+ components: [
388
+ {
389
+ name: "currency0",
390
+ type: "address",
391
+ internalType: "Currency"
392
+ },
393
+ {
394
+ name: "currency1",
395
+ type: "address",
396
+ internalType: "Currency"
397
+ },
398
+ {
399
+ name: "fee",
400
+ type: "uint24",
401
+ internalType: "uint24"
402
+ },
403
+ {
404
+ name: "tickSpacing",
405
+ type: "int24",
406
+ internalType: "int24"
407
+ },
408
+ {
409
+ name: "hooks",
410
+ type: "address",
411
+ internalType: "contract IHooks"
412
+ }
413
+ ]
414
+ }],
415
+ stateMutability: "view"
416
+ },
417
+ {
418
+ type: "function",
419
+ name: "poolManager",
420
+ inputs: [],
421
+ outputs: [{
422
+ name: "",
423
+ type: "address",
424
+ internalType: "contract IPoolManager"
425
+ }],
426
+ stateMutability: "view"
427
+ },
428
+ {
429
+ type: "function",
430
+ name: "renounceOwnership",
431
+ inputs: [],
432
+ outputs: [],
433
+ stateMutability: "nonpayable"
434
+ },
435
+ {
436
+ type: "function",
437
+ name: "repay",
438
+ inputs: [
439
+ {
440
+ name: "tickLower",
441
+ type: "int24",
442
+ internalType: "int24"
443
+ },
444
+ {
445
+ name: "tickUpper",
446
+ type: "int24",
447
+ internalType: "int24"
448
+ },
449
+ {
450
+ name: "liquidity",
451
+ type: "uint128",
452
+ internalType: "uint128"
453
+ },
454
+ {
455
+ name: "refTick",
456
+ type: "int24",
457
+ internalType: "int24"
458
+ }
459
+ ],
460
+ outputs: [{
461
+ name: "delta0",
462
+ type: "int256",
463
+ internalType: "int256"
464
+ }, {
465
+ name: "delta1",
466
+ type: "int256",
467
+ internalType: "int256"
468
+ }],
469
+ stateMutability: "nonpayable"
470
+ },
471
+ {
472
+ type: "function",
473
+ name: "settleAndTake",
474
+ inputs: [],
475
+ outputs: [{
476
+ name: "delta0",
477
+ type: "int256",
478
+ internalType: "int256"
479
+ }, {
480
+ name: "delta1",
481
+ type: "int256",
482
+ internalType: "int256"
483
+ }],
484
+ stateMutability: "nonpayable"
485
+ },
486
+ {
487
+ type: "function",
488
+ name: "transferOwnership",
489
+ inputs: [{
490
+ name: "newOwner",
491
+ type: "address",
492
+ internalType: "address"
493
+ }],
494
+ outputs: [],
495
+ stateMutability: "nonpayable"
496
+ },
497
+ {
498
+ type: "function",
499
+ name: "unlockCallback",
500
+ inputs: [{
501
+ name: "rawData",
502
+ type: "bytes",
503
+ internalType: "bytes"
504
+ }],
505
+ outputs: [{
506
+ name: "",
507
+ type: "bytes",
508
+ internalType: "bytes"
509
+ }],
510
+ stateMutability: "nonpayable"
511
+ },
512
+ {
513
+ type: "function",
514
+ name: "whitelistBorrower",
515
+ inputs: [{
516
+ name: "borrower",
517
+ type: "address",
518
+ internalType: "address"
519
+ }, {
520
+ name: "status",
521
+ type: "bool",
522
+ internalType: "bool"
523
+ }],
524
+ outputs: [],
525
+ stateMutability: "nonpayable"
526
+ },
527
+ {
528
+ type: "function",
529
+ name: "withdrawTokens",
530
+ inputs: [{
531
+ name: "tokens",
532
+ type: "address[]",
533
+ internalType: "contract IERC20[]"
534
+ }],
535
+ outputs: [],
536
+ stateMutability: "nonpayable"
537
+ },
538
+ {
539
+ type: "event",
540
+ name: "Borrow",
541
+ inputs: [
542
+ {
543
+ name: "user",
544
+ type: "address",
545
+ indexed: false,
546
+ internalType: "address"
547
+ },
548
+ {
549
+ name: "tickLower",
550
+ type: "int24",
551
+ indexed: false,
552
+ internalType: "int24"
553
+ },
554
+ {
555
+ name: "tickUpper",
556
+ type: "int24",
557
+ indexed: false,
558
+ internalType: "int24"
559
+ },
560
+ {
561
+ name: "liquidity",
562
+ type: "uint128",
563
+ indexed: false,
564
+ internalType: "uint128"
565
+ }
566
+ ],
567
+ anonymous: false
568
+ },
569
+ {
570
+ type: "event",
571
+ name: "BorrowerWhitelisted",
572
+ inputs: [{
573
+ name: "borrower",
574
+ type: "address",
575
+ indexed: true,
576
+ internalType: "address"
577
+ }, {
578
+ name: "status",
579
+ type: "bool",
580
+ indexed: false,
581
+ internalType: "bool"
582
+ }],
583
+ anonymous: false
584
+ },
585
+ {
586
+ type: "event",
587
+ name: "Burn",
588
+ inputs: [
589
+ {
590
+ name: "user",
591
+ type: "address",
592
+ indexed: false,
593
+ internalType: "address"
594
+ },
595
+ {
596
+ name: "tickLower",
597
+ type: "int24",
598
+ indexed: false,
599
+ internalType: "int24"
600
+ },
601
+ {
602
+ name: "tickUpper",
603
+ type: "int24",
604
+ indexed: false,
605
+ internalType: "int24"
606
+ },
607
+ {
608
+ name: "liquidity",
609
+ type: "uint128",
610
+ indexed: false,
611
+ internalType: "uint128"
612
+ }
613
+ ],
614
+ anonymous: false
615
+ },
616
+ {
617
+ type: "event",
618
+ name: "Mint",
619
+ inputs: [
620
+ {
621
+ name: "user",
622
+ type: "address",
623
+ indexed: false,
624
+ internalType: "address"
625
+ },
626
+ {
627
+ name: "tickLower",
628
+ type: "int24",
629
+ indexed: false,
630
+ internalType: "int24"
631
+ },
632
+ {
633
+ name: "tickUpper",
634
+ type: "int24",
635
+ indexed: false,
636
+ internalType: "int24"
637
+ },
638
+ {
639
+ name: "liquidity",
640
+ type: "uint128",
641
+ indexed: false,
642
+ internalType: "uint128"
643
+ }
644
+ ],
645
+ anonymous: false
646
+ },
647
+ {
648
+ type: "event",
649
+ name: "OwnershipTransferred",
650
+ inputs: [{
651
+ name: "previousOwner",
652
+ type: "address",
653
+ indexed: true,
654
+ internalType: "address"
655
+ }, {
656
+ name: "newOwner",
657
+ type: "address",
658
+ indexed: true,
659
+ internalType: "address"
660
+ }],
661
+ anonymous: false
662
+ },
663
+ {
664
+ type: "event",
665
+ name: "Repay",
666
+ inputs: [
667
+ {
668
+ name: "user",
669
+ type: "address",
670
+ indexed: false,
671
+ internalType: "address"
672
+ },
673
+ {
674
+ name: "tickLower",
675
+ type: "int24",
676
+ indexed: false,
677
+ internalType: "int24"
678
+ },
679
+ {
680
+ name: "tickUpper",
681
+ type: "int24",
682
+ indexed: false,
683
+ internalType: "int24"
684
+ },
685
+ {
686
+ name: "liquidity",
687
+ type: "uint128",
688
+ indexed: false,
689
+ internalType: "uint128"
690
+ }
691
+ ],
692
+ anonymous: false
693
+ },
694
+ {
695
+ type: "event",
696
+ name: "TokenWithdrawn",
697
+ inputs: [
698
+ {
699
+ name: "token",
700
+ type: "address",
701
+ indexed: true,
702
+ internalType: "address"
703
+ },
704
+ {
705
+ name: "to",
706
+ type: "address",
707
+ indexed: true,
708
+ internalType: "address"
709
+ },
710
+ {
711
+ name: "amount",
712
+ type: "uint256",
713
+ indexed: false,
714
+ internalType: "uint256"
715
+ }
716
+ ],
717
+ anonymous: false
718
+ },
719
+ {
720
+ type: "error",
721
+ name: "AddressEmptyCode",
722
+ inputs: [{
723
+ name: "target",
724
+ type: "address",
725
+ internalType: "address"
726
+ }]
727
+ },
728
+ {
729
+ type: "error",
730
+ name: "BorrowerNotWhitelisted",
731
+ inputs: [{
732
+ name: "borrower",
733
+ type: "address",
734
+ internalType: "address"
735
+ }]
736
+ },
737
+ {
738
+ type: "error",
739
+ name: "FailedCall",
740
+ inputs: []
741
+ },
742
+ {
743
+ type: "error",
744
+ name: "InsufficientLiquidity",
745
+ inputs: [{
746
+ name: "blockTickLower",
747
+ type: "int24",
748
+ internalType: "int24"
749
+ }, {
750
+ name: "required",
751
+ type: "uint128",
752
+ internalType: "uint128"
753
+ }]
754
+ },
755
+ {
756
+ type: "error",
757
+ name: "InvalidActionType",
758
+ inputs: [{
759
+ name: "actionType",
760
+ type: "uint8",
761
+ internalType: "uint8"
762
+ }]
763
+ },
764
+ {
765
+ type: "error",
766
+ name: "InvalidRefTick",
767
+ inputs: [{
768
+ name: "tickLower",
769
+ type: "int24",
770
+ internalType: "int24"
771
+ }]
772
+ },
773
+ {
774
+ type: "error",
775
+ name: "InvalidTickRange",
776
+ inputs: [{
777
+ name: "tickLower",
778
+ type: "int24",
779
+ internalType: "int24"
780
+ }, {
781
+ name: "tickUpper",
782
+ type: "int24",
783
+ internalType: "int24"
784
+ }]
785
+ },
786
+ {
787
+ type: "error",
788
+ name: "OwnableInvalidOwner",
789
+ inputs: [{
790
+ name: "owner",
791
+ type: "address",
792
+ internalType: "address"
793
+ }]
794
+ },
795
+ {
796
+ type: "error",
797
+ name: "OwnableUnauthorizedAccount",
798
+ inputs: [{
799
+ name: "account",
800
+ type: "address",
801
+ internalType: "address"
802
+ }]
803
+ },
804
+ {
805
+ type: "error",
806
+ name: "ReentrancyGuardReentrantCall",
807
+ inputs: []
808
+ },
809
+ {
810
+ type: "error",
811
+ name: "SafeERC20FailedOperation",
812
+ inputs: [{
813
+ name: "token",
814
+ type: "address",
815
+ internalType: "address"
816
+ }]
817
+ },
818
+ {
819
+ type: "error",
820
+ name: "TooMuchRepay",
821
+ inputs: [
822
+ {
823
+ name: "blockTickLower",
824
+ type: "int24",
825
+ internalType: "int24"
826
+ },
827
+ {
828
+ name: "attempted",
829
+ type: "uint128",
830
+ internalType: "uint128"
831
+ },
832
+ {
833
+ name: "maximum",
834
+ type: "uint128",
835
+ internalType: "uint128"
836
+ }
837
+ ]
838
+ },
839
+ {
840
+ type: "error",
841
+ name: "UnauthorizedCaller",
842
+ inputs: []
843
+ }
844
+ ];
845
+
846
+ //#endregion
847
+ Object.defineProperty(exports, 'singleOwnerVaultAbi', {
848
+ enumerable: true,
849
+ get: function () {
850
+ return singleOwnerVaultAbi;
851
+ }
852
+ });
853
+ //# sourceMappingURL=singleOwnerVault-GCpQV7pN.cjs.map