@proton/wrap-constants 0.2.19 → 0.2.22
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 +4 -2
- package/dist/constants.d.ts +4 -0
- package/dist/parsers/dex.d.ts +15 -5
- package/dist/wrap-constants.cjs.development.js +23 -10
- 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 +26 -11
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/coins.ts +7 -5
- package/src/constants.ts +6 -1
- package/src/parsers/dex.ts +5 -1
package/dist/coins.d.ts
CHANGED
|
@@ -27,7 +27,8 @@ export declare enum Chains {
|
|
|
27
27
|
TerraMainnet = "Terra",
|
|
28
28
|
RippleMainnet = "Ripple",
|
|
29
29
|
SolanaMainnet = "Solana",
|
|
30
|
-
MetalXTestnet = "Metal X-Chain (Testnet)"
|
|
30
|
+
MetalXTestnet = "Metal X-Chain (Testnet)",
|
|
31
|
+
MetalCTestnet = "Metal C-Chain (Testnet)"
|
|
31
32
|
}
|
|
32
33
|
export declare enum Networks {
|
|
33
34
|
Mainnet = "mainnet",
|
|
@@ -36,7 +37,8 @@ export declare enum Networks {
|
|
|
36
37
|
ERC20 = "erc20",
|
|
37
38
|
BEP20 = "bep20",
|
|
38
39
|
XLM = "xlm",
|
|
39
|
-
AVM = "avm"
|
|
40
|
+
AVM = "avm",
|
|
41
|
+
EVM = "evm"
|
|
40
42
|
}
|
|
41
43
|
export declare const similarChains: {
|
|
42
44
|
Ethereum: Chains[];
|
package/dist/constants.d.ts
CHANGED
|
@@ -43,6 +43,10 @@ export declare const initializeConstants: (chain: string) => {
|
|
|
43
43
|
METAL_DEX_WS_ENDPOINT: string;
|
|
44
44
|
PROTON_ENDPOINTS: string[];
|
|
45
45
|
CHAIN_ID: string;
|
|
46
|
+
DEX_PROCESS_SIZE: number;
|
|
47
|
+
DEX_SLTPPROCESS_SIZE: number;
|
|
48
|
+
MAX_PRICE: string;
|
|
49
|
+
MIN_PRICE: number;
|
|
46
50
|
CHAIN: string;
|
|
47
51
|
SWAP_COINS: Coin[];
|
|
48
52
|
BRIDGE_COINS: Coin[];
|
package/dist/parsers/dex.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export declare const orderHistoryParser: z.ZodObject<{
|
|
|
61
61
|
account_name: z.ZodString;
|
|
62
62
|
order_side: z.ZodNumber;
|
|
63
63
|
order_type: z.ZodNumber;
|
|
64
|
+
trigger_price: z.ZodNumber;
|
|
65
|
+
fill_type: z.ZodNumber;
|
|
64
66
|
status: z.ZodString;
|
|
65
67
|
quantity_change: z.ZodNumber;
|
|
66
68
|
trx_id: z.ZodString;
|
|
@@ -77,6 +79,8 @@ export declare const orderHistoryParser: z.ZodObject<{
|
|
|
77
79
|
account_name: string;
|
|
78
80
|
order_side: number;
|
|
79
81
|
order_type: number;
|
|
82
|
+
trigger_price: number;
|
|
83
|
+
fill_type: number;
|
|
80
84
|
quantity_change: number;
|
|
81
85
|
trx_id: string;
|
|
82
86
|
}, {
|
|
@@ -92,6 +96,8 @@ export declare const orderHistoryParser: z.ZodObject<{
|
|
|
92
96
|
account_name: string;
|
|
93
97
|
order_side: number;
|
|
94
98
|
order_type: number;
|
|
99
|
+
trigger_price: number;
|
|
100
|
+
fill_type: number;
|
|
95
101
|
quantity_change: number;
|
|
96
102
|
trx_id: string;
|
|
97
103
|
}>;
|
|
@@ -255,17 +261,21 @@ export declare const syncParser: z.ZodObject<{
|
|
|
255
261
|
}>;
|
|
256
262
|
export declare type Sync = z.infer<typeof syncParser>;
|
|
257
263
|
export declare enum orderType {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
TAKEPROFIT = 4
|
|
264
|
+
ORDERBOOK = 0,
|
|
265
|
+
LIMIT = 1,
|
|
266
|
+
STOPLOSS = 2,
|
|
267
|
+
TAKEPROFIT = 3
|
|
263
268
|
}
|
|
264
269
|
export declare enum orderSide {
|
|
265
270
|
INVALID = 0,
|
|
266
271
|
BUY = 1,
|
|
267
272
|
SELL = 2
|
|
268
273
|
}
|
|
274
|
+
export declare enum fillType {
|
|
275
|
+
GTC = 0,
|
|
276
|
+
IOC = 1,
|
|
277
|
+
POST_ONLY = 2
|
|
278
|
+
}
|
|
269
279
|
export declare enum logStatus {
|
|
270
280
|
CREATE = "create",
|
|
271
281
|
UPDATE = "update",
|
|
@@ -39,6 +39,7 @@ var _similarChains, _explorerLinkByChain;
|
|
|
39
39
|
Chains["RippleMainnet"] = "Ripple";
|
|
40
40
|
Chains["SolanaMainnet"] = "Solana";
|
|
41
41
|
Chains["MetalXTestnet"] = "Metal X-Chain (Testnet)";
|
|
42
|
+
Chains["MetalCTestnet"] = "Metal C-Chain (Testnet)";
|
|
42
43
|
})(exports.Chains || (exports.Chains = {}));
|
|
43
44
|
|
|
44
45
|
(function (Networks) {
|
|
@@ -49,6 +50,7 @@ var _similarChains, _explorerLinkByChain;
|
|
|
49
50
|
Networks["BEP20"] = "bep20";
|
|
50
51
|
Networks["XLM"] = "xlm";
|
|
51
52
|
Networks["AVM"] = "avm";
|
|
53
|
+
Networks["EVM"] = "evm";
|
|
52
54
|
})(exports.Networks || (exports.Networks = {}));
|
|
53
55
|
|
|
54
56
|
var similarChains = (_similarChains = {}, _similarChains[exports.Chains.EthereumMainnet] = [exports.Chains.BinanceBEP20], _similarChains[exports.Chains.BinanceBEP20] = [exports.Chains.EthereumMainnet], _similarChains);
|
|
@@ -244,12 +246,12 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
244
246
|
wallets: [].concat(IS_TESTNET ? [{
|
|
245
247
|
wallet: 'METAL',
|
|
246
248
|
symbol: 'METAL',
|
|
247
|
-
chain: exports.Chains.
|
|
248
|
-
network: exports.Networks.
|
|
249
|
-
precision:
|
|
249
|
+
chain: exports.Chains.MetalCTestnet,
|
|
250
|
+
network: exports.Networks.EVM,
|
|
251
|
+
precision: 18,
|
|
250
252
|
contract: '',
|
|
251
253
|
provider: exports.Providers.METAL,
|
|
252
|
-
hasWithdrawMemo:
|
|
254
|
+
hasWithdrawMemo: false
|
|
253
255
|
}] : []),
|
|
254
256
|
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/metal-chain.png',
|
|
255
257
|
coingeckoId: ''
|
|
@@ -1173,7 +1175,7 @@ var initializeConstants = function initializeConstants(chain) {
|
|
|
1173
1175
|
|
|
1174
1176
|
var constants = {
|
|
1175
1177
|
SWAP_CONTRACT: 'proton.swaps',
|
|
1176
|
-
DEX_CONTRACT: chain === 'proton' ? 'dex' : '
|
|
1178
|
+
DEX_CONTRACT: chain === 'proton' ? 'dex' : 'dextest22',
|
|
1177
1179
|
FEE_FACTOR: FEE_FACTOR,
|
|
1178
1180
|
GOOGLE_MAPS_KEY: 'AIzaSyDb2_CrK032kSIqBXbkdwmaLKWELl0SxVs',
|
|
1179
1181
|
SWAP_URL: chain === 'proton' ? 'https://otc.protonswap.com' : 'https://otc-test.protonswap.com',
|
|
@@ -1212,6 +1214,10 @@ var initializeConstants = function initializeConstants(chain) {
|
|
|
1212
1214
|
METAL_DEX_WS_ENDPOINT: chain === 'proton' ? 'wss://metallicus-dbapi-dev01.binfra.one/dexws' : 'wss://metallicus-dbapi-dev01.binfra.one/dexws',
|
|
1213
1215
|
PROTON_ENDPOINTS: chain === 'proton' ? ['https://metal-proton-rpc.global.binfra.one', 'https://proton.greymass.com', 'https://proton.eoscafeblock.com', 'https://proton.cryptolions.io', 'https://proton.eosusa.news'] : ['https://metal-protontest-rpc.global.binfra.one', 'https://testnet.protonchain.com'],
|
|
1214
1216
|
CHAIN_ID: chain === 'proton' ? '384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0' : '71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd',
|
|
1217
|
+
DEX_PROCESS_SIZE: 30,
|
|
1218
|
+
DEX_SLTPPROCESS_SIZE: 10,
|
|
1219
|
+
MAX_PRICE: "9223372036854775806",
|
|
1220
|
+
MIN_PRICE: 1,
|
|
1215
1221
|
CHAIN: chain,
|
|
1216
1222
|
SWAP_COINS: swapCoins,
|
|
1217
1223
|
BRIDGE_COINS: bridgeCoins,
|
|
@@ -1469,6 +1475,8 @@ var orderHistoryParser = /*#__PURE__*/z.z.object({
|
|
|
1469
1475
|
account_name: /*#__PURE__*/z.z.string(),
|
|
1470
1476
|
order_side: /*#__PURE__*/z.z.number(),
|
|
1471
1477
|
order_type: /*#__PURE__*/z.z.number(),
|
|
1478
|
+
trigger_price: /*#__PURE__*/z.z.number(),
|
|
1479
|
+
fill_type: /*#__PURE__*/z.z.number(),
|
|
1472
1480
|
status: /*#__PURE__*/z.z.string(),
|
|
1473
1481
|
quantity_change: /*#__PURE__*/z.z.number(),
|
|
1474
1482
|
trx_id: /*#__PURE__*/z.z.string()
|
|
@@ -1536,11 +1544,10 @@ var syncParser = /*#__PURE__*/z.z.object({
|
|
|
1536
1544
|
});
|
|
1537
1545
|
|
|
1538
1546
|
(function (orderType) {
|
|
1539
|
-
orderType[orderType["
|
|
1540
|
-
orderType[orderType["
|
|
1541
|
-
orderType[orderType["
|
|
1542
|
-
orderType[orderType["
|
|
1543
|
-
orderType[orderType["TAKEPROFIT"] = 4] = "TAKEPROFIT";
|
|
1547
|
+
orderType[orderType["ORDERBOOK"] = 0] = "ORDERBOOK";
|
|
1548
|
+
orderType[orderType["LIMIT"] = 1] = "LIMIT";
|
|
1549
|
+
orderType[orderType["STOPLOSS"] = 2] = "STOPLOSS";
|
|
1550
|
+
orderType[orderType["TAKEPROFIT"] = 3] = "TAKEPROFIT";
|
|
1544
1551
|
})(exports.orderType || (exports.orderType = {}));
|
|
1545
1552
|
|
|
1546
1553
|
(function (orderSide) {
|
|
@@ -1549,6 +1556,12 @@ var syncParser = /*#__PURE__*/z.z.object({
|
|
|
1549
1556
|
orderSide[orderSide["SELL"] = 2] = "SELL";
|
|
1550
1557
|
})(exports.orderSide || (exports.orderSide = {}));
|
|
1551
1558
|
|
|
1559
|
+
(function (fillType) {
|
|
1560
|
+
fillType[fillType["GTC"] = 0] = "GTC";
|
|
1561
|
+
fillType[fillType["IOC"] = 1] = "IOC";
|
|
1562
|
+
fillType[fillType["POST_ONLY"] = 2] = "POST_ONLY";
|
|
1563
|
+
})(exports.fillType || (exports.fillType = {}));
|
|
1564
|
+
|
|
1552
1565
|
(function (logStatus) {
|
|
1553
1566
|
logStatus["CREATE"] = "create";
|
|
1554
1567
|
logStatus["UPDATE"] = "update";
|