@depay/web3-wallets-evm 17.1.0 → 17.2.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.
- package/dist/esm/index.evm.js +172 -112
- package/dist/esm/index.js +204 -144
- package/dist/esm/index.solana.js +47 -35
- package/dist/umd/index.evm.js +172 -112
- package/dist/umd/index.js +204 -144
- package/dist/umd/index.solana.js +47 -35
- package/package.json +1 -1
package/dist/esm/index.evm.js
CHANGED
|
@@ -8,7 +8,7 @@ let supported$1 = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanch
|
|
|
8
8
|
supported$1.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
|
|
9
9
|
supported$1.solana = [];
|
|
10
10
|
|
|
11
|
-
function _optionalChain$
|
|
11
|
+
function _optionalChain$o(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
12
12
|
class Transaction {
|
|
13
13
|
|
|
14
14
|
constructor({
|
|
@@ -33,7 +33,7 @@ class Transaction {
|
|
|
33
33
|
this.to = (to && to.match('0x')) ? ethers.utils.getAddress(to) : to;
|
|
34
34
|
|
|
35
35
|
// optional
|
|
36
|
-
this.value = _optionalChain$
|
|
36
|
+
this.value = _optionalChain$o([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
|
|
37
37
|
this.api = api;
|
|
38
38
|
this.method = method;
|
|
39
39
|
this.params = params;
|
|
@@ -73,7 +73,7 @@ class Transaction {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
getParamType(param) {
|
|
76
|
-
if(_optionalChain$
|
|
76
|
+
if(_optionalChain$o([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
|
|
77
77
|
return `(${param.components.map((param)=>this.getParamType(param)).join(',')})`
|
|
78
78
|
} else {
|
|
79
79
|
return param.type
|
|
@@ -146,7 +146,7 @@ class Transaction {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
function _optionalChain$
|
|
149
|
+
function _optionalChain$n(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
150
150
|
|
|
151
151
|
const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
152
152
|
transaction = new Transaction(transaction);
|
|
@@ -201,7 +201,7 @@ const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
|
|
|
201
201
|
|
|
202
202
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
203
203
|
if(
|
|
204
|
-
(error && _optionalChain$
|
|
204
|
+
(error && _optionalChain$n([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
205
205
|
(error && error.toString().match('undefined'))
|
|
206
206
|
) {
|
|
207
207
|
setTimeout(()=>{
|
|
@@ -215,7 +215,7 @@ const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
|
|
|
215
215
|
});
|
|
216
216
|
} catch(error) {
|
|
217
217
|
if(
|
|
218
|
-
(error && _optionalChain$
|
|
218
|
+
(error && _optionalChain$n([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
219
219
|
(error && error.toString().match('undefined'))
|
|
220
220
|
) {
|
|
221
221
|
setTimeout(()=>{
|
|
@@ -250,12 +250,12 @@ const submitContractInteraction$2 = async ({ transaction, signer, provider })=>{
|
|
|
250
250
|
if(contractArguments) {
|
|
251
251
|
return await method(...contractArguments, {
|
|
252
252
|
value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
|
|
253
|
-
gasLimit: _optionalChain$
|
|
253
|
+
gasLimit: _optionalChain$n([gas, 'optionalAccess', _7 => _7.toHexString, 'call', _8 => _8()])
|
|
254
254
|
})
|
|
255
255
|
} else {
|
|
256
256
|
return await method({
|
|
257
257
|
value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
|
|
258
|
-
gasLimit: _optionalChain$
|
|
258
|
+
gasLimit: _optionalChain$n([gas, 'optionalAccess', _9 => _9.toHexString, 'call', _10 => _10()])
|
|
259
259
|
})
|
|
260
260
|
}
|
|
261
261
|
};
|
|
@@ -267,7 +267,7 @@ const submitSimpleTransfer$2 = ({ transaction, signer })=>{
|
|
|
267
267
|
})
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
function _optionalChain$
|
|
270
|
+
function _optionalChain$m(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
271
271
|
|
|
272
272
|
class WindowEthereum {
|
|
273
273
|
|
|
@@ -279,37 +279,39 @@ class WindowEthereum {
|
|
|
279
279
|
|
|
280
280
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
281
281
|
return (
|
|
282
|
-
_optionalChain$
|
|
282
|
+
_optionalChain$m([window, 'optionalAccess', _38 => _38.ethereum]) &&
|
|
283
283
|
// not MetaMask
|
|
284
|
-
!(_optionalChain$
|
|
284
|
+
!(_optionalChain$m([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
|
|
285
285
|
// not Coin98
|
|
286
|
-
!_optionalChain$
|
|
286
|
+
!_optionalChain$m([window, 'optionalAccess', _41 => _41.coin98]) &&
|
|
287
287
|
// not Trust Wallet
|
|
288
|
-
!(_optionalChain$
|
|
288
|
+
!(_optionalChain$m([window, 'optionalAccess', _42 => _42.ethereum, 'optionalAccess', _43 => _43.isTrust]) || _optionalChain$m([window, 'optionalAccess', _44 => _44.ethereum, 'optionalAccess', _45 => _45.isTrustWallet])) &&
|
|
289
289
|
// not crypto.com
|
|
290
|
-
!_optionalChain$
|
|
290
|
+
!_optionalChain$m([window, 'optionalAccess', _46 => _46.ethereum, 'optionalAccess', _47 => _47.isDeficonnectProvider]) &&
|
|
291
291
|
// not HyperPay
|
|
292
|
-
!_optionalChain$
|
|
292
|
+
!_optionalChain$m([window, 'optionalAccess', _48 => _48.ethereum, 'optionalAccess', _49 => _49.isHyperPay]) &&
|
|
293
293
|
// not Phantom
|
|
294
|
-
!(window.phantom && !window.glow && !_optionalChain$
|
|
294
|
+
!(window.phantom && !window.glow && !_optionalChain$m([window, 'optionalAccess', _50 => _50.solana, 'optionalAccess', _51 => _51.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
|
|
295
295
|
// not Rabby
|
|
296
|
-
!_optionalChain$
|
|
296
|
+
!_optionalChain$m([window, 'optionalAccess', _52 => _52.ethereum, 'optionalAccess', _53 => _53.isRabby]) &&
|
|
297
297
|
// not Backpack
|
|
298
|
-
!_optionalChain$
|
|
298
|
+
!_optionalChain$m([window, 'optionalAccess', _54 => _54.backpack, 'optionalAccess', _55 => _55.isBackpack]) &&
|
|
299
299
|
// not TokenPocket
|
|
300
|
-
!_optionalChain$
|
|
300
|
+
!_optionalChain$m([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isTokenPocket]) &&
|
|
301
301
|
// not BitKeep
|
|
302
|
-
!_optionalChain$
|
|
302
|
+
!_optionalChain$m([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isBitKeep]) &&
|
|
303
303
|
// not Coinbase
|
|
304
|
-
!(_optionalChain$
|
|
304
|
+
!(_optionalChain$m([window, 'optionalAccess', _60 => _60.ethereum, 'optionalAccess', _61 => _61.isCoinbaseWallet]) || _optionalChain$m([window, 'optionalAccess', _62 => _62.ethereum, 'optionalAccess', _63 => _63.isWalletLink])) &&
|
|
305
305
|
// MetaMask through ProviderMap
|
|
306
|
-
!_optionalChain$
|
|
306
|
+
!_optionalChain$m([window, 'optionalAccess', _64 => _64.ethereum, 'optionalAccess', _65 => _65.providerMap, 'optionalAccess', _66 => _66.has, 'call', _67 => _67('MetaMask')]) &&
|
|
307
307
|
// Brave Wallet
|
|
308
|
-
!_optionalChain$
|
|
308
|
+
!_optionalChain$m([window, 'optionalAccess', _68 => _68.ethereum, 'optionalAccess', _69 => _69.isBraveWallet]) &&
|
|
309
309
|
// Uniswap Wallet
|
|
310
|
-
!_optionalChain$
|
|
310
|
+
!_optionalChain$m([window, 'optionalAccess', _70 => _70.ethereum, 'optionalAccess', _71 => _71.isUniswapWallet]) &&
|
|
311
|
+
// Rainbow
|
|
312
|
+
!_optionalChain$m([window, 'optionalAccess', _72 => _72.ethereum, 'optionalAccess', _73 => _73.isRainbow]) &&
|
|
311
313
|
// OKX Wallet
|
|
312
|
-
!_optionalChain$
|
|
314
|
+
!_optionalChain$m([window, 'optionalAccess', _74 => _74.okxwallet])
|
|
313
315
|
)
|
|
314
316
|
};}
|
|
315
317
|
|
|
@@ -435,7 +437,7 @@ class WindowEthereum {
|
|
|
435
437
|
}
|
|
436
438
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
437
439
|
|
|
438
|
-
function _optionalChain$
|
|
440
|
+
function _optionalChain$l(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
439
441
|
class Binance extends WindowEthereum {
|
|
440
442
|
|
|
441
443
|
static __initStatic() {this.info = {
|
|
@@ -445,7 +447,7 @@ class Binance extends WindowEthereum {
|
|
|
445
447
|
};}
|
|
446
448
|
|
|
447
449
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
448
|
-
return _optionalChain$
|
|
450
|
+
return _optionalChain$l([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
449
451
|
!window.coin98 &&
|
|
450
452
|
!window.trustwallet
|
|
451
453
|
};}
|
|
@@ -465,7 +467,7 @@ var logos = {
|
|
|
465
467
|
okx: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMzYuMSAzMzYuMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5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eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjc5LjEsMjA1LjRoLTY0LjdjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuNywwLDUtMi4yLDUtNXYtNjQuNwoJQzI4NC4xLDIwNy42LDI4MS45LDIwNS40LDI3OS4xLDIwNS40eiIvPgo8L3N2Zz4K",
|
|
466
468
|
};
|
|
467
469
|
|
|
468
|
-
function _optionalChain$
|
|
470
|
+
function _optionalChain$k(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
469
471
|
class BraveEVM extends WindowEthereum {
|
|
470
472
|
|
|
471
473
|
static __initStatic() {this.info = {
|
|
@@ -475,14 +477,14 @@ class BraveEVM extends WindowEthereum {
|
|
|
475
477
|
platform: 'evm',
|
|
476
478
|
};}
|
|
477
479
|
|
|
478
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
480
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$k([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
479
481
|
|
|
480
482
|
getProvider() {
|
|
481
483
|
return window.ethereum
|
|
482
484
|
}
|
|
483
485
|
} BraveEVM.__initStatic(); BraveEVM.__initStatic2();
|
|
484
486
|
|
|
485
|
-
function _optionalChain$
|
|
487
|
+
function _optionalChain$j(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
486
488
|
class Coin98EVM extends WindowEthereum {
|
|
487
489
|
|
|
488
490
|
static __initStatic() {this.info = {
|
|
@@ -492,13 +494,13 @@ class Coin98EVM extends WindowEthereum {
|
|
|
492
494
|
platform: 'evm',
|
|
493
495
|
};}
|
|
494
496
|
|
|
495
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
497
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$j([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
496
498
|
|
|
497
499
|
getProvider() { return window.coin98.provider }
|
|
498
500
|
|
|
499
501
|
} Coin98EVM.__initStatic(); Coin98EVM.__initStatic2();
|
|
500
502
|
|
|
501
|
-
function _optionalChain$
|
|
503
|
+
function _optionalChain$i(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
502
504
|
class CoinbaseEVM extends WindowEthereum {
|
|
503
505
|
|
|
504
506
|
static __initStatic() {this.info = {
|
|
@@ -509,8 +511,8 @@ class CoinbaseEVM extends WindowEthereum {
|
|
|
509
511
|
};}
|
|
510
512
|
|
|
511
513
|
getProvider() {
|
|
512
|
-
if(_optionalChain$
|
|
513
|
-
return _optionalChain$
|
|
514
|
+
if(_optionalChain$i([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
|
|
515
|
+
return _optionalChain$i([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
|
|
514
516
|
} else {
|
|
515
517
|
return window.ethereum
|
|
516
518
|
}
|
|
@@ -519,15 +521,15 @@ class CoinbaseEVM extends WindowEthereum {
|
|
|
519
521
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
520
522
|
return(
|
|
521
523
|
(
|
|
522
|
-
_optionalChain$
|
|
524
|
+
_optionalChain$i([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$i([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
|
|
523
525
|
) || (
|
|
524
|
-
_optionalChain$
|
|
526
|
+
_optionalChain$i([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
|
|
525
527
|
)
|
|
526
528
|
)
|
|
527
529
|
};}
|
|
528
530
|
} CoinbaseEVM.__initStatic(); CoinbaseEVM.__initStatic2();
|
|
529
531
|
|
|
530
|
-
function _optionalChain$
|
|
532
|
+
function _optionalChain$h(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
531
533
|
class CryptoCom extends WindowEthereum {
|
|
532
534
|
|
|
533
535
|
static __initStatic() {this.info = {
|
|
@@ -536,10 +538,10 @@ class CryptoCom extends WindowEthereum {
|
|
|
536
538
|
blockchains: supported$1.evm
|
|
537
539
|
};}
|
|
538
540
|
|
|
539
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
541
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
540
542
|
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
541
543
|
|
|
542
|
-
function _optionalChain$
|
|
544
|
+
function _optionalChain$g(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
543
545
|
class ExodusEVM extends WindowEthereum {
|
|
544
546
|
|
|
545
547
|
static __initStatic() {this.info = {
|
|
@@ -549,10 +551,10 @@ class ExodusEVM extends WindowEthereum {
|
|
|
549
551
|
platform: 'evm',
|
|
550
552
|
};}
|
|
551
553
|
|
|
552
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
554
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
|
|
553
555
|
} ExodusEVM.__initStatic(); ExodusEVM.__initStatic2();
|
|
554
556
|
|
|
555
|
-
function _optionalChain$
|
|
557
|
+
function _optionalChain$f(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
556
558
|
class HyperPay extends WindowEthereum {
|
|
557
559
|
|
|
558
560
|
static __initStatic() {this.info = {
|
|
@@ -561,10 +563,10 @@ class HyperPay extends WindowEthereum {
|
|
|
561
563
|
blockchains: supported$1.evm
|
|
562
564
|
};}
|
|
563
565
|
|
|
564
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
566
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
|
|
565
567
|
} HyperPay.__initStatic(); HyperPay.__initStatic2();
|
|
566
568
|
|
|
567
|
-
function _optionalChain$
|
|
569
|
+
function _optionalChain$e(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
568
570
|
class MagicEdenEVM extends WindowEthereum {
|
|
569
571
|
|
|
570
572
|
static __initStatic() {this.info = {
|
|
@@ -576,12 +578,12 @@ class MagicEdenEVM extends WindowEthereum {
|
|
|
576
578
|
|
|
577
579
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
578
580
|
return (
|
|
579
|
-
_optionalChain$
|
|
581
|
+
_optionalChain$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMagicEden])
|
|
580
582
|
)
|
|
581
583
|
};}
|
|
582
584
|
} MagicEdenEVM.__initStatic(); MagicEdenEVM.__initStatic2();
|
|
583
585
|
|
|
584
|
-
function _optionalChain$
|
|
586
|
+
function _optionalChain$d(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
585
587
|
class OKXEVM extends WindowEthereum {
|
|
586
588
|
|
|
587
589
|
static __initStatic() {this.info = {
|
|
@@ -593,12 +595,12 @@ class OKXEVM extends WindowEthereum {
|
|
|
593
595
|
|
|
594
596
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
595
597
|
return (
|
|
596
|
-
_optionalChain$
|
|
598
|
+
_optionalChain$d([window, 'optionalAccess', _2 => _2.okxwallet])
|
|
597
599
|
)
|
|
598
600
|
};}
|
|
599
601
|
} OKXEVM.__initStatic(); OKXEVM.__initStatic2();
|
|
600
602
|
|
|
601
|
-
function _optionalChain$
|
|
603
|
+
function _optionalChain$c(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
602
604
|
class MetaMask extends WindowEthereum {
|
|
603
605
|
|
|
604
606
|
static __initStatic() {this.info = {
|
|
@@ -607,27 +609,32 @@ class MetaMask extends WindowEthereum {
|
|
|
607
609
|
blockchains: supported$1.evm
|
|
608
610
|
};}
|
|
609
611
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
}
|
|
612
|
+
static __initStatic2() {this.isMetaMask = (provider)=> {
|
|
613
|
+
return(
|
|
614
|
+
_optionalChain$c([provider, 'optionalAccess', _3 => _3.isMetaMask]) &&
|
|
615
|
+
Object.keys(provider).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
616
|
+
)
|
|
617
|
+
};}
|
|
617
618
|
|
|
618
|
-
static
|
|
619
|
+
static __initStatic3() {this.getEip6963Provider = ()=>{
|
|
620
|
+
return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
|
|
621
|
+
return MetaMask.isMetaMask(provider)
|
|
622
|
+
}) : undefined
|
|
623
|
+
};}
|
|
624
|
+
|
|
625
|
+
static __initStatic4() {this.isAvailable = async()=>{
|
|
619
626
|
return(
|
|
620
|
-
(
|
|
621
|
-
|
|
622
|
-
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
623
|
-
) || (
|
|
624
|
-
_optionalChain$a([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.providerMap, 'optionalAccess', _19 => _19.has, 'call', _20 => _20('MetaMask')])
|
|
625
|
-
)
|
|
627
|
+
MetaMask.getEip6963Provider() ||
|
|
628
|
+
MetaMask.isMetaMask(_optionalChain$c([window, 'optionalAccess', _4 => _4.ethereum]))
|
|
626
629
|
)
|
|
627
630
|
};}
|
|
628
|
-
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
629
631
|
|
|
630
|
-
|
|
632
|
+
getProvider() {
|
|
633
|
+
return MetaMask.getEip6963Provider() || (MetaMask.isMetaMask(_optionalChain$c([window, 'optionalAccess', _5 => _5.ethereum])) && _optionalChain$c([window, 'optionalAccess', _6 => _6.ethereum]))
|
|
634
|
+
}
|
|
635
|
+
} MetaMask.__initStatic(); MetaMask.__initStatic2(); MetaMask.__initStatic3(); MetaMask.__initStatic4();
|
|
636
|
+
|
|
637
|
+
function _optionalChain$b(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
631
638
|
class Opera extends WindowEthereum {
|
|
632
639
|
|
|
633
640
|
static __initStatic() {this.info = {
|
|
@@ -636,10 +643,10 @@ class Opera extends WindowEthereum {
|
|
|
636
643
|
blockchains: supported$1.evm
|
|
637
644
|
};}
|
|
638
645
|
|
|
639
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
646
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
640
647
|
} Opera.__initStatic(); Opera.__initStatic2();
|
|
641
648
|
|
|
642
|
-
function _optionalChain$
|
|
649
|
+
function _optionalChain$a(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
643
650
|
class PhantomEVM extends WindowEthereum {
|
|
644
651
|
|
|
645
652
|
static __initStatic() {this.info = {
|
|
@@ -653,13 +660,13 @@ class PhantomEVM extends WindowEthereum {
|
|
|
653
660
|
return (
|
|
654
661
|
window.phantom &&
|
|
655
662
|
window.phantom.ethereum &&
|
|
656
|
-
! _optionalChain$
|
|
657
|
-
! _optionalChain$
|
|
663
|
+
! _optionalChain$a([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
|
|
664
|
+
! _optionalChain$a([window, 'optionalAccess', _6 => _6.okxwallet])
|
|
658
665
|
)
|
|
659
666
|
};}
|
|
660
667
|
} PhantomEVM.__initStatic(); PhantomEVM.__initStatic2();
|
|
661
668
|
|
|
662
|
-
function _optionalChain$
|
|
669
|
+
function _optionalChain$9(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
663
670
|
class Rabby extends WindowEthereum {
|
|
664
671
|
|
|
665
672
|
static __initStatic() {this.info = {
|
|
@@ -670,12 +677,12 @@ class Rabby extends WindowEthereum {
|
|
|
670
677
|
|
|
671
678
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
672
679
|
return(
|
|
673
|
-
_optionalChain$
|
|
680
|
+
_optionalChain$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
|
|
674
681
|
)
|
|
675
682
|
};}
|
|
676
683
|
} Rabby.__initStatic(); Rabby.__initStatic2();
|
|
677
684
|
|
|
678
|
-
function _optionalChain$
|
|
685
|
+
function _optionalChain$8(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
679
686
|
class Uniswap extends WindowEthereum {
|
|
680
687
|
|
|
681
688
|
static __initStatic() {this.info = {
|
|
@@ -684,14 +691,53 @@ class Uniswap extends WindowEthereum {
|
|
|
684
691
|
blockchains: supported$1.evm
|
|
685
692
|
};}
|
|
686
693
|
|
|
687
|
-
static __initStatic2() {this.
|
|
694
|
+
static __initStatic2() {this.getEip6963Provider = ()=>{
|
|
695
|
+
return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
|
|
696
|
+
return _optionalChain$8([provider, 'optionalAccess', _4 => _4.isUniswapWallet])
|
|
697
|
+
}) : undefined
|
|
698
|
+
};}
|
|
699
|
+
|
|
700
|
+
static __initStatic3() {this.isAvailable = async()=>{
|
|
688
701
|
return(
|
|
689
|
-
|
|
702
|
+
Uniswap.getEip6963Provider() ||
|
|
703
|
+
_optionalChain$8([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isUniswapWallet])
|
|
690
704
|
)
|
|
691
705
|
};}
|
|
692
|
-
} Uniswap.__initStatic(); Uniswap.__initStatic2();
|
|
693
706
|
|
|
694
|
-
|
|
707
|
+
getProvider() {
|
|
708
|
+
return Uniswap.getEip6963Provider() || (_optionalChain$8([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isUniswapWallet]) && _optionalChain$8([window, 'optionalAccess', _9 => _9.ethereum]))
|
|
709
|
+
}
|
|
710
|
+
} Uniswap.__initStatic(); Uniswap.__initStatic2(); Uniswap.__initStatic3();
|
|
711
|
+
|
|
712
|
+
function _optionalChain$7(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
713
|
+
class Rainbow extends WindowEthereum {
|
|
714
|
+
|
|
715
|
+
static __initStatic() {this.info = {
|
|
716
|
+
name: 'Rainbow',
|
|
717
|
+
logo: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyM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CBpZD0icGFpbnQ5X3JhZGlhbF82Ml8zMjkiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjMgNjkpIHJvdGF0ZSgtOTApIHNjYWxlKDE3IDMyMi4zNykiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDBBQUZGIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo=",
|
|
718
|
+
blockchains: supported$1.evm
|
|
719
|
+
};}
|
|
720
|
+
|
|
721
|
+
static __initStatic2() {this.getEip6963Provider = ()=>{
|
|
722
|
+
return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
|
|
723
|
+
return _optionalChain$7([provider, 'optionalAccess', _4 => _4.isRainbow])
|
|
724
|
+
}) : undefined
|
|
725
|
+
};}
|
|
726
|
+
|
|
727
|
+
static __initStatic3() {this.isAvailable = async()=>{
|
|
728
|
+
return(
|
|
729
|
+
Rainbow.getEip6963Provider() ||
|
|
730
|
+
_optionalChain$7([window, 'optionalAccess', _5 => _5.rainbow, 'optionalAccess', _6 => _6.isRainbow])
|
|
731
|
+
)
|
|
732
|
+
};}
|
|
733
|
+
|
|
734
|
+
getProvider() {
|
|
735
|
+
return Rainbow.getEip6963Provider() || _optionalChain$7([window, 'optionalAccess', _7 => _7.rainbow])
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
} Rainbow.__initStatic(); Rainbow.__initStatic2(); Rainbow.__initStatic3();
|
|
739
|
+
|
|
740
|
+
function _optionalChain$6(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
695
741
|
class TokenPocket extends WindowEthereum {
|
|
696
742
|
|
|
697
743
|
static __initStatic() {this.info = {
|
|
@@ -702,12 +748,12 @@ class TokenPocket extends WindowEthereum {
|
|
|
702
748
|
|
|
703
749
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
704
750
|
return (
|
|
705
|
-
_optionalChain$
|
|
751
|
+
_optionalChain$6([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
|
|
706
752
|
)
|
|
707
753
|
};}
|
|
708
754
|
} TokenPocket.__initStatic(); TokenPocket.__initStatic2();
|
|
709
755
|
|
|
710
|
-
function _optionalChain$
|
|
756
|
+
function _optionalChain$5(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
711
757
|
class TrustEVM extends WindowEthereum {
|
|
712
758
|
|
|
713
759
|
static __initStatic() {this.info = {
|
|
@@ -719,7 +765,7 @@ class TrustEVM extends WindowEthereum {
|
|
|
719
765
|
|
|
720
766
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
721
767
|
return (
|
|
722
|
-
(_optionalChain$
|
|
768
|
+
(_optionalChain$5([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$5([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
|
|
723
769
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
724
770
|
)
|
|
725
771
|
};}
|
|
@@ -824,7 +870,7 @@ const getSmartContractWallet = async(blockchain, address)=> {
|
|
|
824
870
|
}
|
|
825
871
|
};
|
|
826
872
|
|
|
827
|
-
function _optionalChain$
|
|
873
|
+
function _optionalChain$4(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
828
874
|
|
|
829
875
|
const sendTransaction$1 = async ({ transaction, wallet })=> {
|
|
830
876
|
transaction = new Transaction(transaction);
|
|
@@ -875,7 +921,7 @@ const retrieveConfirmedTransaction$1 = (sentTransaction)=>{
|
|
|
875
921
|
try {
|
|
876
922
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
877
923
|
if(
|
|
878
|
-
(error && _optionalChain$
|
|
924
|
+
(error && _optionalChain$4([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
879
925
|
(error && error.toString().match('undefined'))
|
|
880
926
|
) {
|
|
881
927
|
setTimeout(()=>{
|
|
@@ -889,7 +935,7 @@ const retrieveConfirmedTransaction$1 = (sentTransaction)=>{
|
|
|
889
935
|
});
|
|
890
936
|
} catch (error) {
|
|
891
937
|
if(
|
|
892
|
-
(error && _optionalChain$
|
|
938
|
+
(error && _optionalChain$4([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
893
939
|
(error && error.toString().match('undefined'))
|
|
894
940
|
) {
|
|
895
941
|
setTimeout(()=>{
|
|
@@ -920,7 +966,7 @@ const retrieveTransaction = (tx, blockchain)=>{
|
|
|
920
966
|
resolve(sentTransaction);
|
|
921
967
|
} catch (error) {
|
|
922
968
|
if(
|
|
923
|
-
(error && _optionalChain$
|
|
969
|
+
(error && _optionalChain$4([error, 'optionalAccess', _7 => _7.stack, 'optionalAccess', _8 => _8.match, 'call', _9 => _9('JSON-RPC error')])) ||
|
|
924
970
|
(error && error.toString().match('undefined'))
|
|
925
971
|
) {
|
|
926
972
|
setTimeout(()=>{
|
|
@@ -962,8 +1008,8 @@ const submitContractInteraction$1 = async ({ transaction, wallet })=>{
|
|
|
962
1008
|
to: transaction.to,
|
|
963
1009
|
value: transaction.value ? ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
|
|
964
1010
|
data: await transaction.getData(),
|
|
965
|
-
gas: _optionalChain$
|
|
966
|
-
gasLimit: _optionalChain$
|
|
1011
|
+
gas: _optionalChain$4([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
|
|
1012
|
+
gasLimit: _optionalChain$4([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
|
|
967
1013
|
gasPrice: gasPrice.toHexString(),
|
|
968
1014
|
nonce: ethers.utils.hexlify(transaction.nonce),
|
|
969
1015
|
}]
|
|
@@ -990,16 +1036,16 @@ const submitSimpleTransfer$1 = async ({ transaction, wallet })=>{
|
|
|
990
1036
|
to: transaction.to,
|
|
991
1037
|
value: transaction.value ? ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
|
|
992
1038
|
data: '0x0',
|
|
993
|
-
gas: _optionalChain$
|
|
994
|
-
gasLimit: _optionalChain$
|
|
995
|
-
gasPrice: _optionalChain$
|
|
1039
|
+
gas: _optionalChain$4([gas, 'optionalAccess', _14 => _14.toHexString, 'call', _15 => _15()]),
|
|
1040
|
+
gasLimit: _optionalChain$4([gas, 'optionalAccess', _16 => _16.toHexString, 'call', _17 => _17()]),
|
|
1041
|
+
gasPrice: _optionalChain$4([gasPrice, 'optionalAccess', _18 => _18.toHexString, 'call', _19 => _19()]),
|
|
996
1042
|
nonce: ethers.utils.hexlify(transaction.nonce)
|
|
997
1043
|
}]
|
|
998
1044
|
}
|
|
999
1045
|
}).catch((e)=>{console.log('ERROR', e);})
|
|
1000
1046
|
};
|
|
1001
1047
|
|
|
1002
|
-
function _optionalChain$
|
|
1048
|
+
function _optionalChain$3(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1003
1049
|
|
|
1004
1050
|
const KEY = 'depay:wallets:wc2';
|
|
1005
1051
|
|
|
@@ -1052,7 +1098,7 @@ const getWalletConnectV2Config = (walletName)=>{
|
|
|
1052
1098
|
optionalNamespaces['eip155'] = {
|
|
1053
1099
|
chains: supported$1.evm.map((blockchain)=>`${Blockchains[blockchain].namespace}:${Blockchains[blockchain].networkId}`),
|
|
1054
1100
|
};
|
|
1055
|
-
if(_optionalChain$
|
|
1101
|
+
if(_optionalChain$3([optionalNamespaces, 'optionalAccess', _ => _.eip155]) && _optionalChain$3([optionalNamespaces, 'optionalAccess', _2 => _2.eip155, 'optionalAccess', _3 => _3.chains, 'optionalAccess', _4 => _4.length])) {
|
|
1056
1102
|
optionalNamespaces['eip155'].methods = methods;
|
|
1057
1103
|
optionalNamespaces['eip155'].events = events;
|
|
1058
1104
|
}
|
|
@@ -1067,9 +1113,9 @@ const getSignClient = ()=>{
|
|
|
1067
1113
|
projectId: localStorage[KEY+":projectId"],
|
|
1068
1114
|
metadata: {
|
|
1069
1115
|
name: document.title || 'dApp',
|
|
1070
|
-
description: _optionalChain$
|
|
1116
|
+
description: _optionalChain$3([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('meta[name="description"]'), 'optionalAccess', _7 => _7.getAttribute, 'call', _8 => _8('content')]) || document.title || 'dApp',
|
|
1071
1117
|
url: location.href,
|
|
1072
|
-
icons: [_optionalChain$
|
|
1118
|
+
icons: [_optionalChain$3([document, 'access', _9 => _9.querySelector, 'call', _10 => _10("link[rel~='icon'], link[rel~='shortcut icon']"), 'optionalAccess', _11 => _11.href]) || `${location.origin}/favicon.ico`]
|
|
1073
1119
|
}
|
|
1074
1120
|
});
|
|
1075
1121
|
resolve(signClient);
|
|
@@ -1087,7 +1133,7 @@ class WalletConnectV2 {
|
|
|
1087
1133
|
};}
|
|
1088
1134
|
|
|
1089
1135
|
static __initStatic2() {this.isAvailable = async(options)=>{
|
|
1090
|
-
return !! await getLastSession(_optionalChain$
|
|
1136
|
+
return !! await getLastSession(_optionalChain$3([options, 'optionalAccess', _13 => _13.walletName]))
|
|
1091
1137
|
};}
|
|
1092
1138
|
|
|
1093
1139
|
constructor() {
|
|
@@ -1102,17 +1148,17 @@ class WalletConnectV2 {
|
|
|
1102
1148
|
}
|
|
1103
1149
|
|
|
1104
1150
|
async account() {
|
|
1105
|
-
if(_optionalChain$
|
|
1151
|
+
if(_optionalChain$3([this, 'access', _14 => _14.session, 'optionalAccess', _15 => _15.namespaces, 'optionalAccess', _16 => _16.eip155, 'optionalAccess', _17 => _17.accounts, 'optionalAccess', _18 => _18.length])) {
|
|
1106
1152
|
return this.session.namespaces.eip155.accounts[0].split(':')[2]
|
|
1107
1153
|
}
|
|
1108
1154
|
}
|
|
1109
1155
|
|
|
1110
1156
|
async setSessionBlockchains() {
|
|
1111
|
-
if(!this.session || (!_optionalChain$
|
|
1157
|
+
if(!this.session || (!_optionalChain$3([this, 'access', _19 => _19.session, 'optionalAccess', _20 => _20.namespaces, 'optionalAccess', _21 => _21.eip155]) && !_optionalChain$3([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.optionalNamespaces, 'optionalAccess', _24 => _24.eip155]))) { return }
|
|
1112
1158
|
if(this.session.namespaces.eip155.chains) {
|
|
1113
|
-
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$
|
|
1159
|
+
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$3([Blockchains, 'access', _25 => _25.findByNetworkId, 'call', _26 => _26(chainIdentifier.split(':')[1]), 'optionalAccess', _27 => _27.name])).filter(Boolean);
|
|
1114
1160
|
} else if(this.session.namespaces.eip155.accounts) {
|
|
1115
|
-
this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$
|
|
1161
|
+
this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$3([Blockchains, 'access', _28 => _28.findByNetworkId, 'call', _29 => _29(accountIdentifier.split(':')[1]), 'optionalAccess', _30 => _30.name])).filter(Boolean);
|
|
1116
1162
|
}
|
|
1117
1163
|
}
|
|
1118
1164
|
|
|
@@ -1122,13 +1168,13 @@ class WalletConnectV2 {
|
|
|
1122
1168
|
|
|
1123
1169
|
try {
|
|
1124
1170
|
|
|
1125
|
-
this.walletName = _optionalChain$
|
|
1171
|
+
this.walletName = _optionalChain$3([options, 'optionalAccess', _31 => _31.name]);
|
|
1126
1172
|
|
|
1127
1173
|
// delete localStorage[`wc@2:client:0.3//session`] // DELETE WC SESSIONS
|
|
1128
1174
|
this.signClient = await getSignClient();
|
|
1129
1175
|
|
|
1130
1176
|
this.signClient.on("session_delete", (session)=> {
|
|
1131
|
-
if(_optionalChain$
|
|
1177
|
+
if(_optionalChain$3([session, 'optionalAccess', _32 => _32.topic]) === _optionalChain$3([this, 'access', _33 => _33.session, 'optionalAccess', _34 => _34.topic])) {
|
|
1132
1178
|
localStorage[KEY+':name'] = undefined;
|
|
1133
1179
|
localStorage[KEY+':logo'] = undefined;
|
|
1134
1180
|
this.signClient = undefined;
|
|
@@ -1137,14 +1183,14 @@ class WalletConnectV2 {
|
|
|
1137
1183
|
});
|
|
1138
1184
|
|
|
1139
1185
|
this.signClient.on("session_update", async(session)=> {
|
|
1140
|
-
if(_optionalChain$
|
|
1186
|
+
if(_optionalChain$3([session, 'optionalAccess', _35 => _35.topic]) === _optionalChain$3([this, 'access', _36 => _36.session, 'optionalAccess', _37 => _37.topic])) {
|
|
1141
1187
|
this.session = this.signClient.session.get(session.topic);
|
|
1142
1188
|
await this.setSessionBlockchains();
|
|
1143
1189
|
}
|
|
1144
1190
|
});
|
|
1145
1191
|
|
|
1146
1192
|
this.signClient.on("session_event", (event)=> {
|
|
1147
|
-
if(_optionalChain$
|
|
1193
|
+
if(_optionalChain$3([event, 'optionalAccess', _38 => _38.topic]) === _optionalChain$3([this, 'access', _39 => _39.session, 'optionalAccess', _40 => _40.topic])) {}
|
|
1148
1194
|
});
|
|
1149
1195
|
|
|
1150
1196
|
const connectWallet = async()=>{
|
|
@@ -1155,24 +1201,24 @@ class WalletConnectV2 {
|
|
|
1155
1201
|
await new Promise(resolve=>setTimeout(resolve, 500)); // to prevent race condition within WalletConnect
|
|
1156
1202
|
};
|
|
1157
1203
|
|
|
1158
|
-
const lastSession = _optionalChain$
|
|
1204
|
+
const lastSession = _optionalChain$3([this, 'optionalAccess', _41 => _41.walletName, 'optionalAccess', _42 => _42.length]) ? await getLastSession(this.walletName) : undefined;
|
|
1159
1205
|
if(lastSession) {
|
|
1160
1206
|
this.session = lastSession;
|
|
1161
1207
|
} else {
|
|
1162
1208
|
await connectWallet();
|
|
1163
1209
|
}
|
|
1164
1210
|
|
|
1165
|
-
let meta = _optionalChain$
|
|
1211
|
+
let meta = _optionalChain$3([this, 'access', _43 => _43.session, 'optionalAccess', _44 => _44.peer, 'optionalAccess', _45 => _45.metadata]);
|
|
1166
1212
|
if(meta && meta.name) {
|
|
1167
1213
|
this.name = meta.name;
|
|
1168
1214
|
localStorage[KEY+':name'] = meta.name;
|
|
1169
|
-
if(_optionalChain$
|
|
1215
|
+
if(_optionalChain$3([meta, 'optionalAccess', _46 => _46.icons]) && meta.icons.length) {
|
|
1170
1216
|
this.logo = meta.icons[0];
|
|
1171
1217
|
localStorage[KEY+':logo'] = this.logo;
|
|
1172
1218
|
}
|
|
1173
1219
|
}
|
|
1174
|
-
if(_optionalChain$
|
|
1175
|
-
if(_optionalChain$
|
|
1220
|
+
if(_optionalChain$3([options, 'optionalAccess', _47 => _47.name])) { localStorage[KEY+':name'] = this.name = options.name; }
|
|
1221
|
+
if(_optionalChain$3([options, 'optionalAccess', _48 => _48.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
|
|
1176
1222
|
|
|
1177
1223
|
await this.setSessionBlockchains();
|
|
1178
1224
|
|
|
@@ -1212,7 +1258,7 @@ class WalletConnectV2 {
|
|
|
1212
1258
|
switch (event) {
|
|
1213
1259
|
case 'account':
|
|
1214
1260
|
internalCallback = async(event)=> {
|
|
1215
|
-
if(_optionalChain$
|
|
1261
|
+
if(_optionalChain$3([event, 'optionalAccess', _49 => _49.topic]) === _optionalChain$3([this, 'access', _50 => _50.session, 'optionalAccess', _51 => _51.topic]) && event.params.event.name === 'accountsChanged') {
|
|
1216
1262
|
callback(await this.account());
|
|
1217
1263
|
}
|
|
1218
1264
|
};
|
|
@@ -1272,7 +1318,7 @@ class WalletConnectV2 {
|
|
|
1272
1318
|
|
|
1273
1319
|
WalletConnectV2.getConnectedInstance = getConnectedInstance$1;
|
|
1274
1320
|
|
|
1275
|
-
function _optionalChain$
|
|
1321
|
+
function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1276
1322
|
const sendTransaction = async ({ transaction, wallet })=> {
|
|
1277
1323
|
transaction = new Transaction(transaction);
|
|
1278
1324
|
if((await wallet.connectedTo(transaction.blockchain)) == false) {
|
|
@@ -1324,7 +1370,7 @@ const retrieveConfirmedTransaction = (sentTransaction)=>{
|
|
|
1324
1370
|
|
|
1325
1371
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
1326
1372
|
if(
|
|
1327
|
-
(error && _optionalChain$
|
|
1373
|
+
(error && _optionalChain$2([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
1328
1374
|
(error && error.toString().match('undefined'))
|
|
1329
1375
|
) {
|
|
1330
1376
|
setTimeout(()=>{
|
|
@@ -1338,7 +1384,7 @@ const retrieveConfirmedTransaction = (sentTransaction)=>{
|
|
|
1338
1384
|
});
|
|
1339
1385
|
} catch(error) {
|
|
1340
1386
|
if(
|
|
1341
|
-
(error && _optionalChain$
|
|
1387
|
+
(error && _optionalChain$2([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
1342
1388
|
(error && error.toString().match('undefined'))
|
|
1343
1389
|
) {
|
|
1344
1390
|
setTimeout(()=>{
|
|
@@ -1383,7 +1429,7 @@ const submitSimpleTransfer = ({ transaction, signer })=>{
|
|
|
1383
1429
|
})
|
|
1384
1430
|
};
|
|
1385
1431
|
|
|
1386
|
-
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1432
|
+
function _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1387
1433
|
|
|
1388
1434
|
const getConnectedInstance = ()=>{
|
|
1389
1435
|
return window._connectedWalletLinkInstance
|
|
@@ -1437,10 +1483,10 @@ class WalletLink {
|
|
|
1437
1483
|
let connect = (options && options.connect) ? options.connect : ({uri})=>{};
|
|
1438
1484
|
await connect({ uri: this.connector.qrUrl });
|
|
1439
1485
|
|
|
1440
|
-
_optionalChain([document, 'access', _ => _.querySelector, 'call', _2 => _2('.-cbwsdk-css-reset'), 'optionalAccess', _3 => _3.setAttribute, 'call', _4 => _4('style', 'display: none;')]);
|
|
1441
|
-
_optionalChain([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('.-cbwsdk-extension-dialog-container'), 'optionalAccess', _7 => _7.setAttribute, 'call', _8 => _8('style', 'display: none;')]);
|
|
1486
|
+
_optionalChain$1([document, 'access', _ => _.querySelector, 'call', _2 => _2('.-cbwsdk-css-reset'), 'optionalAccess', _3 => _3.setAttribute, 'call', _4 => _4('style', 'display: none;')]);
|
|
1487
|
+
_optionalChain$1([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('.-cbwsdk-extension-dialog-container'), 'optionalAccess', _7 => _7.setAttribute, 'call', _8 => _8('style', 'display: none;')]);
|
|
1442
1488
|
setTimeout(()=>{
|
|
1443
|
-
if(_optionalChain([this, 'optionalAccess', _9 => _9.connector, 'optionalAccess', _10 => _10._relay, 'optionalAccess', _11 => _11.ui, 'optionalAccess', _12 => _12.linkFlow, 'optionalAccess', _13 => _13.isOpen])){
|
|
1489
|
+
if(_optionalChain$1([this, 'optionalAccess', _9 => _9.connector, 'optionalAccess', _10 => _10._relay, 'optionalAccess', _11 => _11.ui, 'optionalAccess', _12 => _12.linkFlow, 'optionalAccess', _13 => _13.isOpen])){
|
|
1444
1490
|
this.connector._relay.ui.linkFlow.isOpen = false;
|
|
1445
1491
|
}
|
|
1446
1492
|
}, 10);
|
|
@@ -1565,6 +1611,7 @@ var wallets = {
|
|
|
1565
1611
|
TrustEVM,
|
|
1566
1612
|
Rabby,
|
|
1567
1613
|
Uniswap,
|
|
1614
|
+
Rainbow,
|
|
1568
1615
|
BraveEVM,
|
|
1569
1616
|
Opera,
|
|
1570
1617
|
MagicEdenEVM,
|
|
@@ -1582,10 +1629,22 @@ var wallets = {
|
|
|
1582
1629
|
WalletLink
|
|
1583
1630
|
};
|
|
1584
1631
|
|
|
1632
|
+
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1585
1633
|
const getWallets = async(args)=>{
|
|
1586
1634
|
|
|
1587
1635
|
let drip = (args && typeof args.drip === 'function') ? args.drip : undefined;
|
|
1588
1636
|
|
|
1637
|
+
// eip6963
|
|
1638
|
+
window['_eip6963Providers'] = {};
|
|
1639
|
+
const announceProvider = (event)=>{
|
|
1640
|
+
if(_optionalChain([event, 'optionalAccess', _ => _.detail, 'optionalAccess', _2 => _2.info, 'optionalAccess', _3 => _3.uuid])) {
|
|
1641
|
+
window['_eip6963Providers'][_optionalChain([event, 'optionalAccess', _4 => _4.detail, 'optionalAccess', _5 => _5.info, 'optionalAccess', _6 => _6.uuid])] = event.detail.provider;
|
|
1642
|
+
}
|
|
1643
|
+
};
|
|
1644
|
+
window.addEventListener("eip6963:announceProvider", announceProvider);
|
|
1645
|
+
window.dispatchEvent(new Event("eip6963:requestProvider"));
|
|
1646
|
+
window.removeEventListener("eip6963:announceProvider", announceProvider);
|
|
1647
|
+
|
|
1589
1648
|
let availableWallets = await Promise.all(
|
|
1590
1649
|
|
|
1591
1650
|
Object.keys(wallets).map(
|
|
@@ -1620,6 +1679,7 @@ const supported = [
|
|
|
1620
1679
|
wallets.TrustEVM,
|
|
1621
1680
|
wallets.Rabby,
|
|
1622
1681
|
wallets.Uniswap,
|
|
1682
|
+
wallets.Rainbow,
|
|
1623
1683
|
wallets.PhantomEVM,
|
|
1624
1684
|
wallets.BraveEVM,
|
|
1625
1685
|
wallets.OKXEvm,
|