@openocean.finance/openocean-sdk 0.1.54 → 0.1.57

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.
@@ -1,504 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.chains = exports.Chains = void 0;
4
- var Wallets_1 = require("./Wallets");
5
- var utils_1 = require("./../utils");
6
- var chainObj = {
7
- "eth": {
8
- chainName: "Ethereum Mainnet",
9
- chainId: 1,
10
- blockExplorerUrl: "https://etherscan.io/tx/",
11
- nativeCurrency: { name: "ETH", symbol: "eth", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
12
- popularToken: ["ETH", "USDT", "USDC", "BUSD", "UNI", "C98", "LINK", "MATIC"],
13
- rpcUrls: [
14
- "https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
15
- ],
16
- compiler: 'EVM'
17
- },
18
- "ropsten": {
19
- chainName: "Ethereum Ropsten",
20
- chainId: 3,
21
- blockExplorerUrl: "https://ropsten.etherscan.io/",
22
- nativeCurrency: { name: "ETH", symbol: "eth", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
23
- popularToken: ["ETH", "USDT", "USDC", "BUSD", "UNI", "C98", "LINK", "MATIC"],
24
- rpcUrls: [
25
- "https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
26
- ],
27
- compiler: 'EVM',
28
- isTest: true
29
- },
30
- "rinkeby": {
31
- chainName: "Ethereum Rinkeby",
32
- chainId: 4,
33
- blockExplorerUrl: "https://rinkeby.etherscan.io/",
34
- nativeCurrency: { name: "ETH", symbol: "eth", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
35
- popularToken: ["ETH", "USDT", "USDC", "BUSD", "UNI", "C98", "LINK", "MATIC"],
36
- rpcUrls: [
37
- "https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
38
- ],
39
- compiler: 'EVM',
40
- isTest: true
41
- },
42
- "bsc": {
43
- chainName: "Binance Smart Chain", chainId: 56, blockExplorerUrl: "https://bscscan.com/tx/",
44
- popularToken: ["BNB", "USDT", "BUSD", "CAKE", "C98", "BAKE", "MBOX"],
45
- nativeCurrency: { name: "BNB", symbol: "bnb", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
46
- rpcUrls: ["https://bsc-dataseed1.binance.org/"],
47
- compiler: 'EVM',
48
- },
49
- "solana": {
50
- compiler: 'SOL',
51
- chainName: "Solana Mainnet", blockExplorerUrl: "https://solscan.io/tx/", popularToken: ["SOL", "SNY", "USDT", "USDC", "RAY", "STEP"], rpcUrls: null
52
- },
53
- "polygon": {
54
- compiler: 'EVM',
55
- 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"]
56
- },
57
- "avax": {
58
- compiler: 'EVM',
59
- 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"]
60
- },
61
- "fantom": {
62
- compiler: 'EVM',
63
- 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"]
64
- },
65
- "arbitrum": {
66
- compiler: 'EVM',
67
- chainName: "Arbitrum", chainId: 42161, blockExplorerUrl: "https://arbiscan.io/tx/", nativeCurrency: { name: "ETH", symbol: "eth", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" }, rpcUrls: ["https://arb1.arbitrum.io/rpc"]
68
- },
69
- "terra": {
70
- compiler: 'TERRA',
71
- chainName: "Terra Mainnet", blockExplorerUrl: "https://finder.terra.money/columbus-5/tx/", rpcUrls: null
72
- },
73
- "xdai": {
74
- compiler: 'EVM',
75
- chainName: "Gnosis Mainnet",
76
- chainId: 100,
77
- blockExplorerUrl: "https://blockscout.com/poa/xdai/tx/", popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"],
78
- nativeCurrency: { name: "xDai", symbol: "xdai", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
79
- rpcUrls: ["https://rpc.gnosischain.com", "https://rpc.xdaichain.com/"]
80
- },
81
- "boba": {
82
- compiler: 'EVM',
83
- 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"]
84
- },
85
- "ont": {
86
- compiler: 'ONT',
87
- chainName: "Ontology Mainnet", blockExplorerUrl: "https://explorer.ont.io/transaction/", popularToken: [], rpcUrls: null
88
- },
89
- "tron": {
90
- compiler: 'TRON',
91
- chainName: "Tron Mainnet",
92
- blockExplorerUrl: "https://tronscan.io/#/transaction/",
93
- popularToken: ["TRX", "WTRX", "ETH", "BTC", "USDT", "USDJ", "JST"],
94
- rpcUrls: null
95
- },
96
- "heco": {
97
- compiler: 'EVM',
98
- chainName: "Heco Mainnet",
99
- chainId: 128,
100
- blockExplorerUrl: "https://http-mainnet.hecochain.com/tx/",
101
- popularToken: ["HT", "ETH", "AAVE", "USDT", "USDC", "MDX", "DEP"],
102
- nativeCurrency: { name: "HT", symbol: "ht", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
103
- rpcUrls: ["https://http-mainnet.hecochain.com"]
104
- },
105
- "okex": {
106
- compiler: 'EVM',
107
- 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"]
108
- },
109
- "optimism": {
110
- compiler: 'EVM',
111
- chainName: "Optimistic Ethereum",
112
- chainId: 10,
113
- blockExplorerUrl: "https://optimism.io/tx/",
114
- nativeCurrency: { name: "OETH", symbol: "oeth", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
115
- rpcUrls: ["https://rpc.ankr.com/optimism", "https://optimism-mainnet.public.blastapi.io", "https://mainnet.optimism.io"]
116
- },
117
- "harmony": {
118
- compiler: 'EVM',
119
- chainName: "Harmony",
120
- chainId: '1666600000',
121
- blockExplorerUrl: "https://explorer.harmony.one/",
122
- nativeCurrency: { name: "ONE", symbol: "ONE", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
123
- popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"],
124
- rpcUrls: ["https://api.s0.t.hmny.io", "https://api.harmony.one"]
125
- },
126
- "dot": {
127
- compiler: 'EVM',
128
- chainName: "Polkadot", blockExplorerUrl: "", popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"]
129
- },
130
- "neo": {
131
- compiler: 'EVM',
132
- chainName: "Neo", blockExplorerUrl: "", popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"]
133
- },
134
- "aurora": {
135
- chainName: "Aurora Mainnet",
136
- chainId: 1313161554,
137
- blockExplorerUrl: "https://aurorascan.dev/tx/",
138
- nativeCurrency: { name: "ETH", symbol: "eth", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
139
- popularToken: [],
140
- rpcUrls: [
141
- "https://mainnet.aurora.dev"
142
- ],
143
- compiler: 'EVM'
144
- },
145
- "cronos": {
146
- chainName: "Cronos Mainnet",
147
- chainId: 25,
148
- blockExplorerUrl: "https://cronos.org/explorer",
149
- nativeCurrency: {
150
- name: "CRO",
151
- symbol: "cro",
152
- decimals: 18,
153
- address: "0x0000000000000000000000000000000000000000"
154
- },
155
- popularToken: [],
156
- rpcUrls: [
157
- "https://evm.cronos.org"
158
- ],
159
- compiler: 'EVM'
160
- },
161
- "moonriver": {
162
- chainName: "Moonriver Mainnet",
163
- chainId: 1285,
164
- blockExplorerUrl: "https://moonriver.moonscan.io",
165
- nativeCurrency: { name: "ETH", symbol: "eth", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
166
- popularToken: [],
167
- rpcUrls: [
168
- "https://rpc.moonriver.moonbeam.network"
169
- ],
170
- compiler: 'EVM'
171
- },
172
- "bsctest": {
173
- chainName: "BSC Test Network",
174
- chainId: 1285,
175
- blockExplorerUrl: "https://testnet.bscscan.com/",
176
- nativeCurrency: { name: "BNB", symbol: "bnb", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
177
- popularToken: [],
178
- rpcUrls: [
179
- "https://data-seed-prebsc-1-s1.binance.org:8545"
180
- ],
181
- compiler: 'EVM'
182
- },
183
- };
184
- var Chains = /** @class */ (function () {
185
- function Chains() {
186
- var _this = this;
187
- this.ethereumChainParams = {
188
- rinkeby: [
189
- {
190
- chainId: "0x4",
191
- chainName: "rinkeby",
192
- key: 'rinkeby',
193
- nativeCurrency: {
194
- name: "ETH",
195
- symbol: "eth",
196
- decimals: 18,
197
- },
198
- rpcUrls: ["https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"],
199
- blockExplorerUrls: ["https://rinkeby.etherscan.io"],
200
- },
201
- ],
202
- bsc: [
203
- {
204
- chainId: "0x38",
205
- chainName: "BSC Mainnet",
206
- nativeCurrency: {
207
- name: "BNB",
208
- symbol: "bnb",
209
- decimals: 18,
210
- },
211
- rpcUrls: ["https://bsc-dataseed1.binance.org/"],
212
- blockExplorerUrls: ["https://bscscan.com/"],
213
- },
214
- ],
215
- ok: [
216
- {
217
- chainId: "0x42",
218
- chainName: "OEC Mainnet",
219
- nativeCurrency: {
220
- name: "OKT",
221
- symbol: "okt",
222
- decimals: 18,
223
- },
224
- rpcUrls: ["https://exchainrpc.okex.org"],
225
- blockExplorerUrls: ["https://www.oklink.com/okexchain/"],
226
- },
227
- ],
228
- polygon: [
229
- {
230
- chainId: "0x89",
231
- chainName: "Matic Mainnet",
232
- nativeCurrency: {
233
- name: "MATIC",
234
- symbol: "matic",
235
- decimals: 18,
236
- },
237
- rpcUrls: ["https://rpc-mainnet.maticvigil.com"],
238
- blockExplorerUrls: ["https://polygonscan.com"],
239
- },
240
- ],
241
- xdai: [
242
- {
243
- chainId: "0x64",
244
- chainName: "Gnosis Mainnet",
245
- nativeCurrency: {
246
- name: "xDai",
247
- symbol: "xdai",
248
- decimals: 18,
249
- },
250
- rpcUrls: ["https://rpc.gnosischain.com", "https://rpc.xdaichain.com/"],
251
- blockExplorerUrls: ["https://blockscout.com/poa/xdai", "https://blockscout.com/xdai/mainnet"],
252
- },
253
- ],
254
- fantom: [
255
- {
256
- chainId: "0xfa",
257
- chainName: "Fantom Mainnet",
258
- nativeCurrency: {
259
- name: "FTM",
260
- symbol: "ftm",
261
- decimals: 18,
262
- },
263
- rpcUrls: ["https://rpcapi.fantom.network"],
264
- blockExplorerUrls: ["https://ftmscan.com/"],
265
- },
266
- ],
267
- heco: [
268
- {
269
- chainId: "0x80",
270
- chainName: "Heco Mainnet",
271
- nativeCurrency: {
272
- name: "HT",
273
- symbol: "ht",
274
- decimals: 18,
275
- },
276
- rpcUrls: ["https://http-mainnet.hecochain.com"],
277
- blockExplorerUrls: ["https://http-mainnet.hecochain.com"],
278
- },
279
- ],
280
- avax: [
281
- {
282
- chainId: "0xa86a",
283
- chainName: "Avalanche Mainnet C-Chain",
284
- nativeCurrency: {
285
- name: "AVAX",
286
- symbol: "avax",
287
- decimals: 18,
288
- },
289
- rpcUrls: ["https://api.avax.network/ext/bc/C/rpc"],
290
- blockExplorerUrls: ["https://cchain.explorer.avax.network/"],
291
- },
292
- ],
293
- okex: [
294
- {
295
- chainId: "0x42",
296
- chainName: "OEC Mainnet",
297
- nativeCurrency: {
298
- name: "OKT",
299
- symbol: "okt",
300
- decimals: 18,
301
- },
302
- rpcUrls: ["https://exchainrpc.okex.org"],
303
- blockExplorerUrls: ["https://www.oklink.com/okexchain"],
304
- },
305
- ],
306
- harmony: [
307
- {
308
- chainId: "0x63564c40",
309
- chainName: "Harmony Mainnet",
310
- nativeCurrency: {
311
- name: "ONE",
312
- symbol: "one",
313
- decimals: 18,
314
- },
315
- rpcUrls: ["https://api.s0.t.hmny.io", "https://api.harmony.one"],
316
- blockExplorerUrls: ["https://explorer.harmony.one/"],
317
- },
318
- ],
319
- arbitrum: [
320
- {
321
- chainId: "0xa4b1",
322
- chainName: "Arbitrum One",
323
- nativeCurrency: {
324
- name: "ETH",
325
- symbol: "eth",
326
- decimals: 18,
327
- },
328
- rpcUrls: ["https://arb1.arbitrum.io/rpc"],
329
- blockExplorerUrls: ["https://arbiscan.io"],
330
- },
331
- ],
332
- optimism: [
333
- {
334
- chainId: "0xa",
335
- chainName: "Optimistic Ethereum",
336
- nativeCurrency: {
337
- name: "OETH",
338
- symbol: "oeth",
339
- decimals: 18,
340
- },
341
- rpcUrls: ["https://rpc.ankr.com/optimism", "https://optimism-mainnet.public.blastapi.io", "https://mainnet.optimism.io"],
342
- blockExplorerUrls: ["https://optimism.io/"],
343
- },
344
- ],
345
- boba: [
346
- {
347
- chainId: "0x120",
348
- chainName: "Boba Mainnet",
349
- nativeCurrency: {
350
- name: "ETH",
351
- symbol: "eth",
352
- decimals: 18,
353
- },
354
- rpcUrls: ["https://mainnet.boba.network"],
355
- blockExplorerUrls: ["https://blockexplorer.boba.network"],
356
- },
357
- ],
358
- aurora: [
359
- {
360
- chainId: "0x4e454152",
361
- chainName: "Aurora Mainnet",
362
- nativeCurrency: {
363
- name: "ETH",
364
- symbol: "eth",
365
- decimals: 18,
366
- },
367
- rpcUrls: ["https://mainnet.aurora.dev"],
368
- blockExplorerUrls: ["https://aurorascan.dev/tx/"],
369
- },
370
- ],
371
- cronos: [
372
- {
373
- chainId: "0x19",
374
- chainName: "Cronos Mainnet",
375
- nativeCurrency: {
376
- name: "CRO",
377
- symbol: "cro",
378
- decimals: 18,
379
- },
380
- rpcUrls: ["https://evm.cronos.org"],
381
- blockExplorerUrls: ["https://cronos.org/explorer"],
382
- },
383
- ],
384
- moonriver: [
385
- {
386
- chainId: "0x505",
387
- chainName: "Moonriver Mainnet",
388
- nativeCurrency: {
389
- name: "MOVR",
390
- symbol: "movr",
391
- decimals: 18,
392
- },
393
- rpcUrls: ["https://rpc.moonriver.moonbeam.network"],
394
- blockExplorerUrls: ["https://moonriver.moonscan.io"],
395
- },
396
- ],
397
- bsctest: [
398
- {
399
- chainId: "0x61",
400
- chainName: "BSC Test Network",
401
- nativeCurrency: {
402
- name: "BNB",
403
- symbol: "bnb",
404
- decimals: 18,
405
- },
406
- rpcUrls: ["https://data-seed-prebsc-1-s1.binance.org:8545"],
407
- blockExplorerUrls: ["https://testnet.bscscan.com/"],
408
- },
409
- ],
410
- };
411
- this.chainObj = {};
412
- this.chainList = [];
413
- this.chainIds = [];
414
- this.chainNames = [];
415
- this.chainApproveNames = [];
416
- if (!utils_1.isPc) {
417
- this.ethereumChainParams.eth = {
418
- eth: [
419
- {
420
- chainId: "0x1",
421
- chainName: "ethereum",
422
- key: 'eth',
423
- nativeCurrency: {
424
- name: "ETH",
425
- symbol: "eth",
426
- decimals: 18,
427
- },
428
- rpcUrls: ["https://mainnet.infura.io/v3/"],
429
- blockExplorerUrls: ["https://etherscan.io"],
430
- },
431
- ],
432
- };
433
- }
434
- Wallets_1.wallets.walletList.forEach(function (item) {
435
- item.supportChains.forEach(function (chainName) {
436
- if (chainObj[chainName] && chainObj[chainName].wallets) {
437
- chainObj[chainName].wallets.push(item.key);
438
- }
439
- else {
440
- if (!chainObj[chainName]) {
441
- chainObj[chainName] = {};
442
- }
443
- chainObj[chainName].key = chainName;
444
- chainObj[chainName].wallets = [item.key];
445
- }
446
- });
447
- });
448
- this.chainObj = chainObj;
449
- this.chainList = Object.keys(chainObj).map(function (key) {
450
- if (chainObj[key].chainId) {
451
- _this.chainIds.push(chainObj[key].chainId);
452
- }
453
- _this.chainNames.push(key);
454
- if (chainObj[key].compiler === 'EVM' || chainObj[key].compiler === 'TRON') {
455
- _this.chainApproveNames.push(key);
456
- }
457
- return chainObj[key];
458
- });
459
- // console.log(JSON.stringify(this.chainList))
460
- }
461
- Chains.prototype.isNativeToken = function (chainName, address) {
462
- if (this.chainObj[chainName] && this.chainObj[chainName].nativeCurrency && this.chainObj[chainName].nativeCurrency.address) {
463
- return this.chainObj[chainName].nativeCurrency.address.toUpperCase() === address.toUpperCase();
464
- }
465
- return false;
466
- };
467
- Chains.prototype.getNativeToken = function (chainName) {
468
- return this.chainObj[chainName];
469
- };
470
- Chains.prototype.getIsNewChain = function () {
471
- return ['eth', 'bsc', 'xdai', 'boba', 'arbitrum', 'heco', 'moonriver', 'cronos', 'optimism', 'harmony', 'fantom', 'avax', 'polygon', 'okex'];
472
- };
473
- Chains.prototype.getChainById = function (chainId) {
474
- return this.chainList.find(function (item) {
475
- return item.chainId == chainId;
476
- });
477
- };
478
- Chains.prototype.getChainByName = function (name) {
479
- return this.chainObj[name] || null;
480
- };
481
- Chains.prototype.getProxyContract = function (chainName) {
482
- return {
483
- eth: '0x38B7C17E62dcBD1C39f96eFe74848C4A037b3ed3',
484
- bsc: "0x7aeef1035ba6794c0478718a2330671ec8802af1",
485
- fantom: "0x38B7C17E62dcBD1C39f96eFe74848C4A037b3ed3",
486
- avax: "0x38B7C17E62dcBD1C39f96eFe74848C4A037b3ed3",
487
- polygon: "0x38B7C17E62dcBD1C39f96eFe74848C4A037b3ed3",
488
- okex: "0x6D5630eC1Ee74C907617a6fb7BCAdC4Bf0EF3fcA",
489
- optimism: "0x7AeEF1035Ba6794C0478718a2330671Ec8802aF1",
490
- harmony: "0x7AeEF1035Ba6794C0478718a2330671Ec8802aF1",
491
- cronos: "0x7AeEF1035Ba6794C0478718a2330671Ec8802aF1",
492
- moonriver: "0x7AeEF1035Ba6794C0478718a2330671Ec8802aF1",
493
- arbitrum: "0x7AeEF1035Ba6794C0478718a2330671Ec8802aF1",
494
- heco: "0x7AeEF1035Ba6794C0478718a2330671Ec8802aF1",
495
- boba: "0x7AeEF1035Ba6794C0478718a2330671Ec8802aF1",
496
- xdai: "0x7AeEF1035Ba6794C0478718a2330671Ec8802aF1",
497
- tron: "TTpcMZbsojNCMhea2a9LFHq9DLCxsgGZVv",
498
- }[chainName];
499
- };
500
- ;
501
- return Chains;
502
- }());
503
- exports.Chains = Chains;
504
- exports.chains = new Chains();
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.wallets = exports.Wallets = exports.WalletNames = void 0;
4
- var wallet_1 = require("@openocean.finance/wallet");
5
- var WalletNames;
6
- (function (WalletNames) {
7
- WalletNames[WalletNames["MetaMask"] = 0] = "MetaMask";
8
- WalletNames[WalletNames["WalletConnect"] = 1] = "WalletConnect";
9
- WalletNames[WalletNames["BscWallet"] = 2] = "BscWallet";
10
- WalletNames[WalletNames["Cyano"] = 3] = "Cyano";
11
- WalletNames[WalletNames["OntoMobile"] = 4] = "OntoMobile";
12
- WalletNames[WalletNames["TronLink"] = 5] = "TronLink";
13
- WalletNames[WalletNames["Sollet"] = 6] = "Sollet";
14
- WalletNames[WalletNames["SolflareWallet"] = 7] = "SolflareWallet";
15
- WalletNames[WalletNames["TrustWallet"] = 8] = "TrustWallet";
16
- WalletNames[WalletNames["MathWallet"] = 9] = "MathWallet";
17
- WalletNames[WalletNames["TokenPocket"] = 10] = "TokenPocket";
18
- WalletNames[WalletNames["SafePalWallet"] = 11] = "SafePalWallet";
19
- WalletNames[WalletNames["OntoWallet"] = 12] = "OntoWallet";
20
- WalletNames[WalletNames["Coin98Wallet"] = 13] = "Coin98Wallet";
21
- WalletNames[WalletNames["ImTokenWallet"] = 14] = "ImTokenWallet";
22
- WalletNames[WalletNames["Phantom"] = 15] = "Phantom";
23
- WalletNames[WalletNames["OkExWallet"] = 16] = "OkExWallet";
24
- WalletNames[WalletNames["TerraStation"] = 17] = "TerraStation";
25
- WalletNames[WalletNames["CoinbaseWallet"] = 18] = "CoinbaseWallet";
26
- WalletNames[WalletNames["GnosisSafeWallet"] = 19] = "GnosisSafeWallet";
27
- WalletNames[WalletNames["BitKeepWallet"] = 20] = "BitKeepWallet";
28
- WalletNames[WalletNames["CloverWallet"] = 21] = "CloverWallet";
29
- WalletNames[WalletNames["CryptoCom"] = 22] = "CryptoCom";
30
- WalletNames[WalletNames["BraveWallet"] = 23] = "BraveWallet";
31
- WalletNames[WalletNames["XDEFIWallet"] = 24] = "XDEFIWallet";
32
- WalletNames[WalletNames["MetaXWallet"] = 25] = "MetaXWallet";
33
- WalletNames[WalletNames["SlopeWallet"] = 26] = "SlopeWallet";
34
- WalletNames[WalletNames["KeplrWallet"] = 27] = "KeplrWallet";
35
- })(WalletNames = exports.WalletNames || (exports.WalletNames = {}));
36
- var WalletObj = {
37
- MetaMask: new wallet_1.MetaMask(),
38
- TrustWallet: new wallet_1.TrustWallet(),
39
- BraveWallet: new wallet_1.BraveWallet(),
40
- BscWallet: new wallet_1.BscWallet(),
41
- WalletConnect: new wallet_1.WalletConnect(),
42
- CoinbaseWallet: new wallet_1.CoinbaseWallet(),
43
- SafePalWallet: new wallet_1.SafePalWallet(),
44
- BitKeepWallet: new wallet_1.BitKeepWallet(),
45
- XDEFIWallet: new wallet_1.XDEFIWallet(),
46
- OntoWallet: new wallet_1.OntoWallet(),
47
- Coin98Wallet: new wallet_1.Coin98(),
48
- TokenPocket: new wallet_1.TokenPocket(),
49
- CloverWallet: new wallet_1.CloverWallet(),
50
- ImTokenWallet: new wallet_1.ImTokenWallet(),
51
- MetaXWallet: new wallet_1.MetaXWallet(),
52
- MathWallet: new wallet_1.MathWallet(),
53
- CryptoCom: new wallet_1.CryptoCom(),
54
- Cyano: new wallet_1.Cyano(),
55
- OntoMobile: new wallet_1.OntoMobile(),
56
- TronLink: new wallet_1.TronLink(),
57
- Sollet: new wallet_1.Sollet(),
58
- SolflareWallet: new wallet_1.SolflareWallet(),
59
- Phantom: new wallet_1.Phantom(),
60
- OkExWallet: new wallet_1.OKExWallet(),
61
- TerraStation: new wallet_1.TerraStation(),
62
- GnosisSafeWallet: new wallet_1.GnosisSafeWallet(),
63
- SlopeWallet: new wallet_1.SlopeWallet(),
64
- KeplrWallet: new wallet_1.KeplrWallet(),
65
- };
66
- var Wallets = /** @class */ (function () {
67
- function Wallets() {
68
- this.walletObj = {};
69
- this.walletList = [];
70
- WalletObj.MetaMask.supportChains.push('rinkeby');
71
- WalletObj.MetaMask.supportChains.push('ropsten');
72
- this.walletObj = WalletObj;
73
- this.walletList = Object.keys(WalletObj).map(function (key) {
74
- WalletObj[key].key = key;
75
- return WalletObj[key];
76
- });
77
- }
78
- return Wallets;
79
- }());
80
- exports.Wallets = Wallets;
81
- exports.wallets = new Wallets();
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.config = exports.ERC20_abi = void 0;
4
- var Wallets_1 = require("./Wallets");
5
- var Chains_1 = require("./Chains");
6
- exports.ERC20_abi = [{ "constant": true, "inputs": [], "name": "name", "outputs": [{ "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_spender", "type": "address" }, { "name": "_value", "type": "uint256" }], "name": "approve", "outputs": [{ "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_from", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" }], "name": "transferFrom", "outputs": [{ "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [{ "name": "", "type": "uint8" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "name": "_owner", "type": "address" }], "name": "balanceOf", "outputs": [{ "name": "balance", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [{ "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" }], "name": "transfer", "outputs": [{ "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [{ "name": "_owner", "type": "address" }, { "name": "_spender", "type": "address" }], "name": "allowance", "outputs": [{ "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "payable": true, "stateMutability": "payable", "type": "fallback" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "owner", "type": "address" }, { "indexed": true, "name": "spender", "type": "address" }, { "indexed": false, "name": "value", "type": "uint256" }], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "name": "from", "type": "address" }, { "indexed": true, "name": "to", "type": "address" }, { "indexed": false, "name": "value", "type": "uint256" }], "name": "Transfer", "type": "event" }];
7
- exports.config = {
8
- chains: Chains_1.chains,
9
- wallets: Wallets_1.wallets,
10
- ERC20_abi: exports.ERC20_abi
11
- };