@proton/wrap-constants 0.2.44 → 0.2.46
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/parsers/dex.d.ts +90 -138
- package/dist/wrap-constants.cjs.development.js +18 -20
- package/dist/wrap-constants.cjs.development.js.map +1 -1
- package/dist/wrap-constants.cjs.production.min.js +1 -1
- package/dist/wrap-constants.cjs.production.min.js.map +1 -1
- package/dist/wrap-constants.esm.js +18 -20
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/parsers/dex.ts +13 -15
package/dist/parsers/dex.d.ts
CHANGED
|
@@ -33,15 +33,15 @@ export declare const getOhlcvParser: z.ZodObject<{
|
|
|
33
33
|
from: z.ZodString;
|
|
34
34
|
to: z.ZodString;
|
|
35
35
|
symbol: z.ZodString;
|
|
36
|
-
limit: z.ZodEffects<z.ZodDefault<z.
|
|
36
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
37
37
|
}, "strip", z.ZodTypeAny, {
|
|
38
38
|
symbol: string;
|
|
39
39
|
interval: string;
|
|
40
40
|
from: string;
|
|
41
41
|
to: string;
|
|
42
|
-
limit:
|
|
42
|
+
limit: string;
|
|
43
43
|
}, {
|
|
44
|
-
limit?:
|
|
44
|
+
limit?: string | undefined;
|
|
45
45
|
symbol: string;
|
|
46
46
|
interval: string;
|
|
47
47
|
from: string;
|
|
@@ -160,17 +160,17 @@ export declare type OrderHistory = z.infer<typeof orderHistoryParser>;
|
|
|
160
160
|
export declare const getOrderHistoryParser: z.ZodObject<{
|
|
161
161
|
account: z.ZodString;
|
|
162
162
|
symbol: z.ZodOptional<z.ZodString>;
|
|
163
|
-
offset: z.ZodDefault<z.
|
|
164
|
-
limit: z.ZodEffects<z.ZodDefault<z.
|
|
163
|
+
offset: z.ZodDefault<z.ZodString>;
|
|
164
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
165
165
|
}, "strip", z.ZodTypeAny, {
|
|
166
166
|
symbol?: string | undefined;
|
|
167
|
-
limit:
|
|
167
|
+
limit: string;
|
|
168
168
|
account: string;
|
|
169
|
-
offset:
|
|
169
|
+
offset: string;
|
|
170
170
|
}, {
|
|
171
171
|
symbol?: string | undefined;
|
|
172
|
-
limit?:
|
|
173
|
-
offset?:
|
|
172
|
+
limit?: string | undefined;
|
|
173
|
+
offset?: string | undefined;
|
|
174
174
|
account: string;
|
|
175
175
|
}>;
|
|
176
176
|
export declare type GetOrderHistory = z.infer<typeof getOrderHistoryParser>;
|
|
@@ -293,13 +293,13 @@ export declare type Depth = z.infer<typeof depthParser>;
|
|
|
293
293
|
export declare const getDepthParser: z.ZodObject<{
|
|
294
294
|
symbol: z.ZodString;
|
|
295
295
|
step: z.ZodString;
|
|
296
|
-
limit: z.ZodEffects<z.ZodDefault<z.
|
|
296
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
297
297
|
}, "strip", z.ZodTypeAny, {
|
|
298
298
|
symbol: string;
|
|
299
|
-
limit:
|
|
299
|
+
limit: string;
|
|
300
300
|
step: string;
|
|
301
301
|
}, {
|
|
302
|
-
limit?:
|
|
302
|
+
limit?: string | undefined;
|
|
303
303
|
symbol: string;
|
|
304
304
|
step: string;
|
|
305
305
|
}>;
|
|
@@ -478,54 +478,36 @@ export declare const marketParser: z.ZodObject<{
|
|
|
478
478
|
taker_fee: z.ZodNumber;
|
|
479
479
|
order_min: z.ZodNumber;
|
|
480
480
|
bid_token: z.ZodObject<{
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
precision: z.ZodNumber;
|
|
484
|
-
}, "strip", z.ZodTypeAny, {
|
|
485
|
-
code: string;
|
|
486
|
-
precision: number;
|
|
487
|
-
}, {
|
|
488
|
-
code: string;
|
|
489
|
-
precision: number;
|
|
490
|
-
}>;
|
|
481
|
+
code: z.ZodString;
|
|
482
|
+
precision: z.ZodNumber;
|
|
491
483
|
contract: z.ZodString;
|
|
484
|
+
multiplier: z.ZodNumber;
|
|
492
485
|
}, "strip", z.ZodTypeAny, {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
precision: number;
|
|
496
|
-
};
|
|
486
|
+
code: string;
|
|
487
|
+
precision: number;
|
|
497
488
|
contract: string;
|
|
489
|
+
multiplier: number;
|
|
498
490
|
}, {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
precision: number;
|
|
502
|
-
};
|
|
491
|
+
code: string;
|
|
492
|
+
precision: number;
|
|
503
493
|
contract: string;
|
|
494
|
+
multiplier: number;
|
|
504
495
|
}>;
|
|
505
496
|
ask_token: z.ZodObject<{
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
precision: z.ZodNumber;
|
|
509
|
-
}, "strip", z.ZodTypeAny, {
|
|
510
|
-
code: string;
|
|
511
|
-
precision: number;
|
|
512
|
-
}, {
|
|
513
|
-
code: string;
|
|
514
|
-
precision: number;
|
|
515
|
-
}>;
|
|
497
|
+
code: z.ZodString;
|
|
498
|
+
precision: z.ZodNumber;
|
|
516
499
|
contract: z.ZodString;
|
|
500
|
+
multiplier: z.ZodNumber;
|
|
517
501
|
}, "strip", z.ZodTypeAny, {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
precision: number;
|
|
521
|
-
};
|
|
502
|
+
code: string;
|
|
503
|
+
precision: number;
|
|
522
504
|
contract: string;
|
|
505
|
+
multiplier: number;
|
|
523
506
|
}, {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
precision: number;
|
|
527
|
-
};
|
|
507
|
+
code: string;
|
|
508
|
+
precision: number;
|
|
528
509
|
contract: string;
|
|
510
|
+
multiplier: number;
|
|
529
511
|
}>;
|
|
530
512
|
}, "strip", z.ZodTypeAny, {
|
|
531
513
|
symbol: string;
|
|
@@ -536,18 +518,16 @@ export declare const marketParser: z.ZodObject<{
|
|
|
536
518
|
taker_fee: number;
|
|
537
519
|
order_min: number;
|
|
538
520
|
bid_token: {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
precision: number;
|
|
542
|
-
};
|
|
521
|
+
code: string;
|
|
522
|
+
precision: number;
|
|
543
523
|
contract: string;
|
|
524
|
+
multiplier: number;
|
|
544
525
|
};
|
|
545
526
|
ask_token: {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
precision: number;
|
|
549
|
-
};
|
|
527
|
+
code: string;
|
|
528
|
+
precision: number;
|
|
550
529
|
contract: string;
|
|
530
|
+
multiplier: number;
|
|
551
531
|
};
|
|
552
532
|
}, {
|
|
553
533
|
symbol: string;
|
|
@@ -558,18 +538,16 @@ export declare const marketParser: z.ZodObject<{
|
|
|
558
538
|
taker_fee: number;
|
|
559
539
|
order_min: number;
|
|
560
540
|
bid_token: {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
precision: number;
|
|
564
|
-
};
|
|
541
|
+
code: string;
|
|
542
|
+
precision: number;
|
|
565
543
|
contract: string;
|
|
544
|
+
multiplier: number;
|
|
566
545
|
};
|
|
567
546
|
ask_token: {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
precision: number;
|
|
571
|
-
};
|
|
547
|
+
code: string;
|
|
548
|
+
precision: number;
|
|
572
549
|
contract: string;
|
|
550
|
+
multiplier: number;
|
|
573
551
|
};
|
|
574
552
|
}>;
|
|
575
553
|
export declare type Market = z.infer<typeof marketParser>;
|
|
@@ -584,54 +562,36 @@ export declare const getMarketsResponseParser: z.ZodObject<{
|
|
|
584
562
|
taker_fee: z.ZodNumber;
|
|
585
563
|
order_min: z.ZodNumber;
|
|
586
564
|
bid_token: z.ZodObject<{
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
precision: z.ZodNumber;
|
|
590
|
-
}, "strip", z.ZodTypeAny, {
|
|
591
|
-
code: string;
|
|
592
|
-
precision: number;
|
|
593
|
-
}, {
|
|
594
|
-
code: string;
|
|
595
|
-
precision: number;
|
|
596
|
-
}>;
|
|
565
|
+
code: z.ZodString;
|
|
566
|
+
precision: z.ZodNumber;
|
|
597
567
|
contract: z.ZodString;
|
|
568
|
+
multiplier: z.ZodNumber;
|
|
598
569
|
}, "strip", z.ZodTypeAny, {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
precision: number;
|
|
602
|
-
};
|
|
570
|
+
code: string;
|
|
571
|
+
precision: number;
|
|
603
572
|
contract: string;
|
|
573
|
+
multiplier: number;
|
|
604
574
|
}, {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
precision: number;
|
|
608
|
-
};
|
|
575
|
+
code: string;
|
|
576
|
+
precision: number;
|
|
609
577
|
contract: string;
|
|
578
|
+
multiplier: number;
|
|
610
579
|
}>;
|
|
611
580
|
ask_token: z.ZodObject<{
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
precision: z.ZodNumber;
|
|
615
|
-
}, "strip", z.ZodTypeAny, {
|
|
616
|
-
code: string;
|
|
617
|
-
precision: number;
|
|
618
|
-
}, {
|
|
619
|
-
code: string;
|
|
620
|
-
precision: number;
|
|
621
|
-
}>;
|
|
581
|
+
code: z.ZodString;
|
|
582
|
+
precision: z.ZodNumber;
|
|
622
583
|
contract: z.ZodString;
|
|
584
|
+
multiplier: z.ZodNumber;
|
|
623
585
|
}, "strip", z.ZodTypeAny, {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
precision: number;
|
|
627
|
-
};
|
|
586
|
+
code: string;
|
|
587
|
+
precision: number;
|
|
628
588
|
contract: string;
|
|
589
|
+
multiplier: number;
|
|
629
590
|
}, {
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
precision: number;
|
|
633
|
-
};
|
|
591
|
+
code: string;
|
|
592
|
+
precision: number;
|
|
634
593
|
contract: string;
|
|
594
|
+
multiplier: number;
|
|
635
595
|
}>;
|
|
636
596
|
}, "strip", z.ZodTypeAny, {
|
|
637
597
|
symbol: string;
|
|
@@ -642,18 +602,16 @@ export declare const getMarketsResponseParser: z.ZodObject<{
|
|
|
642
602
|
taker_fee: number;
|
|
643
603
|
order_min: number;
|
|
644
604
|
bid_token: {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
precision: number;
|
|
648
|
-
};
|
|
605
|
+
code: string;
|
|
606
|
+
precision: number;
|
|
649
607
|
contract: string;
|
|
608
|
+
multiplier: number;
|
|
650
609
|
};
|
|
651
610
|
ask_token: {
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
precision: number;
|
|
655
|
-
};
|
|
611
|
+
code: string;
|
|
612
|
+
precision: number;
|
|
656
613
|
contract: string;
|
|
614
|
+
multiplier: number;
|
|
657
615
|
};
|
|
658
616
|
}, {
|
|
659
617
|
symbol: string;
|
|
@@ -664,18 +622,16 @@ export declare const getMarketsResponseParser: z.ZodObject<{
|
|
|
664
622
|
taker_fee: number;
|
|
665
623
|
order_min: number;
|
|
666
624
|
bid_token: {
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
precision: number;
|
|
670
|
-
};
|
|
625
|
+
code: string;
|
|
626
|
+
precision: number;
|
|
671
627
|
contract: string;
|
|
628
|
+
multiplier: number;
|
|
672
629
|
};
|
|
673
630
|
ask_token: {
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
precision: number;
|
|
677
|
-
};
|
|
631
|
+
code: string;
|
|
632
|
+
precision: number;
|
|
678
633
|
contract: string;
|
|
634
|
+
multiplier: number;
|
|
679
635
|
};
|
|
680
636
|
}>, "many">;
|
|
681
637
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -688,18 +644,16 @@ export declare const getMarketsResponseParser: z.ZodObject<{
|
|
|
688
644
|
taker_fee: number;
|
|
689
645
|
order_min: number;
|
|
690
646
|
bid_token: {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
precision: number;
|
|
694
|
-
};
|
|
647
|
+
code: string;
|
|
648
|
+
precision: number;
|
|
695
649
|
contract: string;
|
|
650
|
+
multiplier: number;
|
|
696
651
|
};
|
|
697
652
|
ask_token: {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
precision: number;
|
|
701
|
-
};
|
|
653
|
+
code: string;
|
|
654
|
+
precision: number;
|
|
702
655
|
contract: string;
|
|
656
|
+
multiplier: number;
|
|
703
657
|
};
|
|
704
658
|
}[];
|
|
705
659
|
sync: number;
|
|
@@ -713,18 +667,16 @@ export declare const getMarketsResponseParser: z.ZodObject<{
|
|
|
713
667
|
taker_fee: number;
|
|
714
668
|
order_min: number;
|
|
715
669
|
bid_token: {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
precision: number;
|
|
719
|
-
};
|
|
670
|
+
code: string;
|
|
671
|
+
precision: number;
|
|
720
672
|
contract: string;
|
|
673
|
+
multiplier: number;
|
|
721
674
|
};
|
|
722
675
|
ask_token: {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
precision: number;
|
|
726
|
-
};
|
|
676
|
+
code: string;
|
|
677
|
+
precision: number;
|
|
727
678
|
contract: string;
|
|
679
|
+
multiplier: number;
|
|
728
680
|
};
|
|
729
681
|
}[];
|
|
730
682
|
sync: number;
|
|
@@ -788,15 +740,15 @@ export declare const tradeParser: z.ZodObject<{
|
|
|
788
740
|
export declare type Trade = z.infer<typeof tradeParser>;
|
|
789
741
|
export declare const getTradesParser: z.ZodObject<{
|
|
790
742
|
symbol: z.ZodString;
|
|
791
|
-
offset: z.ZodDefault<z.
|
|
792
|
-
limit: z.ZodEffects<z.ZodDefault<z.
|
|
743
|
+
offset: z.ZodDefault<z.ZodString>;
|
|
744
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
793
745
|
}, "strip", z.ZodTypeAny, {
|
|
794
746
|
symbol: string;
|
|
795
|
-
limit:
|
|
796
|
-
offset:
|
|
747
|
+
limit: string;
|
|
748
|
+
offset: string;
|
|
797
749
|
}, {
|
|
798
|
-
limit?:
|
|
799
|
-
offset?:
|
|
750
|
+
limit?: string | undefined;
|
|
751
|
+
offset?: string | undefined;
|
|
800
752
|
symbol: string;
|
|
801
753
|
}>;
|
|
802
754
|
export declare type GetTrades = z.infer<typeof getTradesParser>;
|
|
@@ -1484,8 +1484,8 @@ var getOhlcvParser = /*#__PURE__*/z.object({
|
|
|
1484
1484
|
from: /*#__PURE__*/z.string(),
|
|
1485
1485
|
to: /*#__PURE__*/z.string(),
|
|
1486
1486
|
symbol: /*#__PURE__*/z.string(),
|
|
1487
|
-
limit: /*#__PURE__*/z.
|
|
1488
|
-
return n <= 1000;
|
|
1487
|
+
limit: /*#__PURE__*/z.string()["default"]("500").refine(function (n) {
|
|
1488
|
+
return +n <= 1000;
|
|
1489
1489
|
}, 'Max limit is 1000')
|
|
1490
1490
|
});
|
|
1491
1491
|
var getOhlcvResponseParser = /*#__PURE__*/z.object({
|
|
@@ -1513,9 +1513,9 @@ var orderHistoryParser = /*#__PURE__*/z.object({
|
|
|
1513
1513
|
var getOrderHistoryParser = /*#__PURE__*/z.object({
|
|
1514
1514
|
account: /*#__PURE__*/z.string(),
|
|
1515
1515
|
symbol: /*#__PURE__*/z.string().optional(),
|
|
1516
|
-
offset: /*#__PURE__*/z.
|
|
1517
|
-
limit: /*#__PURE__*/z.
|
|
1518
|
-
return n <= 250;
|
|
1516
|
+
offset: /*#__PURE__*/z.string()["default"]("0"),
|
|
1517
|
+
limit: /*#__PURE__*/z.string()["default"]("100").refine(function (n) {
|
|
1518
|
+
return +n <= 250;
|
|
1519
1519
|
}, 'Max limit is 250')
|
|
1520
1520
|
});
|
|
1521
1521
|
var getOrderHistoryResponseParser = /*#__PURE__*/z.object({
|
|
@@ -1532,8 +1532,8 @@ var depthParser = /*#__PURE__*/z.object({
|
|
|
1532
1532
|
var getDepthParser = /*#__PURE__*/z.object({
|
|
1533
1533
|
symbol: /*#__PURE__*/z.string(),
|
|
1534
1534
|
step: /*#__PURE__*/z.string(),
|
|
1535
|
-
limit: /*#__PURE__*/z.
|
|
1536
|
-
return n <= 250;
|
|
1535
|
+
limit: /*#__PURE__*/z.string()["default"]("100").refine(function (n) {
|
|
1536
|
+
return +n <= 250;
|
|
1537
1537
|
}, 'Max limit is 250')
|
|
1538
1538
|
});
|
|
1539
1539
|
var getDepthResponseParser = /*#__PURE__*/z.object({
|
|
@@ -1564,18 +1564,16 @@ var marketParser = /*#__PURE__*/z.object({
|
|
|
1564
1564
|
taker_fee: /*#__PURE__*/z.number(),
|
|
1565
1565
|
order_min: /*#__PURE__*/z.number(),
|
|
1566
1566
|
bid_token: /*#__PURE__*/z.object({
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
contract: /*#__PURE__*/z.string()
|
|
1567
|
+
code: /*#__PURE__*/z.string(),
|
|
1568
|
+
precision: /*#__PURE__*/z.number(),
|
|
1569
|
+
contract: /*#__PURE__*/z.string(),
|
|
1570
|
+
multiplier: /*#__PURE__*/z.number()
|
|
1572
1571
|
}),
|
|
1573
1572
|
ask_token: /*#__PURE__*/z.object({
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
contract: /*#__PURE__*/z.string()
|
|
1573
|
+
code: /*#__PURE__*/z.string(),
|
|
1574
|
+
precision: /*#__PURE__*/z.number(),
|
|
1575
|
+
contract: /*#__PURE__*/z.string(),
|
|
1576
|
+
multiplier: /*#__PURE__*/z.number()
|
|
1579
1577
|
})
|
|
1580
1578
|
});
|
|
1581
1579
|
var getMarketsResponseParser = /*#__PURE__*/z.object({
|
|
@@ -1603,9 +1601,9 @@ var tradeParser = /*#__PURE__*/z.object({
|
|
|
1603
1601
|
});
|
|
1604
1602
|
var getTradesParser = /*#__PURE__*/z.object({
|
|
1605
1603
|
symbol: /*#__PURE__*/z.string(),
|
|
1606
|
-
offset: /*#__PURE__*/z.
|
|
1607
|
-
limit: /*#__PURE__*/z.
|
|
1608
|
-
return n <= 250;
|
|
1604
|
+
offset: /*#__PURE__*/z.string()["default"]("0"),
|
|
1605
|
+
limit: /*#__PURE__*/z.string()["default"]("100").refine(function (n) {
|
|
1606
|
+
return +n <= 250;
|
|
1609
1607
|
}, 'Max limit is 250')
|
|
1610
1608
|
});
|
|
1611
1609
|
var getTradesResponseParser = /*#__PURE__*/z.object({
|