@proton/wrap-constants 0.2.6 → 0.2.9
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 +27 -3
- package/dist/wrap-constants.cjs.development.js +13 -1
- 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 +15 -2
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/parsers/dex.ts +30 -1
package/dist/parsers/dex.d.ts
CHANGED
|
@@ -130,18 +130,15 @@ export declare type Depth = z.infer<typeof depthParser>;
|
|
|
130
130
|
export declare const getDepthParser: z.ZodObject<{
|
|
131
131
|
marketId: z.ZodString;
|
|
132
132
|
step: z.ZodString;
|
|
133
|
-
side: z.ZodString;
|
|
134
133
|
limit: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>, number, string | number | undefined>;
|
|
135
134
|
}, "strip", z.ZodTypeAny, {
|
|
136
135
|
marketId: string;
|
|
137
136
|
limit: number;
|
|
138
137
|
step: string;
|
|
139
|
-
side: string;
|
|
140
138
|
}, {
|
|
141
139
|
limit?: string | number | undefined;
|
|
142
140
|
marketId: string;
|
|
143
141
|
step: string;
|
|
144
|
-
side: string;
|
|
145
142
|
}>;
|
|
146
143
|
export declare type GetDepth = z.infer<typeof getDepthParser>;
|
|
147
144
|
export declare const tradeParser: z.ZodObject<{
|
|
@@ -289,3 +286,30 @@ export interface Market {
|
|
|
289
286
|
bid_multiplier: number;
|
|
290
287
|
ask_multiplier: number;
|
|
291
288
|
}
|
|
289
|
+
export interface DbMarket {
|
|
290
|
+
market_id: number;
|
|
291
|
+
order_min: number;
|
|
292
|
+
status_code: number;
|
|
293
|
+
maker_fee: number;
|
|
294
|
+
taker_fee: number;
|
|
295
|
+
bid_token_c: string;
|
|
296
|
+
bid_token_s: string;
|
|
297
|
+
bid_token_m: number;
|
|
298
|
+
ask_token_c: string;
|
|
299
|
+
ask_token_s: string;
|
|
300
|
+
ask_token_m: number;
|
|
301
|
+
created_at: string;
|
|
302
|
+
updated_at: string;
|
|
303
|
+
}
|
|
304
|
+
export declare enum ITopics {
|
|
305
|
+
TRADES = "TRADES",
|
|
306
|
+
ORDERS = "ORDERS"
|
|
307
|
+
}
|
|
308
|
+
export declare const TOPICS: {
|
|
309
|
+
TRADES: {
|
|
310
|
+
topic: ITopics;
|
|
311
|
+
};
|
|
312
|
+
ORDERS: {
|
|
313
|
+
topic: ITopics;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
@@ -1352,6 +1352,7 @@ var wrapParser = /*#__PURE__*/z.z.object({
|
|
|
1352
1352
|
confirmations: /*#__PURE__*/z.z.number()
|
|
1353
1353
|
});
|
|
1354
1354
|
|
|
1355
|
+
var _TOPICS;
|
|
1355
1356
|
var numTransform = /*#__PURE__*/z.z.string().regex(/\d+/).transform(Number);
|
|
1356
1357
|
var ohlcvParser = /*#__PURE__*/z.z.object({
|
|
1357
1358
|
time: /*#__PURE__*/z.z.number(),
|
|
@@ -1404,7 +1405,6 @@ var depthParser = /*#__PURE__*/z.z.object({
|
|
|
1404
1405
|
var getDepthParser = /*#__PURE__*/z.z.object({
|
|
1405
1406
|
marketId: /*#__PURE__*/z.z.string(),
|
|
1406
1407
|
step: /*#__PURE__*/z.z.string(),
|
|
1407
|
-
side: /*#__PURE__*/z.z.string(),
|
|
1408
1408
|
limit: /*#__PURE__*/z.z.number().or(numTransform)["default"](100).refine(function (n) {
|
|
1409
1409
|
return n <= 250;
|
|
1410
1410
|
}, 'Max limit is 250')
|
|
@@ -1464,6 +1464,17 @@ var syncParser = /*#__PURE__*/z.z.object({
|
|
|
1464
1464
|
logStatus["DELETE"] = "delete";
|
|
1465
1465
|
})(exports.logStatus || (exports.logStatus = {}));
|
|
1466
1466
|
|
|
1467
|
+
(function (ITopics) {
|
|
1468
|
+
ITopics["TRADES"] = "TRADES";
|
|
1469
|
+
ITopics["ORDERS"] = "ORDERS";
|
|
1470
|
+
})(exports.ITopics || (exports.ITopics = {}));
|
|
1471
|
+
|
|
1472
|
+
var TOPICS = (_TOPICS = {}, _TOPICS[exports.ITopics.TRADES] = {
|
|
1473
|
+
topic: exports.ITopics.TRADES
|
|
1474
|
+
}, _TOPICS[exports.ITopics.ORDERS] = {
|
|
1475
|
+
topic: exports.ITopics.ORDERS
|
|
1476
|
+
}, _TOPICS);
|
|
1477
|
+
|
|
1467
1478
|
var isSameToken = function isSameToken(token1, token2) {
|
|
1468
1479
|
return token1.xtokenSymbol === token2.xtokenSymbol && token1.xtokenPrecision === token2.xtokenPrecision && token1.xtokenContract === token2.xtokenContract;
|
|
1469
1480
|
};
|
|
@@ -1765,6 +1776,7 @@ exports.FEE_FACTOR = FEE_FACTOR;
|
|
|
1765
1776
|
exports.Graph = Graph;
|
|
1766
1777
|
exports.ILink = ILink;
|
|
1767
1778
|
exports.INode = INode;
|
|
1779
|
+
exports.TOPICS = TOPICS;
|
|
1768
1780
|
exports.WRAP_AUTH_ACTION = WRAP_AUTH_ACTION;
|
|
1769
1781
|
exports.WRAP_CONTRACT = WRAP_CONTRACT;
|
|
1770
1782
|
exports.accountParser = accountParser;
|