@depay/web3-wallets-evm 17.1.0 → 17.2.1

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.
@@ -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$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; }
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$m([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
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$m([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
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$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; }
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$l([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
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$l([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
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$l([gas, 'optionalAccess', _7 => _7.toHexString, 'call', _8 => _8()])
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$l([gas, 'optionalAccess', _9 => _9.toHexString, 'call', _10 => _10()])
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$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; }
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$k([window, 'optionalAccess', _36 => _36.ethereum]) &&
282
+ _optionalChain$m([window, 'optionalAccess', _38 => _38.ethereum]) &&
283
283
  // not MetaMask
284
- !(_optionalChain$k([window, 'optionalAccess', _37 => _37.ethereum, 'optionalAccess', _38 => _38.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
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$k([window, 'optionalAccess', _39 => _39.coin98]) &&
286
+ !_optionalChain$m([window, 'optionalAccess', _41 => _41.coin98]) &&
287
287
  // not Trust Wallet
288
- !(_optionalChain$k([window, 'optionalAccess', _40 => _40.ethereum, 'optionalAccess', _41 => _41.isTrust]) || _optionalChain$k([window, 'optionalAccess', _42 => _42.ethereum, 'optionalAccess', _43 => _43.isTrustWallet])) &&
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$k([window, 'optionalAccess', _44 => _44.ethereum, 'optionalAccess', _45 => _45.isDeficonnectProvider]) &&
290
+ !_optionalChain$m([window, 'optionalAccess', _46 => _46.ethereum, 'optionalAccess', _47 => _47.isDeficonnectProvider]) &&
291
291
  // not HyperPay
292
- !_optionalChain$k([window, 'optionalAccess', _46 => _46.ethereum, 'optionalAccess', _47 => _47.isHyperPay]) &&
292
+ !_optionalChain$m([window, 'optionalAccess', _48 => _48.ethereum, 'optionalAccess', _49 => _49.isHyperPay]) &&
293
293
  // not Phantom
294
- !(window.phantom && !window.glow && !_optionalChain$k([window, 'optionalAccess', _48 => _48.solana, 'optionalAccess', _49 => _49.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
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$k([window, 'optionalAccess', _50 => _50.ethereum, 'optionalAccess', _51 => _51.isRabby]) &&
296
+ !_optionalChain$m([window, 'optionalAccess', _52 => _52.ethereum, 'optionalAccess', _53 => _53.isRabby]) &&
297
297
  // not Backpack
298
- !_optionalChain$k([window, 'optionalAccess', _52 => _52.backpack, 'optionalAccess', _53 => _53.isBackpack]) &&
298
+ !_optionalChain$m([window, 'optionalAccess', _54 => _54.backpack, 'optionalAccess', _55 => _55.isBackpack]) &&
299
299
  // not TokenPocket
300
- !_optionalChain$k([window, 'optionalAccess', _54 => _54.ethereum, 'optionalAccess', _55 => _55.isTokenPocket]) &&
300
+ !_optionalChain$m([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isTokenPocket]) &&
301
301
  // not BitKeep
302
- !_optionalChain$k([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isBitKeep]) &&
302
+ !_optionalChain$m([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isBitKeep]) &&
303
303
  // not Coinbase
304
- !(_optionalChain$k([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isCoinbaseWallet]) || _optionalChain$k([window, 'optionalAccess', _60 => _60.ethereum, 'optionalAccess', _61 => _61.isWalletLink])) &&
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$k([window, 'optionalAccess', _62 => _62.ethereum, 'optionalAccess', _63 => _63.providerMap, 'optionalAccess', _64 => _64.has, 'call', _65 => _65('MetaMask')]) &&
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$k([window, 'optionalAccess', _66 => _66.ethereum, 'optionalAccess', _67 => _67.isBraveWallet]) &&
308
+ !_optionalChain$m([window, 'optionalAccess', _68 => _68.ethereum, 'optionalAccess', _69 => _69.isBraveWallet]) &&
309
309
  // Uniswap Wallet
310
- !_optionalChain$k([window, 'optionalAccess', _68 => _68.ethereum, 'optionalAccess', _69 => _69.isUniswapWallet]) &&
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$k([window, 'optionalAccess', _70 => _70.okxwallet])
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$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; }
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$j([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
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,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5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uMXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyOS44LDIwNS40SDY1LjFjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuOCwwLDUtMi4yLDUtNXYtNjQuNwoJQzEzNC44LDIwNy42LDEzMi41LDIwNS40LDEyOS44LDIwNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjc5LjEsMjA1LjRoLTY0LjdjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuNywwLDUtMi4yLDUtNXYtNjQuNwoJQzI4NC4xLDIwNy42LDI4MS45LDIwNS40LDI3OS4xLDIwNS40eiIvPgo8L3N2Zz4K",
466
468
  };
467
469
 
468
- 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; }
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$i([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
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$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; }
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$h([window, 'optionalAccess', _2 => _2.coin98]) };}
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$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; }
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$g([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
513
- return _optionalChain$g([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
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$g([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$g([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
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$g([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
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$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; }
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$f([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
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$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; }
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$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
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$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; }
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$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
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$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; }
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$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMagicEden])
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$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; }
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$b([window, 'optionalAccess', _2 => _2.okxwallet])
598
+ _optionalChain$d([window, 'optionalAccess', _2 => _2.okxwallet])
597
599
  )
598
600
  };}
599
601
  } OKXEVM.__initStatic(); OKXEVM.__initStatic2();
600
602
 
601
- 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; }
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
- getProvider() {
611
- if(_optionalChain$a([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.providerMap, 'optionalAccess', _9 => _9.has, 'call', _10 => _10('MetaMask')])) {
612
- return _optionalChain$a([window, 'optionalAccess', _11 => _11.ethereum, 'optionalAccess', _12 => _12.providerMap, 'optionalAccess', _13 => _13.get, 'call', _14 => _14('MetaMask')])
613
- } else {
614
- return window.ethereum
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 __initStatic2() {this.isAvailable = async()=>{
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
- _optionalChain$a([window, 'optionalAccess', _15 => _15.ethereum, 'optionalAccess', _16 => _16.isMetaMask]) &&
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
- 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; }
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$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
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$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; }
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,17 @@ class PhantomEVM extends WindowEthereum {
653
660
  return (
654
661
  window.phantom &&
655
662
  window.phantom.ethereum &&
656
- ! _optionalChain$8([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
657
- ! _optionalChain$8([window, 'optionalAccess', _6 => _6.okxwallet])
663
+ ! _optionalChain$a([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
664
+ ! _optionalChain$a([window, 'optionalAccess', _6 => _6.okxwallet])
658
665
  )
659
666
  };}
667
+
668
+ getProvider() {
669
+ return _optionalChain$a([window, 'optionalAccess', _7 => _7.phantom, 'optionalAccess', _8 => _8.ethereum]) || window.ethereum
670
+ }
660
671
  } PhantomEVM.__initStatic(); PhantomEVM.__initStatic2();
661
672
 
662
- 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; }
673
+ 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
674
  class Rabby extends WindowEthereum {
664
675
 
665
676
  static __initStatic() {this.info = {
@@ -670,12 +681,12 @@ class Rabby extends WindowEthereum {
670
681
 
671
682
  static __initStatic2() {this.isAvailable = async()=>{
672
683
  return(
673
- _optionalChain$7([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
684
+ _optionalChain$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
674
685
  )
675
686
  };}
676
687
  } Rabby.__initStatic(); Rabby.__initStatic2();
677
688
 
678
- 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; }
689
+ 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
690
  class Uniswap extends WindowEthereum {
680
691
 
681
692
  static __initStatic() {this.info = {
@@ -684,14 +695,53 @@ class Uniswap extends WindowEthereum {
684
695
  blockchains: supported$1.evm
685
696
  };}
686
697
 
687
- static __initStatic2() {this.isAvailable = async()=>{
698
+ static __initStatic2() {this.getEip6963Provider = ()=>{
699
+ return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
700
+ return _optionalChain$8([provider, 'optionalAccess', _4 => _4.isUniswapWallet])
701
+ }) : undefined
702
+ };}
703
+
704
+ static __initStatic3() {this.isAvailable = async()=>{
688
705
  return(
689
- _optionalChain$6([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isUniswapWallet])
706
+ Uniswap.getEip6963Provider() ||
707
+ _optionalChain$8([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isUniswapWallet])
690
708
  )
691
709
  };}
692
- } Uniswap.__initStatic(); Uniswap.__initStatic2();
693
710
 
694
- 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
+ getProvider() {
712
+ return Uniswap.getEip6963Provider() || (_optionalChain$8([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isUniswapWallet]) && _optionalChain$8([window, 'optionalAccess', _9 => _9.ethereum]))
713
+ }
714
+ } Uniswap.__initStatic(); Uniswap.__initStatic2(); Uniswap.__initStatic3();
715
+
716
+ 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; }
717
+ class Rainbow extends WindowEthereum {
718
+
719
+ static __initStatic() {this.info = {
720
+ name: 'Rainbow',
721
+ logo: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiI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FpbnQ5X3JhZGlhbF82Ml8zMjkiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjMgNjkpIHJvdGF0ZSgtOTApIHNjYWxlKDE3IDMyMi4zNykiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDBBQUZGIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo=",
722
+ blockchains: supported$1.evm
723
+ };}
724
+
725
+ static __initStatic2() {this.getEip6963Provider = ()=>{
726
+ return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
727
+ return _optionalChain$7([provider, 'optionalAccess', _4 => _4.isRainbow])
728
+ }) : undefined
729
+ };}
730
+
731
+ static __initStatic3() {this.isAvailable = async()=>{
732
+ return(
733
+ Rainbow.getEip6963Provider() ||
734
+ _optionalChain$7([window, 'optionalAccess', _5 => _5.rainbow, 'optionalAccess', _6 => _6.isRainbow])
735
+ )
736
+ };}
737
+
738
+ getProvider() {
739
+ return Rainbow.getEip6963Provider() || _optionalChain$7([window, 'optionalAccess', _7 => _7.rainbow])
740
+ }
741
+
742
+ } Rainbow.__initStatic(); Rainbow.__initStatic2(); Rainbow.__initStatic3();
743
+
744
+ 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
745
  class TokenPocket extends WindowEthereum {
696
746
 
697
747
  static __initStatic() {this.info = {
@@ -702,12 +752,12 @@ class TokenPocket extends WindowEthereum {
702
752
 
703
753
  static __initStatic2() {this.isAvailable = async()=>{
704
754
  return (
705
- _optionalChain$5([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
755
+ _optionalChain$6([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
706
756
  )
707
757
  };}
708
758
  } TokenPocket.__initStatic(); TokenPocket.__initStatic2();
709
759
 
710
- 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; }
760
+ 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
761
  class TrustEVM extends WindowEthereum {
712
762
 
713
763
  static __initStatic() {this.info = {
@@ -719,7 +769,7 @@ class TrustEVM extends WindowEthereum {
719
769
 
720
770
  static __initStatic2() {this.isAvailable = async()=>{
721
771
  return (
722
- (_optionalChain$4([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$4([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
772
+ (_optionalChain$5([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$5([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
723
773
  Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
724
774
  )
725
775
  };}
@@ -824,7 +874,7 @@ const getSmartContractWallet = async(blockchain, address)=> {
824
874
  }
825
875
  };
826
876
 
827
- 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; }
877
+ 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
878
 
829
879
  const sendTransaction$1 = async ({ transaction, wallet })=> {
830
880
  transaction = new Transaction(transaction);
@@ -875,7 +925,7 @@ const retrieveConfirmedTransaction$1 = (sentTransaction)=>{
875
925
  try {
876
926
  sentTransaction.wait(1).then(resolve).catch((error)=>{
877
927
  if(
878
- (error && _optionalChain$3([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
928
+ (error && _optionalChain$4([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
879
929
  (error && error.toString().match('undefined'))
880
930
  ) {
881
931
  setTimeout(()=>{
@@ -889,7 +939,7 @@ const retrieveConfirmedTransaction$1 = (sentTransaction)=>{
889
939
  });
890
940
  } catch (error) {
891
941
  if(
892
- (error && _optionalChain$3([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
942
+ (error && _optionalChain$4([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
893
943
  (error && error.toString().match('undefined'))
894
944
  ) {
895
945
  setTimeout(()=>{
@@ -920,7 +970,7 @@ const retrieveTransaction = (tx, blockchain)=>{
920
970
  resolve(sentTransaction);
921
971
  } catch (error) {
922
972
  if(
923
- (error && _optionalChain$3([error, 'optionalAccess', _7 => _7.stack, 'optionalAccess', _8 => _8.match, 'call', _9 => _9('JSON-RPC error')])) ||
973
+ (error && _optionalChain$4([error, 'optionalAccess', _7 => _7.stack, 'optionalAccess', _8 => _8.match, 'call', _9 => _9('JSON-RPC error')])) ||
924
974
  (error && error.toString().match('undefined'))
925
975
  ) {
926
976
  setTimeout(()=>{
@@ -962,8 +1012,8 @@ const submitContractInteraction$1 = async ({ transaction, wallet })=>{
962
1012
  to: transaction.to,
963
1013
  value: transaction.value ? ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
964
1014
  data: await transaction.getData(),
965
- gas: _optionalChain$3([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
966
- gasLimit: _optionalChain$3([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
1015
+ gas: _optionalChain$4([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
1016
+ gasLimit: _optionalChain$4([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
967
1017
  gasPrice: gasPrice.toHexString(),
968
1018
  nonce: ethers.utils.hexlify(transaction.nonce),
969
1019
  }]
@@ -990,16 +1040,16 @@ const submitSimpleTransfer$1 = async ({ transaction, wallet })=>{
990
1040
  to: transaction.to,
991
1041
  value: transaction.value ? ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
992
1042
  data: '0x0',
993
- gas: _optionalChain$3([gas, 'optionalAccess', _14 => _14.toHexString, 'call', _15 => _15()]),
994
- gasLimit: _optionalChain$3([gas, 'optionalAccess', _16 => _16.toHexString, 'call', _17 => _17()]),
995
- gasPrice: _optionalChain$3([gasPrice, 'optionalAccess', _18 => _18.toHexString, 'call', _19 => _19()]),
1043
+ gas: _optionalChain$4([gas, 'optionalAccess', _14 => _14.toHexString, 'call', _15 => _15()]),
1044
+ gasLimit: _optionalChain$4([gas, 'optionalAccess', _16 => _16.toHexString, 'call', _17 => _17()]),
1045
+ gasPrice: _optionalChain$4([gasPrice, 'optionalAccess', _18 => _18.toHexString, 'call', _19 => _19()]),
996
1046
  nonce: ethers.utils.hexlify(transaction.nonce)
997
1047
  }]
998
1048
  }
999
1049
  }).catch((e)=>{console.log('ERROR', e);})
1000
1050
  };
1001
1051
 
1002
- 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; }
1052
+ 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
1053
 
1004
1054
  const KEY = 'depay:wallets:wc2';
1005
1055
 
@@ -1052,7 +1102,7 @@ const getWalletConnectV2Config = (walletName)=>{
1052
1102
  optionalNamespaces['eip155'] = {
1053
1103
  chains: supported$1.evm.map((blockchain)=>`${Blockchains[blockchain].namespace}:${Blockchains[blockchain].networkId}`),
1054
1104
  };
1055
- if(_optionalChain$2([optionalNamespaces, 'optionalAccess', _ => _.eip155]) && _optionalChain$2([optionalNamespaces, 'optionalAccess', _2 => _2.eip155, 'optionalAccess', _3 => _3.chains, 'optionalAccess', _4 => _4.length])) {
1105
+ if(_optionalChain$3([optionalNamespaces, 'optionalAccess', _ => _.eip155]) && _optionalChain$3([optionalNamespaces, 'optionalAccess', _2 => _2.eip155, 'optionalAccess', _3 => _3.chains, 'optionalAccess', _4 => _4.length])) {
1056
1106
  optionalNamespaces['eip155'].methods = methods;
1057
1107
  optionalNamespaces['eip155'].events = events;
1058
1108
  }
@@ -1067,9 +1117,9 @@ const getSignClient = ()=>{
1067
1117
  projectId: localStorage[KEY+":projectId"],
1068
1118
  metadata: {
1069
1119
  name: document.title || 'dApp',
1070
- description: _optionalChain$2([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('meta[name="description"]'), 'optionalAccess', _7 => _7.getAttribute, 'call', _8 => _8('content')]) || document.title || 'dApp',
1120
+ 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
1121
  url: location.href,
1072
- icons: [_optionalChain$2([document, 'access', _9 => _9.querySelector, 'call', _10 => _10("link[rel~='icon'], link[rel~='shortcut icon']"), 'optionalAccess', _11 => _11.href]) || `${location.origin}/favicon.ico`]
1122
+ 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
1123
  }
1074
1124
  });
1075
1125
  resolve(signClient);
@@ -1087,7 +1137,7 @@ class WalletConnectV2 {
1087
1137
  };}
1088
1138
 
1089
1139
  static __initStatic2() {this.isAvailable = async(options)=>{
1090
- return !! await getLastSession(_optionalChain$2([options, 'optionalAccess', _13 => _13.walletName]))
1140
+ return !! await getLastSession(_optionalChain$3([options, 'optionalAccess', _13 => _13.walletName]))
1091
1141
  };}
1092
1142
 
1093
1143
  constructor() {
@@ -1102,17 +1152,17 @@ class WalletConnectV2 {
1102
1152
  }
1103
1153
 
1104
1154
  async account() {
1105
- if(_optionalChain$2([this, 'access', _14 => _14.session, 'optionalAccess', _15 => _15.namespaces, 'optionalAccess', _16 => _16.eip155, 'optionalAccess', _17 => _17.accounts, 'optionalAccess', _18 => _18.length])) {
1155
+ 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
1156
  return this.session.namespaces.eip155.accounts[0].split(':')[2]
1107
1157
  }
1108
1158
  }
1109
1159
 
1110
1160
  async setSessionBlockchains() {
1111
- if(!this.session || (!_optionalChain$2([this, 'access', _19 => _19.session, 'optionalAccess', _20 => _20.namespaces, 'optionalAccess', _21 => _21.eip155]) && !_optionalChain$2([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.optionalNamespaces, 'optionalAccess', _24 => _24.eip155]))) { return }
1161
+ 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
1162
  if(this.session.namespaces.eip155.chains) {
1113
- this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$2([Blockchains, 'access', _25 => _25.findByNetworkId, 'call', _26 => _26(chainIdentifier.split(':')[1]), 'optionalAccess', _27 => _27.name])).filter(Boolean);
1163
+ 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
1164
  } else if(this.session.namespaces.eip155.accounts) {
1115
- this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$2([Blockchains, 'access', _28 => _28.findByNetworkId, 'call', _29 => _29(accountIdentifier.split(':')[1]), 'optionalAccess', _30 => _30.name])).filter(Boolean);
1165
+ 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
1166
  }
1117
1167
  }
1118
1168
 
@@ -1122,13 +1172,13 @@ class WalletConnectV2 {
1122
1172
 
1123
1173
  try {
1124
1174
 
1125
- this.walletName = _optionalChain$2([options, 'optionalAccess', _31 => _31.name]);
1175
+ this.walletName = _optionalChain$3([options, 'optionalAccess', _31 => _31.name]);
1126
1176
 
1127
1177
  // delete localStorage[`wc@2:client:0.3//session`] // DELETE WC SESSIONS
1128
1178
  this.signClient = await getSignClient();
1129
1179
 
1130
1180
  this.signClient.on("session_delete", (session)=> {
1131
- if(_optionalChain$2([session, 'optionalAccess', _32 => _32.topic]) === _optionalChain$2([this, 'access', _33 => _33.session, 'optionalAccess', _34 => _34.topic])) {
1181
+ if(_optionalChain$3([session, 'optionalAccess', _32 => _32.topic]) === _optionalChain$3([this, 'access', _33 => _33.session, 'optionalAccess', _34 => _34.topic])) {
1132
1182
  localStorage[KEY+':name'] = undefined;
1133
1183
  localStorage[KEY+':logo'] = undefined;
1134
1184
  this.signClient = undefined;
@@ -1137,14 +1187,14 @@ class WalletConnectV2 {
1137
1187
  });
1138
1188
 
1139
1189
  this.signClient.on("session_update", async(session)=> {
1140
- if(_optionalChain$2([session, 'optionalAccess', _35 => _35.topic]) === _optionalChain$2([this, 'access', _36 => _36.session, 'optionalAccess', _37 => _37.topic])) {
1190
+ if(_optionalChain$3([session, 'optionalAccess', _35 => _35.topic]) === _optionalChain$3([this, 'access', _36 => _36.session, 'optionalAccess', _37 => _37.topic])) {
1141
1191
  this.session = this.signClient.session.get(session.topic);
1142
1192
  await this.setSessionBlockchains();
1143
1193
  }
1144
1194
  });
1145
1195
 
1146
1196
  this.signClient.on("session_event", (event)=> {
1147
- if(_optionalChain$2([event, 'optionalAccess', _38 => _38.topic]) === _optionalChain$2([this, 'access', _39 => _39.session, 'optionalAccess', _40 => _40.topic])) {}
1197
+ if(_optionalChain$3([event, 'optionalAccess', _38 => _38.topic]) === _optionalChain$3([this, 'access', _39 => _39.session, 'optionalAccess', _40 => _40.topic])) {}
1148
1198
  });
1149
1199
 
1150
1200
  const connectWallet = async()=>{
@@ -1155,24 +1205,24 @@ class WalletConnectV2 {
1155
1205
  await new Promise(resolve=>setTimeout(resolve, 500)); // to prevent race condition within WalletConnect
1156
1206
  };
1157
1207
 
1158
- const lastSession = _optionalChain$2([this, 'optionalAccess', _41 => _41.walletName, 'optionalAccess', _42 => _42.length]) ? await getLastSession(this.walletName) : undefined;
1208
+ const lastSession = _optionalChain$3([this, 'optionalAccess', _41 => _41.walletName, 'optionalAccess', _42 => _42.length]) ? await getLastSession(this.walletName) : undefined;
1159
1209
  if(lastSession) {
1160
1210
  this.session = lastSession;
1161
1211
  } else {
1162
1212
  await connectWallet();
1163
1213
  }
1164
1214
 
1165
- let meta = _optionalChain$2([this, 'access', _43 => _43.session, 'optionalAccess', _44 => _44.peer, 'optionalAccess', _45 => _45.metadata]);
1215
+ let meta = _optionalChain$3([this, 'access', _43 => _43.session, 'optionalAccess', _44 => _44.peer, 'optionalAccess', _45 => _45.metadata]);
1166
1216
  if(meta && meta.name) {
1167
1217
  this.name = meta.name;
1168
1218
  localStorage[KEY+':name'] = meta.name;
1169
- if(_optionalChain$2([meta, 'optionalAccess', _46 => _46.icons]) && meta.icons.length) {
1219
+ if(_optionalChain$3([meta, 'optionalAccess', _46 => _46.icons]) && meta.icons.length) {
1170
1220
  this.logo = meta.icons[0];
1171
1221
  localStorage[KEY+':logo'] = this.logo;
1172
1222
  }
1173
1223
  }
1174
- if(_optionalChain$2([options, 'optionalAccess', _47 => _47.name])) { localStorage[KEY+':name'] = this.name = options.name; }
1175
- if(_optionalChain$2([options, 'optionalAccess', _48 => _48.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
1224
+ if(_optionalChain$3([options, 'optionalAccess', _47 => _47.name])) { localStorage[KEY+':name'] = this.name = options.name; }
1225
+ if(_optionalChain$3([options, 'optionalAccess', _48 => _48.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
1176
1226
 
1177
1227
  await this.setSessionBlockchains();
1178
1228
 
@@ -1212,7 +1262,7 @@ class WalletConnectV2 {
1212
1262
  switch (event) {
1213
1263
  case 'account':
1214
1264
  internalCallback = async(event)=> {
1215
- if(_optionalChain$2([event, 'optionalAccess', _49 => _49.topic]) === _optionalChain$2([this, 'access', _50 => _50.session, 'optionalAccess', _51 => _51.topic]) && event.params.event.name === 'accountsChanged') {
1265
+ 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
1266
  callback(await this.account());
1217
1267
  }
1218
1268
  };
@@ -1272,7 +1322,7 @@ class WalletConnectV2 {
1272
1322
 
1273
1323
  WalletConnectV2.getConnectedInstance = getConnectedInstance$1;
1274
1324
 
1275
- 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; }
1325
+ 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
1326
  const sendTransaction = async ({ transaction, wallet })=> {
1277
1327
  transaction = new Transaction(transaction);
1278
1328
  if((await wallet.connectedTo(transaction.blockchain)) == false) {
@@ -1324,7 +1374,7 @@ const retrieveConfirmedTransaction = (sentTransaction)=>{
1324
1374
 
1325
1375
  sentTransaction.wait(1).then(resolve).catch((error)=>{
1326
1376
  if(
1327
- (error && _optionalChain$1([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
1377
+ (error && _optionalChain$2([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
1328
1378
  (error && error.toString().match('undefined'))
1329
1379
  ) {
1330
1380
  setTimeout(()=>{
@@ -1338,7 +1388,7 @@ const retrieveConfirmedTransaction = (sentTransaction)=>{
1338
1388
  });
1339
1389
  } catch(error) {
1340
1390
  if(
1341
- (error && _optionalChain$1([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
1391
+ (error && _optionalChain$2([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
1342
1392
  (error && error.toString().match('undefined'))
1343
1393
  ) {
1344
1394
  setTimeout(()=>{
@@ -1383,7 +1433,7 @@ const submitSimpleTransfer = ({ transaction, signer })=>{
1383
1433
  })
1384
1434
  };
1385
1435
 
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; }
1436
+ 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
1437
 
1388
1438
  const getConnectedInstance = ()=>{
1389
1439
  return window._connectedWalletLinkInstance
@@ -1437,10 +1487,10 @@ class WalletLink {
1437
1487
  let connect = (options && options.connect) ? options.connect : ({uri})=>{};
1438
1488
  await connect({ uri: this.connector.qrUrl });
1439
1489
 
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;')]);
1490
+ _optionalChain$1([document, 'access', _ => _.querySelector, 'call', _2 => _2('.-cbwsdk-css-reset'), 'optionalAccess', _3 => _3.setAttribute, 'call', _4 => _4('style', 'display: none;')]);
1491
+ _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
1492
  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])){
1493
+ 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
1494
  this.connector._relay.ui.linkFlow.isOpen = false;
1445
1495
  }
1446
1496
  }, 10);
@@ -1565,6 +1615,7 @@ var wallets = {
1565
1615
  TrustEVM,
1566
1616
  Rabby,
1567
1617
  Uniswap,
1618
+ Rainbow,
1568
1619
  BraveEVM,
1569
1620
  Opera,
1570
1621
  MagicEdenEVM,
@@ -1582,10 +1633,22 @@ var wallets = {
1582
1633
  WalletLink
1583
1634
  };
1584
1635
 
1636
+ 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
1637
  const getWallets = async(args)=>{
1586
1638
 
1587
1639
  let drip = (args && typeof args.drip === 'function') ? args.drip : undefined;
1588
1640
 
1641
+ // eip6963
1642
+ window['_eip6963Providers'] = {};
1643
+ const announceProvider = (event)=>{
1644
+ if(_optionalChain([event, 'optionalAccess', _ => _.detail, 'optionalAccess', _2 => _2.info, 'optionalAccess', _3 => _3.uuid])) {
1645
+ window['_eip6963Providers'][_optionalChain([event, 'optionalAccess', _4 => _4.detail, 'optionalAccess', _5 => _5.info, 'optionalAccess', _6 => _6.uuid])] = event.detail.provider;
1646
+ }
1647
+ };
1648
+ window.addEventListener("eip6963:announceProvider", announceProvider);
1649
+ window.dispatchEvent(new Event("eip6963:requestProvider"));
1650
+ window.removeEventListener("eip6963:announceProvider", announceProvider);
1651
+
1589
1652
  let availableWallets = await Promise.all(
1590
1653
 
1591
1654
  Object.keys(wallets).map(
@@ -1620,6 +1683,7 @@ const supported = [
1620
1683
  wallets.TrustEVM,
1621
1684
  wallets.Rabby,
1622
1685
  wallets.Uniswap,
1686
+ wallets.Rainbow,
1623
1687
  wallets.PhantomEVM,
1624
1688
  wallets.BraveEVM,
1625
1689
  wallets.OKXEvm,