@proton/wrap-constants 0.2.10 → 0.2.14
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/coins.d.ts +5 -0
- package/dist/parsers/dex.d.ts +23 -0
- package/dist/wrap-constants.cjs.development.js +67 -8
- 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 +68 -9
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/coins.ts +50 -0
- package/src/math.ts +8 -8
- package/src/parsers/dex.ts +10 -0
package/dist/coins.d.ts
CHANGED
|
@@ -64,8 +64,13 @@ export interface Wallet {
|
|
|
64
64
|
network: Networks;
|
|
65
65
|
precision: number;
|
|
66
66
|
contract: string | undefined;
|
|
67
|
+
provider: string;
|
|
67
68
|
hasWithdrawMemo: boolean;
|
|
68
69
|
}
|
|
70
|
+
export declare enum Providers {
|
|
71
|
+
FIREBLOCKS = "fireblocks",
|
|
72
|
+
METAL = "metal"
|
|
73
|
+
}
|
|
69
74
|
export declare type CoinWallet = Exclude<Coin, 'wallets'> & Wallet;
|
|
70
75
|
export declare const explorerLinkByChain: {
|
|
71
76
|
Bitcoin: (txid: string) => string;
|
package/dist/parsers/dex.d.ts
CHANGED
|
@@ -98,13 +98,16 @@ export declare const orderHistoryParser: z.ZodObject<{
|
|
|
98
98
|
export declare type OrderHistory = z.infer<typeof orderHistoryParser>;
|
|
99
99
|
export declare const getOrderHistoryParser: z.ZodObject<{
|
|
100
100
|
account: z.ZodString;
|
|
101
|
+
marketId: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>;
|
|
101
102
|
offset: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>;
|
|
102
103
|
limit: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>, number, string | number | undefined>;
|
|
103
104
|
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
marketId?: number | undefined;
|
|
104
106
|
limit: number;
|
|
105
107
|
account: string;
|
|
106
108
|
offset: number;
|
|
107
109
|
}, {
|
|
110
|
+
marketId?: string | number | undefined;
|
|
108
111
|
limit?: string | number | undefined;
|
|
109
112
|
offset?: string | number | undefined;
|
|
110
113
|
account: string;
|
|
@@ -141,6 +144,26 @@ export declare const getDepthParser: z.ZodObject<{
|
|
|
141
144
|
step: string;
|
|
142
145
|
}>;
|
|
143
146
|
export declare type GetDepth = z.infer<typeof getDepthParser>;
|
|
147
|
+
export declare const dailyParser: z.ZodObject<{
|
|
148
|
+
market_id: z.ZodNumber;
|
|
149
|
+
first: z.ZodNumber;
|
|
150
|
+
last: z.ZodNumber;
|
|
151
|
+
bid: z.ZodNumber;
|
|
152
|
+
ask: z.ZodNumber;
|
|
153
|
+
}, "strip", z.ZodTypeAny, {
|
|
154
|
+
market_id: number;
|
|
155
|
+
ask: number;
|
|
156
|
+
bid: number;
|
|
157
|
+
first: number;
|
|
158
|
+
last: number;
|
|
159
|
+
}, {
|
|
160
|
+
market_id: number;
|
|
161
|
+
ask: number;
|
|
162
|
+
bid: number;
|
|
163
|
+
first: number;
|
|
164
|
+
last: number;
|
|
165
|
+
}>;
|
|
166
|
+
export declare type Daily = z.infer<typeof dailyParser>;
|
|
144
167
|
export declare const tradeParser: z.ZodObject<{
|
|
145
168
|
block_num: z.ZodNumber;
|
|
146
169
|
block_time: z.ZodString;
|
|
@@ -52,6 +52,12 @@ var _similarChains, _explorerLinkByChain;
|
|
|
52
52
|
})(exports.Networks || (exports.Networks = {}));
|
|
53
53
|
|
|
54
54
|
var similarChains = (_similarChains = {}, _similarChains[exports.Chains.EthereumMainnet] = [exports.Chains.BinanceBEP20], _similarChains[exports.Chains.BinanceBEP20] = [exports.Chains.EthereumMainnet], _similarChains);
|
|
55
|
+
|
|
56
|
+
(function (Providers) {
|
|
57
|
+
Providers["FIREBLOCKS"] = "fireblocks";
|
|
58
|
+
Providers["METAL"] = "metal";
|
|
59
|
+
})(exports.Providers || (exports.Providers = {}));
|
|
60
|
+
|
|
55
61
|
var explorerLinkByChain = (_explorerLinkByChain = {}, _explorerLinkByChain[exports.Chains.BitcoinMainnet] = function (txid) {
|
|
56
62
|
return "https://blockchain.com/btc/tx/" + txid;
|
|
57
63
|
}, _explorerLinkByChain[exports.Chains.BitcoinTestnet] = function (txid) {
|
|
@@ -131,6 +137,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
131
137
|
network: exports.Networks.ERC20,
|
|
132
138
|
precision: 4,
|
|
133
139
|
contract: '0xD7EFB00D12C2C13131FD319336FDF952525DA2AF',
|
|
140
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
134
141
|
hasWithdrawMemo: false
|
|
135
142
|
}, {
|
|
136
143
|
wallet: 'XPR-BEP20',
|
|
@@ -139,6 +146,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
139
146
|
network: exports.Networks.BEP20,
|
|
140
147
|
precision: 4,
|
|
141
148
|
contract: '0x5DE3939B2F811A61D830E6F52D13B066881412AB',
|
|
149
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
142
150
|
hasWithdrawMemo: false
|
|
143
151
|
}] : []),
|
|
144
152
|
image: 'https://www.proton.org/images/tokens/eosio-tokenXPR.png',
|
|
@@ -160,6 +168,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
160
168
|
network: exports.Networks.ERC20,
|
|
161
169
|
precision: 6,
|
|
162
170
|
contract: '0xA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48',
|
|
171
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
163
172
|
hasWithdrawMemo: false
|
|
164
173
|
}, {
|
|
165
174
|
wallet: 'USDC-BEP20',
|
|
@@ -168,6 +177,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
168
177
|
network: exports.Networks.BEP20,
|
|
169
178
|
precision: 18,
|
|
170
179
|
contract: '0x8AC76A51CC950D9822D68B83FE1AD97B32CD580D',
|
|
180
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
171
181
|
hasWithdrawMemo: false
|
|
172
182
|
}, {
|
|
173
183
|
wallet: 'USDC-XLM',
|
|
@@ -176,6 +186,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
176
186
|
network: exports.Networks.XLM,
|
|
177
187
|
precision: 7,
|
|
178
188
|
contract: undefined,
|
|
189
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
179
190
|
hasWithdrawMemo: true
|
|
180
191
|
}] : [], IS_TESTNET ? [{
|
|
181
192
|
wallet: 'USDC',
|
|
@@ -184,6 +195,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
184
195
|
network: exports.Networks.Ropsten,
|
|
185
196
|
precision: 6,
|
|
186
197
|
contract: '0xA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48',
|
|
198
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
187
199
|
hasWithdrawMemo: false
|
|
188
200
|
}, {
|
|
189
201
|
wallet: 'USDC-XLM',
|
|
@@ -192,6 +204,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
192
204
|
network: exports.Networks.XLM,
|
|
193
205
|
precision: 7,
|
|
194
206
|
contract: undefined,
|
|
207
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
195
208
|
hasWithdrawMemo: true
|
|
196
209
|
}] : []),
|
|
197
210
|
image: 'https://www.proton.org/images/tokens/xtokensXUSDC.png',
|
|
@@ -213,6 +226,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
213
226
|
network: exports.Networks.ERC20,
|
|
214
227
|
precision: 8,
|
|
215
228
|
contract: '0xF433089366899D83A9F26A773D59EC7ECF30355E',
|
|
229
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
216
230
|
hasWithdrawMemo: false
|
|
217
231
|
}] : []),
|
|
218
232
|
image: 'https://www.proton.org/images/tokens/xtokensXMT.png',
|
|
@@ -234,6 +248,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
234
248
|
network: exports.Networks.AVM,
|
|
235
249
|
precision: 9,
|
|
236
250
|
contract: '',
|
|
251
|
+
provider: exports.Providers.METAL,
|
|
237
252
|
hasWithdrawMemo: true
|
|
238
253
|
}] : []),
|
|
239
254
|
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/metal-chain.png',
|
|
@@ -255,6 +270,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
255
270
|
network: exports.Networks.Mainnet,
|
|
256
271
|
precision: 8,
|
|
257
272
|
contract: undefined,
|
|
273
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
258
274
|
hasWithdrawMemo: false
|
|
259
275
|
}] : [], IS_TESTNET ? [{
|
|
260
276
|
wallet: 'BTC',
|
|
@@ -263,6 +279,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
263
279
|
network: exports.Networks.Testnet,
|
|
264
280
|
precision: 8,
|
|
265
281
|
contract: undefined,
|
|
282
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
266
283
|
hasWithdrawMemo: false
|
|
267
284
|
}] : []),
|
|
268
285
|
image: 'https://www.proton.org/images/tokens/xtokensXBTC.png',
|
|
@@ -284,6 +301,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
284
301
|
network: exports.Networks.Mainnet,
|
|
285
302
|
precision: 18,
|
|
286
303
|
contract: '0x0000000000000000000000000000000000000000',
|
|
304
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
287
305
|
hasWithdrawMemo: false
|
|
288
306
|
}] : [], IS_TESTNET ? [{
|
|
289
307
|
wallet: 'ETH',
|
|
@@ -292,6 +310,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
292
310
|
network: exports.Networks.Ropsten,
|
|
293
311
|
precision: 18,
|
|
294
312
|
contract: '0x0000000000000000000000000000000000000000',
|
|
313
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
295
314
|
hasWithdrawMemo: false
|
|
296
315
|
}] : []),
|
|
297
316
|
image: 'https://www.proton.org/images/tokens/xtokensXETH.png',
|
|
@@ -326,6 +345,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
326
345
|
network: exports.Networks.ERC20,
|
|
327
346
|
precision: 6,
|
|
328
347
|
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
348
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
329
349
|
hasWithdrawMemo: false
|
|
330
350
|
}] : [], IS_MAINNET ? [{
|
|
331
351
|
wallet: 'USDT-BEP20',
|
|
@@ -334,6 +354,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
334
354
|
network: exports.Networks.BEP20,
|
|
335
355
|
precision: 18,
|
|
336
356
|
contract: '0x55d398326f99059fF775485246999027B3197955',
|
|
357
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
337
358
|
hasWithdrawMemo: false
|
|
338
359
|
}] : [], IS_TESTNET ? [{
|
|
339
360
|
wallet: 'USDT',
|
|
@@ -342,6 +363,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
342
363
|
network: exports.Networks.Ropsten,
|
|
343
364
|
precision: 6,
|
|
344
365
|
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
366
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
345
367
|
hasWithdrawMemo: false
|
|
346
368
|
}] : []),
|
|
347
369
|
image: 'https://www.proton.org/images/tokens/xtokensXUSDT.png',
|
|
@@ -363,6 +385,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
363
385
|
network: exports.Networks.ERC20,
|
|
364
386
|
precision: 18,
|
|
365
387
|
contract: '0x0000000000085D4780B73119B644AE5ECD22B376',
|
|
388
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
366
389
|
hasWithdrawMemo: false
|
|
367
390
|
}] : []),
|
|
368
391
|
image: 'https://www.proton.org/images/tokens/xtokensXTUSD.png',
|
|
@@ -384,6 +407,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
384
407
|
network: exports.Networks.ERC20,
|
|
385
408
|
precision: 18,
|
|
386
409
|
contract: '0x8E870D67F660D95D5BE530380D0EC0BD388289E1',
|
|
410
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
387
411
|
hasWithdrawMemo: false
|
|
388
412
|
}] : []),
|
|
389
413
|
image: 'https://www.proton.org/images/tokens/xtokensXPAX.png',
|
|
@@ -405,6 +429,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
405
429
|
network: exports.Networks.ERC20,
|
|
406
430
|
precision: 18,
|
|
407
431
|
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
432
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
408
433
|
hasWithdrawMemo: false
|
|
409
434
|
}] : [], IS_TESTNET ? [{
|
|
410
435
|
wallet: 'PAXG',
|
|
@@ -413,6 +438,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
413
438
|
network: exports.Networks.Ropsten,
|
|
414
439
|
precision: 18,
|
|
415
440
|
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
441
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
416
442
|
hasWithdrawMemo: false
|
|
417
443
|
}] : []),
|
|
418
444
|
image: 'https://www.proton.org/images/tokens/xtokensXPAXG.png',
|
|
@@ -473,6 +499,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
473
499
|
network: exports.Networks.ERC20,
|
|
474
500
|
precision: 18,
|
|
475
501
|
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
502
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
476
503
|
hasWithdrawMemo: false
|
|
477
504
|
}] : [], IS_TESTNET ? [{
|
|
478
505
|
wallet: 'UNI',
|
|
@@ -481,6 +508,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
481
508
|
network: exports.Networks.Ropsten,
|
|
482
509
|
precision: 18,
|
|
483
510
|
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
511
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
484
512
|
hasWithdrawMemo: false
|
|
485
513
|
}] : []),
|
|
486
514
|
image: 'https://www.proton.org/images/tokens/xtokensXUNI.png',
|
|
@@ -502,6 +530,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
502
530
|
network: exports.Networks.ERC20,
|
|
503
531
|
precision: 18,
|
|
504
532
|
contract: '0x111111111117DC0AA78B770FA6A738034120C302',
|
|
533
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
505
534
|
hasWithdrawMemo: false
|
|
506
535
|
}] : []),
|
|
507
536
|
image: 'https://www.proton.org/images/tokens/xtokensXINCH.png',
|
|
@@ -523,6 +552,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
523
552
|
network: exports.Networks.ERC20,
|
|
524
553
|
precision: 18,
|
|
525
554
|
contract: '0x514910771AF9CA656AF840DFF83E8264ECF986CA',
|
|
555
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
526
556
|
hasWithdrawMemo: false
|
|
527
557
|
}] : []),
|
|
528
558
|
image: 'https://www.proton.org/images/tokens/xtokensXLINK.png',
|
|
@@ -544,6 +574,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
544
574
|
network: exports.Networks.Mainnet,
|
|
545
575
|
precision: 8,
|
|
546
576
|
contract: undefined,
|
|
577
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
547
578
|
hasWithdrawMemo: false
|
|
548
579
|
}] : [], IS_TESTNET ? [{
|
|
549
580
|
wallet: 'LTC',
|
|
@@ -552,6 +583,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
552
583
|
network: exports.Networks.Testnet,
|
|
553
584
|
precision: 8,
|
|
554
585
|
contract: undefined,
|
|
586
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
555
587
|
hasWithdrawMemo: false
|
|
556
588
|
}] : []),
|
|
557
589
|
image: 'https://www.proton.org/images/tokens/xtokensXLTC.png',
|
|
@@ -573,6 +605,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
573
605
|
network: exports.Networks.Mainnet,
|
|
574
606
|
precision: 8,
|
|
575
607
|
contract: undefined,
|
|
608
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
576
609
|
hasWithdrawMemo: false
|
|
577
610
|
}] : [], IS_TESTNET ? [{
|
|
578
611
|
wallet: 'BCH',
|
|
@@ -581,6 +614,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
581
614
|
network: exports.Networks.Testnet,
|
|
582
615
|
precision: 8,
|
|
583
616
|
contract: undefined,
|
|
617
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
584
618
|
hasWithdrawMemo: false
|
|
585
619
|
}] : []),
|
|
586
620
|
image: 'https://www.proton.org/images/tokens/xtokensXBCH.png',
|
|
@@ -602,6 +636,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
602
636
|
network: exports.Networks.Mainnet,
|
|
603
637
|
precision: 7,
|
|
604
638
|
contract: undefined,
|
|
639
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
605
640
|
hasWithdrawMemo: true
|
|
606
641
|
}] : [], IS_TESTNET ? [{
|
|
607
642
|
wallet: 'XLM',
|
|
@@ -610,6 +645,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
610
645
|
network: exports.Networks.Testnet,
|
|
611
646
|
precision: 7,
|
|
612
647
|
contract: undefined,
|
|
648
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
613
649
|
hasWithdrawMemo: true
|
|
614
650
|
}] : []),
|
|
615
651
|
image: 'https://www.proton.org/images/tokens/xtokensXXLM.png',
|
|
@@ -644,6 +680,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
644
680
|
network: exports.Networks.Mainnet,
|
|
645
681
|
precision: 10,
|
|
646
682
|
contract: undefined,
|
|
683
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
647
684
|
hasWithdrawMemo: false
|
|
648
685
|
}] : []),
|
|
649
686
|
image: 'https://www.proton.org/images/tokens/xtokensXDOT.png',
|
|
@@ -665,6 +702,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
665
702
|
network: exports.Networks.BEP20,
|
|
666
703
|
precision: 18,
|
|
667
704
|
contract: undefined,
|
|
705
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
668
706
|
hasWithdrawMemo: false
|
|
669
707
|
}] : []),
|
|
670
708
|
image: 'https://www.proton.org/images/tokens/xtokensXBNB.png',
|
|
@@ -686,6 +724,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
686
724
|
network: exports.Networks.BEP20,
|
|
687
725
|
precision: 18,
|
|
688
726
|
contract: '0xe9e7cea3dedca5984780bafc599bd69add087d56',
|
|
727
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
689
728
|
hasWithdrawMemo: false
|
|
690
729
|
}] : []),
|
|
691
730
|
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xbusd.png',
|
|
@@ -707,6 +746,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
707
746
|
network: exports.Networks.Mainnet,
|
|
708
747
|
precision: 4,
|
|
709
748
|
contract: undefined,
|
|
749
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
710
750
|
hasWithdrawMemo: true
|
|
711
751
|
}] : [], IS_TESTNET ? [{
|
|
712
752
|
wallet: 'EOS',
|
|
@@ -715,6 +755,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
715
755
|
network: exports.Networks.Testnet,
|
|
716
756
|
precision: 4,
|
|
717
757
|
contract: undefined,
|
|
758
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
718
759
|
hasWithdrawMemo: true
|
|
719
760
|
}] : []),
|
|
720
761
|
image: 'https://www.proton.org/images/tokens/xtokensXEOS.png',
|
|
@@ -736,6 +777,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
736
777
|
network: exports.Networks.Mainnet,
|
|
737
778
|
precision: 8,
|
|
738
779
|
contract: undefined,
|
|
780
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
739
781
|
hasWithdrawMemo: false
|
|
740
782
|
}] : []),
|
|
741
783
|
image: 'https://www.proton.org/images/tokens/xtokensXDOGE.png',
|
|
@@ -757,6 +799,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
757
799
|
network: exports.Networks.Mainnet,
|
|
758
800
|
precision: 6,
|
|
759
801
|
contract: undefined,
|
|
802
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
760
803
|
hasWithdrawMemo: false
|
|
761
804
|
}] : []),
|
|
762
805
|
image: 'https://www.proton.org/images/tokens/xtokensXADA.png',
|
|
@@ -779,6 +822,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
779
822
|
network: exports.Networks.Mainnet,
|
|
780
823
|
precision: 6,
|
|
781
824
|
contract: undefined,
|
|
825
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
782
826
|
hasWithdrawMemo: true
|
|
783
827
|
}] : []),
|
|
784
828
|
image: 'https://www.proton.org/images/tokens/xtokensXLUNA.png',
|
|
@@ -800,6 +844,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
800
844
|
network: exports.Networks.Mainnet,
|
|
801
845
|
precision: 6,
|
|
802
846
|
contract: undefined,
|
|
847
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
803
848
|
hasWithdrawMemo: true
|
|
804
849
|
}] : []),
|
|
805
850
|
image: 'https://www.proton.org/images/tokens/xtokensXUST.png',
|
|
@@ -821,6 +866,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
821
866
|
network: exports.Networks.Mainnet,
|
|
822
867
|
precision: 9,
|
|
823
868
|
contract: undefined,
|
|
869
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
824
870
|
hasWithdrawMemo: false
|
|
825
871
|
}] : []),
|
|
826
872
|
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xsol.png',
|
|
@@ -842,6 +888,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
842
888
|
network: exports.Networks.Mainnet,
|
|
843
889
|
precision: 6,
|
|
844
890
|
contract: undefined,
|
|
891
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
845
892
|
hasWithdrawMemo: true
|
|
846
893
|
}] : []),
|
|
847
894
|
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xxrp.png',
|
|
@@ -864,6 +911,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
864
911
|
network: exports.Networks.Mainnet,
|
|
865
912
|
precision: 9,
|
|
866
913
|
contract: undefined,
|
|
914
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
867
915
|
hasWithdrawMemo: false
|
|
868
916
|
}] : []),
|
|
869
917
|
image: 'https://www.proton.org/images/tokens/xtokensXAVAX.png',
|
|
@@ -885,6 +933,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
885
933
|
network: exports.Networks.Mainnet,
|
|
886
934
|
precision: 18,
|
|
887
935
|
contract: '0x0000000000000000000000000000000000000000',
|
|
936
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
888
937
|
hasWithdrawMemo: false
|
|
889
938
|
}] : []),
|
|
890
939
|
image: 'https://www.proton.org/images/tokens/xtokensXMATIC.png',
|
|
@@ -906,6 +955,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
906
955
|
network: exports.Networks.Testnet,
|
|
907
956
|
precision: 8,
|
|
908
957
|
contract: undefined,
|
|
958
|
+
provider: exports.Providers.FIREBLOCKS,
|
|
909
959
|
hasWithdrawMemo: true
|
|
910
960
|
}] : []),
|
|
911
961
|
image: 'https://www.proton.org/images/tokens/xtokensXHBAR.png',
|
|
@@ -1402,6 +1452,7 @@ var orderHistoryParser = /*#__PURE__*/z.z.object({
|
|
|
1402
1452
|
});
|
|
1403
1453
|
var getOrderHistoryParser = /*#__PURE__*/z.z.object({
|
|
1404
1454
|
account: /*#__PURE__*/z.z.string(),
|
|
1455
|
+
marketId: /*#__PURE__*/z.z.number().or(numTransform).optional(),
|
|
1405
1456
|
offset: /*#__PURE__*/z.z.number().or(numTransform)["default"](0),
|
|
1406
1457
|
limit: /*#__PURE__*/z.z.number().or(numTransform)["default"](100).refine(function (n) {
|
|
1407
1458
|
return n <= 250;
|
|
@@ -1420,6 +1471,13 @@ var getDepthParser = /*#__PURE__*/z.z.object({
|
|
|
1420
1471
|
return n <= 250;
|
|
1421
1472
|
}, 'Max limit is 250')
|
|
1422
1473
|
});
|
|
1474
|
+
var dailyParser = /*#__PURE__*/z.z.object({
|
|
1475
|
+
market_id: /*#__PURE__*/z.z.number(),
|
|
1476
|
+
first: /*#__PURE__*/z.z.number(),
|
|
1477
|
+
last: /*#__PURE__*/z.z.number(),
|
|
1478
|
+
bid: /*#__PURE__*/z.z.number(),
|
|
1479
|
+
ask: /*#__PURE__*/z.z.number()
|
|
1480
|
+
});
|
|
1423
1481
|
var tradeParser = /*#__PURE__*/z.z.object({
|
|
1424
1482
|
block_num: /*#__PURE__*/z.z.number(),
|
|
1425
1483
|
block_time: /*#__PURE__*/z.z.string(),
|
|
@@ -1701,12 +1759,12 @@ var Graph = /*#__PURE__*/function () {
|
|
|
1701
1759
|
|
|
1702
1760
|
var compute_transfer = function compute_transfer(pool1, pool2, swap, exchange_fee, precision) {
|
|
1703
1761
|
var term1 = pool2;
|
|
1704
|
-
var term2over = pool1.
|
|
1762
|
+
var term2over = pool1.times(pool2);
|
|
1705
1763
|
var term2under = pool1.plus(swap);
|
|
1706
|
-
var term2 = term2over.
|
|
1764
|
+
var term2 = term2over.div(term2under).integerValue(bignumber_js.BigNumber.ROUND_DOWN);
|
|
1707
1765
|
var term = term1.minus(term2);
|
|
1708
|
-
var fee = new bignumber_js.BigNumber(exchange_fee).
|
|
1709
|
-
var result = term.minus(term.
|
|
1766
|
+
var fee = new bignumber_js.BigNumber(exchange_fee).div(FEE_FACTOR);
|
|
1767
|
+
var result = term.minus(term.times(fee));
|
|
1710
1768
|
return result.integerValue(bignumber_js.BigNumber.ROUND_DOWN).shiftedBy(-precision);
|
|
1711
1769
|
};
|
|
1712
1770
|
var compute_transfer_curve = function compute_transfer_curve(reserve_in, reserve_out, amount_in, exchange_fee, precision, amplifier) {
|
|
@@ -1739,7 +1797,7 @@ var compute_transfer_curve = function compute_transfer_curve(reserve_in, reserve
|
|
|
1739
1797
|
|
|
1740
1798
|
while (x != x_prev && i--) {
|
|
1741
1799
|
x_prev = F(x);
|
|
1742
|
-
x = +new bignumber_js.BigNumber(x * x + c).
|
|
1800
|
+
x = +new bignumber_js.BigNumber(x * x + c).div(2 * x + b).toFixed(0, bignumber_js.BigNumber.ROUND_DOWN);
|
|
1743
1801
|
}
|
|
1744
1802
|
|
|
1745
1803
|
if (reserve_out <= x) {
|
|
@@ -1750,15 +1808,15 @@ var compute_transfer_curve = function compute_transfer_curve(reserve_in, reserve
|
|
|
1750
1808
|
var amount_out_with_fee = new bignumber_js.BigNumber(reserve_out - x); // Fee + 1
|
|
1751
1809
|
// +1 covers small precision issues
|
|
1752
1810
|
|
|
1753
|
-
var fee = amount_out_with_fee.
|
|
1811
|
+
var fee = amount_out_with_fee.times(exchange_fee).div(FEE_FACTOR).plus(1).toFixed(0, bignumber_js.BigNumber.ROUND_DOWN); // Amount out
|
|
1754
1812
|
|
|
1755
1813
|
var amount_out = amount_out_with_fee.minus(fee);
|
|
1756
1814
|
return amount_out.integerValue(bignumber_js.BigNumber.ROUND_DOWN).shiftedBy(-precision);
|
|
1757
1815
|
};
|
|
1758
1816
|
var compute_liquidity = function compute_liquidity(amount_lt, pool, lt_supply, precision) {
|
|
1759
|
-
var over = amount_lt.
|
|
1817
|
+
var over = amount_lt.times(pool);
|
|
1760
1818
|
var under = lt_supply;
|
|
1761
|
-
var result = over.
|
|
1819
|
+
var result = over.div(under).integerValue(bignumber_js.BigNumber.ROUND_DOWN);
|
|
1762
1820
|
return +result.shiftedBy(-precision).toFixed(precision, bignumber_js.BigNumber.ROUND_DOWN);
|
|
1763
1821
|
};
|
|
1764
1822
|
var isInputInvalid = function isInputInvalid(data, value, pool) {
|
|
@@ -1802,6 +1860,7 @@ exports.compute_liquidity = compute_liquidity;
|
|
|
1802
1860
|
exports.compute_transfer = compute_transfer;
|
|
1803
1861
|
exports.compute_transfer_curve = compute_transfer_curve;
|
|
1804
1862
|
exports.createAbstractAuthParser = createAbstractAuthParser;
|
|
1863
|
+
exports.dailyParser = dailyParser;
|
|
1805
1864
|
exports.depositBodyParser = depositBodyParser;
|
|
1806
1865
|
exports.depthParser = depthParser;
|
|
1807
1866
|
exports.exchangeRateParser = exchangeRateParser;
|