@proton/wrap-constants 0.1.1 → 0.2.2
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 +42 -9
- package/dist/constants.d.ts +10 -0
- package/dist/graph.d.ts +30 -0
- package/dist/index.d.ts +2 -0
- package/dist/math.d.ts +17 -0
- package/dist/parsers/actions.d.ts +1323 -0
- package/dist/parsers/address.d.ts +932 -0
- package/dist/parsers/auth.d.ts +1816 -0
- package/dist/parsers/base.d.ts +35 -0
- package/dist/parsers/currency.d.ts +236 -0
- package/dist/parsers/deposit.d.ts +63 -0
- package/dist/parsers/dex.d.ts +291 -0
- package/dist/parsers/index.d.ts +12 -0
- package/dist/parsers/otc.d.ts +46 -0
- package/dist/parsers/pool.d.ts +51 -0
- package/dist/parsers/withdraw.d.ts +1053 -0
- package/dist/parsers/withdrawalHistory.d.ts +98 -0
- package/dist/parsers/wrap.d.ts +109 -0
- package/dist/utils.d.ts +1 -0
- package/dist/wrap-constants.cjs.development.js +1236 -289
- 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 +1216 -293
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +14 -8
- package/src/coins.ts +578 -150
- package/src/constants.ts +41 -14
- package/src/graph.ts +126 -0
- package/src/index.ts +3 -1
- package/src/math.ts +112 -0
- package/src/parsers/actions.ts +82 -0
- package/src/parsers/address.ts +27 -0
- package/src/parsers/auth.ts +22 -0
- package/src/parsers/base.ts +18 -0
- package/src/parsers/currency.ts +89 -0
- package/src/parsers/deposit.ts +30 -0
- package/src/parsers/dex.ts +156 -0
- package/src/parsers/index.ts +12 -0
- package/src/parsers/otc.ts +23 -0
- package/src/parsers/pool.ts +51 -0
- package/src/parsers/withdraw.ts +39 -0
- package/src/parsers/withdrawalHistory.ts +23 -0
- package/src/parsers/wrap.ts +41 -0
- package/src/utils.ts +12 -1
- package/dist/parsers.d.ts +0 -849
- package/dist/pools.d.ts +0 -31
- package/src/parsers.ts +0 -258
- package/src/pools.ts +0 -26
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
+
|
|
5
7
|
var z = require('zod');
|
|
8
|
+
var cloneDeep = _interopDefault(require('lodash.clonedeep'));
|
|
9
|
+
var bignumber_js = require('bignumber.js');
|
|
6
10
|
|
|
7
|
-
var _explorerLinkByChain;
|
|
11
|
+
var _similarChains, _explorerLinkByChain;
|
|
8
12
|
|
|
9
13
|
(function (Chains) {
|
|
10
14
|
Chains["BitcoinMainnet"] = "Bitcoin";
|
|
@@ -12,14 +16,28 @@ var _explorerLinkByChain;
|
|
|
12
16
|
Chains["EthereumMainnet"] = "Ethereum";
|
|
13
17
|
Chains["EthereumRopsten"] = "Ethereum (Ropsten)";
|
|
14
18
|
Chains["LitecoinMainnet"] = "Litecoin";
|
|
19
|
+
Chains["LitecoinTestnet"] = "Litecoin (Testnet)";
|
|
15
20
|
Chains["BitcoinCashMainnet"] = "Bitcoin Cash";
|
|
21
|
+
Chains["BitcoinCashTestnet"] = "Bitcoin Cash (Testnet)";
|
|
16
22
|
Chains["StellarMainnet"] = "Stellar";
|
|
23
|
+
Chains["StellarTestnet"] = "Stellar (Testnet)";
|
|
17
24
|
Chains["ProtonMainnet"] = "Proton";
|
|
18
25
|
Chains["ProtonTestnet"] = "Proton (Testnet)";
|
|
19
26
|
Chains["PolkadotMainnet"] = "Polkadot";
|
|
20
27
|
Chains["BinanceBEP2"] = "Binance (BEP2)";
|
|
21
28
|
Chains["BinanceBEP20"] = "Binance (BEP20)";
|
|
22
29
|
Chains["EosMainnet"] = "EOS";
|
|
30
|
+
Chains["EosTestnet"] = "EOS (Jungle Testnet)";
|
|
31
|
+
Chains["HederaMainnet"] = "Hedera (Mainnet)";
|
|
32
|
+
Chains["HederaTestnet"] = "Hedera (Testnet)";
|
|
33
|
+
Chains["DogeMainnet"] = "Dogecoin";
|
|
34
|
+
Chains["CardanoMainnet"] = "Cardano";
|
|
35
|
+
Chains["AvalancheXChain"] = "Avalanche X-Chain";
|
|
36
|
+
Chains["AvalancheCChain"] = "Avalanche C-Chain";
|
|
37
|
+
Chains["PolygonMainnet"] = "Polygon";
|
|
38
|
+
Chains["TerraMainnet"] = "Terra";
|
|
39
|
+
Chains["RippleMainnet"] = "Ripple";
|
|
40
|
+
Chains["SolanaMainnet"] = "Solana";
|
|
23
41
|
})(exports.Chains || (exports.Chains = {}));
|
|
24
42
|
|
|
25
43
|
(function (Networks) {
|
|
@@ -28,8 +46,10 @@ var _explorerLinkByChain;
|
|
|
28
46
|
Networks["Ropsten"] = "ropsten";
|
|
29
47
|
Networks["ERC20"] = "erc20";
|
|
30
48
|
Networks["BEP20"] = "bep20";
|
|
49
|
+
Networks["XLM"] = "xlm";
|
|
31
50
|
})(exports.Networks || (exports.Networks = {}));
|
|
32
51
|
|
|
52
|
+
var similarChains = (_similarChains = {}, _similarChains[exports.Chains.EthereumMainnet] = [exports.Chains.BinanceBEP20], _similarChains[exports.Chains.BinanceBEP20] = [exports.Chains.EthereumMainnet], _similarChains);
|
|
33
53
|
var explorerLinkByChain = (_explorerLinkByChain = {}, _explorerLinkByChain[exports.Chains.BitcoinMainnet] = function (txid) {
|
|
34
54
|
return "https://blockchain.com/btc/tx/" + txid;
|
|
35
55
|
}, _explorerLinkByChain[exports.Chains.BitcoinTestnet] = function (txid) {
|
|
@@ -40,37 +60,69 @@ var explorerLinkByChain = (_explorerLinkByChain = {}, _explorerLinkByChain[expor
|
|
|
40
60
|
return "https://ropsten.etherscan.io/tx/" + txid;
|
|
41
61
|
}, _explorerLinkByChain[exports.Chains.LitecoinMainnet] = function (txid) {
|
|
42
62
|
return "https://blockchair.com/litecoin/transaction/" + txid;
|
|
63
|
+
}, _explorerLinkByChain[exports.Chains.LitecoinTestnet] = function (txid) {
|
|
64
|
+
return "https://blockexplorer.one/litecoin/testnet/blockHash/" + txid;
|
|
43
65
|
}, _explorerLinkByChain[exports.Chains.BitcoinCashMainnet] = function (txid) {
|
|
44
66
|
return "https://blockchair.com/bitcoin-cash/transaction/" + txid;
|
|
67
|
+
}, _explorerLinkByChain[exports.Chains.BitcoinCashTestnet] = function (txid) {
|
|
68
|
+
return "https://blockexplorer.one/bitcoin-cash/testnet/blockHash/" + txid;
|
|
45
69
|
}, _explorerLinkByChain[exports.Chains.StellarMainnet] = function (txid) {
|
|
46
70
|
return "https://blockchair.com/stellar/transaction/" + txid;
|
|
47
|
-
}, _explorerLinkByChain[exports.Chains.
|
|
48
|
-
return "https://
|
|
49
|
-
}, _explorerLinkByChain[exports.Chains.
|
|
50
|
-
return "https://proton
|
|
71
|
+
}, _explorerLinkByChain[exports.Chains.StellarTestnet] = function (txid) {
|
|
72
|
+
return "https://testnet.steexp.com/tx/" + txid;
|
|
73
|
+
}, _explorerLinkByChain[exports.Chains.ProtonMainnet] = function (txid, traces) {
|
|
74
|
+
return "https://proton.bloks.io/transaction/" + txid + (traces ? '?tab=traces' : '');
|
|
75
|
+
}, _explorerLinkByChain[exports.Chains.ProtonTestnet] = function (txid, traces) {
|
|
76
|
+
return "https://proton-test.bloks.io/transaction/" + txid + (traces ? '?tab=traces' : '');
|
|
51
77
|
}, _explorerLinkByChain[exports.Chains.PolkadotMainnet] = function (txid) {
|
|
52
78
|
return "https://polkadot.subscan.io/extrinsic/" + txid;
|
|
53
|
-
}, _explorerLinkByChain[exports.Chains.EosMainnet] = function (txid) {
|
|
54
|
-
return "https://bloks.io/transaction/" + txid;
|
|
55
79
|
}, _explorerLinkByChain[exports.Chains.BinanceBEP2] = function (txid) {
|
|
56
80
|
return "https://binance.mintscan.io/txs/" + txid;
|
|
57
81
|
}, _explorerLinkByChain[exports.Chains.BinanceBEP20] = function (txid) {
|
|
58
82
|
return "https://bscscan.com/tx/" + txid;
|
|
83
|
+
}, _explorerLinkByChain[exports.Chains.EosMainnet] = function (txid) {
|
|
84
|
+
return "https://bloks.io/transaction/" + txid;
|
|
85
|
+
}, _explorerLinkByChain[exports.Chains.EosTestnet] = function (txid) {
|
|
86
|
+
return "https://jungle.bloks.io/transaction/" + txid;
|
|
87
|
+
}, _explorerLinkByChain[exports.Chains.HederaMainnet] = function (txid) {
|
|
88
|
+
return "https://app.dragonglass.me/transactions/" + txid;
|
|
89
|
+
}, _explorerLinkByChain[exports.Chains.HederaTestnet] = function (txid) {
|
|
90
|
+
return "https://testnet.dragonglass.me/transactions/" + txid;
|
|
91
|
+
}, _explorerLinkByChain[exports.Chains.DogeMainnet] = function (txid) {
|
|
92
|
+
return "https://blockchair.com/dogecoin/transaction/" + txid;
|
|
93
|
+
}, _explorerLinkByChain[exports.Chains.CardanoMainnet] = function (txid) {
|
|
94
|
+
return "https://explorer.cardano.org/en/transaction?id=" + txid;
|
|
95
|
+
}, _explorerLinkByChain[exports.Chains.AvalancheXChain] = function (txid) {
|
|
96
|
+
return "https://avascan.info/blockchain/x/tx/" + txid;
|
|
97
|
+
}, _explorerLinkByChain[exports.Chains.AvalancheCChain] = function (txid) {
|
|
98
|
+
return "https://snowtrace.io/tx/" + txid;
|
|
99
|
+
}, _explorerLinkByChain[exports.Chains.PolygonMainnet] = function (txid) {
|
|
100
|
+
return "https://polygonscan.com/tx/" + txid;
|
|
101
|
+
}, _explorerLinkByChain[exports.Chains.TerraMainnet] = function (txid) {
|
|
102
|
+
return "https://terra.stake.id/?#/tx/" + txid;
|
|
103
|
+
}, _explorerLinkByChain[exports.Chains.RippleMainnet] = function (txid) {
|
|
104
|
+
return "https://xrpscan.com/tx/" + txid;
|
|
105
|
+
}, _explorerLinkByChain[exports.Chains.SolanaMainnet] = function (txid) {
|
|
106
|
+
return "https://explorer.solana.com/tx/" + txid;
|
|
59
107
|
}, _explorerLinkByChain);
|
|
108
|
+
var protonExplorerTxUrl = function protonExplorerTxUrl(chain, txId, traces) {
|
|
109
|
+
return chain === 'proton' ? explorerLinkByChain[exports.Chains.ProtonMainnet](txId, traces) : explorerLinkByChain[exports.Chains.ProtonTestnet](txId, traces);
|
|
110
|
+
}; // Initialize
|
|
111
|
+
|
|
60
112
|
var initializeCoins = function initializeCoins(protonChain) {
|
|
61
113
|
var IS_MAINNET = protonChain === 'proton';
|
|
62
114
|
var IS_TESTNET = protonChain === 'proton-test';
|
|
63
115
|
var coins = [{
|
|
64
116
|
allowSwap: true,
|
|
65
|
-
allowBridge:
|
|
66
|
-
allowLend:
|
|
67
|
-
allowBorrow:
|
|
117
|
+
allowBridge: IS_MAINNET,
|
|
118
|
+
allowLend: true,
|
|
119
|
+
allowBorrow: true,
|
|
68
120
|
name: 'Proton',
|
|
69
121
|
coin: 'XPR',
|
|
70
122
|
xtokenSymbol: 'XPR',
|
|
71
123
|
xtokenPrecision: 4,
|
|
72
124
|
xtokenContract: 'eosio.token',
|
|
73
|
-
wallets: [{
|
|
125
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
74
126
|
wallet: 'XPR-ERC20',
|
|
75
127
|
symbol: 'XPR',
|
|
76
128
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -78,7 +130,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
78
130
|
precision: 4,
|
|
79
131
|
contract: '0xD7EFB00D12C2C13131FD319336FDF952525DA2AF',
|
|
80
132
|
hasWithdrawMemo: false
|
|
81
|
-
}
|
|
133
|
+
}, {
|
|
82
134
|
wallet: 'XPR-BEP20',
|
|
83
135
|
symbol: 'XPR',
|
|
84
136
|
chain: exports.Chains.BinanceBEP20,
|
|
@@ -87,18 +139,19 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
87
139
|
contract: '0x5DE3939B2F811A61D830E6F52D13B066881412AB',
|
|
88
140
|
hasWithdrawMemo: false
|
|
89
141
|
}] : []),
|
|
90
|
-
image: '/
|
|
142
|
+
image: 'https://www.proton.org/images/tokens/eosio-tokenXPR.png',
|
|
143
|
+
coingeckoId: 'proton'
|
|
91
144
|
}, {
|
|
92
145
|
allowSwap: true,
|
|
93
146
|
allowBridge: true,
|
|
94
|
-
allowLend:
|
|
95
|
-
allowBorrow:
|
|
147
|
+
allowLend: true,
|
|
148
|
+
allowBorrow: true,
|
|
96
149
|
name: 'USD Coin',
|
|
97
150
|
coin: 'USDC',
|
|
98
151
|
xtokenSymbol: 'XUSDC',
|
|
99
152
|
xtokenPrecision: 6,
|
|
100
153
|
xtokenContract: 'xtokens',
|
|
101
|
-
wallets: [{
|
|
154
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
102
155
|
wallet: 'USDC',
|
|
103
156
|
symbol: 'USDC',
|
|
104
157
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -106,19 +159,52 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
106
159
|
precision: 6,
|
|
107
160
|
contract: '0xA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48',
|
|
108
161
|
hasWithdrawMemo: false
|
|
109
|
-
}
|
|
110
|
-
|
|
162
|
+
}, {
|
|
163
|
+
wallet: 'USDC-BEP20',
|
|
164
|
+
symbol: 'USDC',
|
|
165
|
+
chain: exports.Chains.BinanceBEP20,
|
|
166
|
+
network: exports.Networks.BEP20,
|
|
167
|
+
precision: 18,
|
|
168
|
+
contract: '0x8AC76A51CC950D9822D68B83FE1AD97B32CD580D',
|
|
169
|
+
hasWithdrawMemo: false
|
|
170
|
+
}, {
|
|
171
|
+
wallet: 'USDC-XLM',
|
|
172
|
+
symbol: 'USDC',
|
|
173
|
+
chain: exports.Chains.StellarMainnet,
|
|
174
|
+
network: exports.Networks.XLM,
|
|
175
|
+
precision: 7,
|
|
176
|
+
contract: undefined,
|
|
177
|
+
hasWithdrawMemo: true
|
|
178
|
+
}] : [], IS_TESTNET ? [{
|
|
179
|
+
wallet: 'USDC',
|
|
180
|
+
symbol: 'USDC',
|
|
181
|
+
chain: exports.Chains.EthereumRopsten,
|
|
182
|
+
network: exports.Networks.Ropsten,
|
|
183
|
+
precision: 6,
|
|
184
|
+
contract: '0xA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48',
|
|
185
|
+
hasWithdrawMemo: false
|
|
186
|
+
}, {
|
|
187
|
+
wallet: 'USDC-XLM',
|
|
188
|
+
symbol: 'USDC',
|
|
189
|
+
chain: exports.Chains.StellarTestnet,
|
|
190
|
+
network: exports.Networks.XLM,
|
|
191
|
+
precision: 7,
|
|
192
|
+
contract: undefined,
|
|
193
|
+
hasWithdrawMemo: true
|
|
194
|
+
}] : []),
|
|
195
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUSDC.png',
|
|
196
|
+
coingeckoId: 'usd-coin'
|
|
111
197
|
}, {
|
|
112
198
|
allowSwap: true,
|
|
113
|
-
allowBridge:
|
|
114
|
-
allowLend:
|
|
115
|
-
allowBorrow:
|
|
116
|
-
name: 'Metal',
|
|
199
|
+
allowBridge: IS_MAINNET,
|
|
200
|
+
allowLend: true,
|
|
201
|
+
allowBorrow: true,
|
|
202
|
+
name: 'Metal DAO',
|
|
117
203
|
coin: 'MTL',
|
|
118
204
|
xtokenSymbol: 'XMT',
|
|
119
205
|
xtokenPrecision: 8,
|
|
120
206
|
xtokenContract: 'xtokens',
|
|
121
|
-
wallets: [{
|
|
207
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
122
208
|
wallet: 'MTL',
|
|
123
209
|
symbol: 'MTL',
|
|
124
210
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -126,19 +212,33 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
126
212
|
precision: 8,
|
|
127
213
|
contract: '0xF433089366899D83A9F26A773D59EC7ECF30355E',
|
|
128
214
|
hasWithdrawMemo: false
|
|
129
|
-
}],
|
|
130
|
-
image: '/
|
|
215
|
+
}] : []),
|
|
216
|
+
image: 'https://www.proton.org/images/tokens/xtokensXMT.png',
|
|
217
|
+
coingeckoId: 'metal'
|
|
131
218
|
}, {
|
|
132
|
-
allowSwap:
|
|
133
|
-
allowBridge:
|
|
219
|
+
allowSwap: IS_MAINNET,
|
|
220
|
+
allowBridge: false,
|
|
134
221
|
allowLend: false,
|
|
135
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: ''
|
|
231
|
+
}, {
|
|
232
|
+
allowSwap: true,
|
|
233
|
+
allowBridge: true,
|
|
234
|
+
allowLend: true,
|
|
235
|
+
allowBorrow: true,
|
|
136
236
|
name: 'Bitcoin',
|
|
137
237
|
coin: 'BTC',
|
|
138
238
|
xtokenSymbol: 'XBTC',
|
|
139
239
|
xtokenPrecision: 8,
|
|
140
240
|
xtokenContract: 'xtokens',
|
|
141
|
-
wallets: [{
|
|
241
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
142
242
|
wallet: 'BTC',
|
|
143
243
|
symbol: 'BTC',
|
|
144
244
|
chain: exports.Chains.BitcoinMainnet,
|
|
@@ -146,8 +246,8 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
146
246
|
precision: 8,
|
|
147
247
|
contract: undefined,
|
|
148
248
|
hasWithdrawMemo: false
|
|
149
|
-
}]
|
|
150
|
-
wallet: 'BTC
|
|
249
|
+
}] : [], IS_TESTNET ? [{
|
|
250
|
+
wallet: 'BTC',
|
|
151
251
|
symbol: 'BTC',
|
|
152
252
|
chain: exports.Chains.BitcoinTestnet,
|
|
153
253
|
network: exports.Networks.Testnet,
|
|
@@ -155,18 +255,19 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
155
255
|
contract: undefined,
|
|
156
256
|
hasWithdrawMemo: false
|
|
157
257
|
}] : []),
|
|
158
|
-
image: '/
|
|
258
|
+
image: 'https://www.proton.org/images/tokens/xtokensXBTC.png',
|
|
259
|
+
coingeckoId: 'bitcoin'
|
|
159
260
|
}, {
|
|
160
261
|
allowSwap: true,
|
|
161
262
|
allowBridge: true,
|
|
162
|
-
allowLend:
|
|
163
|
-
allowBorrow:
|
|
263
|
+
allowLend: true,
|
|
264
|
+
allowBorrow: true,
|
|
164
265
|
name: 'Ethereum',
|
|
165
266
|
coin: 'ETH',
|
|
166
267
|
xtokenSymbol: 'XETH',
|
|
167
268
|
xtokenPrecision: 8,
|
|
168
269
|
xtokenContract: 'xtokens',
|
|
169
|
-
wallets: [{
|
|
270
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
170
271
|
wallet: 'ETH',
|
|
171
272
|
symbol: 'ETH',
|
|
172
273
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -174,8 +275,8 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
174
275
|
precision: 18,
|
|
175
276
|
contract: '0x0000000000000000000000000000000000000000',
|
|
176
277
|
hasWithdrawMemo: false
|
|
177
|
-
}]
|
|
178
|
-
wallet: 'ETH
|
|
278
|
+
}] : [], IS_TESTNET ? [{
|
|
279
|
+
wallet: 'ETH',
|
|
179
280
|
symbol: 'ETH',
|
|
180
281
|
chain: exports.Chains.EthereumRopsten,
|
|
181
282
|
network: exports.Networks.Ropsten,
|
|
@@ -183,9 +284,23 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
183
284
|
contract: '0x0000000000000000000000000000000000000000',
|
|
184
285
|
hasWithdrawMemo: false
|
|
185
286
|
}] : []),
|
|
186
|
-
image: '/
|
|
287
|
+
image: 'https://www.proton.org/images/tokens/xtokensXETH.png',
|
|
288
|
+
coingeckoId: 'ethereum'
|
|
187
289
|
}, {
|
|
188
|
-
allowSwap:
|
|
290
|
+
allowSwap: true,
|
|
291
|
+
allowBridge: false,
|
|
292
|
+
allowLend: false,
|
|
293
|
+
allowBorrow: false,
|
|
294
|
+
name: 'Loan',
|
|
295
|
+
coin: 'LOAN',
|
|
296
|
+
xtokenSymbol: 'LOAN',
|
|
297
|
+
xtokenPrecision: 4,
|
|
298
|
+
xtokenContract: 'loan.token',
|
|
299
|
+
wallets: [],
|
|
300
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/loan.png',
|
|
301
|
+
coingeckoId: 'proton-loan'
|
|
302
|
+
}, {
|
|
303
|
+
allowSwap: true,
|
|
189
304
|
allowBridge: true,
|
|
190
305
|
allowLend: false,
|
|
191
306
|
allowBorrow: false,
|
|
@@ -194,7 +309,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
194
309
|
xtokenSymbol: 'XUSDT',
|
|
195
310
|
xtokenPrecision: 6,
|
|
196
311
|
xtokenContract: 'xtokens',
|
|
197
|
-
wallets: [{
|
|
312
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
198
313
|
wallet: 'USDT',
|
|
199
314
|
symbol: 'USDT',
|
|
200
315
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -202,11 +317,28 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
202
317
|
precision: 6,
|
|
203
318
|
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
204
319
|
hasWithdrawMemo: false
|
|
205
|
-
}],
|
|
206
|
-
|
|
320
|
+
}] : [], IS_MAINNET ? [{
|
|
321
|
+
wallet: 'USDT-BEP20',
|
|
322
|
+
symbol: 'USDT',
|
|
323
|
+
chain: exports.Chains.BinanceBEP20,
|
|
324
|
+
network: exports.Networks.BEP20,
|
|
325
|
+
precision: 18,
|
|
326
|
+
contract: '0x55d398326f99059fF775485246999027B3197955',
|
|
327
|
+
hasWithdrawMemo: false
|
|
328
|
+
}] : [], IS_TESTNET ? [{
|
|
329
|
+
wallet: 'USDT',
|
|
330
|
+
symbol: 'USDT',
|
|
331
|
+
chain: exports.Chains.EthereumRopsten,
|
|
332
|
+
network: exports.Networks.Ropsten,
|
|
333
|
+
precision: 6,
|
|
334
|
+
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
335
|
+
hasWithdrawMemo: false
|
|
336
|
+
}] : []),
|
|
337
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUSDT.png',
|
|
338
|
+
coingeckoId: 'tether'
|
|
207
339
|
}, {
|
|
208
340
|
allowSwap: false,
|
|
209
|
-
allowBridge:
|
|
341
|
+
allowBridge: IS_MAINNET,
|
|
210
342
|
allowLend: false,
|
|
211
343
|
allowBorrow: false,
|
|
212
344
|
name: 'TrueUSD',
|
|
@@ -214,7 +346,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
214
346
|
xtokenSymbol: 'XTUSD',
|
|
215
347
|
xtokenPrecision: 6,
|
|
216
348
|
xtokenContract: 'xtokens',
|
|
217
|
-
wallets: [{
|
|
349
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
218
350
|
wallet: 'TUSD',
|
|
219
351
|
symbol: 'TUSD',
|
|
220
352
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -222,11 +354,12 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
222
354
|
precision: 18,
|
|
223
355
|
contract: '0x0000000000085D4780B73119B644AE5ECD22B376',
|
|
224
356
|
hasWithdrawMemo: false
|
|
225
|
-
}],
|
|
226
|
-
image: '/
|
|
357
|
+
}] : []),
|
|
358
|
+
image: 'https://www.proton.org/images/tokens/xtokensXTUSD.png',
|
|
359
|
+
coingeckoId: 'true-usd'
|
|
227
360
|
}, {
|
|
228
361
|
allowSwap: false,
|
|
229
|
-
allowBridge:
|
|
362
|
+
allowBridge: IS_MAINNET,
|
|
230
363
|
allowLend: false,
|
|
231
364
|
allowBorrow: false,
|
|
232
365
|
name: 'Paxos Standard',
|
|
@@ -234,7 +367,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
234
367
|
xtokenSymbol: 'XPAX',
|
|
235
368
|
xtokenPrecision: 6,
|
|
236
369
|
xtokenContract: 'xtokens',
|
|
237
|
-
wallets: [{
|
|
370
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
238
371
|
wallet: 'PAX',
|
|
239
372
|
symbol: 'PAX',
|
|
240
373
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -242,8 +375,9 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
242
375
|
precision: 18,
|
|
243
376
|
contract: '0x8E870D67F660D95D5BE530380D0EC0BD388289E1',
|
|
244
377
|
hasWithdrawMemo: false
|
|
245
|
-
}],
|
|
246
|
-
image: '/
|
|
378
|
+
}] : []),
|
|
379
|
+
image: 'https://www.proton.org/images/tokens/xtokensXPAX.png',
|
|
380
|
+
coingeckoId: 'paxos-standard'
|
|
247
381
|
}, {
|
|
248
382
|
allowSwap: false,
|
|
249
383
|
allowBridge: true,
|
|
@@ -254,7 +388,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
254
388
|
xtokenSymbol: 'XPAXG',
|
|
255
389
|
xtokenPrecision: 8,
|
|
256
390
|
xtokenContract: 'xtokens',
|
|
257
|
-
wallets: [{
|
|
391
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
258
392
|
wallet: 'PAXG',
|
|
259
393
|
symbol: 'PAXG',
|
|
260
394
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -262,11 +396,59 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
262
396
|
precision: 18,
|
|
263
397
|
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
264
398
|
hasWithdrawMemo: false
|
|
265
|
-
}],
|
|
266
|
-
|
|
399
|
+
}] : [], IS_TESTNET ? [{
|
|
400
|
+
wallet: 'PAXG',
|
|
401
|
+
symbol: 'PAXG',
|
|
402
|
+
chain: exports.Chains.EthereumRopsten,
|
|
403
|
+
network: exports.Networks.Ropsten,
|
|
404
|
+
precision: 18,
|
|
405
|
+
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
406
|
+
hasWithdrawMemo: false
|
|
407
|
+
}] : []),
|
|
408
|
+
image: 'https://www.proton.org/images/tokens/xtokensXPAXG.png',
|
|
409
|
+
coingeckoId: 'pax-gold'
|
|
267
410
|
}, {
|
|
268
411
|
allowSwap: IS_MAINNET,
|
|
269
|
-
allowBridge:
|
|
412
|
+
allowBridge: false,
|
|
413
|
+
allowLend: false,
|
|
414
|
+
allowBorrow: false,
|
|
415
|
+
name: 'Storex',
|
|
416
|
+
coin: 'STRX',
|
|
417
|
+
xtokenSymbol: 'STRX',
|
|
418
|
+
xtokenPrecision: 4,
|
|
419
|
+
xtokenContract: 'storex',
|
|
420
|
+
wallets: [],
|
|
421
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/strx.png',
|
|
422
|
+
coingeckoId: ''
|
|
423
|
+
}, {
|
|
424
|
+
allowSwap: IS_MAINNET,
|
|
425
|
+
allowBridge: false,
|
|
426
|
+
allowLend: false,
|
|
427
|
+
allowBorrow: false,
|
|
428
|
+
name: 'Mint',
|
|
429
|
+
coin: 'MINT',
|
|
430
|
+
xtokenSymbol: 'MINT',
|
|
431
|
+
xtokenPrecision: 4,
|
|
432
|
+
xtokenContract: 'protonmint',
|
|
433
|
+
wallets: [],
|
|
434
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/PMLogo-04.png',
|
|
435
|
+
coingeckoId: ''
|
|
436
|
+
}, {
|
|
437
|
+
allowSwap: IS_MAINNET,
|
|
438
|
+
allowBridge: false,
|
|
439
|
+
allowLend: false,
|
|
440
|
+
allowBorrow: false,
|
|
441
|
+
name: 'Snipcoins',
|
|
442
|
+
coin: 'SNIPS',
|
|
443
|
+
xtokenSymbol: 'SNIPS',
|
|
444
|
+
xtokenPrecision: 4,
|
|
445
|
+
xtokenContract: 'snipcoins',
|
|
446
|
+
wallets: [],
|
|
447
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/snips.png',
|
|
448
|
+
coingeckoId: ''
|
|
449
|
+
}, {
|
|
450
|
+
allowSwap: IS_MAINNET,
|
|
451
|
+
allowBridge: true,
|
|
270
452
|
allowLend: false,
|
|
271
453
|
allowBorrow: false,
|
|
272
454
|
name: 'Uniswap',
|
|
@@ -274,7 +456,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
274
456
|
xtokenSymbol: 'XUNI',
|
|
275
457
|
xtokenPrecision: 6,
|
|
276
458
|
xtokenContract: 'xtokens',
|
|
277
|
-
wallets: [{
|
|
459
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
278
460
|
wallet: 'UNI',
|
|
279
461
|
symbol: 'UNI',
|
|
280
462
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -282,8 +464,17 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
282
464
|
precision: 18,
|
|
283
465
|
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
284
466
|
hasWithdrawMemo: false
|
|
285
|
-
}],
|
|
286
|
-
|
|
467
|
+
}] : [], IS_TESTNET ? [{
|
|
468
|
+
wallet: 'UNI',
|
|
469
|
+
symbol: 'UNI',
|
|
470
|
+
chain: exports.Chains.EthereumRopsten,
|
|
471
|
+
network: exports.Networks.Ropsten,
|
|
472
|
+
precision: 18,
|
|
473
|
+
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
474
|
+
hasWithdrawMemo: false
|
|
475
|
+
}] : []),
|
|
476
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUNI.png',
|
|
477
|
+
coingeckoId: 'uniswap'
|
|
287
478
|
}, {
|
|
288
479
|
allowSwap: false,
|
|
289
480
|
allowBridge: false,
|
|
@@ -294,7 +485,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
294
485
|
xtokenSymbol: 'XINCH',
|
|
295
486
|
xtokenPrecision: 6,
|
|
296
487
|
xtokenContract: 'xtokens',
|
|
297
|
-
wallets: [{
|
|
488
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
298
489
|
wallet: '1INCH',
|
|
299
490
|
symbol: '1INCH',
|
|
300
491
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -302,8 +493,9 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
302
493
|
precision: 18,
|
|
303
494
|
contract: '0x111111111117DC0AA78B770FA6A738034120C302',
|
|
304
495
|
hasWithdrawMemo: false
|
|
305
|
-
}],
|
|
306
|
-
image: '/
|
|
496
|
+
}] : []),
|
|
497
|
+
image: 'https://www.proton.org/images/tokens/xtokensXINCH.png',
|
|
498
|
+
coingeckoId: '1inch'
|
|
307
499
|
}, {
|
|
308
500
|
allowSwap: false,
|
|
309
501
|
allowBridge: false,
|
|
@@ -314,7 +506,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
314
506
|
xtokenSymbol: 'XLINK',
|
|
315
507
|
xtokenPrecision: 6,
|
|
316
508
|
xtokenContract: 'xtokens',
|
|
317
|
-
wallets: [{
|
|
509
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
318
510
|
wallet: 'LINK',
|
|
319
511
|
symbol: 'LINK',
|
|
320
512
|
chain: exports.Chains.EthereumMainnet,
|
|
@@ -322,11 +514,12 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
322
514
|
precision: 18,
|
|
323
515
|
contract: '0x514910771AF9CA656AF840DFF83E8264ECF986CA',
|
|
324
516
|
hasWithdrawMemo: false
|
|
325
|
-
}],
|
|
326
|
-
image: '/
|
|
517
|
+
}] : []),
|
|
518
|
+
image: 'https://www.proton.org/images/tokens/xtokensXLINK.png',
|
|
519
|
+
coingeckoId: 'chainlink'
|
|
327
520
|
}, {
|
|
328
521
|
allowSwap: IS_MAINNET,
|
|
329
|
-
allowBridge:
|
|
522
|
+
allowBridge: true,
|
|
330
523
|
allowLend: false,
|
|
331
524
|
allowBorrow: false,
|
|
332
525
|
name: 'Litecoin',
|
|
@@ -334,7 +527,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
334
527
|
xtokenSymbol: 'XLTC',
|
|
335
528
|
xtokenPrecision: 8,
|
|
336
529
|
xtokenContract: 'xtokens',
|
|
337
|
-
wallets: [{
|
|
530
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
338
531
|
wallet: 'LTC',
|
|
339
532
|
symbol: 'LTC',
|
|
340
533
|
chain: exports.Chains.LitecoinMainnet,
|
|
@@ -342,11 +535,20 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
342
535
|
precision: 8,
|
|
343
536
|
contract: undefined,
|
|
344
537
|
hasWithdrawMemo: false
|
|
345
|
-
}],
|
|
346
|
-
|
|
538
|
+
}] : [], IS_TESTNET ? [{
|
|
539
|
+
wallet: 'LTC',
|
|
540
|
+
symbol: 'LTC',
|
|
541
|
+
chain: exports.Chains.LitecoinTestnet,
|
|
542
|
+
network: exports.Networks.Testnet,
|
|
543
|
+
precision: 8,
|
|
544
|
+
contract: undefined,
|
|
545
|
+
hasWithdrawMemo: false
|
|
546
|
+
}] : []),
|
|
547
|
+
image: 'https://www.proton.org/images/tokens/xtokensXLTC.png',
|
|
548
|
+
coingeckoId: 'litecoin'
|
|
347
549
|
}, {
|
|
348
550
|
allowSwap: IS_MAINNET,
|
|
349
|
-
allowBridge:
|
|
551
|
+
allowBridge: true,
|
|
350
552
|
allowLend: false,
|
|
351
553
|
allowBorrow: false,
|
|
352
554
|
name: 'Bitcoin Cash',
|
|
@@ -354,7 +556,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
354
556
|
xtokenSymbol: 'XBCH',
|
|
355
557
|
xtokenPrecision: 8,
|
|
356
558
|
xtokenContract: 'xtokens',
|
|
357
|
-
wallets: [{
|
|
559
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
358
560
|
wallet: 'BCH',
|
|
359
561
|
symbol: 'BCH',
|
|
360
562
|
chain: exports.Chains.BitcoinCashMainnet,
|
|
@@ -362,11 +564,20 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
362
564
|
precision: 8,
|
|
363
565
|
contract: undefined,
|
|
364
566
|
hasWithdrawMemo: false
|
|
365
|
-
}],
|
|
366
|
-
|
|
567
|
+
}] : [], IS_TESTNET ? [{
|
|
568
|
+
wallet: 'BCH',
|
|
569
|
+
symbol: 'BCH',
|
|
570
|
+
chain: exports.Chains.BitcoinCashTestnet,
|
|
571
|
+
network: exports.Networks.Testnet,
|
|
572
|
+
precision: 8,
|
|
573
|
+
contract: undefined,
|
|
574
|
+
hasWithdrawMemo: false
|
|
575
|
+
}] : []),
|
|
576
|
+
image: 'https://www.proton.org/images/tokens/xtokensXBCH.png',
|
|
577
|
+
coingeckoId: 'bitcoin-cash'
|
|
367
578
|
}, {
|
|
368
579
|
allowSwap: false,
|
|
369
|
-
allowBridge:
|
|
580
|
+
allowBridge: IS_TESTNET,
|
|
370
581
|
allowLend: false,
|
|
371
582
|
allowBorrow: false,
|
|
372
583
|
name: 'Stellar',
|
|
@@ -374,18 +585,27 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
374
585
|
xtokenSymbol: 'XXLM',
|
|
375
586
|
xtokenPrecision: 6,
|
|
376
587
|
xtokenContract: 'xtokens',
|
|
377
|
-
wallets: [{
|
|
588
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
378
589
|
wallet: 'XLM',
|
|
379
590
|
symbol: 'XLM',
|
|
380
591
|
chain: exports.Chains.StellarMainnet,
|
|
381
592
|
network: exports.Networks.Mainnet,
|
|
382
593
|
precision: 7,
|
|
383
594
|
contract: undefined,
|
|
384
|
-
hasWithdrawMemo:
|
|
385
|
-
}],
|
|
386
|
-
|
|
595
|
+
hasWithdrawMemo: true
|
|
596
|
+
}] : [], IS_TESTNET ? [{
|
|
597
|
+
wallet: 'XLM',
|
|
598
|
+
symbol: 'XLM',
|
|
599
|
+
chain: exports.Chains.StellarTestnet,
|
|
600
|
+
network: exports.Networks.Testnet,
|
|
601
|
+
precision: 7,
|
|
602
|
+
contract: undefined,
|
|
603
|
+
hasWithdrawMemo: true
|
|
604
|
+
}] : []),
|
|
605
|
+
image: 'https://www.proton.org/images/tokens/xtokensXXLM.png',
|
|
606
|
+
coingeckoId: 'stellar'
|
|
387
607
|
}, {
|
|
388
|
-
allowSwap:
|
|
608
|
+
allowSwap: false,
|
|
389
609
|
allowBridge: false,
|
|
390
610
|
allowLend: false,
|
|
391
611
|
allowBorrow: false,
|
|
@@ -395,7 +615,8 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
395
615
|
xtokenPrecision: 4,
|
|
396
616
|
xtokenContract: 'sense',
|
|
397
617
|
wallets: [],
|
|
398
|
-
image: '/
|
|
618
|
+
image: 'https://www.proton.org/images/tokens/senseXSENSE.png',
|
|
619
|
+
coingeckoId: 'sense'
|
|
399
620
|
}, {
|
|
400
621
|
allowSwap: false,
|
|
401
622
|
allowBridge: false,
|
|
@@ -406,7 +627,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
406
627
|
xtokenSymbol: 'XDOT',
|
|
407
628
|
xtokenPrecision: 8,
|
|
408
629
|
xtokenContract: 'xtokens',
|
|
409
|
-
wallets: [{
|
|
630
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
410
631
|
wallet: 'DOT',
|
|
411
632
|
symbol: 'DOT',
|
|
412
633
|
chain: exports.Chains.PolkadotMainnet,
|
|
@@ -414,11 +635,12 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
414
635
|
precision: 10,
|
|
415
636
|
contract: undefined,
|
|
416
637
|
hasWithdrawMemo: false
|
|
417
|
-
}],
|
|
418
|
-
image: '/
|
|
638
|
+
}] : []),
|
|
639
|
+
image: 'https://www.proton.org/images/tokens/xtokensXDOT.png',
|
|
640
|
+
coingeckoId: 'polkadot'
|
|
419
641
|
}, {
|
|
420
642
|
allowSwap: true,
|
|
421
|
-
allowBridge:
|
|
643
|
+
allowBridge: IS_MAINNET,
|
|
422
644
|
allowLend: false,
|
|
423
645
|
allowBorrow: false,
|
|
424
646
|
name: 'Binance Coin',
|
|
@@ -426,16 +648,38 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
426
648
|
xtokenSymbol: 'XBNB',
|
|
427
649
|
xtokenPrecision: 8,
|
|
428
650
|
xtokenContract: 'xtokens',
|
|
429
|
-
wallets: [{
|
|
651
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
430
652
|
wallet: 'BNB',
|
|
431
653
|
symbol: 'BNB',
|
|
432
|
-
chain: exports.Chains.
|
|
433
|
-
network: exports.Networks.
|
|
434
|
-
precision:
|
|
654
|
+
chain: exports.Chains.BinanceBEP20,
|
|
655
|
+
network: exports.Networks.BEP20,
|
|
656
|
+
precision: 18,
|
|
435
657
|
contract: undefined,
|
|
436
|
-
hasWithdrawMemo:
|
|
437
|
-
}],
|
|
438
|
-
image: '/
|
|
658
|
+
hasWithdrawMemo: false
|
|
659
|
+
}] : []),
|
|
660
|
+
image: 'https://www.proton.org/images/tokens/xtokensXBNB.png',
|
|
661
|
+
coingeckoId: 'binancecoin'
|
|
662
|
+
}, {
|
|
663
|
+
allowSwap: false,
|
|
664
|
+
allowBridge: IS_MAINNET,
|
|
665
|
+
allowLend: false,
|
|
666
|
+
allowBorrow: false,
|
|
667
|
+
name: 'Binance USD',
|
|
668
|
+
coin: 'BUSD',
|
|
669
|
+
xtokenSymbol: 'XBUSD',
|
|
670
|
+
xtokenPrecision: 6,
|
|
671
|
+
xtokenContract: 'xtokens',
|
|
672
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
673
|
+
wallet: 'BUSD-BEP20',
|
|
674
|
+
symbol: 'BUSD',
|
|
675
|
+
chain: exports.Chains.BinanceBEP20,
|
|
676
|
+
network: exports.Networks.BEP20,
|
|
677
|
+
precision: 18,
|
|
678
|
+
contract: '0xe9e7cea3dedca5984780bafc599bd69add087d56',
|
|
679
|
+
hasWithdrawMemo: false
|
|
680
|
+
}] : []),
|
|
681
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xbusd.png',
|
|
682
|
+
coingeckoId: 'binance-usd'
|
|
439
683
|
}, {
|
|
440
684
|
allowSwap: true,
|
|
441
685
|
allowBridge: true,
|
|
@@ -446,7 +690,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
446
690
|
xtokenSymbol: 'XEOS',
|
|
447
691
|
xtokenPrecision: 4,
|
|
448
692
|
xtokenContract: 'xtokens',
|
|
449
|
-
wallets: [{
|
|
693
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
450
694
|
wallet: 'EOS',
|
|
451
695
|
symbol: 'EOS',
|
|
452
696
|
chain: exports.Chains.EosMainnet,
|
|
@@ -454,24 +698,41 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
454
698
|
precision: 4,
|
|
455
699
|
contract: undefined,
|
|
456
700
|
hasWithdrawMemo: true
|
|
457
|
-
}],
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
701
|
+
}] : [], IS_TESTNET ? [{
|
|
702
|
+
wallet: 'EOS',
|
|
703
|
+
symbol: 'EOS',
|
|
704
|
+
chain: exports.Chains.EosTestnet,
|
|
705
|
+
network: exports.Networks.Testnet,
|
|
706
|
+
precision: 4,
|
|
707
|
+
contract: undefined,
|
|
708
|
+
hasWithdrawMemo: true
|
|
709
|
+
}] : []),
|
|
710
|
+
image: 'https://www.proton.org/images/tokens/xtokensXEOS.png',
|
|
711
|
+
coingeckoId: 'eos'
|
|
712
|
+
}, {
|
|
461
713
|
allowSwap: IS_MAINNET,
|
|
462
|
-
allowBridge:
|
|
463
|
-
allowLend:
|
|
464
|
-
allowBorrow:
|
|
714
|
+
allowBridge: IS_MAINNET,
|
|
715
|
+
allowLend: true,
|
|
716
|
+
allowBorrow: true,
|
|
465
717
|
name: 'Dogecoin',
|
|
466
718
|
coin: 'DOGE',
|
|
467
719
|
xtokenSymbol: 'XDOGE',
|
|
468
720
|
xtokenPrecision: 6,
|
|
469
721
|
xtokenContract: 'xtokens',
|
|
470
|
-
wallets: []
|
|
471
|
-
|
|
722
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
723
|
+
wallet: 'DOGE',
|
|
724
|
+
symbol: 'DOGE',
|
|
725
|
+
chain: exports.Chains.DogeMainnet,
|
|
726
|
+
network: exports.Networks.Mainnet,
|
|
727
|
+
precision: 8,
|
|
728
|
+
contract: undefined,
|
|
729
|
+
hasWithdrawMemo: false
|
|
730
|
+
}] : []),
|
|
731
|
+
image: 'https://www.proton.org/images/tokens/xtokensXDOGE.png',
|
|
732
|
+
coingeckoId: 'dogecoin'
|
|
472
733
|
}, {
|
|
473
734
|
allowSwap: IS_MAINNET,
|
|
474
|
-
allowBridge:
|
|
735
|
+
allowBridge: IS_MAINNET,
|
|
475
736
|
allowLend: false,
|
|
476
737
|
allowBorrow: false,
|
|
477
738
|
name: 'Cardano',
|
|
@@ -479,70 +740,288 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
479
740
|
xtokenSymbol: 'XADA',
|
|
480
741
|
xtokenPrecision: 6,
|
|
481
742
|
xtokenContract: 'xtokens',
|
|
482
|
-
wallets: []
|
|
483
|
-
|
|
743
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
744
|
+
wallet: 'ADA',
|
|
745
|
+
symbol: 'ADA',
|
|
746
|
+
chain: exports.Chains.CardanoMainnet,
|
|
747
|
+
network: exports.Networks.Mainnet,
|
|
748
|
+
precision: 6,
|
|
749
|
+
contract: undefined,
|
|
750
|
+
hasWithdrawMemo: false
|
|
751
|
+
}] : []),
|
|
752
|
+
image: 'https://www.proton.org/images/tokens/xtokensXADA.png',
|
|
753
|
+
coingeckoId: 'cardano'
|
|
754
|
+
}, // Adding
|
|
755
|
+
{
|
|
756
|
+
allowSwap: false,
|
|
757
|
+
allowBridge: IS_MAINNET,
|
|
758
|
+
allowLend: false,
|
|
759
|
+
allowBorrow: false,
|
|
760
|
+
name: 'Terra',
|
|
761
|
+
coin: 'LUNA',
|
|
762
|
+
xtokenSymbol: 'XLUNA',
|
|
763
|
+
xtokenPrecision: 6,
|
|
764
|
+
xtokenContract: 'xtokens',
|
|
765
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
766
|
+
wallet: 'LUNA',
|
|
767
|
+
symbol: 'LUNA',
|
|
768
|
+
chain: exports.Chains.TerraMainnet,
|
|
769
|
+
network: exports.Networks.Mainnet,
|
|
770
|
+
precision: 6,
|
|
771
|
+
contract: undefined,
|
|
772
|
+
hasWithdrawMemo: true
|
|
773
|
+
}] : []),
|
|
774
|
+
image: 'https://www.proton.org/images/tokens/xtokensXLUNA.png',
|
|
775
|
+
coingeckoId: 'terra-luna'
|
|
484
776
|
}, {
|
|
485
777
|
allowSwap: false,
|
|
486
|
-
allowBridge:
|
|
778
|
+
allowBridge: IS_MAINNET,
|
|
487
779
|
allowLend: false,
|
|
488
780
|
allowBorrow: false,
|
|
489
|
-
name: '
|
|
490
|
-
coin: '
|
|
491
|
-
xtokenSymbol: '
|
|
781
|
+
name: 'TerraUSD',
|
|
782
|
+
coin: 'UST',
|
|
783
|
+
xtokenSymbol: 'XUST',
|
|
492
784
|
xtokenPrecision: 6,
|
|
493
785
|
xtokenContract: 'xtokens',
|
|
494
|
-
wallets: []
|
|
495
|
-
|
|
786
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
787
|
+
wallet: 'UST',
|
|
788
|
+
symbol: 'UST',
|
|
789
|
+
chain: exports.Chains.TerraMainnet,
|
|
790
|
+
network: exports.Networks.Mainnet,
|
|
791
|
+
precision: 6,
|
|
792
|
+
contract: undefined,
|
|
793
|
+
hasWithdrawMemo: true
|
|
794
|
+
}] : []),
|
|
795
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUST.png',
|
|
796
|
+
coingeckoId: 'terrausd'
|
|
496
797
|
}, {
|
|
497
798
|
allowSwap: false,
|
|
498
|
-
allowBridge:
|
|
799
|
+
allowBridge: IS_MAINNET,
|
|
499
800
|
allowLend: false,
|
|
500
801
|
allowBorrow: false,
|
|
501
|
-
name: '
|
|
502
|
-
coin: '
|
|
503
|
-
xtokenSymbol: '
|
|
802
|
+
name: 'Solana',
|
|
803
|
+
coin: 'SOL',
|
|
804
|
+
xtokenSymbol: 'XSOL',
|
|
504
805
|
xtokenPrecision: 6,
|
|
505
806
|
xtokenContract: 'xtokens',
|
|
506
|
-
wallets: []
|
|
507
|
-
|
|
807
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
808
|
+
wallet: 'SOL',
|
|
809
|
+
symbol: 'SOL',
|
|
810
|
+
chain: exports.Chains.SolanaMainnet,
|
|
811
|
+
network: exports.Networks.Mainnet,
|
|
812
|
+
precision: 9,
|
|
813
|
+
contract: undefined,
|
|
814
|
+
hasWithdrawMemo: false
|
|
815
|
+
}] : []),
|
|
816
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xsol.png',
|
|
817
|
+
coingeckoId: 'solana'
|
|
508
818
|
}, {
|
|
509
819
|
allowSwap: false,
|
|
510
|
-
allowBridge:
|
|
820
|
+
allowBridge: IS_MAINNET,
|
|
511
821
|
allowLend: false,
|
|
512
822
|
allowBorrow: false,
|
|
513
|
-
name: '
|
|
514
|
-
coin: '
|
|
515
|
-
xtokenSymbol: '
|
|
823
|
+
name: 'Ripple',
|
|
824
|
+
coin: 'XRP',
|
|
825
|
+
xtokenSymbol: 'XXRP',
|
|
516
826
|
xtokenPrecision: 6,
|
|
517
827
|
xtokenContract: 'xtokens',
|
|
518
|
-
wallets: []
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
828
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
829
|
+
wallet: 'XRP',
|
|
830
|
+
symbol: 'XRP',
|
|
831
|
+
chain: exports.Chains.RippleMainnet,
|
|
832
|
+
network: exports.Networks.Mainnet,
|
|
833
|
+
precision: 6,
|
|
834
|
+
contract: undefined,
|
|
835
|
+
hasWithdrawMemo: true
|
|
836
|
+
}] : []),
|
|
837
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xxrp.png',
|
|
838
|
+
coingeckoId: 'ripple'
|
|
839
|
+
}, // Future
|
|
840
|
+
{
|
|
841
|
+
allowSwap: false,
|
|
842
|
+
allowBridge: false,
|
|
843
|
+
allowLend: false,
|
|
844
|
+
allowBorrow: false,
|
|
845
|
+
name: 'Avalanche',
|
|
846
|
+
coin: 'AVAX',
|
|
847
|
+
xtokenSymbol: 'XAVAX',
|
|
848
|
+
xtokenPrecision: 9,
|
|
849
|
+
xtokenContract: 'xtokens',
|
|
850
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
851
|
+
wallet: 'AVAX',
|
|
852
|
+
symbol: 'AVAX',
|
|
853
|
+
chain: exports.Chains.AvalancheCChain,
|
|
854
|
+
network: exports.Networks.Mainnet,
|
|
855
|
+
precision: 9,
|
|
856
|
+
contract: undefined,
|
|
857
|
+
hasWithdrawMemo: false
|
|
858
|
+
}] : []),
|
|
859
|
+
image: 'https://www.proton.org/images/tokens/xtokensXAVAX.png',
|
|
860
|
+
coingeckoId: 'avalanche-2'
|
|
861
|
+
}, {
|
|
862
|
+
allowSwap: false,
|
|
863
|
+
allowBridge: false,
|
|
864
|
+
allowLend: false,
|
|
865
|
+
allowBorrow: false,
|
|
866
|
+
name: 'Polygon',
|
|
867
|
+
coin: 'MATIC',
|
|
868
|
+
xtokenSymbol: 'XMATIC',
|
|
869
|
+
xtokenPrecision: 8,
|
|
870
|
+
xtokenContract: 'xtokens',
|
|
871
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
872
|
+
wallet: 'MATIC',
|
|
873
|
+
symbol: 'MATIC',
|
|
874
|
+
chain: exports.Chains.PolygonMainnet,
|
|
875
|
+
network: exports.Networks.Mainnet,
|
|
876
|
+
precision: 18,
|
|
877
|
+
contract: '0x0000000000000000000000000000000000000000',
|
|
878
|
+
hasWithdrawMemo: false
|
|
879
|
+
}] : []),
|
|
880
|
+
image: 'https://www.proton.org/images/tokens/xtokensXMATIC.png',
|
|
881
|
+
coingeckoId: 'matic-network'
|
|
882
|
+
}, {
|
|
883
|
+
allowSwap: false,
|
|
884
|
+
allowBridge: IS_TESTNET,
|
|
885
|
+
allowLend: false,
|
|
886
|
+
allowBorrow: false,
|
|
887
|
+
name: 'HBAR',
|
|
888
|
+
coin: 'HBAR',
|
|
889
|
+
xtokenSymbol: 'XHBAR',
|
|
890
|
+
xtokenPrecision: 6,
|
|
891
|
+
xtokenContract: 'xtokens',
|
|
892
|
+
wallets: [].concat(IS_TESTNET ? [{
|
|
893
|
+
wallet: 'HBAR',
|
|
894
|
+
symbol: 'HBAR',
|
|
895
|
+
chain: exports.Chains.HederaTestnet,
|
|
896
|
+
network: exports.Networks.Testnet,
|
|
897
|
+
precision: 8,
|
|
898
|
+
contract: undefined,
|
|
899
|
+
hasWithdrawMemo: true
|
|
900
|
+
}] : []),
|
|
901
|
+
image: 'https://www.proton.org/images/tokens/xtokensXHBAR.png',
|
|
902
|
+
coingeckoId: 'hedera-hashgraph'
|
|
903
|
+
}]; // Validation
|
|
904
|
+
|
|
905
|
+
var walletWithDuplicateChains = coins.find(function (coin) {
|
|
906
|
+
var chains = coin.wallets.map(function (wallet) {
|
|
907
|
+
return wallet.chain;
|
|
908
|
+
});
|
|
909
|
+
return new Set(chains).size !== chains.length;
|
|
910
|
+
});
|
|
911
|
+
|
|
912
|
+
if (walletWithDuplicateChains) {
|
|
913
|
+
throw new Error("Coin " + walletWithDuplicateChains.coin + " has duplicate chains in wallet");
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
return {
|
|
917
|
+
allCoins: coins,
|
|
918
|
+
swapCoins: coins.filter(function (coin) {
|
|
919
|
+
return coin.allowSwap;
|
|
920
|
+
}),
|
|
921
|
+
bridgeCoins: coins.filter(function (coin) {
|
|
922
|
+
return coin.allowBridge;
|
|
923
|
+
}),
|
|
924
|
+
lendCoins: coins.filter(function (coin) {
|
|
925
|
+
return coin.allowLend;
|
|
926
|
+
}),
|
|
927
|
+
borrowCoins: coins.filter(function (coin) {
|
|
928
|
+
return coin.allowBorrow;
|
|
929
|
+
}),
|
|
930
|
+
loanCoins: coins.filter(function (coin) {
|
|
931
|
+
return coin.allowLend || coin.allowBorrow;
|
|
932
|
+
}),
|
|
933
|
+
allEnabledCoins: coins.filter(function (coin) {
|
|
934
|
+
return coin.allowSwap || coin.allowBridge;
|
|
935
|
+
})
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
var accountParser = /*#__PURE__*/z.string().regex(/^[.1-5a-z]{0,12}[.1-5a-j]?$/);
|
|
940
|
+
var authorizationParser = /*#__PURE__*/z.object({
|
|
941
|
+
actor: accountParser,
|
|
942
|
+
permission: /*#__PURE__*/z.string()
|
|
943
|
+
});
|
|
944
|
+
var authorizationsParser = /*#__PURE__*/z.array(authorizationParser).min(1);
|
|
945
|
+
var ExtendedAssetParser = /*#__PURE__*/z.object({
|
|
946
|
+
quantity: /*#__PURE__*/z.string(),
|
|
947
|
+
contract: accountParser
|
|
948
|
+
});
|
|
949
|
+
|
|
950
|
+
var actionParser = /*#__PURE__*/z.object({
|
|
951
|
+
account: /*#__PURE__*/z.string(),
|
|
952
|
+
name: /*#__PURE__*/z.string(),
|
|
953
|
+
authorization: /*#__PURE__*/z.array( /*#__PURE__*/z.object({
|
|
954
|
+
actor: /*#__PURE__*/z.string(),
|
|
955
|
+
permission: /*#__PURE__*/z.string()
|
|
956
|
+
})),
|
|
957
|
+
data: /*#__PURE__*/z.any(),
|
|
958
|
+
hex_data: /*#__PURE__*/z.string().optional()
|
|
959
|
+
});
|
|
960
|
+
var transactionExtensionsParser = /*#__PURE__*/z.array(z.number().or(z.string())).optional();
|
|
961
|
+
var rawTransactionParser = /*#__PURE__*/z.object({
|
|
962
|
+
expiration: /*#__PURE__*/z.string(),
|
|
963
|
+
ref_block_num: /*#__PURE__*/z.number(),
|
|
964
|
+
ref_block_prefix: /*#__PURE__*/z.number(),
|
|
965
|
+
max_net_usage_words: /*#__PURE__*/z.number(),
|
|
966
|
+
max_cpu_usage_ms: /*#__PURE__*/z.number(),
|
|
967
|
+
delay_sec: /*#__PURE__*/z.number(),
|
|
968
|
+
context_free_actions: /*#__PURE__*/z.array(actionParser),
|
|
969
|
+
transaction_extensions: /*#__PURE__*/z.array(transactionExtensionsParser)
|
|
970
|
+
});
|
|
971
|
+
var baseActionParser = function baseActionParser(contract, action, data) {
|
|
972
|
+
return z.object({
|
|
973
|
+
account: contract === '*' ? accountParser : z.literal(contract),
|
|
974
|
+
name: z.literal(action),
|
|
975
|
+
data: z.object(data),
|
|
976
|
+
authorization: authorizationsParser
|
|
977
|
+
});
|
|
978
|
+
};
|
|
979
|
+
var baseActionSerializedParser = function baseActionSerializedParser(contract, action, data) {
|
|
980
|
+
return z.object({
|
|
981
|
+
account: contract === '*' ? accountParser : z.literal(contract),
|
|
982
|
+
name: z.literal(action),
|
|
983
|
+
data: z.string().or(z.object(data)),
|
|
984
|
+
authorization: authorizationsParser
|
|
985
|
+
});
|
|
986
|
+
};
|
|
987
|
+
var webauthActionParser = function webauthActionParser(contract, action, data) {
|
|
988
|
+
return z.object({
|
|
989
|
+
account: z.literal('webauthn'),
|
|
990
|
+
name: z.literal('exec'),
|
|
991
|
+
data: z.object({
|
|
992
|
+
account: accountParser,
|
|
993
|
+
key: z.object({
|
|
994
|
+
key: z.array(z.string().or(z.object({
|
|
995
|
+
modulus: z.string(),
|
|
996
|
+
exponent: z.string()
|
|
997
|
+
}))),
|
|
998
|
+
user_presence: z.number(),
|
|
999
|
+
rpid: z.string()
|
|
1000
|
+
}),
|
|
1001
|
+
nonce: z.number(),
|
|
1002
|
+
permissions: authorizationsParser,
|
|
1003
|
+
signature: z.object({
|
|
1004
|
+
auth_data: z.string(),
|
|
1005
|
+
client_json: z.string(),
|
|
1006
|
+
signature: z.string()
|
|
1007
|
+
}),
|
|
1008
|
+
trx: rawTransactionParser.merge(z.object({
|
|
1009
|
+
actions: z.array(baseActionSerializedParser(contract, action, data)).length(1)
|
|
1010
|
+
}))
|
|
1011
|
+
}),
|
|
1012
|
+
authorization: authorizationsParser
|
|
1013
|
+
});
|
|
1014
|
+
};
|
|
1015
|
+
var singleActionTransactionParser = function singleActionTransactionParser(contract, action, data) {
|
|
1016
|
+
var baseAction = baseActionParser(contract, action, data);
|
|
1017
|
+
var webauthAction = webauthActionParser(contract, action, data);
|
|
1018
|
+
return rawTransactionParser.merge(z.object({
|
|
1019
|
+
actions: z.array(baseAction.or(webauthAction)).length(1)
|
|
1020
|
+
}));
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
function _extends() {
|
|
1024
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
546
1025
|
for (var i = 1; i < arguments.length; i++) {
|
|
547
1026
|
var source = arguments[i];
|
|
548
1027
|
|
|
@@ -555,35 +1034,79 @@ function _extends() {
|
|
|
555
1034
|
|
|
556
1035
|
return target;
|
|
557
1036
|
};
|
|
558
|
-
|
|
559
1037
|
return _extends.apply(this, arguments);
|
|
560
1038
|
}
|
|
561
1039
|
|
|
1040
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
1041
|
+
if (!o) return;
|
|
1042
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1043
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1044
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1045
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1046
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
function _arrayLikeToArray(arr, len) {
|
|
1050
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1051
|
+
|
|
1052
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1053
|
+
|
|
1054
|
+
return arr2;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
1058
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
1059
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
1060
|
+
|
|
1061
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
1062
|
+
if (it) o = it;
|
|
1063
|
+
var i = 0;
|
|
1064
|
+
return function () {
|
|
1065
|
+
if (i >= o.length) return {
|
|
1066
|
+
done: true
|
|
1067
|
+
};
|
|
1068
|
+
return {
|
|
1069
|
+
done: false,
|
|
1070
|
+
value: o[i++]
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1076
|
+
}
|
|
1077
|
+
|
|
562
1078
|
var WRAP_CONTRACT = 'proton.wrap';
|
|
1079
|
+
var WRAP_AUTH_ACTION = 'generateauth';
|
|
1080
|
+
var FEE_FACTOR = 10000;
|
|
563
1081
|
var initializeConstants = function initializeConstants(chain) {
|
|
564
1082
|
var _initializeCoins = initializeCoins(chain),
|
|
565
1083
|
swapCoins = _initializeCoins.swapCoins,
|
|
566
1084
|
bridgeCoins = _initializeCoins.bridgeCoins,
|
|
567
1085
|
allEnabledCoins = _initializeCoins.allEnabledCoins,
|
|
568
|
-
allCoins = _initializeCoins.allCoins
|
|
1086
|
+
allCoins = _initializeCoins.allCoins,
|
|
1087
|
+
lendCoins = _initializeCoins.lendCoins,
|
|
1088
|
+
borrowCoins = _initializeCoins.borrowCoins,
|
|
1089
|
+
loanCoins = _initializeCoins.loanCoins;
|
|
569
1090
|
|
|
570
1091
|
var constants = {
|
|
571
1092
|
SWAP_CONTRACT: 'proton.swaps',
|
|
572
|
-
|
|
1093
|
+
DEX_CONTRACT: chain === 'proton' ? 'dex' : 'dextest21',
|
|
1094
|
+
FEE_FACTOR: FEE_FACTOR,
|
|
573
1095
|
GOOGLE_MAPS_KEY: 'AIzaSyDb2_CrK032kSIqBXbkdwmaLKWELl0SxVs',
|
|
574
1096
|
SWAP_URL: chain === 'proton' ? 'https://otc.protonswap.com' : 'https://otc-test.protonswap.com',
|
|
575
|
-
WRAP_SERVER_URL: chain === 'proton' ? 'https://www.api.bloks.io/proton-wrap-
|
|
1097
|
+
WRAP_SERVER_URL: chain === 'proton' ? 'https://www.api.bloks.io/proton-wrap-public2' : 'https://www.api.bloks.io/proton-wrap-testnet-public2',
|
|
576
1098
|
WRAP_CONTRACT: WRAP_CONTRACT,
|
|
577
1099
|
WRAP_ACTIONS: {
|
|
578
|
-
SAVE_ADDRESS: '
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
1100
|
+
SAVE_ADDRESS: 'saveaddress2',
|
|
1101
|
+
DELETE_ADDRESS: 'deladdress2',
|
|
1102
|
+
WRAP_START: 'wrapstart2',
|
|
1103
|
+
WRAP_FINISH: 'wrapfinish2',
|
|
1104
|
+
WRAP_PROCESS: 'wrapprocess2',
|
|
1105
|
+
WRAP_SET_CONF: 'wrapsetconf2'
|
|
583
1106
|
},
|
|
584
1107
|
WRAP_TABLES: {
|
|
585
|
-
ADDRESSES: '
|
|
586
|
-
WRAPS: '
|
|
1108
|
+
ADDRESSES: 'addresses2',
|
|
1109
|
+
WRAPS: 'wraps2'
|
|
587
1110
|
},
|
|
588
1111
|
ADDRESSES_INDEXES: {
|
|
589
1112
|
BY_ACCOUNT: 2,
|
|
@@ -598,16 +1121,32 @@ var initializeConstants = function initializeConstants(chain) {
|
|
|
598
1121
|
FARM_CONTRACT: 'yield.farms',
|
|
599
1122
|
WEBHOOK_PERMISSION: 'webhook',
|
|
600
1123
|
PUBLIC_PERMISSION: 'public',
|
|
601
|
-
|
|
1124
|
+
LIGHT_PERMISSION: 'light',
|
|
1125
|
+
WRAP_AUTH_ACTION: WRAP_AUTH_ACTION,
|
|
602
1126
|
METAL_ENDPOINT: chain === 'proton' ? 'https://cirrus.metalpay.com' : 'https://cirrus-dev.metalpay.com',
|
|
603
1127
|
METAL_PROTON_ENDPOINT: chain === 'proton' ? 'https://api.protonchain.com' : 'https://api-dev.protonchain.com',
|
|
604
|
-
|
|
1128
|
+
METAL_DEX_ENDPOINT: chain === 'proton' ? 'https://metallicus-dbapi-dev01.binfra.one' : 'https://metallicus-dbapi-dev01.binfra.one',
|
|
1129
|
+
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'],
|
|
605
1130
|
CHAIN_ID: chain === 'proton' ? '384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0' : '71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd',
|
|
606
1131
|
CHAIN: chain,
|
|
607
1132
|
SWAP_COINS: swapCoins,
|
|
608
1133
|
BRIDGE_COINS: bridgeCoins,
|
|
609
1134
|
ALL_ENABLED_COINS: allEnabledCoins,
|
|
1135
|
+
LEND_COINS: lendCoins,
|
|
1136
|
+
BORROW_COINS: borrowCoins,
|
|
1137
|
+
LOAN_COINS: loanCoins,
|
|
610
1138
|
ALL_COINS: allCoins,
|
|
1139
|
+
findBridgeCoinWalletByXtokenAndChain: function findBridgeCoinWalletByXtokenAndChain(xtokenSymbol, chain) {
|
|
1140
|
+
var bridgeCoin = constants.BRIDGE_COINS.find(function (bridgeCoin) {
|
|
1141
|
+
return bridgeCoin.xtokenSymbol === xtokenSymbol;
|
|
1142
|
+
});
|
|
1143
|
+
if (!bridgeCoin) return undefined;
|
|
1144
|
+
var bridgeWallet = bridgeCoin.wallets.find(function (bridgeWallet) {
|
|
1145
|
+
return bridgeWallet.chain === chain;
|
|
1146
|
+
});
|
|
1147
|
+
if (!bridgeWallet) return undefined;
|
|
1148
|
+
return _extends({}, bridgeCoin, bridgeWallet);
|
|
1149
|
+
},
|
|
611
1150
|
findBridgeCoinWallet: function findBridgeCoinWallet(coin, wallet) {
|
|
612
1151
|
var bridgeCoin = constants.BRIDGE_COINS.find(function (bridgeCoin) {
|
|
613
1152
|
return bridgeCoin.coin === coin;
|
|
@@ -634,42 +1173,25 @@ var initializeConstants = function initializeConstants(chain) {
|
|
|
634
1173
|
return constants;
|
|
635
1174
|
};
|
|
636
1175
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
})
|
|
1176
|
+
var createAbstractAuthParser = function createAbstractAuthParser(contract, action, data) {
|
|
1177
|
+
return z.object({
|
|
1178
|
+
signer: authorizationParser,
|
|
1179
|
+
signatures: z.array(z.string()).length(1),
|
|
1180
|
+
transaction: singleActionTransactionParser(contract, action, data)
|
|
1181
|
+
});
|
|
1182
|
+
};
|
|
1183
|
+
var generateAuthData = {
|
|
1184
|
+
time: /*#__PURE__*/z.string(),
|
|
1185
|
+
protonAccount: /*#__PURE__*/z.string()
|
|
1186
|
+
};
|
|
1187
|
+
var generateAuthParser = /*#__PURE__*/createAbstractAuthParser(WRAP_CONTRACT, WRAP_AUTH_ACTION, generateAuthData);
|
|
643
1188
|
|
|
644
|
-
var
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
expiration: /*#__PURE__*/z.string(),
|
|
651
|
-
ref_block_num: /*#__PURE__*/z.number(),
|
|
652
|
-
ref_block_prefix: /*#__PURE__*/z.number(),
|
|
653
|
-
max_net_usage_words: /*#__PURE__*/z.number(),
|
|
654
|
-
max_cpu_usage_ms: /*#__PURE__*/z.number(),
|
|
655
|
-
delay_sec: /*#__PURE__*/z.number(),
|
|
656
|
-
context_free_actions: /*#__PURE__*/z.array( /*#__PURE__*/z.any()),
|
|
657
|
-
transaction_extensions: /*#__PURE__*/z.array( /*#__PURE__*/z.any())
|
|
658
|
-
});
|
|
659
|
-
var generateAuthParser = /*#__PURE__*/z.object({
|
|
660
|
-
signer: authorizationParser,
|
|
661
|
-
signatures: /*#__PURE__*/z.array( /*#__PURE__*/z.string()),
|
|
662
|
-
transaction: /*#__PURE__*/rawTransactionParser.merge( /*#__PURE__*/z.object({
|
|
663
|
-
actions: /*#__PURE__*/z.array( /*#__PURE__*/z.object({
|
|
664
|
-
account: accountParser,
|
|
665
|
-
name: /*#__PURE__*/z.string(),
|
|
666
|
-
data: /*#__PURE__*/z.object({
|
|
667
|
-
time: /*#__PURE__*/z.string(),
|
|
668
|
-
protonAccount: /*#__PURE__*/z.string()
|
|
669
|
-
}),
|
|
670
|
-
authorization: /*#__PURE__*/z.array(authorizationParser).min(1)
|
|
671
|
-
}))
|
|
672
|
-
}))
|
|
1189
|
+
var addressParser = /*#__PURE__*/z.object({
|
|
1190
|
+
index: /*#__PURE__*/z.number(),
|
|
1191
|
+
account: accountParser,
|
|
1192
|
+
chain: /*#__PURE__*/z.string(),
|
|
1193
|
+
address: /*#__PURE__*/z.string(),
|
|
1194
|
+
address_hash: /*#__PURE__*/z.string()
|
|
673
1195
|
});
|
|
674
1196
|
var generateAddressBodyParser = /*#__PURE__*/z.object({
|
|
675
1197
|
coin: z.string(),
|
|
@@ -682,40 +1204,102 @@ var generateAddressResponse = /*#__PURE__*/z.object({
|
|
|
682
1204
|
wallet: /*#__PURE__*/z.string(),
|
|
683
1205
|
memo: /*#__PURE__*/z.string().optional()
|
|
684
1206
|
});
|
|
1207
|
+
|
|
1208
|
+
var rateParser = /*#__PURE__*/z.object({
|
|
1209
|
+
counterCurrency: /*#__PURE__*/z.string(),
|
|
1210
|
+
price: /*#__PURE__*/z.number(),
|
|
1211
|
+
priceChangePercent: /*#__PURE__*/z.number(),
|
|
1212
|
+
marketCap: /*#__PURE__*/z.number(),
|
|
1213
|
+
volume: /*#__PURE__*/z.number(),
|
|
1214
|
+
timestamp: /*#__PURE__*/z.number()
|
|
1215
|
+
});
|
|
1216
|
+
var exchangeRateParser = /*#__PURE__*/z.object({
|
|
1217
|
+
contract: /*#__PURE__*/z.string(),
|
|
1218
|
+
symbol: /*#__PURE__*/z.string(),
|
|
1219
|
+
rank: /*#__PURE__*/z.number(),
|
|
1220
|
+
rates: /*#__PURE__*/z.array(rateParser)
|
|
1221
|
+
});
|
|
1222
|
+
var exchangeRatesParser = /*#__PURE__*/z.array(exchangeRateParser);
|
|
1223
|
+
var bloksRatesParser = /*#__PURE__*/z.array( /*#__PURE__*/z.object({
|
|
1224
|
+
contract: /*#__PURE__*/z.string(),
|
|
1225
|
+
symbol: /*#__PURE__*/z.string(),
|
|
1226
|
+
rank: /*#__PURE__*/z.number(),
|
|
1227
|
+
rates: /*#__PURE__*/z.array(rateParser)
|
|
1228
|
+
}));
|
|
1229
|
+
|
|
1230
|
+
(function (Type) {
|
|
1231
|
+
Type["RECEIVE"] = "receive";
|
|
1232
|
+
Type["SEND"] = "send";
|
|
1233
|
+
})(exports.Type || (exports.Type = {}));
|
|
1234
|
+
|
|
685
1235
|
var depositBodyParser = /*#__PURE__*/z.object({
|
|
686
1236
|
id: /*#__PURE__*/z.string(),
|
|
687
|
-
|
|
688
|
-
type: /*#__PURE__*/z.string(),
|
|
1237
|
+
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
689
1238
|
hash: /*#__PURE__*/z.string(),
|
|
690
1239
|
coin: /*#__PURE__*/z.string(),
|
|
691
|
-
wallet: /*#__PURE__*/z.string()
|
|
1240
|
+
wallet: /*#__PURE__*/z.string() // "ETH-ROPSTEN" or "XPR-MAINNET"
|
|
1241
|
+
|
|
1242
|
+
});
|
|
1243
|
+
var transactionParser = /*#__PURE__*/z.object({
|
|
1244
|
+
id: /*#__PURE__*/z.string(),
|
|
1245
|
+
wallet: /*#__PURE__*/z.string(),
|
|
1246
|
+
value: /*#__PURE__*/z.number(),
|
|
1247
|
+
valueString: /*#__PURE__*/z.string(),
|
|
1248
|
+
address: /*#__PURE__*/z.string(),
|
|
1249
|
+
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
1250
|
+
state: /*#__PURE__*/z.string(),
|
|
1251
|
+
confirmations: /*#__PURE__*/z.number(),
|
|
1252
|
+
hash: /*#__PURE__*/z.string(),
|
|
1253
|
+
blockHash: /*#__PURE__*/z.string().optional().nullable(),
|
|
1254
|
+
blockHeight: /*#__PURE__*/z.number().optional().nullable() // 643159
|
|
1255
|
+
|
|
1256
|
+
});
|
|
1257
|
+
|
|
1258
|
+
var otcOrderResponseParser = /*#__PURE__*/z.object({
|
|
1259
|
+
success: /*#__PURE__*/z.boolean(),
|
|
1260
|
+
transaction_id: /*#__PURE__*/z.string(),
|
|
1261
|
+
errormsg: /*#__PURE__*/z.string().optional()
|
|
1262
|
+
});
|
|
1263
|
+
var otcQuoteBodyParser = /*#__PURE__*/z.object({
|
|
1264
|
+
baseAmount: /*#__PURE__*/z.number(),
|
|
1265
|
+
baseSymbol: /*#__PURE__*/z.string(),
|
|
1266
|
+
quoteSymbol: /*#__PURE__*/z.string()
|
|
1267
|
+
});
|
|
1268
|
+
var otcQuoteResponseParser = /*#__PURE__*/z.object({
|
|
1269
|
+
success: /*#__PURE__*/z.boolean(),
|
|
1270
|
+
token: /*#__PURE__*/z.string(),
|
|
1271
|
+
qty: /*#__PURE__*/z.number(),
|
|
1272
|
+
errormsg: /*#__PURE__*/z.string().optional()
|
|
692
1273
|
});
|
|
1274
|
+
|
|
1275
|
+
var withdrawData = {
|
|
1276
|
+
from: /*#__PURE__*/z.string().refine(function (val) {
|
|
1277
|
+
return val !== WRAP_CONTRACT;
|
|
1278
|
+
}, {
|
|
1279
|
+
message: WRAP_CONTRACT + " must be receiver"
|
|
1280
|
+
}),
|
|
1281
|
+
to: /*#__PURE__*/z.literal(WRAP_CONTRACT),
|
|
1282
|
+
quantity: /*#__PURE__*/z.string(),
|
|
1283
|
+
memo: /*#__PURE__*/z.string()
|
|
1284
|
+
};
|
|
693
1285
|
var withdrawBodyParser = /*#__PURE__*/z.object({
|
|
694
1286
|
signer: authorizationParser,
|
|
695
|
-
signatures: /*#__PURE__*/z.array(z.string()).
|
|
696
|
-
transaction: /*#__PURE__*/
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
name: z.literal('transfer'),
|
|
700
|
-
data: z.object({
|
|
701
|
-
from: z.string().refine(function (val) {
|
|
702
|
-
return val !== WRAP_CONTRACT;
|
|
703
|
-
}, {
|
|
704
|
-
message: WRAP_CONTRACT + " must be receiver"
|
|
705
|
-
}),
|
|
706
|
-
to: z.literal(WRAP_CONTRACT),
|
|
707
|
-
quantity: z.string(),
|
|
708
|
-
memo: z.string()
|
|
709
|
-
}),
|
|
710
|
-
authorization: z.array(authorizationParser).min(1)
|
|
711
|
-
})).min(1)
|
|
712
|
-
})),
|
|
713
|
-
quoteId: /*#__PURE__*/z.string()
|
|
1287
|
+
signatures: /*#__PURE__*/z.array(z.string()).length(1),
|
|
1288
|
+
transaction: /*#__PURE__*/singleActionTransactionParser('*', 'transfer', withdrawData),
|
|
1289
|
+
quoteId: /*#__PURE__*/z.string(),
|
|
1290
|
+
provider: /*#__PURE__*/z.string().optional()
|
|
714
1291
|
});
|
|
715
1292
|
var withdrawMetalResponseParser = /*#__PURE__*/z.object({
|
|
716
1293
|
success: /*#__PURE__*/z.boolean(),
|
|
717
1294
|
id: /*#__PURE__*/z.string()
|
|
718
1295
|
});
|
|
1296
|
+
var withdrawalFeeQuoteParser = /*#__PURE__*/z.object({
|
|
1297
|
+
quoteId: /*#__PURE__*/z.string(),
|
|
1298
|
+
estimatedFee: /*#__PURE__*/z.string(),
|
|
1299
|
+
currency: /*#__PURE__*/z.string(),
|
|
1300
|
+
network: /*#__PURE__*/z.string()
|
|
1301
|
+
});
|
|
1302
|
+
|
|
719
1303
|
var withdrawHistoryMetalSwapParser = /*#__PURE__*/z.object({
|
|
720
1304
|
id: /*#__PURE__*/z.string(),
|
|
721
1305
|
status: /*#__PURE__*/z.string(),
|
|
@@ -734,15 +1318,19 @@ var withdrawHistoryMetalResponseParser = /*#__PURE__*/z.object({
|
|
|
734
1318
|
totalPages: /*#__PURE__*/z.number(),
|
|
735
1319
|
totalElements: /*#__PURE__*/z.number()
|
|
736
1320
|
});
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
1321
|
+
|
|
1322
|
+
(function (Status) {
|
|
1323
|
+
Status["PENDING"] = "pending";
|
|
1324
|
+
Status["SUCCESS"] = "success";
|
|
1325
|
+
Status["FAIL"] = "fail";
|
|
1326
|
+
Status["PROCESSING"] = "processing";
|
|
1327
|
+
})(exports.Status || (exports.Status = {}));
|
|
1328
|
+
|
|
741
1329
|
var wrapStartParser = /*#__PURE__*/z.object({
|
|
742
1330
|
balance: ExtendedAssetParser,
|
|
1331
|
+
id: /*#__PURE__*/z.string(),
|
|
743
1332
|
txid: /*#__PURE__*/z.string(),
|
|
744
|
-
|
|
745
|
-
wallet: /*#__PURE__*/z.string(),
|
|
1333
|
+
chain: /*#__PURE__*/z.string(),
|
|
746
1334
|
deposit_address: /*#__PURE__*/z.string(),
|
|
747
1335
|
confirmations: /*#__PURE__*/z.number()
|
|
748
1336
|
});
|
|
@@ -754,114 +1342,473 @@ var wrapParser = /*#__PURE__*/z.object({
|
|
|
754
1342
|
index: /*#__PURE__*/z.number(),
|
|
755
1343
|
proton_account: /*#__PURE__*/z.string(),
|
|
756
1344
|
balance: ExtendedAssetParser,
|
|
1345
|
+
id: /*#__PURE__*/z.string(),
|
|
757
1346
|
txid: /*#__PURE__*/z.string(),
|
|
758
|
-
|
|
759
|
-
wallet: /*#__PURE__*/z.string(),
|
|
1347
|
+
chain: /*#__PURE__*/z.string(),
|
|
760
1348
|
deposit_address: /*#__PURE__*/z.string(),
|
|
761
1349
|
status: /*#__PURE__*/z.nativeEnum(exports.Status),
|
|
762
1350
|
finish_txid: /*#__PURE__*/z.string(),
|
|
763
1351
|
wrap_hash: /*#__PURE__*/z.string(),
|
|
764
1352
|
confirmations: /*#__PURE__*/z.number()
|
|
765
1353
|
});
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
wallet: /*#__PURE__*/z.string(),
|
|
778
|
-
value: /*#__PURE__*/z.number(),
|
|
779
|
-
valueString: /*#__PURE__*/z.string(),
|
|
780
|
-
isChange: /*#__PURE__*/z.boolean()
|
|
781
|
-
})),
|
|
782
|
-
outputs: /*#__PURE__*/z.array( /*#__PURE__*/z.object({
|
|
783
|
-
address: /*#__PURE__*/z.string(),
|
|
784
|
-
wallet: /*#__PURE__*/z.string(),
|
|
785
|
-
fromWallet: /*#__PURE__*/z.string(),
|
|
786
|
-
value: /*#__PURE__*/z.number(),
|
|
787
|
-
valueString: /*#__PURE__*/z.string(),
|
|
788
|
-
coinbase: /*#__PURE__*/z.boolean()
|
|
789
|
-
})),
|
|
790
|
-
value: /*#__PURE__*/z.number(),
|
|
791
|
-
valueString: /*#__PURE__*/z.string(),
|
|
792
|
-
pending: /*#__PURE__*/z.boolean(),
|
|
793
|
-
instant: /*#__PURE__*/z.boolean()
|
|
1354
|
+
|
|
1355
|
+
var numTransform = /*#__PURE__*/z.string().regex(/\d+/).transform(Number);
|
|
1356
|
+
var ohlcvParser = /*#__PURE__*/z.object({
|
|
1357
|
+
time: /*#__PURE__*/z.number(),
|
|
1358
|
+
open: /*#__PURE__*/z.number(),
|
|
1359
|
+
high: /*#__PURE__*/z.number(),
|
|
1360
|
+
low: /*#__PURE__*/z.number(),
|
|
1361
|
+
close: /*#__PURE__*/z.number(),
|
|
1362
|
+
volume: /*#__PURE__*/z.number(),
|
|
1363
|
+
volume_bid: /*#__PURE__*/z.number(),
|
|
1364
|
+
count: /*#__PURE__*/z.number()
|
|
794
1365
|
});
|
|
795
|
-
var
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
1366
|
+
var getOhlcvParser = /*#__PURE__*/z.object({
|
|
1367
|
+
interval: /*#__PURE__*/z.string(),
|
|
1368
|
+
dateFrom: /*#__PURE__*/z.string(),
|
|
1369
|
+
dateTo: /*#__PURE__*/z.string(),
|
|
1370
|
+
marketId: /*#__PURE__*/z.number().or(numTransform),
|
|
1371
|
+
limit: /*#__PURE__*/z.number().or(numTransform)["default"](500).refine(function (n) {
|
|
1372
|
+
return n <= 1000;
|
|
1373
|
+
}, 'Max limit is 1000')
|
|
802
1374
|
});
|
|
803
|
-
var
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
1375
|
+
var orderHistoryParser = /*#__PURE__*/z.object({
|
|
1376
|
+
seq: /*#__PURE__*/z.number(),
|
|
1377
|
+
block_num: /*#__PURE__*/z.number(),
|
|
1378
|
+
block_time: /*#__PURE__*/z.string(),
|
|
1379
|
+
order_id: /*#__PURE__*/z.number(),
|
|
1380
|
+
market_id: /*#__PURE__*/z.number(),
|
|
1381
|
+
quantity_init: /*#__PURE__*/z.number().optional(),
|
|
1382
|
+
quantity_curr: /*#__PURE__*/z.number(),
|
|
1383
|
+
price: /*#__PURE__*/z.number(),
|
|
1384
|
+
account_name: /*#__PURE__*/z.string(),
|
|
1385
|
+
order_side: /*#__PURE__*/z.number(),
|
|
1386
|
+
order_type: /*#__PURE__*/z.number(),
|
|
1387
|
+
status: /*#__PURE__*/z.string(),
|
|
1388
|
+
quantity_change: /*#__PURE__*/z.number(),
|
|
1389
|
+
trx_id: /*#__PURE__*/z.string()
|
|
807
1390
|
});
|
|
808
|
-
var
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
1391
|
+
var getOrderHistoryParser = /*#__PURE__*/z.object({
|
|
1392
|
+
account: /*#__PURE__*/z.string(),
|
|
1393
|
+
offset: /*#__PURE__*/z.number().or(numTransform)["default"](0),
|
|
1394
|
+
limit: /*#__PURE__*/z.number().or(numTransform)["default"](100).refine(function (n) {
|
|
1395
|
+
return n <= 250;
|
|
1396
|
+
}, 'Max limit is 250')
|
|
812
1397
|
});
|
|
813
|
-
var
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
1398
|
+
var depthParser = /*#__PURE__*/z.object({
|
|
1399
|
+
level: /*#__PURE__*/z.number(),
|
|
1400
|
+
ask: /*#__PURE__*/z.number(),
|
|
1401
|
+
bid: /*#__PURE__*/z.number(),
|
|
1402
|
+
count: /*#__PURE__*/z.number()
|
|
818
1403
|
});
|
|
819
|
-
var
|
|
820
|
-
|
|
1404
|
+
var getDepthParser = /*#__PURE__*/z.object({
|
|
1405
|
+
marketId: /*#__PURE__*/z.number(),
|
|
1406
|
+
step: /*#__PURE__*/z.string(),
|
|
1407
|
+
side: /*#__PURE__*/z.string(),
|
|
1408
|
+
limit: /*#__PURE__*/z.number().or(numTransform)["default"](100).refine(function (n) {
|
|
1409
|
+
return n <= 250;
|
|
1410
|
+
}, 'Max limit is 250')
|
|
1411
|
+
});
|
|
1412
|
+
var tradeParser = /*#__PURE__*/z.object({
|
|
1413
|
+
block_num: /*#__PURE__*/z.number(),
|
|
1414
|
+
block_time: /*#__PURE__*/z.string(),
|
|
1415
|
+
trade_id: /*#__PURE__*/z.number(),
|
|
1416
|
+
market_id: /*#__PURE__*/z.number(),
|
|
821
1417
|
price: /*#__PURE__*/z.number(),
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
1418
|
+
bid_user: /*#__PURE__*/z.string(),
|
|
1419
|
+
bid_user_order_id: /*#__PURE__*/z.number(),
|
|
1420
|
+
bid_amount: /*#__PURE__*/z.number(),
|
|
1421
|
+
bid_fee: /*#__PURE__*/z.number(),
|
|
1422
|
+
ask_user: /*#__PURE__*/z.string(),
|
|
1423
|
+
ask_user_order_id: /*#__PURE__*/z.number(),
|
|
1424
|
+
ask_amount: /*#__PURE__*/z.number(),
|
|
1425
|
+
ask_fee: /*#__PURE__*/z.number(),
|
|
1426
|
+
order_side: /*#__PURE__*/z.number(),
|
|
1427
|
+
trx_id: /*#__PURE__*/z.string()
|
|
826
1428
|
});
|
|
827
|
-
var
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
1429
|
+
var getTradesParser = /*#__PURE__*/z.object({
|
|
1430
|
+
marketId: /*#__PURE__*/z.number().or(numTransform),
|
|
1431
|
+
offset: /*#__PURE__*/z.number().or(numTransform)["default"](0),
|
|
1432
|
+
limit: /*#__PURE__*/z.number().or(numTransform)["default"](100).refine(function (n) {
|
|
1433
|
+
return n <= 250;
|
|
1434
|
+
}, 'Max limit is 250')
|
|
832
1435
|
});
|
|
833
|
-
var
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
1436
|
+
var syncParser = /*#__PURE__*/z.object({
|
|
1437
|
+
sourceid: /*#__PURE__*/z.number(),
|
|
1438
|
+
block_num: /*#__PURE__*/z.string(),
|
|
1439
|
+
block_time: /*#__PURE__*/z.string(),
|
|
1440
|
+
irreversible: /*#__PURE__*/z.string(),
|
|
1441
|
+
is_master: /*#__PURE__*/z.number(),
|
|
1442
|
+
last_updated: /*#__PURE__*/z.string()
|
|
839
1443
|
});
|
|
840
1444
|
|
|
1445
|
+
(function (orderType) {
|
|
1446
|
+
orderType[orderType["INVALID"] = 0] = "INVALID";
|
|
1447
|
+
orderType[orderType["MARKET"] = 1] = "MARKET";
|
|
1448
|
+
orderType[orderType["LIMIT"] = 2] = "LIMIT";
|
|
1449
|
+
orderType[orderType["STOPLOSS"] = 3] = "STOPLOSS";
|
|
1450
|
+
orderType[orderType["TAKEPROFIT"] = 4] = "TAKEPROFIT";
|
|
1451
|
+
})(exports.orderType || (exports.orderType = {}));
|
|
1452
|
+
|
|
1453
|
+
(function (orderSide) {
|
|
1454
|
+
orderSide[orderSide["INVALID"] = 0] = "INVALID";
|
|
1455
|
+
orderSide[orderSide["BUY"] = 1] = "BUY";
|
|
1456
|
+
orderSide[orderSide["SELL"] = 2] = "SELL";
|
|
1457
|
+
})(exports.orderSide || (exports.orderSide = {}));
|
|
1458
|
+
|
|
1459
|
+
(function (logStatus) {
|
|
1460
|
+
logStatus["CREATE"] = "create";
|
|
1461
|
+
logStatus["UPDATE"] = "update";
|
|
1462
|
+
logStatus["TRANSFER"] = "transfer";
|
|
1463
|
+
logStatus["CANCEL"] = "cancel";
|
|
1464
|
+
logStatus["DELETE"] = "delete";
|
|
1465
|
+
})(exports.logStatus || (exports.logStatus = {}));
|
|
1466
|
+
|
|
841
1467
|
var isSameToken = function isSameToken(token1, token2) {
|
|
842
1468
|
return token1.xtokenSymbol === token2.xtokenSymbol && token1.xtokenPrecision === token2.xtokenPrecision && token1.xtokenContract === token2.xtokenContract;
|
|
843
1469
|
};
|
|
1470
|
+
var median = function median(numbers) {
|
|
1471
|
+
var sorted = numbers.slice().sort(function (a, b) {
|
|
1472
|
+
return a - b;
|
|
1473
|
+
});
|
|
1474
|
+
var middle = Math.floor(sorted.length / 2);
|
|
1475
|
+
|
|
1476
|
+
if (sorted.length % 2 === 0) {
|
|
1477
|
+
return (sorted[middle - 1] + sorted[middle]) / 2;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
return sorted[middle];
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
var INode = function INode(key, data) {
|
|
1484
|
+
this.key = void 0;
|
|
1485
|
+
this.data = {};
|
|
1486
|
+
this.key = key;
|
|
1487
|
+
|
|
1488
|
+
if (data) {
|
|
1489
|
+
this.data = data;
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
var ILink = function ILink(from, to, data) {
|
|
1493
|
+
this.from = void 0;
|
|
1494
|
+
this.to = void 0;
|
|
1495
|
+
this.data = {};
|
|
1496
|
+
this.from = from;
|
|
1497
|
+
this.to = to;
|
|
1498
|
+
|
|
1499
|
+
if (data) {
|
|
1500
|
+
this.data = data;
|
|
1501
|
+
}
|
|
1502
|
+
};
|
|
1503
|
+
var Graph = /*#__PURE__*/function () {
|
|
1504
|
+
function Graph() {
|
|
1505
|
+
this.nodes = [];
|
|
1506
|
+
this.links = [];
|
|
1507
|
+
this.lastPathFound = [];
|
|
1508
|
+
|
|
1509
|
+
this.isEquals = function (a, b) {
|
|
1510
|
+
return a.key === b.key;
|
|
1511
|
+
};
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
var _proto = Graph.prototype;
|
|
1515
|
+
|
|
1516
|
+
_proto.addNode = function addNode(k, v) {
|
|
1517
|
+
var node = this.findNode(k);
|
|
1518
|
+
|
|
1519
|
+
if (!node) {
|
|
1520
|
+
this.nodes.push(new INode(k, v));
|
|
1521
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
|
|
1524
|
+
_proto.addNodes = function addNodes() {
|
|
1525
|
+
var _this = this;
|
|
1526
|
+
|
|
1527
|
+
for (var _len = arguments.length, nodes = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1528
|
+
nodes[_key] = arguments[_key];
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
nodes.forEach(function (node) {
|
|
1532
|
+
return typeof node === "string" ? _this.addNode(node) : _this.addNode(node[0], node[1]);
|
|
1533
|
+
});
|
|
1534
|
+
};
|
|
1535
|
+
|
|
1536
|
+
_proto.findNode = function findNode(k) {
|
|
1537
|
+
var _this2 = this;
|
|
1538
|
+
|
|
1539
|
+
var inode = new INode(k);
|
|
1540
|
+
return this.nodes.find(function (node) {
|
|
1541
|
+
return _this2.isEquals(node, inode);
|
|
1542
|
+
});
|
|
1543
|
+
};
|
|
1544
|
+
|
|
1545
|
+
_proto.findNodes = function findNodes() {
|
|
1546
|
+
var _this3 = this;
|
|
1547
|
+
|
|
1548
|
+
for (var _len2 = arguments.length, keys = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
1549
|
+
keys[_key2] = arguments[_key2];
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
return keys.map(function (k) {
|
|
1553
|
+
return _this3.findNode(k);
|
|
1554
|
+
});
|
|
1555
|
+
};
|
|
1556
|
+
|
|
1557
|
+
_proto.requireFindNodes = function requireFindNodes() {
|
|
1558
|
+
var nodes = this.findNodes.apply(this, arguments);
|
|
1559
|
+
|
|
1560
|
+
if (nodes.some(function (n) {
|
|
1561
|
+
return n === undefined;
|
|
1562
|
+
})) {
|
|
1563
|
+
throw new Error('One of the nodes does not exist');
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
return nodes;
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
_proto.addLink = function addLink(nodeA, nodeB, data) {
|
|
1570
|
+
var _this$requireFindNode = this.requireFindNodes(nodeA, nodeB),
|
|
1571
|
+
inodeA = _this$requireFindNode[0],
|
|
1572
|
+
inodeB = _this$requireFindNode[1];
|
|
1573
|
+
|
|
1574
|
+
this.links.push(new ILink(inodeA, inodeB, data));
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
_proto.addLinks = function addLinks() {
|
|
1578
|
+
var _this4 = this;
|
|
1579
|
+
|
|
1580
|
+
for (var _len3 = arguments.length, links = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
1581
|
+
links[_key3] = arguments[_key3];
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
links.forEach(function (link) {
|
|
1585
|
+
return _this4.addLink.apply(_this4, link);
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1588
|
+
/**
|
|
1589
|
+
* Get all nodes linked
|
|
1590
|
+
* to from `node`.
|
|
1591
|
+
*/
|
|
1592
|
+
;
|
|
1593
|
+
|
|
1594
|
+
_proto.findLinkedNodes = function findLinkedNodes(node) {
|
|
1595
|
+
var _this5 = this;
|
|
1596
|
+
|
|
1597
|
+
return this.links.reduce(function (acc, link) {
|
|
1598
|
+
if (_this5.isEquals(link.from, node)) {
|
|
1599
|
+
acc.push(link.to);
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
return acc;
|
|
1603
|
+
}, []);
|
|
1604
|
+
};
|
|
1605
|
+
|
|
1606
|
+
_proto.findAllPaths = function findAllPaths(from, to) {
|
|
1607
|
+
var _this6 = this;
|
|
1608
|
+
|
|
1609
|
+
var allPaths = [];
|
|
1610
|
+
|
|
1611
|
+
var _this$requireFindNode2 = this.requireFindNodes(from, to),
|
|
1612
|
+
fromNode = _this$requireFindNode2[0],
|
|
1613
|
+
toNode = _this$requireFindNode2[1];
|
|
1614
|
+
|
|
1615
|
+
var path = [fromNode];
|
|
1616
|
+
var seen = new Set();
|
|
1617
|
+
|
|
1618
|
+
var stuck = function stuck(x) {
|
|
1619
|
+
if (_this6.isEquals(x, toNode)) {
|
|
1620
|
+
return false;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
for (var _iterator = _createForOfIteratorHelperLoose(_this6.findLinkedNodes(x)), _step; !(_step = _iterator()).done;) {
|
|
1624
|
+
var y = _step.value;
|
|
1625
|
+
|
|
1626
|
+
if (!seen.has(y.key)) {
|
|
1627
|
+
seen.add(y.key);
|
|
1628
|
+
|
|
1629
|
+
if (!stuck(y)) {
|
|
1630
|
+
return false;
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
return true;
|
|
1636
|
+
};
|
|
1637
|
+
|
|
1638
|
+
var search = function search(x) {
|
|
1639
|
+
if (_this6.isEquals(x, toNode)) {
|
|
1640
|
+
allPaths.push(cloneDeep(path));
|
|
1641
|
+
return;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
seen = new Set(path.map(function (p) {
|
|
1645
|
+
return p.key;
|
|
1646
|
+
}));
|
|
1647
|
+
|
|
1648
|
+
if (stuck(x)) {
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(_this6.findLinkedNodes(x)), _step2; !(_step2 = _iterator2()).done;) {
|
|
1653
|
+
var y = _step2.value;
|
|
1654
|
+
|
|
1655
|
+
if (!path.includes(y)) {
|
|
1656
|
+
path.push(y);
|
|
1657
|
+
search(y);
|
|
1658
|
+
path.pop();
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1663
|
+
search(fromNode);
|
|
1664
|
+
return allPaths;
|
|
1665
|
+
};
|
|
1666
|
+
|
|
1667
|
+
return Graph;
|
|
1668
|
+
}();
|
|
1669
|
+
|
|
1670
|
+
/**
|
|
1671
|
+
* XPR<>XUSDT (XPR -> XUSDT)
|
|
1672
|
+
*
|
|
1673
|
+
* pool1 * pool2
|
|
1674
|
+
* term = pool2 - --------------
|
|
1675
|
+
* pool1 + swap
|
|
1676
|
+
*
|
|
1677
|
+
* result = term - (term * fee)
|
|
1678
|
+
*/
|
|
1679
|
+
|
|
1680
|
+
var compute_transfer = function compute_transfer(pool1, pool2, swap, exchange_fee, precision) {
|
|
1681
|
+
var term1 = pool2;
|
|
1682
|
+
var term2over = pool1.multipliedBy(pool2);
|
|
1683
|
+
var term2under = pool1.plus(swap);
|
|
1684
|
+
var term2 = term2over.dividedBy(term2under).integerValue(bignumber_js.BigNumber.ROUND_DOWN);
|
|
1685
|
+
var term = term1.minus(term2);
|
|
1686
|
+
var fee = new bignumber_js.BigNumber(exchange_fee).dividedBy(FEE_FACTOR);
|
|
1687
|
+
var result = term.minus(term.multipliedBy(fee));
|
|
1688
|
+
return result.integerValue(bignumber_js.BigNumber.ROUND_DOWN).shiftedBy(-precision);
|
|
1689
|
+
};
|
|
1690
|
+
var compute_transfer_curve = function compute_transfer_curve(reserve_in, reserve_out, amount_in, exchange_fee, precision, amplifier) {
|
|
1691
|
+
if (amplifier === 0) {
|
|
1692
|
+
return compute_transfer(new bignumber_js.BigNumber(reserve_in), new bignumber_js.BigNumber(reserve_out), new bignumber_js.BigNumber(amount_in), exchange_fee, precision);
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
var MAX_ITERATIONS = 10;
|
|
1696
|
+
var sum = reserve_in + reserve_out;
|
|
1697
|
+
var D = sum;
|
|
1698
|
+
var D_prev = 0;
|
|
1699
|
+
|
|
1700
|
+
var F = function F(v) {
|
|
1701
|
+
return (v >= 0 ? 1 : -1) * Math.floor(Math.abs(v));
|
|
1702
|
+
};
|
|
1703
|
+
|
|
1704
|
+
var i = MAX_ITERATIONS;
|
|
1705
|
+
|
|
1706
|
+
while (D != D_prev && i--) {
|
|
1707
|
+
var prod1 = F(F(D * D / (reserve_in * 2)) * D / (reserve_out * 2));
|
|
1708
|
+
D_prev = D;
|
|
1709
|
+
D = F(2 * D * (amplifier * sum + prod1) / ((2 * amplifier - 1) * D + 3 * prod1));
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
var b = reserve_in + amount_in + F(D / (amplifier * 2)) - D;
|
|
1713
|
+
var c = F(F(D * D / ((reserve_in + amount_in) * 2)) * D / (amplifier * 4));
|
|
1714
|
+
var x = D,
|
|
1715
|
+
x_prev = 0;
|
|
1716
|
+
i = MAX_ITERATIONS;
|
|
1717
|
+
|
|
1718
|
+
while (x != x_prev && i--) {
|
|
1719
|
+
x_prev = F(x);
|
|
1720
|
+
x = +new bignumber_js.BigNumber(x * x + c).dividedBy(2 * x + b).toFixed(0, bignumber_js.BigNumber.ROUND_DOWN);
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
if (reserve_out <= x) {
|
|
1724
|
+
throw new Error("curve: insufficient reserve out");
|
|
1725
|
+
} // Amount out + Fee + 1
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
var amount_out_with_fee = new bignumber_js.BigNumber(reserve_out - x); // Fee + 1
|
|
1729
|
+
// +1 covers small precision issues
|
|
1730
|
+
|
|
1731
|
+
var fee = amount_out_with_fee.multipliedBy(exchange_fee).dividedBy(FEE_FACTOR).plus(1).toFixed(0, bignumber_js.BigNumber.ROUND_DOWN); // Amount out
|
|
1732
|
+
|
|
1733
|
+
var amount_out = amount_out_with_fee.minus(fee);
|
|
1734
|
+
return amount_out.integerValue(bignumber_js.BigNumber.ROUND_DOWN).shiftedBy(-precision);
|
|
1735
|
+
};
|
|
1736
|
+
var compute_liquidity = function compute_liquidity(amount_lt, pool, lt_supply, precision) {
|
|
1737
|
+
var over = amount_lt.multipliedBy(pool);
|
|
1738
|
+
var under = lt_supply;
|
|
1739
|
+
var result = over.dividedBy(under).integerValue(bignumber_js.BigNumber.ROUND_DOWN);
|
|
1740
|
+
return +result.shiftedBy(-precision).toFixed(precision, bignumber_js.BigNumber.ROUND_DOWN);
|
|
1741
|
+
};
|
|
1742
|
+
var isInputInvalid = function isInputInvalid(data, value, pool) {
|
|
1743
|
+
value = String(value);
|
|
1744
|
+
var isBackspace = data === null;
|
|
1745
|
+
var isNumber = !/[0-9]|\./.test(data);
|
|
1746
|
+
var isDoubleDot = data === '.' && value.indexOf('.') !== value.length - 1;
|
|
1747
|
+
var isPrecisionTooHigh = value && value.indexOf('.') !== -1 && value.split('.')[1].length > pool.xtokenPrecision;
|
|
1748
|
+
var isInvalid = !isBackspace && Boolean(isNumber || isDoubleDot || isPrecisionTooHigh);
|
|
1749
|
+
return isInvalid;
|
|
1750
|
+
};
|
|
1751
|
+
var applyDiscountToFee = function applyDiscountToFee(fee, staked) {
|
|
1752
|
+
if (staked >= 10000000) {
|
|
1753
|
+
return fee * 0;
|
|
1754
|
+
} else if (staked >= 1000000) {
|
|
1755
|
+
return fee * 0.33;
|
|
1756
|
+
} else if (staked >= 100000) {
|
|
1757
|
+
return fee * 0.66;
|
|
1758
|
+
} else {
|
|
1759
|
+
return fee;
|
|
1760
|
+
}
|
|
1761
|
+
};
|
|
844
1762
|
|
|
1763
|
+
exports.ExtendedAssetParser = ExtendedAssetParser;
|
|
1764
|
+
exports.FEE_FACTOR = FEE_FACTOR;
|
|
1765
|
+
exports.Graph = Graph;
|
|
1766
|
+
exports.ILink = ILink;
|
|
1767
|
+
exports.INode = INode;
|
|
1768
|
+
exports.WRAP_AUTH_ACTION = WRAP_AUTH_ACTION;
|
|
845
1769
|
exports.WRAP_CONTRACT = WRAP_CONTRACT;
|
|
846
1770
|
exports.accountParser = accountParser;
|
|
847
1771
|
exports.addressParser = addressParser;
|
|
1772
|
+
exports.applyDiscountToFee = applyDiscountToFee;
|
|
848
1773
|
exports.authorizationParser = authorizationParser;
|
|
1774
|
+
exports.authorizationsParser = authorizationsParser;
|
|
1775
|
+
exports.baseActionParser = baseActionParser;
|
|
1776
|
+
exports.baseActionSerializedParser = baseActionSerializedParser;
|
|
1777
|
+
exports.bloksRatesParser = bloksRatesParser;
|
|
1778
|
+
exports.compute_liquidity = compute_liquidity;
|
|
1779
|
+
exports.compute_transfer = compute_transfer;
|
|
1780
|
+
exports.compute_transfer_curve = compute_transfer_curve;
|
|
1781
|
+
exports.createAbstractAuthParser = createAbstractAuthParser;
|
|
849
1782
|
exports.depositBodyParser = depositBodyParser;
|
|
1783
|
+
exports.depthParser = depthParser;
|
|
850
1784
|
exports.exchangeRateParser = exchangeRateParser;
|
|
851
1785
|
exports.exchangeRatesParser = exchangeRatesParser;
|
|
852
1786
|
exports.explorerLinkByChain = explorerLinkByChain;
|
|
853
1787
|
exports.generateAddressBodyParser = generateAddressBodyParser;
|
|
854
1788
|
exports.generateAddressResponse = generateAddressResponse;
|
|
855
1789
|
exports.generateAuthParser = generateAuthParser;
|
|
1790
|
+
exports.getDepthParser = getDepthParser;
|
|
1791
|
+
exports.getOhlcvParser = getOhlcvParser;
|
|
1792
|
+
exports.getOrderHistoryParser = getOrderHistoryParser;
|
|
1793
|
+
exports.getTradesParser = getTradesParser;
|
|
856
1794
|
exports.initializeCoins = initializeCoins;
|
|
857
1795
|
exports.initializeConstants = initializeConstants;
|
|
1796
|
+
exports.isInputInvalid = isInputInvalid;
|
|
858
1797
|
exports.isSameToken = isSameToken;
|
|
1798
|
+
exports.median = median;
|
|
1799
|
+
exports.ohlcvParser = ohlcvParser;
|
|
1800
|
+
exports.orderHistoryParser = orderHistoryParser;
|
|
859
1801
|
exports.otcOrderResponseParser = otcOrderResponseParser;
|
|
860
1802
|
exports.otcQuoteBodyParser = otcQuoteBodyParser;
|
|
861
1803
|
exports.otcQuoteResponseParser = otcQuoteResponseParser;
|
|
1804
|
+
exports.protonExplorerTxUrl = protonExplorerTxUrl;
|
|
862
1805
|
exports.rateParser = rateParser;
|
|
863
|
-
exports.
|
|
1806
|
+
exports.similarChains = similarChains;
|
|
1807
|
+
exports.singleActionTransactionParser = singleActionTransactionParser;
|
|
1808
|
+
exports.syncParser = syncParser;
|
|
1809
|
+
exports.tradeParser = tradeParser;
|
|
864
1810
|
exports.transactionParser = transactionParser;
|
|
1811
|
+
exports.webauthActionParser = webauthActionParser;
|
|
865
1812
|
exports.withdrawBodyParser = withdrawBodyParser;
|
|
866
1813
|
exports.withdrawHistoryMetalResponseParser = withdrawHistoryMetalResponseParser;
|
|
867
1814
|
exports.withdrawHistoryMetalSwapParser = withdrawHistoryMetalSwapParser;
|