@longdotxyz/shared 0.0.13 → 0.0.15

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.
@@ -401,8 +401,8 @@ export declare const rootContract: {
401
401
  v4ExactOutputSingle: {
402
402
  method: "POST";
403
403
  body: import("zod").ZodObject<{
404
- chainId: import("zod").ZodNumber;
405
- poolKey: import("zod").ZodObject<{
404
+ chain_id: import("zod").ZodNumber;
405
+ pool_key: import("zod").ZodObject<{
406
406
  currency0: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
407
407
  currency1: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
408
408
  fee: import("zod").ZodNumber;
@@ -421,56 +421,56 @@ export declare const rootContract: {
421
421
  tickSpacing: number;
422
422
  hooks: string;
423
423
  }>;
424
- zeroForOne: import("zod").ZodBoolean;
425
- exactAmount: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
426
- hookData: import("zod").ZodOptional<import("zod").ZodString>;
424
+ zero_for_one: import("zod").ZodBoolean;
425
+ exact_amount: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
426
+ hook_data: import("zod").ZodOptional<import("zod").ZodString>;
427
427
  }, "strip", import("zod").ZodTypeAny, {
428
- chainId: number;
429
- poolKey: {
428
+ chain_id: number;
429
+ pool_key: {
430
430
  currency0: `0x${string}`;
431
431
  currency1: `0x${string}`;
432
432
  fee: number;
433
433
  tickSpacing: number;
434
434
  hooks: `0x${string}`;
435
435
  };
436
- zeroForOne: boolean;
437
- exactAmount: bigint;
438
- hookData?: string | undefined;
436
+ zero_for_one: boolean;
437
+ exact_amount: bigint;
438
+ hook_data?: string | undefined;
439
439
  }, {
440
- chainId: number;
441
- poolKey: {
440
+ chain_id: number;
441
+ pool_key: {
442
442
  currency0: string;
443
443
  currency1: string;
444
444
  fee: number;
445
445
  tickSpacing: number;
446
446
  hooks: string;
447
447
  };
448
- zeroForOne: boolean;
449
- exactAmount?: any;
450
- hookData?: string | undefined;
448
+ zero_for_one: boolean;
449
+ exact_amount?: any;
450
+ hook_data?: string | undefined;
451
451
  }>;
452
452
  path: "/quotes/v4/exact-output-single";
453
453
  responses: {
454
454
  200: import("zod").ZodObject<{
455
455
  result: import("zod").ZodObject<{
456
- amountIn: import("zod").ZodString;
457
- gasEstimate: import("zod").ZodString;
456
+ amount_in: import("zod").ZodString;
457
+ gas_estimate: import("zod").ZodString;
458
458
  }, "strip", import("zod").ZodTypeAny, {
459
- amountIn: string;
460
- gasEstimate: string;
459
+ amount_in: string;
460
+ gas_estimate: string;
461
461
  }, {
462
- amountIn: string;
463
- gasEstimate: string;
462
+ amount_in: string;
463
+ gas_estimate: string;
464
464
  }>;
465
465
  }, "strip", import("zod").ZodTypeAny, {
466
466
  result: {
467
- amountIn: string;
468
- gasEstimate: string;
467
+ amount_in: string;
468
+ gas_estimate: string;
469
469
  };
470
470
  }, {
471
471
  result: {
472
- amountIn: string;
473
- gasEstimate: string;
472
+ amount_in: string;
473
+ gas_estimate: string;
474
474
  };
475
475
  }>;
476
476
  };
@@ -478,8 +478,8 @@ export declare const rootContract: {
478
478
  v4ExactInputSingle: {
479
479
  method: "POST";
480
480
  body: import("zod").ZodObject<{
481
- chainId: import("zod").ZodNumber;
482
- poolKey: import("zod").ZodObject<{
481
+ chain_id: import("zod").ZodNumber;
482
+ pool_key: import("zod").ZodObject<{
483
483
  currency0: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
484
484
  currency1: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
485
485
  fee: import("zod").ZodNumber;
@@ -498,56 +498,56 @@ export declare const rootContract: {
498
498
  tickSpacing: number;
499
499
  hooks: string;
500
500
  }>;
501
- zeroForOne: import("zod").ZodBoolean;
502
- exactAmount: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
503
- hookData: import("zod").ZodOptional<import("zod").ZodString>;
501
+ zero_for_one: import("zod").ZodBoolean;
502
+ exact_amount: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
503
+ hook_data: import("zod").ZodOptional<import("zod").ZodString>;
504
504
  }, "strip", import("zod").ZodTypeAny, {
505
- chainId: number;
506
- poolKey: {
505
+ chain_id: number;
506
+ pool_key: {
507
507
  currency0: `0x${string}`;
508
508
  currency1: `0x${string}`;
509
509
  fee: number;
510
510
  tickSpacing: number;
511
511
  hooks: `0x${string}`;
512
512
  };
513
- zeroForOne: boolean;
514
- exactAmount: bigint;
515
- hookData?: string | undefined;
513
+ zero_for_one: boolean;
514
+ exact_amount: bigint;
515
+ hook_data?: string | undefined;
516
516
  }, {
517
- chainId: number;
518
- poolKey: {
517
+ chain_id: number;
518
+ pool_key: {
519
519
  currency0: string;
520
520
  currency1: string;
521
521
  fee: number;
522
522
  tickSpacing: number;
523
523
  hooks: string;
524
524
  };
525
- zeroForOne: boolean;
526
- exactAmount?: any;
527
- hookData?: string | undefined;
525
+ zero_for_one: boolean;
526
+ exact_amount?: any;
527
+ hook_data?: string | undefined;
528
528
  }>;
529
529
  path: "/quotes/v4/exact-input-single";
530
530
  responses: {
531
531
  200: import("zod").ZodObject<{
532
532
  result: import("zod").ZodObject<{
533
- amountOut: import("zod").ZodString;
534
- gasEstimate: import("zod").ZodString;
533
+ amount_out: import("zod").ZodString;
534
+ gas_estimate: import("zod").ZodString;
535
535
  }, "strip", import("zod").ZodTypeAny, {
536
- gasEstimate: string;
537
- amountOut: string;
536
+ gas_estimate: string;
537
+ amount_out: string;
538
538
  }, {
539
- gasEstimate: string;
540
- amountOut: string;
539
+ gas_estimate: string;
540
+ amount_out: string;
541
541
  }>;
542
542
  }, "strip", import("zod").ZodTypeAny, {
543
543
  result: {
544
- gasEstimate: string;
545
- amountOut: string;
544
+ gas_estimate: string;
545
+ amount_out: string;
546
546
  };
547
547
  }, {
548
548
  result: {
549
- gasEstimate: string;
550
- amountOut: string;
549
+ gas_estimate: string;
550
+ amount_out: string;
551
551
  };
552
552
  }>;
553
553
  };
@@ -555,56 +555,56 @@ export declare const rootContract: {
555
555
  v3ExactOutputSingle: {
556
556
  method: "POST";
557
557
  body: import("zod").ZodObject<{
558
- chainId: import("zod").ZodNumber;
559
- tokenIn: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
560
- tokenOut: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
561
- amountOut: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
558
+ chain_id: import("zod").ZodNumber;
559
+ token_in: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
560
+ token_out: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
561
+ amount_out: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
562
562
  fee: import("zod").ZodNumber;
563
563
  }, "strip", import("zod").ZodTypeAny, {
564
564
  fee: number;
565
- chainId: number;
566
- amountOut: bigint;
567
- tokenIn: `0x${string}`;
568
- tokenOut: `0x${string}`;
565
+ chain_id: number;
566
+ amount_out: bigint;
567
+ token_in: `0x${string}`;
568
+ token_out: `0x${string}`;
569
569
  }, {
570
570
  fee: number;
571
- chainId: number;
572
- tokenIn: string;
573
- tokenOut: string;
574
- amountOut?: any;
571
+ chain_id: number;
572
+ token_in: string;
573
+ token_out: string;
574
+ amount_out?: any;
575
575
  }>;
576
576
  path: "/quotes/v3/exact-output-single";
577
577
  responses: {
578
578
  200: import("zod").ZodObject<{
579
579
  result: import("zod").ZodObject<{
580
- amountIn: import("zod").ZodString;
581
- sqrtPriceX96After: import("zod").ZodString;
582
- initializedTicksCrossed: import("zod").ZodNumber;
583
- gasEstimate: import("zod").ZodString;
580
+ amount_in: import("zod").ZodString;
581
+ sqrt_price_x96_after: import("zod").ZodString;
582
+ initialized_ticks_crossed: import("zod").ZodNumber;
583
+ gas_estimate: import("zod").ZodString;
584
584
  }, "strip", import("zod").ZodTypeAny, {
585
- amountIn: string;
586
- gasEstimate: string;
587
- sqrtPriceX96After: string;
588
- initializedTicksCrossed: number;
585
+ amount_in: string;
586
+ gas_estimate: string;
587
+ sqrt_price_x96_after: string;
588
+ initialized_ticks_crossed: number;
589
589
  }, {
590
- amountIn: string;
591
- gasEstimate: string;
592
- sqrtPriceX96After: string;
593
- initializedTicksCrossed: number;
590
+ amount_in: string;
591
+ gas_estimate: string;
592
+ sqrt_price_x96_after: string;
593
+ initialized_ticks_crossed: number;
594
594
  }>;
595
595
  }, "strip", import("zod").ZodTypeAny, {
596
596
  result: {
597
- amountIn: string;
598
- gasEstimate: string;
599
- sqrtPriceX96After: string;
600
- initializedTicksCrossed: number;
597
+ amount_in: string;
598
+ gas_estimate: string;
599
+ sqrt_price_x96_after: string;
600
+ initialized_ticks_crossed: number;
601
601
  };
602
602
  }, {
603
603
  result: {
604
- amountIn: string;
605
- gasEstimate: string;
606
- sqrtPriceX96After: string;
607
- initializedTicksCrossed: number;
604
+ amount_in: string;
605
+ gas_estimate: string;
606
+ sqrt_price_x96_after: string;
607
+ initialized_ticks_crossed: number;
608
608
  };
609
609
  }>;
610
610
  };
@@ -612,59 +612,59 @@ export declare const rootContract: {
612
612
  v3ExactInputSingle: {
613
613
  method: "POST";
614
614
  body: import("zod").ZodObject<{
615
- chainId: import("zod").ZodNumber;
616
- tokenIn: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
617
- tokenOut: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
618
- amountIn: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
615
+ chain_id: import("zod").ZodNumber;
616
+ token_in: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
617
+ token_out: import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
618
+ amount_in: import("zod").ZodEffects<import("zod").ZodAny, bigint, any>;
619
619
  fee: import("zod").ZodNumber;
620
- sqrtPriceLimitX96: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodAny, bigint, any>>;
620
+ sqrt_price_limit_x96: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodAny, bigint, any>>;
621
621
  }, "strip", import("zod").ZodTypeAny, {
622
622
  fee: number;
623
- chainId: number;
624
- amountIn: bigint;
625
- tokenIn: `0x${string}`;
626
- tokenOut: `0x${string}`;
627
- sqrtPriceLimitX96?: bigint | undefined;
623
+ chain_id: number;
624
+ amount_in: bigint;
625
+ token_in: `0x${string}`;
626
+ token_out: `0x${string}`;
627
+ sqrt_price_limit_x96?: bigint | undefined;
628
628
  }, {
629
629
  fee: number;
630
- chainId: number;
631
- tokenIn: string;
632
- tokenOut: string;
633
- amountIn?: any;
634
- sqrtPriceLimitX96?: any;
630
+ chain_id: number;
631
+ token_in: string;
632
+ token_out: string;
633
+ amount_in?: any;
634
+ sqrt_price_limit_x96?: any;
635
635
  }>;
636
636
  path: "/quotes/v3/exact-input-single";
637
637
  responses: {
638
638
  200: import("zod").ZodObject<{
639
639
  result: import("zod").ZodObject<{
640
- amountOut: import("zod").ZodString;
641
- sqrtPriceX96After: import("zod").ZodString;
642
- initializedTicksCrossed: import("zod").ZodNumber;
643
- gasEstimate: import("zod").ZodString;
640
+ amount_out: import("zod").ZodString;
641
+ sqrt_price_x96_after: import("zod").ZodString;
642
+ initialized_ticks_crossed: import("zod").ZodNumber;
643
+ gas_estimate: import("zod").ZodString;
644
644
  }, "strip", import("zod").ZodTypeAny, {
645
- gasEstimate: string;
646
- amountOut: string;
647
- sqrtPriceX96After: string;
648
- initializedTicksCrossed: number;
645
+ gas_estimate: string;
646
+ amount_out: string;
647
+ sqrt_price_x96_after: string;
648
+ initialized_ticks_crossed: number;
649
649
  }, {
650
- gasEstimate: string;
651
- amountOut: string;
652
- sqrtPriceX96After: string;
653
- initializedTicksCrossed: number;
650
+ gas_estimate: string;
651
+ amount_out: string;
652
+ sqrt_price_x96_after: string;
653
+ initialized_ticks_crossed: number;
654
654
  }>;
655
655
  }, "strip", import("zod").ZodTypeAny, {
656
656
  result: {
657
- gasEstimate: string;
658
- amountOut: string;
659
- sqrtPriceX96After: string;
660
- initializedTicksCrossed: number;
657
+ gas_estimate: string;
658
+ amount_out: string;
659
+ sqrt_price_x96_after: string;
660
+ initialized_ticks_crossed: number;
661
661
  };
662
662
  }, {
663
663
  result: {
664
- gasEstimate: string;
665
- amountOut: string;
666
- sqrtPriceX96After: string;
667
- initializedTicksCrossed: number;
664
+ gas_estimate: string;
665
+ amount_out: string;
666
+ sqrt_price_x96_after: string;
667
+ initialized_ticks_crossed: number;
668
668
  };
669
669
  }>;
670
670
  };
@@ -3,8 +3,8 @@ declare const quoteContract: {
3
3
  v4ExactOutputSingle: {
4
4
  method: "POST";
5
5
  body: z.ZodObject<{
6
- chainId: z.ZodNumber;
7
- poolKey: z.ZodObject<{
6
+ chain_id: z.ZodNumber;
7
+ pool_key: z.ZodObject<{
8
8
  currency0: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
9
9
  currency1: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
10
10
  fee: z.ZodNumber;
@@ -23,56 +23,56 @@ declare const quoteContract: {
23
23
  tickSpacing: number;
24
24
  hooks: string;
25
25
  }>;
26
- zeroForOne: z.ZodBoolean;
27
- exactAmount: z.ZodEffects<z.ZodAny, bigint, any>;
28
- hookData: z.ZodOptional<z.ZodString>;
26
+ zero_for_one: z.ZodBoolean;
27
+ exact_amount: z.ZodEffects<z.ZodAny, bigint, any>;
28
+ hook_data: z.ZodOptional<z.ZodString>;
29
29
  }, "strip", z.ZodTypeAny, {
30
- chainId: number;
31
- poolKey: {
30
+ chain_id: number;
31
+ pool_key: {
32
32
  currency0: `0x${string}`;
33
33
  currency1: `0x${string}`;
34
34
  fee: number;
35
35
  tickSpacing: number;
36
36
  hooks: `0x${string}`;
37
37
  };
38
- zeroForOne: boolean;
39
- exactAmount: bigint;
40
- hookData?: string | undefined;
38
+ zero_for_one: boolean;
39
+ exact_amount: bigint;
40
+ hook_data?: string | undefined;
41
41
  }, {
42
- chainId: number;
43
- poolKey: {
42
+ chain_id: number;
43
+ pool_key: {
44
44
  currency0: string;
45
45
  currency1: string;
46
46
  fee: number;
47
47
  tickSpacing: number;
48
48
  hooks: string;
49
49
  };
50
- zeroForOne: boolean;
51
- exactAmount?: any;
52
- hookData?: string | undefined;
50
+ zero_for_one: boolean;
51
+ exact_amount?: any;
52
+ hook_data?: string | undefined;
53
53
  }>;
54
54
  path: "/quotes/v4/exact-output-single";
55
55
  responses: {
56
56
  200: z.ZodObject<{
57
57
  result: z.ZodObject<{
58
- amountIn: z.ZodString;
59
- gasEstimate: z.ZodString;
58
+ amount_in: z.ZodString;
59
+ gas_estimate: z.ZodString;
60
60
  }, "strip", z.ZodTypeAny, {
61
- amountIn: string;
62
- gasEstimate: string;
61
+ amount_in: string;
62
+ gas_estimate: string;
63
63
  }, {
64
- amountIn: string;
65
- gasEstimate: string;
64
+ amount_in: string;
65
+ gas_estimate: string;
66
66
  }>;
67
67
  }, "strip", z.ZodTypeAny, {
68
68
  result: {
69
- amountIn: string;
70
- gasEstimate: string;
69
+ amount_in: string;
70
+ gas_estimate: string;
71
71
  };
72
72
  }, {
73
73
  result: {
74
- amountIn: string;
75
- gasEstimate: string;
74
+ amount_in: string;
75
+ gas_estimate: string;
76
76
  };
77
77
  }>;
78
78
  };
@@ -80,8 +80,8 @@ declare const quoteContract: {
80
80
  v4ExactInputSingle: {
81
81
  method: "POST";
82
82
  body: z.ZodObject<{
83
- chainId: z.ZodNumber;
84
- poolKey: z.ZodObject<{
83
+ chain_id: z.ZodNumber;
84
+ pool_key: z.ZodObject<{
85
85
  currency0: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
86
86
  currency1: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
87
87
  fee: z.ZodNumber;
@@ -100,56 +100,56 @@ declare const quoteContract: {
100
100
  tickSpacing: number;
101
101
  hooks: string;
102
102
  }>;
103
- zeroForOne: z.ZodBoolean;
104
- exactAmount: z.ZodEffects<z.ZodAny, bigint, any>;
105
- hookData: z.ZodOptional<z.ZodString>;
103
+ zero_for_one: z.ZodBoolean;
104
+ exact_amount: z.ZodEffects<z.ZodAny, bigint, any>;
105
+ hook_data: z.ZodOptional<z.ZodString>;
106
106
  }, "strip", z.ZodTypeAny, {
107
- chainId: number;
108
- poolKey: {
107
+ chain_id: number;
108
+ pool_key: {
109
109
  currency0: `0x${string}`;
110
110
  currency1: `0x${string}`;
111
111
  fee: number;
112
112
  tickSpacing: number;
113
113
  hooks: `0x${string}`;
114
114
  };
115
- zeroForOne: boolean;
116
- exactAmount: bigint;
117
- hookData?: string | undefined;
115
+ zero_for_one: boolean;
116
+ exact_amount: bigint;
117
+ hook_data?: string | undefined;
118
118
  }, {
119
- chainId: number;
120
- poolKey: {
119
+ chain_id: number;
120
+ pool_key: {
121
121
  currency0: string;
122
122
  currency1: string;
123
123
  fee: number;
124
124
  tickSpacing: number;
125
125
  hooks: string;
126
126
  };
127
- zeroForOne: boolean;
128
- exactAmount?: any;
129
- hookData?: string | undefined;
127
+ zero_for_one: boolean;
128
+ exact_amount?: any;
129
+ hook_data?: string | undefined;
130
130
  }>;
131
131
  path: "/quotes/v4/exact-input-single";
132
132
  responses: {
133
133
  200: z.ZodObject<{
134
134
  result: z.ZodObject<{
135
- amountOut: z.ZodString;
136
- gasEstimate: z.ZodString;
135
+ amount_out: z.ZodString;
136
+ gas_estimate: z.ZodString;
137
137
  }, "strip", z.ZodTypeAny, {
138
- gasEstimate: string;
139
- amountOut: string;
138
+ gas_estimate: string;
139
+ amount_out: string;
140
140
  }, {
141
- gasEstimate: string;
142
- amountOut: string;
141
+ gas_estimate: string;
142
+ amount_out: string;
143
143
  }>;
144
144
  }, "strip", z.ZodTypeAny, {
145
145
  result: {
146
- gasEstimate: string;
147
- amountOut: string;
146
+ gas_estimate: string;
147
+ amount_out: string;
148
148
  };
149
149
  }, {
150
150
  result: {
151
- gasEstimate: string;
152
- amountOut: string;
151
+ gas_estimate: string;
152
+ amount_out: string;
153
153
  };
154
154
  }>;
155
155
  };
@@ -157,56 +157,56 @@ declare const quoteContract: {
157
157
  v3ExactOutputSingle: {
158
158
  method: "POST";
159
159
  body: z.ZodObject<{
160
- chainId: z.ZodNumber;
161
- tokenIn: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
162
- tokenOut: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
163
- amountOut: z.ZodEffects<z.ZodAny, bigint, any>;
160
+ chain_id: z.ZodNumber;
161
+ token_in: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
162
+ token_out: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
163
+ amount_out: z.ZodEffects<z.ZodAny, bigint, any>;
164
164
  fee: z.ZodNumber;
165
165
  }, "strip", z.ZodTypeAny, {
166
166
  fee: number;
167
- chainId: number;
168
- amountOut: bigint;
169
- tokenIn: `0x${string}`;
170
- tokenOut: `0x${string}`;
167
+ chain_id: number;
168
+ amount_out: bigint;
169
+ token_in: `0x${string}`;
170
+ token_out: `0x${string}`;
171
171
  }, {
172
172
  fee: number;
173
- chainId: number;
174
- tokenIn: string;
175
- tokenOut: string;
176
- amountOut?: any;
173
+ chain_id: number;
174
+ token_in: string;
175
+ token_out: string;
176
+ amount_out?: any;
177
177
  }>;
178
178
  path: "/quotes/v3/exact-output-single";
179
179
  responses: {
180
180
  200: z.ZodObject<{
181
181
  result: z.ZodObject<{
182
- amountIn: z.ZodString;
183
- sqrtPriceX96After: z.ZodString;
184
- initializedTicksCrossed: z.ZodNumber;
185
- gasEstimate: z.ZodString;
182
+ amount_in: z.ZodString;
183
+ sqrt_price_x96_after: z.ZodString;
184
+ initialized_ticks_crossed: z.ZodNumber;
185
+ gas_estimate: z.ZodString;
186
186
  }, "strip", z.ZodTypeAny, {
187
- amountIn: string;
188
- gasEstimate: string;
189
- sqrtPriceX96After: string;
190
- initializedTicksCrossed: number;
187
+ amount_in: string;
188
+ gas_estimate: string;
189
+ sqrt_price_x96_after: string;
190
+ initialized_ticks_crossed: number;
191
191
  }, {
192
- amountIn: string;
193
- gasEstimate: string;
194
- sqrtPriceX96After: string;
195
- initializedTicksCrossed: number;
192
+ amount_in: string;
193
+ gas_estimate: string;
194
+ sqrt_price_x96_after: string;
195
+ initialized_ticks_crossed: number;
196
196
  }>;
197
197
  }, "strip", z.ZodTypeAny, {
198
198
  result: {
199
- amountIn: string;
200
- gasEstimate: string;
201
- sqrtPriceX96After: string;
202
- initializedTicksCrossed: number;
199
+ amount_in: string;
200
+ gas_estimate: string;
201
+ sqrt_price_x96_after: string;
202
+ initialized_ticks_crossed: number;
203
203
  };
204
204
  }, {
205
205
  result: {
206
- amountIn: string;
207
- gasEstimate: string;
208
- sqrtPriceX96After: string;
209
- initializedTicksCrossed: number;
206
+ amount_in: string;
207
+ gas_estimate: string;
208
+ sqrt_price_x96_after: string;
209
+ initialized_ticks_crossed: number;
210
210
  };
211
211
  }>;
212
212
  };
@@ -214,59 +214,59 @@ declare const quoteContract: {
214
214
  v3ExactInputSingle: {
215
215
  method: "POST";
216
216
  body: z.ZodObject<{
217
- chainId: z.ZodNumber;
218
- tokenIn: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
219
- tokenOut: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
220
- amountIn: z.ZodEffects<z.ZodAny, bigint, any>;
217
+ chain_id: z.ZodNumber;
218
+ token_in: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
219
+ token_out: z.ZodPipeline<z.ZodString, z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
220
+ amount_in: z.ZodEffects<z.ZodAny, bigint, any>;
221
221
  fee: z.ZodNumber;
222
- sqrtPriceLimitX96: z.ZodOptional<z.ZodEffects<z.ZodAny, bigint, any>>;
222
+ sqrt_price_limit_x96: z.ZodOptional<z.ZodEffects<z.ZodAny, bigint, any>>;
223
223
  }, "strip", z.ZodTypeAny, {
224
224
  fee: number;
225
- chainId: number;
226
- amountIn: bigint;
227
- tokenIn: `0x${string}`;
228
- tokenOut: `0x${string}`;
229
- sqrtPriceLimitX96?: bigint | undefined;
225
+ chain_id: number;
226
+ amount_in: bigint;
227
+ token_in: `0x${string}`;
228
+ token_out: `0x${string}`;
229
+ sqrt_price_limit_x96?: bigint | undefined;
230
230
  }, {
231
231
  fee: number;
232
- chainId: number;
233
- tokenIn: string;
234
- tokenOut: string;
235
- amountIn?: any;
236
- sqrtPriceLimitX96?: any;
232
+ chain_id: number;
233
+ token_in: string;
234
+ token_out: string;
235
+ amount_in?: any;
236
+ sqrt_price_limit_x96?: any;
237
237
  }>;
238
238
  path: "/quotes/v3/exact-input-single";
239
239
  responses: {
240
240
  200: z.ZodObject<{
241
241
  result: z.ZodObject<{
242
- amountOut: z.ZodString;
243
- sqrtPriceX96After: z.ZodString;
244
- initializedTicksCrossed: z.ZodNumber;
245
- gasEstimate: z.ZodString;
242
+ amount_out: z.ZodString;
243
+ sqrt_price_x96_after: z.ZodString;
244
+ initialized_ticks_crossed: z.ZodNumber;
245
+ gas_estimate: z.ZodString;
246
246
  }, "strip", z.ZodTypeAny, {
247
- gasEstimate: string;
248
- amountOut: string;
249
- sqrtPriceX96After: string;
250
- initializedTicksCrossed: number;
247
+ gas_estimate: string;
248
+ amount_out: string;
249
+ sqrt_price_x96_after: string;
250
+ initialized_ticks_crossed: number;
251
251
  }, {
252
- gasEstimate: string;
253
- amountOut: string;
254
- sqrtPriceX96After: string;
255
- initializedTicksCrossed: number;
252
+ gas_estimate: string;
253
+ amount_out: string;
254
+ sqrt_price_x96_after: string;
255
+ initialized_ticks_crossed: number;
256
256
  }>;
257
257
  }, "strip", z.ZodTypeAny, {
258
258
  result: {
259
- gasEstimate: string;
260
- amountOut: string;
261
- sqrtPriceX96After: string;
262
- initializedTicksCrossed: number;
259
+ gas_estimate: string;
260
+ amount_out: string;
261
+ sqrt_price_x96_after: string;
262
+ initialized_ticks_crossed: number;
263
263
  };
264
264
  }, {
265
265
  result: {
266
- gasEstimate: string;
267
- amountOut: string;
268
- sqrtPriceX96After: string;
269
- initializedTicksCrossed: number;
266
+ gas_estimate: string;
267
+ amount_out: string;
268
+ sqrt_price_x96_after: string;
269
+ initialized_ticks_crossed: number;
270
270
  };
271
271
  }>;
272
272
  };
@@ -10,17 +10,17 @@ const quoteContract = contract.router({
10
10
  method: "POST",
11
11
  path: "/v4/exact-output-single",
12
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()),
13
+ chain_id: zod_1.default.number(),
14
+ pool_key: types_1.poolKeySchema,
15
+ zero_for_one: zod_1.default.boolean(),
16
+ exact_amount: types_1.coerceBigInt,
17
+ hook_data: zod_1.default.optional(zod_1.default.string()),
18
18
  }),
19
19
  responses: {
20
20
  200: zod_1.default.object({
21
21
  result: zod_1.default.object({
22
- amountIn: zod_1.default.string(),
23
- gasEstimate: zod_1.default.string(),
22
+ amount_in: zod_1.default.string(),
23
+ gas_estimate: zod_1.default.string(),
24
24
  }),
25
25
  }),
26
26
  },
@@ -29,17 +29,17 @@ const quoteContract = contract.router({
29
29
  method: "POST",
30
30
  path: "/v4/exact-input-single",
31
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()),
32
+ chain_id: zod_1.default.number(),
33
+ pool_key: types_1.poolKeySchema,
34
+ zero_for_one: zod_1.default.boolean(),
35
+ exact_amount: types_1.coerceBigInt,
36
+ hook_data: zod_1.default.optional(zod_1.default.string()),
37
37
  }),
38
38
  responses: {
39
39
  200: zod_1.default.object({
40
40
  result: zod_1.default.object({
41
- amountOut: zod_1.default.string(),
42
- gasEstimate: zod_1.default.string(),
41
+ amount_out: zod_1.default.string(),
42
+ gas_estimate: zod_1.default.string(),
43
43
  }),
44
44
  }),
45
45
  },
@@ -48,19 +48,19 @@ const quoteContract = contract.router({
48
48
  method: "POST",
49
49
  path: "/v3/exact-output-single",
50
50
  body: zod_1.default.object({
51
- chainId: zod_1.default.number(),
52
- tokenIn: zod_1.default.string().pipe(types_1.hex),
53
- tokenOut: zod_1.default.string().pipe(types_1.hex),
54
- amountOut: types_1.coerceBigInt,
51
+ chain_id: zod_1.default.number(),
52
+ token_in: zod_1.default.string().pipe(types_1.hex),
53
+ token_out: zod_1.default.string().pipe(types_1.hex),
54
+ amount_out: types_1.coerceBigInt,
55
55
  fee: zod_1.default.number(),
56
56
  }),
57
57
  responses: {
58
58
  200: zod_1.default.object({
59
59
  result: zod_1.default.object({
60
- amountIn: zod_1.default.string(),
61
- sqrtPriceX96After: zod_1.default.string(),
62
- initializedTicksCrossed: zod_1.default.number(),
63
- gasEstimate: zod_1.default.string(),
60
+ amount_in: zod_1.default.string(),
61
+ sqrt_price_x96_after: zod_1.default.string(),
62
+ initialized_ticks_crossed: zod_1.default.number(),
63
+ gas_estimate: zod_1.default.string(),
64
64
  }),
65
65
  }),
66
66
  },
@@ -69,20 +69,20 @@ const quoteContract = contract.router({
69
69
  method: "POST",
70
70
  path: "/v3/exact-input-single",
71
71
  body: zod_1.default.object({
72
- chainId: zod_1.default.number(),
73
- tokenIn: zod_1.default.string().pipe(types_1.hex),
74
- tokenOut: zod_1.default.string().pipe(types_1.hex),
75
- amountIn: types_1.coerceBigInt,
72
+ chain_id: zod_1.default.number(),
73
+ token_in: zod_1.default.string().pipe(types_1.hex),
74
+ token_out: zod_1.default.string().pipe(types_1.hex),
75
+ amount_in: types_1.coerceBigInt,
76
76
  fee: zod_1.default.number(),
77
- sqrtPriceLimitX96: zod_1.default.optional(types_1.coerceBigInt),
77
+ sqrt_price_limit_x96: zod_1.default.optional(types_1.coerceBigInt),
78
78
  }),
79
79
  responses: {
80
80
  200: zod_1.default.object({
81
81
  result: zod_1.default.object({
82
- amountOut: zod_1.default.string(),
83
- sqrtPriceX96After: zod_1.default.string(),
84
- initializedTicksCrossed: zod_1.default.number(),
85
- gasEstimate: zod_1.default.string(),
82
+ amount_out: zod_1.default.string(),
83
+ sqrt_price_x96_after: zod_1.default.string(),
84
+ initialized_ticks_crossed: zod_1.default.number(),
85
+ gas_estimate: zod_1.default.string(),
86
86
  }),
87
87
  }),
88
88
  },
@@ -1 +1 @@
1
- {"version":3,"file":"quote.contract.js","sourceRoot":"","sources":["../../src/contracts/quote.contract.ts"],"names":[],"mappings":";;;AAAA,wCAA6C;AAC7C,6BAAoB;AAEpB,oCAA4D;AAE5D,MAAM,QAAQ,GAAG,IAAA,mBAAY,GAAE,CAAC;AAEhC,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CACjC;IACI,mBAAmB,EAAE;QACjB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,yBAAyB;QAC/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E,aAAC,CAAC,MAAM,EAAE;YACf,oBAAoB,EAAE,aAAC,CAAC,QAAQ,CAAC,oBAAY,CAAC;SACjD,CAAC;QACF,SAAS,EAAE;YACP,GAAG,EAAE,aAAC,CAAC,MAAM,CAAC;gBACV,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;oBACb,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE;oBACtB,oBAAoB,EAAE,aAAC,CAAC,MAAM,EAAE;oBAChC,yBAAyB,EAAE,aAAC,CAAC,MAAM,EAAE;oBACrC,YAAY,EAAE,aAAC,CAAC,MAAM,EAAE;iBAC3B,CAAC;aACL,CAAC;SACL;KACJ;CACJ,EACD;IACI,UAAU,EAAE,SAAS;CACxB,CACJ,CAAC;AAEO,sCAAa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longdotxyz/shared",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Shared types and utilities for Long.xyz API",
5
5
  "files": [
6
6
  "dist"
@@ -49,7 +49,7 @@
49
49
  "build": "pnpm codegen && rm -f tsconfig.tsbuildinfo && tsc",
50
50
  "build:watch": "tsc --watch",
51
51
  "codegen": "graphql-codegen --config codegen.ts",
52
- "format": "prettier --write \"src/**/*.ts\"",
52
+ "format": "prettier --write \"src/**/*.ts\" --ignore-path=../../.prettierignore",
53
53
  "lint": "eslint \"src/**/*.ts\" --fix",
54
54
  "test": "jest --passWithNoTests",
55
55
  "test:watch": "jest --watch --passWithNoTests",
package/readme.md CHANGED
@@ -132,55 +132,84 @@ if (createResponse.status === 200) {
132
132
 
133
133
  ```typescript
134
134
  // V4 Exact Input Quote
135
- const v4Quote = await apiClient.quotes.v4ExactInputSingle({
135
+ const v4InputQuote = await apiClient.quotes.v4ExactInputSingle({
136
136
  body: {
137
- chainId: 8453,
138
- poolKey: {
137
+ chain_id: 8453,
138
+ pool_key: {
139
139
  currency0: '0x0000000000000000000000000000000000000000', // ETH
140
140
  currency1: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC
141
141
  fee: 500,
142
- tickSpacing: 10,
142
+ tick_spacing: 10,
143
143
  hooks: '0x0000000000000000000000000000000000000000'
144
144
  },
145
- zeroForOne: true,
146
- exactAmount: '1000000000000000000' // 1 ETH
145
+ zero_for_one: true,
146
+ exact_amount: '1000000000000000000', // 1 ETH
147
+ hook_data: '0x' // Optional hook data
147
148
  }
148
149
  });
149
150
 
150
- if (v4Quote.status === 200) {
151
- console.log(`Output amount: ${v4Quote.body.result.amountOut}`);
152
- console.log(`Gas estimate: ${v4Quote.body.result.gasEstimate}`);
151
+ if (v4InputQuote.status === 200) {
152
+ console.log(`Output amount: ${v4InputQuote.body.result.amount_out}`);
153
+ console.log(`Gas estimate: ${v4InputQuote.body.result.gas_estimate}`);
154
+ }
155
+
156
+ // V4 Exact Output Quote
157
+ const v4OutputQuote = await apiClient.quotes.v4ExactOutputSingle({
158
+ body: {
159
+ chain_id: 8453,
160
+ pool_key: {
161
+ currency0: '0x0000000000000000000000000000000000000000', // ETH
162
+ currency1: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC
163
+ fee: 500,
164
+ tick_spacing: 10,
165
+ hooks: '0x0000000000000000000000000000000000000000'
166
+ },
167
+ zero_for_one: true,
168
+ exact_amount: '1000000000', // 1000 USDC output
169
+ hook_data: '0x' // Optional hook data
170
+ }
171
+ });
172
+
173
+ if (v4OutputQuote.status === 200) {
174
+ console.log(`Input required: ${v4OutputQuote.body.result.amount_in}`);
175
+ console.log(`Gas estimate: ${v4OutputQuote.body.result.gas_estimate}`);
153
176
  }
154
177
 
155
178
  // V3 Exact Input Quote
156
179
  const v3InputQuote = await apiClient.quotes.v3ExactInputSingle({
157
180
  body: {
158
- chainId: 1,
159
- tokenIn: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
160
- tokenOut: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
161
- amountIn: '1000000000000000000', // 1 WETH
162
- fee: 500 // 0.05%
181
+ chain_id: 1,
182
+ token_in: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
183
+ token_out: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
184
+ amount_in: '1000000000000000000', // 1 WETH
185
+ fee: 500, // 0.05%
186
+ sqrt_price_limit_x96: '0' // Optional price limit
163
187
  }
164
188
  });
165
189
 
166
190
  if (v3InputQuote.status === 200) {
167
- console.log(`Output amount: ${v3InputQuote.body.result.amountOut}`);
168
- console.log(`Price after: ${v3InputQuote.body.result.sqrtPriceX96After}`);
191
+ console.log(`Output amount: ${v3InputQuote.body.result.amount_out}`);
192
+ console.log(`Price after: ${v3InputQuote.body.result.sqrt_price_x96_after}`);
193
+ console.log(`Ticks crossed: ${v3InputQuote.body.result.initialized_ticks_crossed}`);
194
+ console.log(`Gas estimate: ${v3InputQuote.body.result.gas_estimate}`);
169
195
  }
170
196
 
171
197
  // V3 Exact Output Quote
172
198
  const v3OutputQuote = await apiClient.quotes.v3ExactOutputSingle({
173
199
  body: {
174
- chainId: 1,
175
- tokenIn: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
176
- tokenOut: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
177
- amountOut: '1000000000', // 1000 USDC
200
+ chain_id: 1,
201
+ token_in: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
202
+ token_out: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
203
+ amount_out: '1000000000', // 1000 USDC
178
204
  fee: 500 // 0.05%
179
205
  }
180
206
  });
181
207
 
182
208
  if (v3OutputQuote.status === 200) {
183
- console.log(`Input required: ${v3OutputQuote.body.result.amountIn}`);
209
+ console.log(`Input required: ${v3OutputQuote.body.result.amount_in}`);
210
+ console.log(`Price after: ${v3OutputQuote.body.result.sqrt_price_x96_after}`);
211
+ console.log(`Ticks crossed: ${v3OutputQuote.body.result.initialized_ticks_crossed}`);
212
+ console.log(`Gas estimate: ${v3OutputQuote.body.result.gas_estimate}`);
184
213
  }
185
214
  ```
186
215
 
@@ -254,7 +283,7 @@ const poolKey: PoolKey = {
254
283
  currency0: '0x0000000000000000000000000000000000000000',
255
284
  currency1: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
256
285
  fee: 500,
257
- tickSpacing: 10,
286
+ tick_spacing: 10,
258
287
  hooks: '0x0000000000000000000000000000000000000000'
259
288
  };
260
289
  ```