@proton/wrap-constants 0.2.43 → 0.2.45
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 +20 -61
- package/dist/wrap-constants.cjs.development.js +11 -26
- 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 +12 -26
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/parsers/dex.ts +8 -24
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
|
}>;
|
|
@@ -573,7 +573,7 @@ export declare const marketParser: z.ZodObject<{
|
|
|
573
573
|
};
|
|
574
574
|
}>;
|
|
575
575
|
export declare type Market = z.infer<typeof marketParser>;
|
|
576
|
-
export declare const
|
|
576
|
+
export declare const getMarketsResponseParser: z.ZodObject<{
|
|
577
577
|
sync: z.ZodNumber;
|
|
578
578
|
data: z.ZodArray<z.ZodObject<{
|
|
579
579
|
market_id: z.ZodNumber;
|
|
@@ -729,48 +729,7 @@ export declare const getMarketsParser: z.ZodObject<{
|
|
|
729
729
|
}[];
|
|
730
730
|
sync: number;
|
|
731
731
|
}>;
|
|
732
|
-
export declare type GetMarketsResponse = z.infer<typeof
|
|
733
|
-
export declare const getMarketsResponseParser: z.ZodArray<z.ZodObject<{
|
|
734
|
-
market_id: z.ZodNumber;
|
|
735
|
-
symbol: z.ZodString;
|
|
736
|
-
status_code: z.ZodNumber;
|
|
737
|
-
base_id: z.ZodString;
|
|
738
|
-
quote_id: z.ZodString;
|
|
739
|
-
type: z.ZodString;
|
|
740
|
-
maker_fee: z.ZodNumber;
|
|
741
|
-
taker_fee: z.ZodNumber;
|
|
742
|
-
base_precision: z.ZodNumber;
|
|
743
|
-
quote_precision: z.ZodNumber;
|
|
744
|
-
base_contract: z.ZodString;
|
|
745
|
-
quote_contract: z.ZodString;
|
|
746
|
-
}, "strip", z.ZodTypeAny, {
|
|
747
|
-
symbol: string;
|
|
748
|
-
type: string;
|
|
749
|
-
market_id: number;
|
|
750
|
-
status_code: number;
|
|
751
|
-
maker_fee: number;
|
|
752
|
-
taker_fee: number;
|
|
753
|
-
base_id: string;
|
|
754
|
-
quote_id: string;
|
|
755
|
-
base_precision: number;
|
|
756
|
-
quote_precision: number;
|
|
757
|
-
base_contract: string;
|
|
758
|
-
quote_contract: string;
|
|
759
|
-
}, {
|
|
760
|
-
symbol: string;
|
|
761
|
-
type: string;
|
|
762
|
-
market_id: number;
|
|
763
|
-
status_code: number;
|
|
764
|
-
maker_fee: number;
|
|
765
|
-
taker_fee: number;
|
|
766
|
-
base_id: string;
|
|
767
|
-
quote_id: string;
|
|
768
|
-
base_precision: number;
|
|
769
|
-
quote_precision: number;
|
|
770
|
-
base_contract: string;
|
|
771
|
-
quote_contract: string;
|
|
772
|
-
}>, "many">;
|
|
773
|
-
export declare type GetMarketsResponseParser = z.infer<typeof getMarketsResponseParser>;
|
|
732
|
+
export declare type GetMarketsResponse = z.infer<typeof getMarketsResponseParser>;
|
|
774
733
|
export declare const tradeParser: z.ZodObject<{
|
|
775
734
|
block_num: z.ZodNumber;
|
|
776
735
|
block_time: z.ZodString;
|
|
@@ -829,15 +788,15 @@ export declare const tradeParser: z.ZodObject<{
|
|
|
829
788
|
export declare type Trade = z.infer<typeof tradeParser>;
|
|
830
789
|
export declare const getTradesParser: z.ZodObject<{
|
|
831
790
|
symbol: z.ZodString;
|
|
832
|
-
offset: z.ZodDefault<z.
|
|
833
|
-
limit: z.ZodEffects<z.ZodDefault<z.
|
|
791
|
+
offset: z.ZodDefault<z.ZodString>;
|
|
792
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
834
793
|
}, "strip", z.ZodTypeAny, {
|
|
835
794
|
symbol: string;
|
|
836
|
-
limit:
|
|
837
|
-
offset:
|
|
795
|
+
limit: string;
|
|
796
|
+
offset: string;
|
|
838
797
|
}, {
|
|
839
|
-
limit?:
|
|
840
|
-
offset?:
|
|
798
|
+
limit?: string | undefined;
|
|
799
|
+
offset?: string | undefined;
|
|
841
800
|
symbol: string;
|
|
842
801
|
}>;
|
|
843
802
|
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({
|
|
@@ -1578,24 +1578,10 @@ var marketParser = /*#__PURE__*/z.object({
|
|
|
1578
1578
|
contract: /*#__PURE__*/z.string()
|
|
1579
1579
|
})
|
|
1580
1580
|
});
|
|
1581
|
-
var
|
|
1581
|
+
var getMarketsResponseParser = /*#__PURE__*/z.object({
|
|
1582
1582
|
sync: /*#__PURE__*/z.number(),
|
|
1583
1583
|
data: /*#__PURE__*/z.array(marketParser)
|
|
1584
1584
|
});
|
|
1585
|
-
var getMarketsResponseParser = /*#__PURE__*/z.array( /*#__PURE__*/z.object({
|
|
1586
|
-
market_id: /*#__PURE__*/z.number(),
|
|
1587
|
-
symbol: /*#__PURE__*/z.string(),
|
|
1588
|
-
status_code: /*#__PURE__*/z.number(),
|
|
1589
|
-
base_id: /*#__PURE__*/z.string(),
|
|
1590
|
-
quote_id: /*#__PURE__*/z.string(),
|
|
1591
|
-
type: /*#__PURE__*/z.string(),
|
|
1592
|
-
maker_fee: /*#__PURE__*/z.number(),
|
|
1593
|
-
taker_fee: /*#__PURE__*/z.number(),
|
|
1594
|
-
base_precision: /*#__PURE__*/z.number(),
|
|
1595
|
-
quote_precision: /*#__PURE__*/z.number(),
|
|
1596
|
-
base_contract: /*#__PURE__*/z.string(),
|
|
1597
|
-
quote_contract: /*#__PURE__*/z.string()
|
|
1598
|
-
}));
|
|
1599
1585
|
var tradeParser = /*#__PURE__*/z.object({
|
|
1600
1586
|
block_num: /*#__PURE__*/z.number(),
|
|
1601
1587
|
block_time: /*#__PURE__*/z.string(),
|
|
@@ -1617,9 +1603,9 @@ var tradeParser = /*#__PURE__*/z.object({
|
|
|
1617
1603
|
});
|
|
1618
1604
|
var getTradesParser = /*#__PURE__*/z.object({
|
|
1619
1605
|
symbol: /*#__PURE__*/z.string(),
|
|
1620
|
-
offset: /*#__PURE__*/z.
|
|
1621
|
-
limit: /*#__PURE__*/z.
|
|
1622
|
-
return n <= 250;
|
|
1606
|
+
offset: /*#__PURE__*/z.string()["default"]("0"),
|
|
1607
|
+
limit: /*#__PURE__*/z.string()["default"]("100").refine(function (n) {
|
|
1608
|
+
return +n <= 250;
|
|
1623
1609
|
}, 'Max limit is 250')
|
|
1624
1610
|
});
|
|
1625
1611
|
var getTradesResponseParser = /*#__PURE__*/z.object({
|
|
@@ -2011,7 +1997,6 @@ exports.generateAuthParser = generateAuthParser;
|
|
|
2011
1997
|
exports.getDailyResponseParser = getDailyResponseParser;
|
|
2012
1998
|
exports.getDepthParser = getDepthParser;
|
|
2013
1999
|
exports.getDepthResponseParser = getDepthResponseParser;
|
|
2014
|
-
exports.getMarketsParser = getMarketsParser;
|
|
2015
2000
|
exports.getMarketsResponseParser = getMarketsResponseParser;
|
|
2016
2001
|
exports.getOhlcvParser = getOhlcvParser;
|
|
2017
2002
|
exports.getOhlcvResponseParser = getOhlcvResponseParser;
|