@proton/wrap-constants 0.2.0 → 0.2.3
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 +9 -226
- package/dist/wrap-constants.cjs.development.js +33 -101
- 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 +25 -94
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +4 -3
- package/src/coins.ts +15 -1
- package/src/constants.ts +2 -2
- package/src/parsers/dex.ts +9 -20
package/dist/parsers/dex.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtendedAsset, ExtendedSymbol } from '@bloks/numbers';
|
|
2
2
|
import { z } from 'nestjs-zod/z';
|
|
3
|
-
declare const ohlcvParser: z.ZodObject<{
|
|
3
|
+
export declare const ohlcvParser: z.ZodObject<{
|
|
4
4
|
time: z.ZodNumber;
|
|
5
5
|
open: z.ZodNumber;
|
|
6
6
|
high: z.ZodNumber;
|
|
@@ -29,37 +29,7 @@ declare const ohlcvParser: z.ZodObject<{
|
|
|
29
29
|
count: number;
|
|
30
30
|
}>;
|
|
31
31
|
export declare type OHLCV = z.infer<typeof ohlcvParser>;
|
|
32
|
-
declare const
|
|
33
|
-
time: number;
|
|
34
|
-
open: number;
|
|
35
|
-
high: number;
|
|
36
|
-
low: number;
|
|
37
|
-
close: number;
|
|
38
|
-
volume: number;
|
|
39
|
-
volume_bid: number;
|
|
40
|
-
count: number;
|
|
41
|
-
}, z.ZodObjectDef<{
|
|
42
|
-
time: z.ZodNumber;
|
|
43
|
-
open: z.ZodNumber;
|
|
44
|
-
high: z.ZodNumber;
|
|
45
|
-
low: z.ZodNumber;
|
|
46
|
-
close: z.ZodNumber;
|
|
47
|
-
volume: z.ZodNumber;
|
|
48
|
-
volume_bid: z.ZodNumber;
|
|
49
|
-
count: z.ZodNumber;
|
|
50
|
-
}, "strip", z.ZodTypeAny>, {
|
|
51
|
-
time: number;
|
|
52
|
-
open: number;
|
|
53
|
-
high: number;
|
|
54
|
-
low: number;
|
|
55
|
-
close: number;
|
|
56
|
-
volume: number;
|
|
57
|
-
volume_bid: number;
|
|
58
|
-
count: number;
|
|
59
|
-
}>;
|
|
60
|
-
export declare class OHLCV_DTO extends OHLCV_DTO_base {
|
|
61
|
-
}
|
|
62
|
-
declare const getOhlcvParser: z.ZodObject<{
|
|
32
|
+
export declare const getOhlcvParser: z.ZodObject<{
|
|
63
33
|
interval: z.ZodString;
|
|
64
34
|
dateFrom: z.ZodString;
|
|
65
35
|
dateTo: z.ZodString;
|
|
@@ -79,28 +49,7 @@ declare const getOhlcvParser: z.ZodObject<{
|
|
|
79
49
|
marketId: string | number;
|
|
80
50
|
}>;
|
|
81
51
|
export declare type GetOHLCV = z.infer<typeof getOhlcvParser>;
|
|
82
|
-
declare const
|
|
83
|
-
interval: string;
|
|
84
|
-
dateFrom: string;
|
|
85
|
-
dateTo: string;
|
|
86
|
-
marketId: number;
|
|
87
|
-
limit: number;
|
|
88
|
-
}, z.ZodObjectDef<{
|
|
89
|
-
interval: z.ZodString;
|
|
90
|
-
dateFrom: z.ZodString;
|
|
91
|
-
dateTo: z.ZodString;
|
|
92
|
-
marketId: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
|
|
93
|
-
limit: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>, number, string | number | undefined>;
|
|
94
|
-
}, "strip", z.ZodTypeAny>, {
|
|
95
|
-
limit?: string | number | undefined;
|
|
96
|
-
interval: string;
|
|
97
|
-
dateFrom: string;
|
|
98
|
-
dateTo: string;
|
|
99
|
-
marketId: string | number;
|
|
100
|
-
}>;
|
|
101
|
-
export declare class GetOHLCV_DTO extends GetOHLCV_DTO_base {
|
|
102
|
-
}
|
|
103
|
-
declare const orderHistoryParser: z.ZodObject<{
|
|
52
|
+
export declare const orderHistoryParser: z.ZodObject<{
|
|
104
53
|
seq: z.ZodNumber;
|
|
105
54
|
block_num: z.ZodNumber;
|
|
106
55
|
block_time: z.ZodString;
|
|
@@ -147,55 +96,7 @@ declare const orderHistoryParser: z.ZodObject<{
|
|
|
147
96
|
trx_id: string;
|
|
148
97
|
}>;
|
|
149
98
|
export declare type OrderHistory = z.infer<typeof orderHistoryParser>;
|
|
150
|
-
declare const
|
|
151
|
-
quantity_init?: number | undefined;
|
|
152
|
-
status: string;
|
|
153
|
-
seq: number;
|
|
154
|
-
block_num: number;
|
|
155
|
-
block_time: string;
|
|
156
|
-
order_id: number;
|
|
157
|
-
market_id: number;
|
|
158
|
-
quantity_curr: number;
|
|
159
|
-
price: number;
|
|
160
|
-
account_name: string;
|
|
161
|
-
order_side: number;
|
|
162
|
-
order_type: number;
|
|
163
|
-
quantity_change: number;
|
|
164
|
-
trx_id: string;
|
|
165
|
-
}, z.ZodObjectDef<{
|
|
166
|
-
seq: z.ZodNumber;
|
|
167
|
-
block_num: z.ZodNumber;
|
|
168
|
-
block_time: z.ZodString;
|
|
169
|
-
order_id: z.ZodNumber;
|
|
170
|
-
market_id: z.ZodNumber;
|
|
171
|
-
quantity_init: z.ZodOptional<z.ZodNumber>;
|
|
172
|
-
quantity_curr: z.ZodNumber;
|
|
173
|
-
price: z.ZodNumber;
|
|
174
|
-
account_name: z.ZodString;
|
|
175
|
-
order_side: z.ZodNumber;
|
|
176
|
-
order_type: z.ZodNumber;
|
|
177
|
-
status: z.ZodString;
|
|
178
|
-
quantity_change: z.ZodNumber;
|
|
179
|
-
trx_id: z.ZodString;
|
|
180
|
-
}, "strip", z.ZodTypeAny>, {
|
|
181
|
-
quantity_init?: number | undefined;
|
|
182
|
-
status: string;
|
|
183
|
-
seq: number;
|
|
184
|
-
block_num: number;
|
|
185
|
-
block_time: string;
|
|
186
|
-
order_id: number;
|
|
187
|
-
market_id: number;
|
|
188
|
-
quantity_curr: number;
|
|
189
|
-
price: number;
|
|
190
|
-
account_name: string;
|
|
191
|
-
order_side: number;
|
|
192
|
-
order_type: number;
|
|
193
|
-
quantity_change: number;
|
|
194
|
-
trx_id: string;
|
|
195
|
-
}>;
|
|
196
|
-
export declare class OrderHistory_DTO extends OrderHistory_DTO_base {
|
|
197
|
-
}
|
|
198
|
-
declare const getOrderHistoryParser: z.ZodObject<{
|
|
99
|
+
export declare const getOrderHistoryParser: z.ZodObject<{
|
|
199
100
|
account: z.ZodString;
|
|
200
101
|
offset: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>;
|
|
201
102
|
limit: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>, number, string | number | undefined>;
|
|
@@ -209,22 +110,7 @@ declare const getOrderHistoryParser: z.ZodObject<{
|
|
|
209
110
|
account: string;
|
|
210
111
|
}>;
|
|
211
112
|
export declare type GetOrderHistory = z.infer<typeof getOrderHistoryParser>;
|
|
212
|
-
declare const
|
|
213
|
-
limit: number;
|
|
214
|
-
account: string;
|
|
215
|
-
offset: number;
|
|
216
|
-
}, z.ZodObjectDef<{
|
|
217
|
-
account: z.ZodString;
|
|
218
|
-
offset: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>;
|
|
219
|
-
limit: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>, number, string | number | undefined>;
|
|
220
|
-
}, "strip", z.ZodTypeAny>, {
|
|
221
|
-
limit?: string | number | undefined;
|
|
222
|
-
offset?: string | number | undefined;
|
|
223
|
-
account: string;
|
|
224
|
-
}>;
|
|
225
|
-
export declare class GetOrderHistory_DTO extends GetOrderHistory_DTO_base {
|
|
226
|
-
}
|
|
227
|
-
declare const depthParser: z.ZodObject<{
|
|
113
|
+
export declare const depthParser: z.ZodObject<{
|
|
228
114
|
level: z.ZodNumber;
|
|
229
115
|
ask: z.ZodNumber;
|
|
230
116
|
bid: z.ZodNumber;
|
|
@@ -241,25 +127,7 @@ declare const depthParser: z.ZodObject<{
|
|
|
241
127
|
bid: number;
|
|
242
128
|
}>;
|
|
243
129
|
export declare type Depth = z.infer<typeof depthParser>;
|
|
244
|
-
declare const
|
|
245
|
-
count: number;
|
|
246
|
-
level: number;
|
|
247
|
-
ask: number;
|
|
248
|
-
bid: number;
|
|
249
|
-
}, z.ZodObjectDef<{
|
|
250
|
-
level: z.ZodNumber;
|
|
251
|
-
ask: z.ZodNumber;
|
|
252
|
-
bid: z.ZodNumber;
|
|
253
|
-
count: z.ZodNumber;
|
|
254
|
-
}, "strip", z.ZodTypeAny>, {
|
|
255
|
-
count: number;
|
|
256
|
-
level: number;
|
|
257
|
-
ask: number;
|
|
258
|
-
bid: number;
|
|
259
|
-
}>;
|
|
260
|
-
export declare class Depth_DTO extends Depth_DTO_base {
|
|
261
|
-
}
|
|
262
|
-
declare const getDepthParser: z.ZodObject<{
|
|
130
|
+
export declare const getDepthParser: z.ZodObject<{
|
|
263
131
|
marketId: z.ZodNumber;
|
|
264
132
|
step: z.ZodString;
|
|
265
133
|
side: z.ZodString;
|
|
@@ -276,25 +144,7 @@ declare const getDepthParser: z.ZodObject<{
|
|
|
276
144
|
side: string;
|
|
277
145
|
}>;
|
|
278
146
|
export declare type GetDepth = z.infer<typeof getDepthParser>;
|
|
279
|
-
declare const
|
|
280
|
-
marketId: number;
|
|
281
|
-
limit: number;
|
|
282
|
-
step: string;
|
|
283
|
-
side: string;
|
|
284
|
-
}, z.ZodObjectDef<{
|
|
285
|
-
marketId: z.ZodNumber;
|
|
286
|
-
step: z.ZodString;
|
|
287
|
-
side: z.ZodString;
|
|
288
|
-
limit: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>, number, string | number | undefined>;
|
|
289
|
-
}, "strip", z.ZodTypeAny>, {
|
|
290
|
-
limit?: string | number | undefined;
|
|
291
|
-
marketId: number;
|
|
292
|
-
step: string;
|
|
293
|
-
side: string;
|
|
294
|
-
}>;
|
|
295
|
-
export declare class GetDepth_DTO extends GetDepth_DTO_base {
|
|
296
|
-
}
|
|
297
|
-
declare const tradeParser: z.ZodObject<{
|
|
147
|
+
export declare const tradeParser: z.ZodObject<{
|
|
298
148
|
block_num: z.ZodNumber;
|
|
299
149
|
block_time: z.ZodString;
|
|
300
150
|
trade_id: z.ZodNumber;
|
|
@@ -344,58 +194,7 @@ declare const tradeParser: z.ZodObject<{
|
|
|
344
194
|
ask_fee: number;
|
|
345
195
|
}>;
|
|
346
196
|
export declare type Trade = z.infer<typeof tradeParser>;
|
|
347
|
-
declare const
|
|
348
|
-
block_num: number;
|
|
349
|
-
block_time: string;
|
|
350
|
-
market_id: number;
|
|
351
|
-
price: number;
|
|
352
|
-
order_side: number;
|
|
353
|
-
trx_id: string;
|
|
354
|
-
trade_id: number;
|
|
355
|
-
bid_user: string;
|
|
356
|
-
bid_user_order_id: number;
|
|
357
|
-
bid_amount: number;
|
|
358
|
-
bid_fee: number;
|
|
359
|
-
ask_user: string;
|
|
360
|
-
ask_user_order_id: number;
|
|
361
|
-
ask_amount: number;
|
|
362
|
-
ask_fee: number;
|
|
363
|
-
}, z.ZodObjectDef<{
|
|
364
|
-
block_num: z.ZodNumber;
|
|
365
|
-
block_time: z.ZodString;
|
|
366
|
-
trade_id: z.ZodNumber;
|
|
367
|
-
market_id: z.ZodNumber;
|
|
368
|
-
price: z.ZodNumber;
|
|
369
|
-
bid_user: z.ZodString;
|
|
370
|
-
bid_user_order_id: z.ZodNumber;
|
|
371
|
-
bid_amount: z.ZodNumber;
|
|
372
|
-
bid_fee: z.ZodNumber;
|
|
373
|
-
ask_user: z.ZodString;
|
|
374
|
-
ask_user_order_id: z.ZodNumber;
|
|
375
|
-
ask_amount: z.ZodNumber;
|
|
376
|
-
ask_fee: z.ZodNumber;
|
|
377
|
-
order_side: z.ZodNumber;
|
|
378
|
-
trx_id: z.ZodString;
|
|
379
|
-
}, "strip", z.ZodTypeAny>, {
|
|
380
|
-
block_num: number;
|
|
381
|
-
block_time: string;
|
|
382
|
-
market_id: number;
|
|
383
|
-
price: number;
|
|
384
|
-
order_side: number;
|
|
385
|
-
trx_id: string;
|
|
386
|
-
trade_id: number;
|
|
387
|
-
bid_user: string;
|
|
388
|
-
bid_user_order_id: number;
|
|
389
|
-
bid_amount: number;
|
|
390
|
-
bid_fee: number;
|
|
391
|
-
ask_user: string;
|
|
392
|
-
ask_user_order_id: number;
|
|
393
|
-
ask_amount: number;
|
|
394
|
-
ask_fee: number;
|
|
395
|
-
}>;
|
|
396
|
-
export declare class Trade_DTO extends Trade_DTO_base {
|
|
397
|
-
}
|
|
398
|
-
declare const getTradesParser: z.ZodObject<{
|
|
197
|
+
export declare const getTradesParser: z.ZodObject<{
|
|
399
198
|
marketId: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
|
|
400
199
|
offset: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>;
|
|
401
200
|
limit: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>, number, string | number | undefined>;
|
|
@@ -409,22 +208,7 @@ declare const getTradesParser: z.ZodObject<{
|
|
|
409
208
|
marketId: string | number;
|
|
410
209
|
}>;
|
|
411
210
|
export declare type GetTrades = z.infer<typeof getTradesParser>;
|
|
412
|
-
declare const
|
|
413
|
-
marketId: number;
|
|
414
|
-
limit: number;
|
|
415
|
-
offset: number;
|
|
416
|
-
}, z.ZodObjectDef<{
|
|
417
|
-
marketId: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
|
|
418
|
-
offset: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>;
|
|
419
|
-
limit: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>, number, string | number | undefined>;
|
|
420
|
-
}, "strip", z.ZodTypeAny>, {
|
|
421
|
-
limit?: string | number | undefined;
|
|
422
|
-
offset?: string | number | undefined;
|
|
423
|
-
marketId: string | number;
|
|
424
|
-
}>;
|
|
425
|
-
export declare class GetTrades_DTO extends GetTrades_DTO_base {
|
|
426
|
-
}
|
|
427
|
-
declare const syncParser: z.ZodObject<{
|
|
211
|
+
export declare const syncParser: z.ZodObject<{
|
|
428
212
|
sourceid: z.ZodNumber;
|
|
429
213
|
block_num: z.ZodString;
|
|
430
214
|
block_time: z.ZodString;
|
|
@@ -505,4 +289,3 @@ export interface Market {
|
|
|
505
289
|
bid_multiplier: number;
|
|
506
290
|
ask_multiplier: number;
|
|
507
291
|
}
|
|
508
|
-
export {};
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
7
|
var z = require('nestjs-zod/z');
|
|
8
|
-
var nestjsZod = require('nestjs-zod');
|
|
9
8
|
var cloneDeep = _interopDefault(require('lodash.clonedeep'));
|
|
10
9
|
var bignumber_js = require('bignumber.js');
|
|
11
10
|
|
|
@@ -200,7 +199,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
200
199
|
allowBridge: IS_MAINNET,
|
|
201
200
|
allowLend: true,
|
|
202
201
|
allowBorrow: true,
|
|
203
|
-
name: 'Metal',
|
|
202
|
+
name: 'Metal DAO',
|
|
204
203
|
coin: 'MTL',
|
|
205
204
|
xtokenSymbol: 'XMT',
|
|
206
205
|
xtokenPrecision: 8,
|
|
@@ -216,6 +215,19 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
216
215
|
}] : []),
|
|
217
216
|
image: 'https://www.proton.org/images/tokens/xtokensXMT.png',
|
|
218
217
|
coingeckoId: 'metal'
|
|
218
|
+
}, {
|
|
219
|
+
allowSwap: IS_MAINNET,
|
|
220
|
+
allowBridge: false,
|
|
221
|
+
allowLend: false,
|
|
222
|
+
allowBorrow: false,
|
|
223
|
+
name: 'Metal Blockchain',
|
|
224
|
+
coin: 'METAL',
|
|
225
|
+
xtokenSymbol: 'METAL',
|
|
226
|
+
xtokenPrecision: 8,
|
|
227
|
+
xtokenContract: 'xtokens',
|
|
228
|
+
wallets: [],
|
|
229
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/metal-chain.png',
|
|
230
|
+
coingeckoId: ''
|
|
219
231
|
}, {
|
|
220
232
|
allowSwap: true,
|
|
221
233
|
allowBridge: true,
|
|
@@ -1009,7 +1021,7 @@ var singleActionTransactionParser = function singleActionTransactionParser(contr
|
|
|
1009
1021
|
};
|
|
1010
1022
|
|
|
1011
1023
|
function _extends() {
|
|
1012
|
-
_extends = Object.assign
|
|
1024
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1013
1025
|
for (var i = 1; i < arguments.length; i++) {
|
|
1014
1026
|
var source = arguments[i];
|
|
1015
1027
|
|
|
@@ -1022,26 +1034,9 @@ function _extends() {
|
|
|
1022
1034
|
|
|
1023
1035
|
return target;
|
|
1024
1036
|
};
|
|
1025
|
-
|
|
1026
1037
|
return _extends.apply(this, arguments);
|
|
1027
1038
|
}
|
|
1028
1039
|
|
|
1029
|
-
function _inheritsLoose(subClass, superClass) {
|
|
1030
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1031
|
-
subClass.prototype.constructor = subClass;
|
|
1032
|
-
|
|
1033
|
-
_setPrototypeOf(subClass, superClass);
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
function _setPrototypeOf(o, p) {
|
|
1037
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
1038
|
-
o.__proto__ = p;
|
|
1039
|
-
return o;
|
|
1040
|
-
};
|
|
1041
|
-
|
|
1042
|
-
return _setPrototypeOf(o, p);
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
1040
|
function _unsupportedIterableToArray(o, minLen) {
|
|
1046
1041
|
if (!o) return;
|
|
1047
1042
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -1095,7 +1090,7 @@ var initializeConstants = function initializeConstants(chain) {
|
|
|
1095
1090
|
|
|
1096
1091
|
var constants = {
|
|
1097
1092
|
SWAP_CONTRACT: 'proton.swaps',
|
|
1098
|
-
DEX_CONTRACT: chain === 'proton' ? '
|
|
1093
|
+
DEX_CONTRACT: chain === 'proton' ? 'dex' : 'dextest21',
|
|
1099
1094
|
FEE_FACTOR: FEE_FACTOR,
|
|
1100
1095
|
GOOGLE_MAPS_KEY: 'AIzaSyDb2_CrK032kSIqBXbkdwmaLKWELl0SxVs',
|
|
1101
1096
|
SWAP_URL: chain === 'proton' ? 'https://otc.protonswap.com' : 'https://otc-test.protonswap.com',
|
|
@@ -1368,15 +1363,6 @@ var ohlcvParser = /*#__PURE__*/z.z.object({
|
|
|
1368
1363
|
volume_bid: /*#__PURE__*/z.z.number(),
|
|
1369
1364
|
count: /*#__PURE__*/z.z.number()
|
|
1370
1365
|
});
|
|
1371
|
-
var OHLCV_DTO = /*#__PURE__*/function (_createZodDto) {
|
|
1372
|
-
_inheritsLoose(OHLCV_DTO, _createZodDto);
|
|
1373
|
-
|
|
1374
|
-
function OHLCV_DTO() {
|
|
1375
|
-
return _createZodDto.apply(this, arguments) || this;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
return OHLCV_DTO;
|
|
1379
|
-
}( /*#__PURE__*/nestjsZod.createZodDto(ohlcvParser));
|
|
1380
1366
|
var getOhlcvParser = /*#__PURE__*/z.z.object({
|
|
1381
1367
|
interval: /*#__PURE__*/z.z.string(),
|
|
1382
1368
|
dateFrom: /*#__PURE__*/z.z.string(),
|
|
@@ -1386,15 +1372,6 @@ var getOhlcvParser = /*#__PURE__*/z.z.object({
|
|
|
1386
1372
|
return n <= 1000;
|
|
1387
1373
|
}, 'Max limit is 1000')
|
|
1388
1374
|
});
|
|
1389
|
-
var GetOHLCV_DTO = /*#__PURE__*/function (_createZodDto2) {
|
|
1390
|
-
_inheritsLoose(GetOHLCV_DTO, _createZodDto2);
|
|
1391
|
-
|
|
1392
|
-
function GetOHLCV_DTO() {
|
|
1393
|
-
return _createZodDto2.apply(this, arguments) || this;
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
return GetOHLCV_DTO;
|
|
1397
|
-
}( /*#__PURE__*/nestjsZod.createZodDto(getOhlcvParser));
|
|
1398
1375
|
var orderHistoryParser = /*#__PURE__*/z.z.object({
|
|
1399
1376
|
seq: /*#__PURE__*/z.z.number(),
|
|
1400
1377
|
block_num: /*#__PURE__*/z.z.number(),
|
|
@@ -1411,15 +1388,6 @@ var orderHistoryParser = /*#__PURE__*/z.z.object({
|
|
|
1411
1388
|
quantity_change: /*#__PURE__*/z.z.number(),
|
|
1412
1389
|
trx_id: /*#__PURE__*/z.z.string()
|
|
1413
1390
|
});
|
|
1414
|
-
var OrderHistory_DTO = /*#__PURE__*/function (_createZodDto3) {
|
|
1415
|
-
_inheritsLoose(OrderHistory_DTO, _createZodDto3);
|
|
1416
|
-
|
|
1417
|
-
function OrderHistory_DTO() {
|
|
1418
|
-
return _createZodDto3.apply(this, arguments) || this;
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
return OrderHistory_DTO;
|
|
1422
|
-
}( /*#__PURE__*/nestjsZod.createZodDto(orderHistoryParser));
|
|
1423
1391
|
var getOrderHistoryParser = /*#__PURE__*/z.z.object({
|
|
1424
1392
|
account: /*#__PURE__*/z.z.string(),
|
|
1425
1393
|
offset: /*#__PURE__*/z.z.number().or(numTransform)["default"](0),
|
|
@@ -1427,30 +1395,12 @@ var getOrderHistoryParser = /*#__PURE__*/z.z.object({
|
|
|
1427
1395
|
return n <= 250;
|
|
1428
1396
|
}, 'Max limit is 250')
|
|
1429
1397
|
});
|
|
1430
|
-
var GetOrderHistory_DTO = /*#__PURE__*/function (_createZodDto4) {
|
|
1431
|
-
_inheritsLoose(GetOrderHistory_DTO, _createZodDto4);
|
|
1432
|
-
|
|
1433
|
-
function GetOrderHistory_DTO() {
|
|
1434
|
-
return _createZodDto4.apply(this, arguments) || this;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
return GetOrderHistory_DTO;
|
|
1438
|
-
}( /*#__PURE__*/nestjsZod.createZodDto(getOrderHistoryParser));
|
|
1439
1398
|
var depthParser = /*#__PURE__*/z.z.object({
|
|
1440
1399
|
level: /*#__PURE__*/z.z.number(),
|
|
1441
1400
|
ask: /*#__PURE__*/z.z.number(),
|
|
1442
1401
|
bid: /*#__PURE__*/z.z.number(),
|
|
1443
1402
|
count: /*#__PURE__*/z.z.number()
|
|
1444
1403
|
});
|
|
1445
|
-
var Depth_DTO = /*#__PURE__*/function (_createZodDto5) {
|
|
1446
|
-
_inheritsLoose(Depth_DTO, _createZodDto5);
|
|
1447
|
-
|
|
1448
|
-
function Depth_DTO() {
|
|
1449
|
-
return _createZodDto5.apply(this, arguments) || this;
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
return Depth_DTO;
|
|
1453
|
-
}( /*#__PURE__*/nestjsZod.createZodDto(depthParser));
|
|
1454
1404
|
var getDepthParser = /*#__PURE__*/z.z.object({
|
|
1455
1405
|
marketId: /*#__PURE__*/z.z.number(),
|
|
1456
1406
|
step: /*#__PURE__*/z.z.string(),
|
|
@@ -1459,15 +1409,6 @@ var getDepthParser = /*#__PURE__*/z.z.object({
|
|
|
1459
1409
|
return n <= 250;
|
|
1460
1410
|
}, 'Max limit is 250')
|
|
1461
1411
|
});
|
|
1462
|
-
var GetDepth_DTO = /*#__PURE__*/function (_createZodDto6) {
|
|
1463
|
-
_inheritsLoose(GetDepth_DTO, _createZodDto6);
|
|
1464
|
-
|
|
1465
|
-
function GetDepth_DTO() {
|
|
1466
|
-
return _createZodDto6.apply(this, arguments) || this;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
return GetDepth_DTO;
|
|
1470
|
-
}( /*#__PURE__*/nestjsZod.createZodDto(getDepthParser));
|
|
1471
1412
|
var tradeParser = /*#__PURE__*/z.z.object({
|
|
1472
1413
|
block_num: /*#__PURE__*/z.z.number(),
|
|
1473
1414
|
block_time: /*#__PURE__*/z.z.string(),
|
|
@@ -1485,15 +1426,6 @@ var tradeParser = /*#__PURE__*/z.z.object({
|
|
|
1485
1426
|
order_side: /*#__PURE__*/z.z.number(),
|
|
1486
1427
|
trx_id: /*#__PURE__*/z.z.string()
|
|
1487
1428
|
});
|
|
1488
|
-
var Trade_DTO = /*#__PURE__*/function (_createZodDto7) {
|
|
1489
|
-
_inheritsLoose(Trade_DTO, _createZodDto7);
|
|
1490
|
-
|
|
1491
|
-
function Trade_DTO() {
|
|
1492
|
-
return _createZodDto7.apply(this, arguments) || this;
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
return Trade_DTO;
|
|
1496
|
-
}( /*#__PURE__*/nestjsZod.createZodDto(tradeParser));
|
|
1497
1429
|
var getTradesParser = /*#__PURE__*/z.z.object({
|
|
1498
1430
|
marketId: /*#__PURE__*/z.z.number().or(numTransform),
|
|
1499
1431
|
offset: /*#__PURE__*/z.z.number().or(numTransform)["default"](0),
|
|
@@ -1501,15 +1433,14 @@ var getTradesParser = /*#__PURE__*/z.z.object({
|
|
|
1501
1433
|
return n <= 250;
|
|
1502
1434
|
}, 'Max limit is 250')
|
|
1503
1435
|
});
|
|
1504
|
-
var
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
}( /*#__PURE__*/nestjsZod.createZodDto(getTradesParser));
|
|
1436
|
+
var syncParser = /*#__PURE__*/z.z.object({
|
|
1437
|
+
sourceid: /*#__PURE__*/z.z.number(),
|
|
1438
|
+
block_num: /*#__PURE__*/z.z.string(),
|
|
1439
|
+
block_time: /*#__PURE__*/z.z.string(),
|
|
1440
|
+
irreversible: /*#__PURE__*/z.z.string(),
|
|
1441
|
+
is_master: /*#__PURE__*/z.z.number(),
|
|
1442
|
+
last_updated: /*#__PURE__*/z.z.string()
|
|
1443
|
+
});
|
|
1513
1444
|
|
|
1514
1445
|
(function (orderType) {
|
|
1515
1446
|
orderType[orderType["INVALID"] = 0] = "INVALID";
|
|
@@ -1829,19 +1760,11 @@ var applyDiscountToFee = function applyDiscountToFee(fee, staked) {
|
|
|
1829
1760
|
}
|
|
1830
1761
|
};
|
|
1831
1762
|
|
|
1832
|
-
exports.Depth_DTO = Depth_DTO;
|
|
1833
1763
|
exports.ExtendedAssetParser = ExtendedAssetParser;
|
|
1834
1764
|
exports.FEE_FACTOR = FEE_FACTOR;
|
|
1835
|
-
exports.GetDepth_DTO = GetDepth_DTO;
|
|
1836
|
-
exports.GetOHLCV_DTO = GetOHLCV_DTO;
|
|
1837
|
-
exports.GetOrderHistory_DTO = GetOrderHistory_DTO;
|
|
1838
|
-
exports.GetTrades_DTO = GetTrades_DTO;
|
|
1839
1765
|
exports.Graph = Graph;
|
|
1840
1766
|
exports.ILink = ILink;
|
|
1841
1767
|
exports.INode = INode;
|
|
1842
|
-
exports.OHLCV_DTO = OHLCV_DTO;
|
|
1843
|
-
exports.OrderHistory_DTO = OrderHistory_DTO;
|
|
1844
|
-
exports.Trade_DTO = Trade_DTO;
|
|
1845
1768
|
exports.WRAP_AUTH_ACTION = WRAP_AUTH_ACTION;
|
|
1846
1769
|
exports.WRAP_CONTRACT = WRAP_CONTRACT;
|
|
1847
1770
|
exports.accountParser = accountParser;
|
|
@@ -1857,17 +1780,24 @@ exports.compute_transfer = compute_transfer;
|
|
|
1857
1780
|
exports.compute_transfer_curve = compute_transfer_curve;
|
|
1858
1781
|
exports.createAbstractAuthParser = createAbstractAuthParser;
|
|
1859
1782
|
exports.depositBodyParser = depositBodyParser;
|
|
1783
|
+
exports.depthParser = depthParser;
|
|
1860
1784
|
exports.exchangeRateParser = exchangeRateParser;
|
|
1861
1785
|
exports.exchangeRatesParser = exchangeRatesParser;
|
|
1862
1786
|
exports.explorerLinkByChain = explorerLinkByChain;
|
|
1863
1787
|
exports.generateAddressBodyParser = generateAddressBodyParser;
|
|
1864
1788
|
exports.generateAddressResponse = generateAddressResponse;
|
|
1865
1789
|
exports.generateAuthParser = generateAuthParser;
|
|
1790
|
+
exports.getDepthParser = getDepthParser;
|
|
1791
|
+
exports.getOhlcvParser = getOhlcvParser;
|
|
1792
|
+
exports.getOrderHistoryParser = getOrderHistoryParser;
|
|
1793
|
+
exports.getTradesParser = getTradesParser;
|
|
1866
1794
|
exports.initializeCoins = initializeCoins;
|
|
1867
1795
|
exports.initializeConstants = initializeConstants;
|
|
1868
1796
|
exports.isInputInvalid = isInputInvalid;
|
|
1869
1797
|
exports.isSameToken = isSameToken;
|
|
1870
1798
|
exports.median = median;
|
|
1799
|
+
exports.ohlcvParser = ohlcvParser;
|
|
1800
|
+
exports.orderHistoryParser = orderHistoryParser;
|
|
1871
1801
|
exports.otcOrderResponseParser = otcOrderResponseParser;
|
|
1872
1802
|
exports.otcQuoteBodyParser = otcQuoteBodyParser;
|
|
1873
1803
|
exports.otcQuoteResponseParser = otcQuoteResponseParser;
|
|
@@ -1875,6 +1805,8 @@ exports.protonExplorerTxUrl = protonExplorerTxUrl;
|
|
|
1875
1805
|
exports.rateParser = rateParser;
|
|
1876
1806
|
exports.similarChains = similarChains;
|
|
1877
1807
|
exports.singleActionTransactionParser = singleActionTransactionParser;
|
|
1808
|
+
exports.syncParser = syncParser;
|
|
1809
|
+
exports.tradeParser = tradeParser;
|
|
1878
1810
|
exports.transactionParser = transactionParser;
|
|
1879
1811
|
exports.webauthActionParser = webauthActionParser;
|
|
1880
1812
|
exports.withdrawBodyParser = withdrawBodyParser;
|