@openocean.finance/wallet 0.4.69 → 1.0.0

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.
@@ -0,0 +1,26 @@
1
+ declare const EthereumChainParams: any;
2
+ interface Chain {
3
+ chainName: string;
4
+ chainId: string | number;
5
+ key: string;
6
+ blockExplorerUrl: string;
7
+ nativeCurrency: any;
8
+ popularToken: [];
9
+ rpcUrls: [];
10
+ compiler: string;
11
+ }
12
+ declare class Chains {
13
+ chainObj: any;
14
+ chainList: Chain[];
15
+ chainIds: String[];
16
+ chainNames: String[];
17
+ chainApproveNames: String[];
18
+ constructor();
19
+ getNativeToken(chainName: string): any;
20
+ getIsNewChain(): string[];
21
+ getChainById(chainId: string): Chain | undefined;
22
+ getChainByName(name: string): any;
23
+ isNativeToken(chainName: string, address: string): boolean;
24
+ }
25
+ declare const chainsObj: Chains;
26
+ export { chainsObj, Chains, Chain, EthereumChainParams };
package/lib/Chains.js ADDED
@@ -0,0 +1,563 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EthereumChainParams = exports.Chains = exports.chainsObj = void 0;
4
+ var index_1 = require("./Wallets/index");
5
+ var util_1 = require("./util");
6
+ var EthereumChainParams = {
7
+ rinkeby: [
8
+ {
9
+ chainId: "0x4",
10
+ chainName: "rinkeby",
11
+ key: 'rinkeby',
12
+ nativeCurrency: {
13
+ name: "ETH",
14
+ symbol: "ETH",
15
+ decimals: 18,
16
+ },
17
+ rpcUrls: ["https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"],
18
+ blockExplorerUrls: ["https://rinkeby.etherscan.io"],
19
+ },
20
+ ],
21
+ bsc: [
22
+ {
23
+ chainId: "0x38",
24
+ chainName: "Binance Smart Chain Mainnet",
25
+ nativeCurrency: {
26
+ name: "BNB",
27
+ symbol: "BNB",
28
+ decimals: 18,
29
+ },
30
+ rpcUrls: ["https://bsc-dataseed1.binance.org"],
31
+ blockExplorerUrls: ["https://bscscan.com/"],
32
+ },
33
+ ],
34
+ ok: [
35
+ {
36
+ chainId: "0x42",
37
+ chainName: "OEC Mainnet",
38
+ nativeCurrency: {
39
+ name: "OKT",
40
+ symbol: "OKT",
41
+ decimals: 18,
42
+ },
43
+ rpcUrls: ["https://exchainrpc.okex.org"],
44
+ blockExplorerUrls: ["https://www.oklink.com/okexchain/"],
45
+ },
46
+ ],
47
+ polygon: [
48
+ {
49
+ chainId: "0x89",
50
+ chainName: "Polygon Mainnet",
51
+ nativeCurrency: {
52
+ name: "MATIC",
53
+ symbol: "MATIC",
54
+ decimals: 18,
55
+ },
56
+ rpcUrls: ["https://polygon-rpc.com/"],
57
+ blockExplorerUrls: ["https://polygonscan.com"],
58
+ },
59
+ ],
60
+ xdai: [
61
+ {
62
+ chainId: "0x64",
63
+ chainName: "Gnosis Mainnet",
64
+ nativeCurrency: {
65
+ name: "xDai",
66
+ symbol: "XDAI",
67
+ decimals: 18,
68
+ },
69
+ rpcUrls: ["https://rpc.gnosischain.com", "https://rpc.xdaichain.com/"],
70
+ blockExplorerUrls: ["https://blockscout.com/poa/xdai", "https://blockscout.com/xdai/mainnet"],
71
+ },
72
+ ],
73
+ fantom: [
74
+ {
75
+ chainId: "0xfa",
76
+ chainName: "Fantom Mainnet",
77
+ nativeCurrency: {
78
+ name: "FTM",
79
+ symbol: "FTM",
80
+ decimals: 18,
81
+ },
82
+ rpcUrls: ["https://rpcapi.fantom.network"],
83
+ blockExplorerUrls: ["https://ftmscan.com/"],
84
+ },
85
+ ],
86
+ heco: [
87
+ {
88
+ chainId: "0x80",
89
+ chainName: "Heco Mainnet",
90
+ nativeCurrency: {
91
+ name: "HT",
92
+ symbol: "HT",
93
+ decimals: 18,
94
+ },
95
+ rpcUrls: ["https://http-mainnet.hecochain.com"],
96
+ blockExplorerUrls: ["https://http-mainnet.hecochain.com"],
97
+ },
98
+ ],
99
+ avax: [
100
+ {
101
+ chainId: "0xa86a",
102
+ chainName: "Avalanche Mainnet C-Chain",
103
+ nativeCurrency: {
104
+ name: "AVAX",
105
+ symbol: "AVAX",
106
+ decimals: 18,
107
+ },
108
+ rpcUrls: ["https://api.avax.network/ext/bc/C/rpc"],
109
+ blockExplorerUrls: ["https://cchain.explorer.avax.network/"],
110
+ },
111
+ ],
112
+ okex: [
113
+ {
114
+ chainId: "0x42",
115
+ chainName: "OEC Mainnet",
116
+ nativeCurrency: {
117
+ name: "OKT",
118
+ symbol: "OKT",
119
+ decimals: 18,
120
+ },
121
+ rpcUrls: ["https://exchainrpc.okex.org"],
122
+ blockExplorerUrls: ["https://www.oklink.com/okexchain"],
123
+ },
124
+ ],
125
+ harmony: [
126
+ {
127
+ chainId: "0x63564c40",
128
+ chainName: "Harmony Mainnet",
129
+ nativeCurrency: {
130
+ name: "ONE",
131
+ symbol: "ONE",
132
+ decimals: 18,
133
+ },
134
+ rpcUrls: ["https://api.s0.t.hmny.io", "https://api.harmony.one"],
135
+ blockExplorerUrls: ["https://explorer.harmony.one/"],
136
+ },
137
+ ],
138
+ ontevm: [
139
+ {
140
+ chainId: "0x3a",
141
+ chainName: "Ontology EVM",
142
+ nativeCurrency: {
143
+ name: "ONG",
144
+ symbol: "ONG",
145
+ decimals: 18,
146
+ },
147
+ rpcUrls: ["https://dappnode1.ont.io:10339"],
148
+ blockExplorerUrls: ["https://explorer.ont.io"],
149
+ },
150
+ ],
151
+ metis: [
152
+ {
153
+ chainId: "0x440",
154
+ chainName: "Andromeda (Metis)",
155
+ nativeCurrency: {
156
+ name: "METIS",
157
+ symbol: "METIS",
158
+ decimals: 18,
159
+ },
160
+ rpcUrls: ["https://andromeda.metis.io/?owner=1088"],
161
+ blockExplorerUrls: ["https://andromeda-explorer.metis.io"],
162
+ },
163
+ ],
164
+ arbitrum: [
165
+ {
166
+ chainId: "0xa4b1",
167
+ chainName: "Arbitrum One",
168
+ nativeCurrency: {
169
+ name: "ETH",
170
+ symbol: "ETH",
171
+ decimals: 18,
172
+ },
173
+ rpcUrls: ["https://arb1.arbitrum.io/rpc"],
174
+ blockExplorerUrls: ["https://arbiscan.io"],
175
+ },
176
+ ],
177
+ optimism: [
178
+ {
179
+ chainId: "0xa",
180
+ chainName: "optimism",
181
+ nativeCurrency: {
182
+ name: "ETH",
183
+ symbol: "ETH",
184
+ decimals: 18,
185
+ },
186
+ rpcUrls: ["https://rpc.ankr.com/optimism", "https://optimism-mainnet.public.blastapi.io", "https://mainnet.optimism.io"],
187
+ blockExplorerUrls: ["https://optimism.io/"],
188
+ },
189
+ ],
190
+ boba: [
191
+ {
192
+ chainId: "0x120",
193
+ chainName: "Boba Mainnet",
194
+ nativeCurrency: {
195
+ name: "ETH",
196
+ symbol: "ETH",
197
+ decimals: 18,
198
+ },
199
+ rpcUrls: ["https://mainnet.boba.network"],
200
+ blockExplorerUrls: ["https://blockexplorer.boba.network"],
201
+ },
202
+ ],
203
+ aurora: [
204
+ {
205
+ chainId: "0x4e454152",
206
+ chainName: "Aurora Mainnet",
207
+ nativeCurrency: {
208
+ name: "ETH",
209
+ symbol: "ETH",
210
+ decimals: 18,
211
+ },
212
+ rpcUrls: ["https://mainnet.aurora.dev"],
213
+ blockExplorerUrls: ["https://aurorascan.dev/tx/"],
214
+ },
215
+ ],
216
+ cronos: [
217
+ {
218
+ chainId: "0x19",
219
+ chainName: "Cronos Mainnet",
220
+ nativeCurrency: {
221
+ name: "CRO",
222
+ symbol: "CRO",
223
+ decimals: 18,
224
+ },
225
+ rpcUrls: ["https://evm.cronos.org"],
226
+ blockExplorerUrls: ["https://cronos.org/explorer"],
227
+ },
228
+ ],
229
+ moonriver: [
230
+ {
231
+ chainId: "0x505",
232
+ chainName: "Moonriver Mainnet",
233
+ nativeCurrency: {
234
+ name: "MOVR",
235
+ symbol: "MOVR",
236
+ decimals: 18,
237
+ },
238
+ rpcUrls: ["https://rpc.moonriver.moonbeam.network"],
239
+ blockExplorerUrls: ["https://moonriver.moonscan.io"],
240
+ },
241
+ ],
242
+ bsctest: [
243
+ {
244
+ chainId: "0x61",
245
+ chainName: "BSC Test Network",
246
+ nativeCurrency: {
247
+ name: "BNB",
248
+ symbol: "BNB",
249
+ decimals: 18,
250
+ },
251
+ rpcUrls: ["https://data-seed-prebsc-1-s1.binance.org:8545"],
252
+ blockExplorerUrls: ["https://testnet.bscscan.com/"],
253
+ },
254
+ ],
255
+ };
256
+ exports.EthereumChainParams = EthereumChainParams;
257
+ var chainObj = {
258
+ "eth": {
259
+ chainName: "Ethereum Mainnet",
260
+ chainId: 1,
261
+ blockExplorerUrl: "https://etherscan.io/tx/",
262
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
263
+ popularToken: ["ETH", "USDT", "USDC", "BUSD", "UNI", "C98", "LINK", "MATIC"],
264
+ rpcUrls: [
265
+ "https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
266
+ ],
267
+ compiler: 'EVM'
268
+ },
269
+ "ropsten": {
270
+ chainName: "Ethereum Ropsten",
271
+ chainId: 3,
272
+ blockExplorerUrl: "https://ropsten.etherscan.io/",
273
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
274
+ popularToken: ["ETH", "USDT", "USDC", "BUSD", "UNI", "C98", "LINK", "MATIC"],
275
+ rpcUrls: [
276
+ "https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
277
+ ],
278
+ compiler: 'EVM',
279
+ isTest: true
280
+ },
281
+ "rinkeby": {
282
+ chainName: "Ethereum Rinkeby",
283
+ chainId: 4,
284
+ blockExplorerUrl: "https://rinkeby.etherscan.io/",
285
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
286
+ popularToken: ["ETH", "USDT", "USDC", "BUSD", "UNI", "C98", "LINK", "MATIC"],
287
+ rpcUrls: [
288
+ "https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
289
+ ],
290
+ compiler: 'EVM',
291
+ isTest: true
292
+ },
293
+ "bsc": {
294
+ chainName: "Binance Smart Chain", chainId: 56, blockExplorerUrl: "https://bscscan.com/tx/",
295
+ popularToken: ["BNB", "USDT", "BUSD", "CAKE", "C98", "BAKE", "MBOX"],
296
+ nativeCurrency: { name: "BNB", symbol: "BNB", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
297
+ rpcUrls: ["https://bsc-dataseed1.binance.org/"],
298
+ compiler: 'EVM',
299
+ },
300
+ "solana": {
301
+ compiler: 'SOL',
302
+ chainName: "Solana Mainnet", blockExplorerUrl: "https://solscan.io/tx/", popularToken: ["SOL", "SNY", "USDT", "USDC", "RAY", "STEP"], rpcUrls: null
303
+ },
304
+ "flow": {
305
+ compiler: 'FLOW',
306
+ chainName: "Flow Mainnet", blockExplorerUrl: "https://flowscan.org/transaction/", popularToken: ["SOL", "SNY", "USDT", "USDC", "RAY", "STEP"], rpcUrls: null
307
+ },
308
+ "polygon": {
309
+ compiler: 'EVM',
310
+ chainName: "Polygon Mainnet", chainId: 137, blockExplorerUrl: "https://polygonscan.com/tx/", popularToken: ["USDT", "USDC", "MATIC", "AAVE", "DINO", "ADDY", "MIMATIC"], nativeCurrency: { name: "MATIC", symbol: "MATIC", decimals: 18, address: "0x0000000000000000000000000000000000001010" }, rpcUrls: ["https://rpc-mainnet.maticvigil.com"]
311
+ },
312
+ "avax": {
313
+ compiler: 'EVM',
314
+ chainName: "Avalanche", chainId: 43114, blockExplorerUrl: "https://cchain.explorer.avax.network/tx/", popularToken: ["AVAX", "PNG", "DAI.E", "ETH", "WAVAX", "JOE", "QI", "USDC.E"], nativeCurrency: { name: "AVAX", symbol: "AVAX", decimals: 18, address: "0x0000000000000000000000000000000000000000" }, rpcUrls: ["https://api.avax.network/ext/bc/C/rpc"]
315
+ },
316
+ "fantom": {
317
+ compiler: 'EVM',
318
+ chainName: "Fantom", chainId: 250, blockExplorerUrl: "https://ftmscan.com/tx/", popularToken: ["ETH", "USDT", "USDC", "SPIRIT", "1INCH", "C98", "FTM", "fUSDT", "MIM", "BOO"], nativeCurrency: { name: "FTM", symbol: "FTM", decimals: 18, address: "0x0000000000000000000000000000000000000000" }, rpcUrls: ["https://rpcapi.fantom.network"]
319
+ },
320
+ "arbitrum": {
321
+ compiler: 'EVM',
322
+ chainName: "Arbitrum", chainId: 42161, blockExplorerUrl: "https://arbiscan.io/tx/", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" }, rpcUrls: ["https://arb1.arbitrum.io/rpc"]
323
+ },
324
+ "terra": {
325
+ compiler: 'TERRA',
326
+ chainName: "Terra Mainnet", blockExplorerUrl: "https://finder.terra.money/columbus-5/tx/", rpcUrls: null
327
+ },
328
+ "xdai": {
329
+ compiler: 'EVM',
330
+ chainName: "Gnosis Mainnet",
331
+ chainId: 100,
332
+ blockExplorerUrl: "https://blockscout.com/poa/xdai/tx/", popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"],
333
+ nativeCurrency: { name: "xDai", symbol: "XDAI", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
334
+ rpcUrls: ["https://rpc.gnosischain.com", "https://rpc.xdaichain.com/"]
335
+ },
336
+ "boba": {
337
+ compiler: 'EVM',
338
+ chainName: "Boba Mainnet", chainId: 288, blockExplorerUrl: "https://blockexplorer.boba.network/tx/", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0x0000000000000000000000000000000000000000" }, rpcUrls: ["https://mainnet.boba.network"]
339
+ },
340
+ "ont": {
341
+ compiler: 'ONT',
342
+ chainName: "Ontology Mainnet", blockExplorerUrl: "https://explorer.ont.io/transaction/", popularToken: [], rpcUrls: null
343
+ },
344
+ "ontevm": {
345
+ compiler: 'EVM',
346
+ chainName: "Ontology Evm", chainId: 58, blockExplorerUrl: "https://explorer.ont.io/transaction/", nativeCurrency: { name: "ONG", symbol: "ONG", decimals: 18, address: "0x0000000000000000000000000000000000000000" }, rpcUrls: ["https://dappnode10.ont.io:10339"]
347
+ },
348
+ "metis": {
349
+ compiler: 'EVM',
350
+ chainName: "Andromeda (Metis)", chainId: 1088, blockExplorerUrl: "https://andromeda-explorer.metis.io/tx/", nativeCurrency: { name: "METIS", symbol: "METIS", decimals: 18, address: "0x0000000000000000000000000000000000000000" }, rpcUrls: ["https://andromeda.metis.io/?owner=1088"]
351
+ },
352
+ "tron": {
353
+ compiler: 'TRON',
354
+ chainName: "Tron Mainnet",
355
+ blockExplorerUrl: "https://tronscan.io/#/transaction/",
356
+ popularToken: ["TRX", "WTRX", "ETH", "BTC", "USDT", "USDJ", "JST"],
357
+ rpcUrls: null
358
+ },
359
+ "heco": {
360
+ compiler: 'EVM',
361
+ chainName: "Heco Mainnet",
362
+ chainId: 128,
363
+ blockExplorerUrl: "https://http-mainnet.hecochain.com/tx/",
364
+ popularToken: ["HT", "ETH", "AAVE", "USDT", "USDC", "MDX", "DEP"],
365
+ nativeCurrency: { name: "HT", symbol: "HT", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
366
+ rpcUrls: ["https://http-mainnet.hecochain.com"]
367
+ },
368
+ "okex": {
369
+ compiler: 'EVM',
370
+ chainName: "OEC Mainnet", chainId: 66, blockExplorerUrl: "https://www.oklink.com/okexchain/", popularToken: ["OKT", "OKB", "USDT", "USDC", "BUSD", "BNB", "CHE"], nativeCurrency: { name: "OKT", symbol: "OKT", decimals: 18, address: "0x0000000000000000000000000000000000000000" }, rpcUrls: ["https://exchainrpc.okex.org"]
371
+ },
372
+ "optimism": {
373
+ compiler: 'EVM',
374
+ chainName: "Optimism",
375
+ chainId: 10,
376
+ blockExplorerUrl: "https://optimism.io/tx/",
377
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
378
+ rpcUrls: ["https://rpc.ankr.com/optimism", "https://optimism-mainnet.public.blastapi.io", "https://mainnet.optimism.io"]
379
+ },
380
+ "harmony": {
381
+ compiler: 'EVM',
382
+ chainName: "Harmony",
383
+ chainId: 1666600000,
384
+ blockExplorerUrl: "https://explorer.harmony.one/",
385
+ nativeCurrency: { name: "ONE", symbol: "ONE", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
386
+ popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"],
387
+ rpcUrls: ["https://api.s0.t.hmny.io", "https://api.harmony.one"]
388
+ },
389
+ "dot": {
390
+ compiler: 'EVM',
391
+ chainName: "Polkadot", blockExplorerUrl: "", popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"]
392
+ },
393
+ "neo": {
394
+ compiler: 'EVM',
395
+ chainName: "Neo", blockExplorerUrl: "", popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"]
396
+ },
397
+ "aurora": {
398
+ chainName: "Aurora Mainnet",
399
+ chainId: 1313161554,
400
+ blockExplorerUrl: "https://aurorascan.dev/tx/",
401
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
402
+ popularToken: [],
403
+ rpcUrls: [
404
+ "https://mainnet.aurora.dev"
405
+ ],
406
+ compiler: 'EVM'
407
+ },
408
+ "cronos": {
409
+ chainName: "Cronos Mainnet",
410
+ chainId: 25,
411
+ blockExplorerUrl: "https://cronos.org/explorer",
412
+ nativeCurrency: {
413
+ name: "CRO",
414
+ symbol: "CRO",
415
+ decimals: 18,
416
+ address: "0x0000000000000000000000000000000000000000"
417
+ },
418
+ popularToken: [],
419
+ rpcUrls: [
420
+ "https://evm.cronos.org"
421
+ ],
422
+ compiler: 'EVM'
423
+ },
424
+ "moonriver": {
425
+ chainName: "Moonriver Mainnet",
426
+ chainId: 1285,
427
+ blockExplorerUrl: "https://moonriver.moonscan.io",
428
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
429
+ popularToken: [],
430
+ rpcUrls: [
431
+ "https://rpc.moonriver.moonbeam.network"
432
+ ],
433
+ compiler: 'EVM'
434
+ },
435
+ "bsctest": {
436
+ chainName: "BSC Test Network",
437
+ chainId: 1285,
438
+ blockExplorerUrl: "https://testnet.bscscan.com/",
439
+ nativeCurrency: { name: "BNB", symbol: "BNB", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
440
+ popularToken: [],
441
+ rpcUrls: [
442
+ "https://data-seed-prebsc-1-s1.binance.org:8545"
443
+ ],
444
+ compiler: 'EVM'
445
+ },
446
+ "aptos": {
447
+ compiler: 'APTOS',
448
+ chainName: "Aptos Mainnet",
449
+ blockExplorerUrl: "https://explorer.aptoslabs.com/txn/",
450
+ nativeCurrency: { name: "Aptos", symbol: "APT", decimals: 8, address: "0x1" },
451
+ },
452
+ "near": {
453
+ compiler: 'NEAR',
454
+ chainName: "Near Mainnet",
455
+ blockExplorerUrl: "https://nearblocks.io/txns/",
456
+ nativeCurrency: { name: "Near", symbol: "Near", decimals: 24, address: "near.near" },
457
+ },
458
+ cosmos: {
459
+ chainId: 'cosmoshub-4',
460
+ chainName: 'Cosmos',
461
+ rpcUrls: [
462
+ ''
463
+ ],
464
+ blockExplorerUrl: '',
465
+ compiler: 'COSMOS',
466
+ },
467
+ osmosis: {
468
+ chainId: 'osmosis-1',
469
+ chainName: 'Osmosis',
470
+ rpcUrls: [
471
+ 'https://rpc.cosmos.directory/osmosis'
472
+ ],
473
+ blockExplorerUrl: 'https://www.mintscan.io/osmosis/txs/',
474
+ compiler: 'COSMOS',
475
+ },
476
+ iris: {
477
+ chainId: 'irishub-1',
478
+ chainName: 'Iris',
479
+ rpcUrls: [
480
+ 'https://rpc-iris.keplr.app'
481
+ ],
482
+ blockExplorerUrl: '',
483
+ compiler: 'COSMOS',
484
+ },
485
+ };
486
+ var Chains = /** @class */ (function () {
487
+ function Chains() {
488
+ var _this = this;
489
+ this.chainObj = {};
490
+ this.chainList = [];
491
+ this.chainIds = [];
492
+ this.chainNames = [];
493
+ this.chainApproveNames = [];
494
+ if (!util_1.isPc) {
495
+ EthereumChainParams.eth = {
496
+ eth: [
497
+ {
498
+ chainId: "0x1",
499
+ chainName: "ethereum",
500
+ key: 'eth',
501
+ nativeCurrency: {
502
+ name: "ETH",
503
+ symbol: "ETH",
504
+ decimals: 18,
505
+ },
506
+ rpcUrls: ["https://mainnet.infura.io/v3/"],
507
+ blockExplorerUrls: ["https://etherscan.io"],
508
+ },
509
+ ],
510
+ };
511
+ }
512
+ index_1.walletsObj.walletList.forEach(function (item) {
513
+ item.supportChains.forEach(function (chainName) {
514
+ if (chainObj[chainName] && chainObj[chainName].wallets) {
515
+ chainObj[chainName].wallets.push(item.key);
516
+ }
517
+ else {
518
+ if (!chainObj[chainName]) {
519
+ chainObj[chainName] = {};
520
+ }
521
+ chainObj[chainName].key = chainName;
522
+ chainObj[chainName].wallets = [item.key];
523
+ }
524
+ });
525
+ });
526
+ this.chainObj = chainObj;
527
+ this.chainList = Object.keys(chainObj).map(function (key) {
528
+ if (chainObj[key].chainId) {
529
+ _this.chainIds.push(chainObj[key].chainId);
530
+ }
531
+ _this.chainNames.push(key);
532
+ if (chainObj[key].compiler === 'EVM' || chainObj[key].compiler === 'TRON') {
533
+ _this.chainApproveNames.push(key);
534
+ }
535
+ return chainObj[key];
536
+ });
537
+ // console.log(JSON.stringify(this.chainList))
538
+ }
539
+ Chains.prototype.getNativeToken = function (chainName) {
540
+ return this.chainObj[chainName];
541
+ };
542
+ Chains.prototype.getIsNewChain = function () {
543
+ return ['eth', 'bsc', 'xdai', 'boba', 'arbitrum', 'heco', 'moonriver', 'cronos', 'optimism', 'harmony', 'fantom', 'avax', 'polygon', 'okex'];
544
+ };
545
+ Chains.prototype.getChainById = function (chainId) {
546
+ return this.chainList.find(function (item) {
547
+ return item.chainId == chainId;
548
+ });
549
+ };
550
+ Chains.prototype.getChainByName = function (name) {
551
+ return this.chainObj[name] || null;
552
+ };
553
+ Chains.prototype.isNativeToken = function (chainName, address) {
554
+ if (chainObj[chainName] && chainObj[chainName].nativeCurrency && chainObj[chainName].nativeCurrency.address) {
555
+ return chainObj[chainName].nativeCurrency.address.toUpperCase() === address.toUpperCase();
556
+ }
557
+ return false;
558
+ };
559
+ return Chains;
560
+ }());
561
+ exports.Chains = Chains;
562
+ var chainsObj = new Chains();
563
+ exports.chainsObj = chainsObj;
@@ -0,0 +1,17 @@
1
+ export declare class NotoMobile {
2
+ close: Function;
3
+ $on(key: string, callBack: Function): void;
4
+ mask: any;
5
+ qrcodeBox: any;
6
+ id: string;
7
+ qrCode: string;
8
+ width: number;
9
+ time: number;
10
+ outTime: any;
11
+ constructor(qrData: any);
12
+ loop(): void;
13
+ setCloseStyle(): void;
14
+ createQrcode(w: number): void;
15
+ show(): void;
16
+ cancel(): void;
17
+ }