@proton/wrap-constants 0.2.18 → 0.2.21

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.
@@ -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[];
@@ -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
- INVALID = 0,
259
- MARKET = 1,
260
- LIMIT = 2,
261
- STOPLOSS = 3,
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",
@@ -620,7 +620,7 @@ var initializeCoins = function initializeCoins(protonChain) {
620
620
  image: 'https://www.proton.org/images/tokens/xtokensXBCH.png',
621
621
  coingeckoId: 'bitcoin-cash'
622
622
  }, {
623
- allowSwap: false,
623
+ allowSwap: true,
624
624
  allowBridge: true,
625
625
  allowLend: false,
626
626
  allowBorrow: false,
@@ -1173,7 +1173,7 @@ var initializeConstants = function initializeConstants(chain) {
1173
1173
 
1174
1174
  var constants = {
1175
1175
  SWAP_CONTRACT: 'proton.swaps',
1176
- DEX_CONTRACT: chain === 'proton' ? 'dex' : 'dextest21',
1176
+ DEX_CONTRACT: chain === 'proton' ? 'dex' : 'dextest22',
1177
1177
  FEE_FACTOR: FEE_FACTOR,
1178
1178
  GOOGLE_MAPS_KEY: 'AIzaSyDb2_CrK032kSIqBXbkdwmaLKWELl0SxVs',
1179
1179
  SWAP_URL: chain === 'proton' ? 'https://otc.protonswap.com' : 'https://otc-test.protonswap.com',
@@ -1212,6 +1212,10 @@ var initializeConstants = function initializeConstants(chain) {
1212
1212
  METAL_DEX_WS_ENDPOINT: chain === 'proton' ? 'wss://metallicus-dbapi-dev01.binfra.one/dexws' : 'wss://metallicus-dbapi-dev01.binfra.one/dexws',
1213
1213
  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
1214
  CHAIN_ID: chain === 'proton' ? '384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0' : '71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd',
1215
+ DEX_PROCESS_SIZE: 30,
1216
+ DEX_SLTPPROCESS_SIZE: 10,
1217
+ MAX_PRICE: "9223372036854775806",
1218
+ MIN_PRICE: 1,
1215
1219
  CHAIN: chain,
1216
1220
  SWAP_COINS: swapCoins,
1217
1221
  BRIDGE_COINS: bridgeCoins,
@@ -1469,6 +1473,8 @@ var orderHistoryParser = /*#__PURE__*/z.z.object({
1469
1473
  account_name: /*#__PURE__*/z.z.string(),
1470
1474
  order_side: /*#__PURE__*/z.z.number(),
1471
1475
  order_type: /*#__PURE__*/z.z.number(),
1476
+ trigger_price: /*#__PURE__*/z.z.number(),
1477
+ fill_type: /*#__PURE__*/z.z.number(),
1472
1478
  status: /*#__PURE__*/z.z.string(),
1473
1479
  quantity_change: /*#__PURE__*/z.z.number(),
1474
1480
  trx_id: /*#__PURE__*/z.z.string()
@@ -1536,11 +1542,10 @@ var syncParser = /*#__PURE__*/z.z.object({
1536
1542
  });
1537
1543
 
1538
1544
  (function (orderType) {
1539
- orderType[orderType["INVALID"] = 0] = "INVALID";
1540
- orderType[orderType["MARKET"] = 1] = "MARKET";
1541
- orderType[orderType["LIMIT"] = 2] = "LIMIT";
1542
- orderType[orderType["STOPLOSS"] = 3] = "STOPLOSS";
1543
- orderType[orderType["TAKEPROFIT"] = 4] = "TAKEPROFIT";
1545
+ orderType[orderType["ORDERBOOK"] = 0] = "ORDERBOOK";
1546
+ orderType[orderType["LIMIT"] = 1] = "LIMIT";
1547
+ orderType[orderType["STOPLOSS"] = 2] = "STOPLOSS";
1548
+ orderType[orderType["TAKEPROFIT"] = 3] = "TAKEPROFIT";
1544
1549
  })(exports.orderType || (exports.orderType = {}));
1545
1550
 
1546
1551
  (function (orderSide) {
@@ -1549,6 +1554,12 @@ var syncParser = /*#__PURE__*/z.z.object({
1549
1554
  orderSide[orderSide["SELL"] = 2] = "SELL";
1550
1555
  })(exports.orderSide || (exports.orderSide = {}));
1551
1556
 
1557
+ (function (fillType) {
1558
+ fillType[fillType["GTC"] = 0] = "GTC";
1559
+ fillType[fillType["IOC"] = 1] = "IOC";
1560
+ fillType[fillType["POST_ONLY"] = 2] = "POST_ONLY";
1561
+ })(exports.fillType || (exports.fillType = {}));
1562
+
1552
1563
  (function (logStatus) {
1553
1564
  logStatus["CREATE"] = "create";
1554
1565
  logStatus["UPDATE"] = "update";