@longdotxyz/shared 0.0.4 → 0.0.6
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/contracts/index.d.ts +168 -14
- package/dist/contracts/quote.contract.d.ts +168 -14
- package/dist/contracts/quote.contract.js +38 -0
- package/dist/contracts/quote.contract.js.map +1 -1
- package/dist/graphql/generated.d.ts +2455 -0
- package/dist/graphql/generated.js +260 -0
- package/dist/graphql/generated.js.map +1 -0
- package/dist/graphql/index.d.ts +1 -0
- package/dist/graphql/index.js +18 -0
- package/dist/graphql/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/types/pool-key.type.d.ts +20 -0
- package/dist/types/pool-key.type.js +10 -0
- package/dist/types/pool-key.type.js.map +1 -1
- package/package.json +10 -2
|
@@ -400,6 +400,160 @@ export declare const rootContract: {
|
|
|
400
400
|
};
|
|
401
401
|
};
|
|
402
402
|
quotes: {
|
|
403
|
+
v4ExactOutputSingle: {
|
|
404
|
+
method: "POST";
|
|
405
|
+
body: import("zod").ZodObject<{
|
|
406
|
+
chainId: import("zod").ZodNumber;
|
|
407
|
+
poolKey: import("zod").ZodObject<{
|
|
408
|
+
currency0: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
409
|
+
currency1: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
410
|
+
fee: import("zod").ZodNumber;
|
|
411
|
+
tickSpacing: import("zod").ZodNumber;
|
|
412
|
+
hooks: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
413
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
414
|
+
currency0: `0x${string}`;
|
|
415
|
+
currency1: `0x${string}`;
|
|
416
|
+
fee: number;
|
|
417
|
+
tickSpacing: number;
|
|
418
|
+
hooks: `0x${string}`;
|
|
419
|
+
}, {
|
|
420
|
+
currency0: string;
|
|
421
|
+
currency1: string;
|
|
422
|
+
fee: number;
|
|
423
|
+
tickSpacing: number;
|
|
424
|
+
hooks: string;
|
|
425
|
+
}>;
|
|
426
|
+
zeroForOne: import("zod").ZodBoolean;
|
|
427
|
+
exactAmount: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
|
|
428
|
+
hookData: import("zod").ZodOptional<import("zod").ZodString>;
|
|
429
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
430
|
+
chainId: number;
|
|
431
|
+
poolKey: {
|
|
432
|
+
currency0: `0x${string}`;
|
|
433
|
+
currency1: `0x${string}`;
|
|
434
|
+
fee: number;
|
|
435
|
+
tickSpacing: number;
|
|
436
|
+
hooks: `0x${string}`;
|
|
437
|
+
};
|
|
438
|
+
zeroForOne: boolean;
|
|
439
|
+
exactAmount: bigint;
|
|
440
|
+
hookData?: string | undefined;
|
|
441
|
+
}, {
|
|
442
|
+
chainId: number;
|
|
443
|
+
poolKey: {
|
|
444
|
+
currency0: string;
|
|
445
|
+
currency1: string;
|
|
446
|
+
fee: number;
|
|
447
|
+
tickSpacing: number;
|
|
448
|
+
hooks: string;
|
|
449
|
+
};
|
|
450
|
+
zeroForOne: boolean;
|
|
451
|
+
exactAmount?: any;
|
|
452
|
+
hookData?: string | undefined;
|
|
453
|
+
}>;
|
|
454
|
+
path: "/v4/exact-output-single";
|
|
455
|
+
responses: {
|
|
456
|
+
200: import("zod").ZodObject<{
|
|
457
|
+
result: import("zod").ZodObject<{
|
|
458
|
+
amountIn: import("zod").ZodString;
|
|
459
|
+
gasEstimate: import("zod").ZodString;
|
|
460
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
461
|
+
amountIn: string;
|
|
462
|
+
gasEstimate: string;
|
|
463
|
+
}, {
|
|
464
|
+
amountIn: string;
|
|
465
|
+
gasEstimate: string;
|
|
466
|
+
}>;
|
|
467
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
468
|
+
result: {
|
|
469
|
+
amountIn: string;
|
|
470
|
+
gasEstimate: string;
|
|
471
|
+
};
|
|
472
|
+
}, {
|
|
473
|
+
result: {
|
|
474
|
+
amountIn: string;
|
|
475
|
+
gasEstimate: string;
|
|
476
|
+
};
|
|
477
|
+
}>;
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
v4ExactInputSingle: {
|
|
481
|
+
method: "POST";
|
|
482
|
+
body: import("zod").ZodObject<{
|
|
483
|
+
chainId: import("zod").ZodNumber;
|
|
484
|
+
poolKey: import("zod").ZodObject<{
|
|
485
|
+
currency0: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
486
|
+
currency1: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
487
|
+
fee: import("zod").ZodNumber;
|
|
488
|
+
tickSpacing: import("zod").ZodNumber;
|
|
489
|
+
hooks: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
490
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
491
|
+
currency0: `0x${string}`;
|
|
492
|
+
currency1: `0x${string}`;
|
|
493
|
+
fee: number;
|
|
494
|
+
tickSpacing: number;
|
|
495
|
+
hooks: `0x${string}`;
|
|
496
|
+
}, {
|
|
497
|
+
currency0: string;
|
|
498
|
+
currency1: string;
|
|
499
|
+
fee: number;
|
|
500
|
+
tickSpacing: number;
|
|
501
|
+
hooks: string;
|
|
502
|
+
}>;
|
|
503
|
+
zeroForOne: import("zod").ZodBoolean;
|
|
504
|
+
exactAmount: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
|
|
505
|
+
hookData: import("zod").ZodOptional<import("zod").ZodString>;
|
|
506
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
507
|
+
chainId: number;
|
|
508
|
+
poolKey: {
|
|
509
|
+
currency0: `0x${string}`;
|
|
510
|
+
currency1: `0x${string}`;
|
|
511
|
+
fee: number;
|
|
512
|
+
tickSpacing: number;
|
|
513
|
+
hooks: `0x${string}`;
|
|
514
|
+
};
|
|
515
|
+
zeroForOne: boolean;
|
|
516
|
+
exactAmount: bigint;
|
|
517
|
+
hookData?: string | undefined;
|
|
518
|
+
}, {
|
|
519
|
+
chainId: number;
|
|
520
|
+
poolKey: {
|
|
521
|
+
currency0: string;
|
|
522
|
+
currency1: string;
|
|
523
|
+
fee: number;
|
|
524
|
+
tickSpacing: number;
|
|
525
|
+
hooks: string;
|
|
526
|
+
};
|
|
527
|
+
zeroForOne: boolean;
|
|
528
|
+
exactAmount?: any;
|
|
529
|
+
hookData?: string | undefined;
|
|
530
|
+
}>;
|
|
531
|
+
path: "/v4/exact-input-single";
|
|
532
|
+
responses: {
|
|
533
|
+
200: import("zod").ZodObject<{
|
|
534
|
+
result: import("zod").ZodObject<{
|
|
535
|
+
amountOut: import("zod").ZodString;
|
|
536
|
+
gasEstimate: import("zod").ZodString;
|
|
537
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
538
|
+
gasEstimate: string;
|
|
539
|
+
amountOut: string;
|
|
540
|
+
}, {
|
|
541
|
+
gasEstimate: string;
|
|
542
|
+
amountOut: string;
|
|
543
|
+
}>;
|
|
544
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
545
|
+
result: {
|
|
546
|
+
gasEstimate: string;
|
|
547
|
+
amountOut: string;
|
|
548
|
+
};
|
|
549
|
+
}, {
|
|
550
|
+
result: {
|
|
551
|
+
gasEstimate: string;
|
|
552
|
+
amountOut: string;
|
|
553
|
+
};
|
|
554
|
+
}>;
|
|
555
|
+
};
|
|
556
|
+
};
|
|
403
557
|
v3ExactOutputSingle: {
|
|
404
558
|
method: "POST";
|
|
405
559
|
body: import("zod").ZodObject<{
|
|
@@ -409,16 +563,16 @@ export declare const rootContract: {
|
|
|
409
563
|
amountOut: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
|
|
410
564
|
fee: import("zod").ZodNumber;
|
|
411
565
|
}, "strip", import("zod").ZodTypeAny, {
|
|
566
|
+
fee: number;
|
|
412
567
|
chainId: number;
|
|
568
|
+
amountOut: bigint;
|
|
413
569
|
tokenIn: `0x${string}`;
|
|
414
570
|
tokenOut: `0x${string}`;
|
|
415
|
-
amountOut: bigint;
|
|
416
|
-
fee: number;
|
|
417
571
|
}, {
|
|
572
|
+
fee: number;
|
|
418
573
|
chainId: number;
|
|
419
574
|
tokenIn: string;
|
|
420
575
|
tokenOut: string;
|
|
421
|
-
fee: number;
|
|
422
576
|
amountOut?: any;
|
|
423
577
|
}>;
|
|
424
578
|
path: "/v3/exact-output-single";
|
|
@@ -431,28 +585,28 @@ export declare const rootContract: {
|
|
|
431
585
|
gasEstimate: import("zod").ZodString;
|
|
432
586
|
}, "strip", import("zod").ZodTypeAny, {
|
|
433
587
|
amountIn: string;
|
|
588
|
+
gasEstimate: string;
|
|
434
589
|
sqrtPriceX96After: string;
|
|
435
590
|
initializedTicksCrossed: number;
|
|
436
|
-
gasEstimate: string;
|
|
437
591
|
}, {
|
|
438
592
|
amountIn: string;
|
|
593
|
+
gasEstimate: string;
|
|
439
594
|
sqrtPriceX96After: string;
|
|
440
595
|
initializedTicksCrossed: number;
|
|
441
|
-
gasEstimate: string;
|
|
442
596
|
}>;
|
|
443
597
|
}, "strip", import("zod").ZodTypeAny, {
|
|
444
598
|
result: {
|
|
445
599
|
amountIn: string;
|
|
600
|
+
gasEstimate: string;
|
|
446
601
|
sqrtPriceX96After: string;
|
|
447
602
|
initializedTicksCrossed: number;
|
|
448
|
-
gasEstimate: string;
|
|
449
603
|
};
|
|
450
604
|
}, {
|
|
451
605
|
result: {
|
|
452
606
|
amountIn: string;
|
|
607
|
+
gasEstimate: string;
|
|
453
608
|
sqrtPriceX96After: string;
|
|
454
609
|
initializedTicksCrossed: number;
|
|
455
|
-
gasEstimate: string;
|
|
456
610
|
};
|
|
457
611
|
}>;
|
|
458
612
|
};
|
|
@@ -467,17 +621,17 @@ export declare const rootContract: {
|
|
|
467
621
|
fee: import("zod").ZodNumber;
|
|
468
622
|
sqrtPriceLimitX96: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodAny, bigint, any>>;
|
|
469
623
|
}, "strip", import("zod").ZodTypeAny, {
|
|
624
|
+
fee: number;
|
|
470
625
|
chainId: number;
|
|
626
|
+
amountIn: bigint;
|
|
471
627
|
tokenIn: `0x${string}`;
|
|
472
628
|
tokenOut: `0x${string}`;
|
|
473
|
-
fee: number;
|
|
474
|
-
amountIn: bigint;
|
|
475
629
|
sqrtPriceLimitX96?: bigint | undefined;
|
|
476
630
|
}, {
|
|
631
|
+
fee: number;
|
|
477
632
|
chainId: number;
|
|
478
633
|
tokenIn: string;
|
|
479
634
|
tokenOut: string;
|
|
480
|
-
fee: number;
|
|
481
635
|
amountIn?: any;
|
|
482
636
|
sqrtPriceLimitX96?: any;
|
|
483
637
|
}>;
|
|
@@ -490,29 +644,29 @@ export declare const rootContract: {
|
|
|
490
644
|
initializedTicksCrossed: import("zod").ZodNumber;
|
|
491
645
|
gasEstimate: import("zod").ZodString;
|
|
492
646
|
}, "strip", import("zod").ZodTypeAny, {
|
|
647
|
+
gasEstimate: string;
|
|
493
648
|
amountOut: string;
|
|
494
649
|
sqrtPriceX96After: string;
|
|
495
650
|
initializedTicksCrossed: number;
|
|
496
|
-
gasEstimate: string;
|
|
497
651
|
}, {
|
|
652
|
+
gasEstimate: string;
|
|
498
653
|
amountOut: string;
|
|
499
654
|
sqrtPriceX96After: string;
|
|
500
655
|
initializedTicksCrossed: number;
|
|
501
|
-
gasEstimate: string;
|
|
502
656
|
}>;
|
|
503
657
|
}, "strip", import("zod").ZodTypeAny, {
|
|
504
658
|
result: {
|
|
659
|
+
gasEstimate: string;
|
|
505
660
|
amountOut: string;
|
|
506
661
|
sqrtPriceX96After: string;
|
|
507
662
|
initializedTicksCrossed: number;
|
|
508
|
-
gasEstimate: string;
|
|
509
663
|
};
|
|
510
664
|
}, {
|
|
511
665
|
result: {
|
|
666
|
+
gasEstimate: string;
|
|
512
667
|
amountOut: string;
|
|
513
668
|
sqrtPriceX96After: string;
|
|
514
669
|
initializedTicksCrossed: number;
|
|
515
|
-
gasEstimate: string;
|
|
516
670
|
};
|
|
517
671
|
}>;
|
|
518
672
|
};
|
|
@@ -1,5 +1,159 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
2
|
declare const quoteContract: {
|
|
3
|
+
v4ExactOutputSingle: {
|
|
4
|
+
method: "POST";
|
|
5
|
+
body: z.ZodObject<{
|
|
6
|
+
chainId: z.ZodNumber;
|
|
7
|
+
poolKey: z.ZodObject<{
|
|
8
|
+
currency0: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
|
|
9
|
+
currency1: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
|
|
10
|
+
fee: z.ZodNumber;
|
|
11
|
+
tickSpacing: z.ZodNumber;
|
|
12
|
+
hooks: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
currency0: `0x${string}`;
|
|
15
|
+
currency1: `0x${string}`;
|
|
16
|
+
fee: number;
|
|
17
|
+
tickSpacing: number;
|
|
18
|
+
hooks: `0x${string}`;
|
|
19
|
+
}, {
|
|
20
|
+
currency0: string;
|
|
21
|
+
currency1: string;
|
|
22
|
+
fee: number;
|
|
23
|
+
tickSpacing: number;
|
|
24
|
+
hooks: string;
|
|
25
|
+
}>;
|
|
26
|
+
zeroForOne: z.ZodBoolean;
|
|
27
|
+
exactAmount: z.ZodEffects<z.ZodAny, bigint, any>;
|
|
28
|
+
hookData: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
chainId: number;
|
|
31
|
+
poolKey: {
|
|
32
|
+
currency0: `0x${string}`;
|
|
33
|
+
currency1: `0x${string}`;
|
|
34
|
+
fee: number;
|
|
35
|
+
tickSpacing: number;
|
|
36
|
+
hooks: `0x${string}`;
|
|
37
|
+
};
|
|
38
|
+
zeroForOne: boolean;
|
|
39
|
+
exactAmount: bigint;
|
|
40
|
+
hookData?: string | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
chainId: number;
|
|
43
|
+
poolKey: {
|
|
44
|
+
currency0: string;
|
|
45
|
+
currency1: string;
|
|
46
|
+
fee: number;
|
|
47
|
+
tickSpacing: number;
|
|
48
|
+
hooks: string;
|
|
49
|
+
};
|
|
50
|
+
zeroForOne: boolean;
|
|
51
|
+
exactAmount?: any;
|
|
52
|
+
hookData?: string | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
path: "/v4/exact-output-single";
|
|
55
|
+
responses: {
|
|
56
|
+
200: z.ZodObject<{
|
|
57
|
+
result: z.ZodObject<{
|
|
58
|
+
amountIn: z.ZodString;
|
|
59
|
+
gasEstimate: z.ZodString;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
amountIn: string;
|
|
62
|
+
gasEstimate: string;
|
|
63
|
+
}, {
|
|
64
|
+
amountIn: string;
|
|
65
|
+
gasEstimate: string;
|
|
66
|
+
}>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
result: {
|
|
69
|
+
amountIn: string;
|
|
70
|
+
gasEstimate: string;
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
result: {
|
|
74
|
+
amountIn: string;
|
|
75
|
+
gasEstimate: string;
|
|
76
|
+
};
|
|
77
|
+
}>;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
v4ExactInputSingle: {
|
|
81
|
+
method: "POST";
|
|
82
|
+
body: z.ZodObject<{
|
|
83
|
+
chainId: z.ZodNumber;
|
|
84
|
+
poolKey: z.ZodObject<{
|
|
85
|
+
currency0: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
|
|
86
|
+
currency1: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
|
|
87
|
+
fee: z.ZodNumber;
|
|
88
|
+
tickSpacing: z.ZodNumber;
|
|
89
|
+
hooks: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
currency0: `0x${string}`;
|
|
92
|
+
currency1: `0x${string}`;
|
|
93
|
+
fee: number;
|
|
94
|
+
tickSpacing: number;
|
|
95
|
+
hooks: `0x${string}`;
|
|
96
|
+
}, {
|
|
97
|
+
currency0: string;
|
|
98
|
+
currency1: string;
|
|
99
|
+
fee: number;
|
|
100
|
+
tickSpacing: number;
|
|
101
|
+
hooks: string;
|
|
102
|
+
}>;
|
|
103
|
+
zeroForOne: z.ZodBoolean;
|
|
104
|
+
exactAmount: z.ZodEffects<z.ZodAny, bigint, any>;
|
|
105
|
+
hookData: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
chainId: number;
|
|
108
|
+
poolKey: {
|
|
109
|
+
currency0: `0x${string}`;
|
|
110
|
+
currency1: `0x${string}`;
|
|
111
|
+
fee: number;
|
|
112
|
+
tickSpacing: number;
|
|
113
|
+
hooks: `0x${string}`;
|
|
114
|
+
};
|
|
115
|
+
zeroForOne: boolean;
|
|
116
|
+
exactAmount: bigint;
|
|
117
|
+
hookData?: string | undefined;
|
|
118
|
+
}, {
|
|
119
|
+
chainId: number;
|
|
120
|
+
poolKey: {
|
|
121
|
+
currency0: string;
|
|
122
|
+
currency1: string;
|
|
123
|
+
fee: number;
|
|
124
|
+
tickSpacing: number;
|
|
125
|
+
hooks: string;
|
|
126
|
+
};
|
|
127
|
+
zeroForOne: boolean;
|
|
128
|
+
exactAmount?: any;
|
|
129
|
+
hookData?: string | undefined;
|
|
130
|
+
}>;
|
|
131
|
+
path: "/v4/exact-input-single";
|
|
132
|
+
responses: {
|
|
133
|
+
200: z.ZodObject<{
|
|
134
|
+
result: z.ZodObject<{
|
|
135
|
+
amountOut: z.ZodString;
|
|
136
|
+
gasEstimate: z.ZodString;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
gasEstimate: string;
|
|
139
|
+
amountOut: string;
|
|
140
|
+
}, {
|
|
141
|
+
gasEstimate: string;
|
|
142
|
+
amountOut: string;
|
|
143
|
+
}>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
result: {
|
|
146
|
+
gasEstimate: string;
|
|
147
|
+
amountOut: string;
|
|
148
|
+
};
|
|
149
|
+
}, {
|
|
150
|
+
result: {
|
|
151
|
+
gasEstimate: string;
|
|
152
|
+
amountOut: string;
|
|
153
|
+
};
|
|
154
|
+
}>;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
3
157
|
v3ExactOutputSingle: {
|
|
4
158
|
method: "POST";
|
|
5
159
|
body: z.ZodObject<{
|
|
@@ -9,16 +163,16 @@ declare const quoteContract: {
|
|
|
9
163
|
amountOut: z.ZodEffects<z.ZodAny, bigint, any>;
|
|
10
164
|
fee: z.ZodNumber;
|
|
11
165
|
}, "strip", z.ZodTypeAny, {
|
|
166
|
+
fee: number;
|
|
12
167
|
chainId: number;
|
|
168
|
+
amountOut: bigint;
|
|
13
169
|
tokenIn: `0x${string}`;
|
|
14
170
|
tokenOut: `0x${string}`;
|
|
15
|
-
amountOut: bigint;
|
|
16
|
-
fee: number;
|
|
17
171
|
}, {
|
|
172
|
+
fee: number;
|
|
18
173
|
chainId: number;
|
|
19
174
|
tokenIn: string;
|
|
20
175
|
tokenOut: string;
|
|
21
|
-
fee: number;
|
|
22
176
|
amountOut?: any;
|
|
23
177
|
}>;
|
|
24
178
|
path: "/v3/exact-output-single";
|
|
@@ -31,28 +185,28 @@ declare const quoteContract: {
|
|
|
31
185
|
gasEstimate: z.ZodString;
|
|
32
186
|
}, "strip", z.ZodTypeAny, {
|
|
33
187
|
amountIn: string;
|
|
188
|
+
gasEstimate: string;
|
|
34
189
|
sqrtPriceX96After: string;
|
|
35
190
|
initializedTicksCrossed: number;
|
|
36
|
-
gasEstimate: string;
|
|
37
191
|
}, {
|
|
38
192
|
amountIn: string;
|
|
193
|
+
gasEstimate: string;
|
|
39
194
|
sqrtPriceX96After: string;
|
|
40
195
|
initializedTicksCrossed: number;
|
|
41
|
-
gasEstimate: string;
|
|
42
196
|
}>;
|
|
43
197
|
}, "strip", z.ZodTypeAny, {
|
|
44
198
|
result: {
|
|
45
199
|
amountIn: string;
|
|
200
|
+
gasEstimate: string;
|
|
46
201
|
sqrtPriceX96After: string;
|
|
47
202
|
initializedTicksCrossed: number;
|
|
48
|
-
gasEstimate: string;
|
|
49
203
|
};
|
|
50
204
|
}, {
|
|
51
205
|
result: {
|
|
52
206
|
amountIn: string;
|
|
207
|
+
gasEstimate: string;
|
|
53
208
|
sqrtPriceX96After: string;
|
|
54
209
|
initializedTicksCrossed: number;
|
|
55
|
-
gasEstimate: string;
|
|
56
210
|
};
|
|
57
211
|
}>;
|
|
58
212
|
};
|
|
@@ -67,17 +221,17 @@ declare const quoteContract: {
|
|
|
67
221
|
fee: z.ZodNumber;
|
|
68
222
|
sqrtPriceLimitX96: z.ZodOptional<z.ZodEffects<z.ZodAny, bigint, any>>;
|
|
69
223
|
}, "strip", z.ZodTypeAny, {
|
|
224
|
+
fee: number;
|
|
70
225
|
chainId: number;
|
|
226
|
+
amountIn: bigint;
|
|
71
227
|
tokenIn: `0x${string}`;
|
|
72
228
|
tokenOut: `0x${string}`;
|
|
73
|
-
fee: number;
|
|
74
|
-
amountIn: bigint;
|
|
75
229
|
sqrtPriceLimitX96?: bigint | undefined;
|
|
76
230
|
}, {
|
|
231
|
+
fee: number;
|
|
77
232
|
chainId: number;
|
|
78
233
|
tokenIn: string;
|
|
79
234
|
tokenOut: string;
|
|
80
|
-
fee: number;
|
|
81
235
|
amountIn?: any;
|
|
82
236
|
sqrtPriceLimitX96?: any;
|
|
83
237
|
}>;
|
|
@@ -90,29 +244,29 @@ declare const quoteContract: {
|
|
|
90
244
|
initializedTicksCrossed: z.ZodNumber;
|
|
91
245
|
gasEstimate: z.ZodString;
|
|
92
246
|
}, "strip", z.ZodTypeAny, {
|
|
247
|
+
gasEstimate: string;
|
|
93
248
|
amountOut: string;
|
|
94
249
|
sqrtPriceX96After: string;
|
|
95
250
|
initializedTicksCrossed: number;
|
|
96
|
-
gasEstimate: string;
|
|
97
251
|
}, {
|
|
252
|
+
gasEstimate: string;
|
|
98
253
|
amountOut: string;
|
|
99
254
|
sqrtPriceX96After: string;
|
|
100
255
|
initializedTicksCrossed: number;
|
|
101
|
-
gasEstimate: string;
|
|
102
256
|
}>;
|
|
103
257
|
}, "strip", z.ZodTypeAny, {
|
|
104
258
|
result: {
|
|
259
|
+
gasEstimate: string;
|
|
105
260
|
amountOut: string;
|
|
106
261
|
sqrtPriceX96After: string;
|
|
107
262
|
initializedTicksCrossed: number;
|
|
108
|
-
gasEstimate: string;
|
|
109
263
|
};
|
|
110
264
|
}, {
|
|
111
265
|
result: {
|
|
266
|
+
gasEstimate: string;
|
|
112
267
|
amountOut: string;
|
|
113
268
|
sqrtPriceX96After: string;
|
|
114
269
|
initializedTicksCrossed: number;
|
|
115
|
-
gasEstimate: string;
|
|
116
270
|
};
|
|
117
271
|
}>;
|
|
118
272
|
};
|
|
@@ -6,6 +6,44 @@ const zod_1 = require("zod");
|
|
|
6
6
|
const types_1 = require("../types");
|
|
7
7
|
const contract = (0, core_1.initContract)();
|
|
8
8
|
const quoteContract = contract.router({
|
|
9
|
+
v4ExactOutputSingle: {
|
|
10
|
+
method: "POST",
|
|
11
|
+
path: "/v4/exact-output-single",
|
|
12
|
+
body: zod_1.default.object({
|
|
13
|
+
chainId: zod_1.default.number(),
|
|
14
|
+
poolKey: types_1.poolKeySchema,
|
|
15
|
+
zeroForOne: zod_1.default.boolean(),
|
|
16
|
+
exactAmount: types_1.coerceBigInt,
|
|
17
|
+
hookData: zod_1.default.optional(zod_1.default.string()),
|
|
18
|
+
}),
|
|
19
|
+
responses: {
|
|
20
|
+
200: zod_1.default.object({
|
|
21
|
+
result: zod_1.default.object({
|
|
22
|
+
amountIn: zod_1.default.string(),
|
|
23
|
+
gasEstimate: zod_1.default.string(),
|
|
24
|
+
}),
|
|
25
|
+
}),
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
v4ExactInputSingle: {
|
|
29
|
+
method: "POST",
|
|
30
|
+
path: "/v4/exact-input-single",
|
|
31
|
+
body: zod_1.default.object({
|
|
32
|
+
chainId: zod_1.default.number(),
|
|
33
|
+
poolKey: types_1.poolKeySchema,
|
|
34
|
+
zeroForOne: zod_1.default.boolean(),
|
|
35
|
+
exactAmount: types_1.coerceBigInt,
|
|
36
|
+
hookData: zod_1.default.optional(zod_1.default.string()),
|
|
37
|
+
}),
|
|
38
|
+
responses: {
|
|
39
|
+
200: zod_1.default.object({
|
|
40
|
+
result: zod_1.default.object({
|
|
41
|
+
amountOut: zod_1.default.string(),
|
|
42
|
+
gasEstimate: zod_1.default.string(),
|
|
43
|
+
}),
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
9
47
|
v3ExactOutputSingle: {
|
|
10
48
|
method: "POST",
|
|
11
49
|
path: "/v3/exact-output-single",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.contract.js","sourceRoot":"","sources":["../../src/contracts/quote.contract.ts"],"names":[],"mappings":";;;AAAA,wCAA6C;AAC7C,6BAAoB;AAEpB,
|
|
1
|
+
{"version":3,"file":"quote.contract.js","sourceRoot":"","sources":["../../src/contracts/quote.contract.ts"],"names":[],"mappings":";;;AAAA,wCAA6C;AAC7C,6BAAoB;AAEpB,oCAA4D;AAE5D,MA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