@depay/web3-wallets-evm 16.0.5 → 16.0.7

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.js CHANGED
@@ -6,7 +6,7 @@ import { WalletConnectClient } from '@depay/walletconnect-v1';
6
6
  import { SignClient } from '@depay/walletconnect-v2';
7
7
  import { CoinbaseWalletSDK } from '@depay/coinbase-wallet-sdk';
8
8
 
9
- 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; }
9
+ 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; }
10
10
  class Transaction {
11
11
 
12
12
  constructor({
@@ -31,7 +31,7 @@ class Transaction {
31
31
  this.to = (to && to.match('0x')) ? ethers.utils.getAddress(to) : to;
32
32
 
33
33
  // optional
34
- this.value = _optionalChain$m([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
34
+ this.value = _optionalChain$n([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
35
35
  this.api = api;
36
36
  this.method = method;
37
37
  this.params = params;
@@ -71,7 +71,7 @@ class Transaction {
71
71
  }
72
72
 
73
73
  getParamType(param) {
74
- if(_optionalChain$m([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
74
+ if(_optionalChain$n([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
75
75
  return `(${param.components.map((param)=>this.getParamType(param)).join(',')})`
76
76
  } else {
77
77
  return param.type
@@ -144,7 +144,7 @@ class Transaction {
144
144
  }
145
145
  }
146
146
 
147
- 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; }
147
+ 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; }
148
148
 
149
149
  const POLL_SPEED = 500; // 0.5 seconds
150
150
  const MAX_POLLS = 240; // 120 seconds
@@ -165,14 +165,14 @@ const sendTransaction$4 = async ({ transaction, wallet })=> {
165
165
 
166
166
  const provider = await getProvider(transaction.blockchain);
167
167
  const { value } = await provider.getSignatureStatus(signature);
168
- const confirmationStatus = _optionalChain$l([value, 'optionalAccess', _ => _.confirmationStatus]);
168
+ const confirmationStatus = _optionalChain$m([value, 'optionalAccess', _ => _.confirmationStatus]);
169
169
  if(confirmationStatus) {
170
170
  const hasReachedSufficientCommitment = confirmationStatus === 'confirmed' || confirmationStatus === 'finalized';
171
171
  if (hasReachedSufficientCommitment) {
172
172
  if(value.err) {
173
173
  transaction._failed = true;
174
174
  const confirmedTransaction = await provider.getConfirmedTransaction(signature);
175
- const failedReason = _optionalChain$l([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
175
+ const failedReason = _optionalChain$m([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
176
176
  if(transaction.failed) transaction.failed(transaction, failedReason);
177
177
  } else {
178
178
  transaction._succeeded = true;
@@ -263,7 +263,7 @@ let supported$1 = ['ethereum', 'bsc', 'polygon', 'solana', 'fantom', 'arbitrum',
263
263
  supported$1.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism'];
264
264
  supported$1.solana = ['solana'];
265
265
 
266
- 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; }
266
+ 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; }
267
267
  class WindowSolana {
268
268
 
269
269
  static __initStatic() {this.info = {
@@ -274,9 +274,14 @@ class WindowSolana {
274
274
 
275
275
  static __initStatic2() {this.isAvailable = async()=>{
276
276
  return (
277
- _optionalChain$k([window, 'optionalAccess', _2 => _2.solana]) &&
278
- !(window.phantom && !window.glow && !window.solana.isGlow) &&
277
+ _optionalChain$l([window, 'optionalAccess', _5 => _5.solana]) &&
278
+ // not Phantom
279
+ !(window.phantom && !window.glow && !window.solana.isGlow && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
280
+ // not Coin98
279
281
  !window.coin98 &&
282
+ // not BitKeep
283
+ !(_optionalChain$l([window, 'optionalAccess', _6 => _6.solana]) && _optionalChain$l([window, 'optionalAccess', _7 => _7.solana, 'access', _8 => _8.isBitKeep])) &&
284
+ // not Glow
280
285
  !window.solana.isGlow
281
286
  )
282
287
  };}
@@ -324,7 +329,7 @@ class WindowSolana {
324
329
  let internalCallback;
325
330
  switch (event) {
326
331
  case 'account':
327
- internalCallback = (publicKey) => callback(_optionalChain$k([publicKey, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]));
332
+ internalCallback = (publicKey) => callback(_optionalChain$l([publicKey, 'optionalAccess', _9 => _9.toString, 'call', _10 => _10()]));
328
333
  this.getProvider().on('accountChanged', internalCallback);
329
334
  break
330
335
  }
@@ -377,7 +382,7 @@ class WindowSolana {
377
382
  }
378
383
  } WindowSolana.__initStatic(); WindowSolana.__initStatic2();
379
384
 
380
- 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; }
385
+ 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; }
381
386
  class Backpack extends WindowSolana {
382
387
 
383
388
  static __initStatic() {this.info = {
@@ -388,7 +393,7 @@ class Backpack extends WindowSolana {
388
393
 
389
394
  static __initStatic2() {this.isAvailable = async()=>{
390
395
  return (
391
- _optionalChain$j([window, 'optionalAccess', _2 => _2.backpack]) &&
396
+ _optionalChain$k([window, 'optionalAccess', _2 => _2.backpack]) &&
392
397
  window.backpack.isBackpack
393
398
  )
394
399
  };}
@@ -483,7 +488,7 @@ const submitSimpleTransfer$3 = ({ transaction, signer })=>{
483
488
  })
484
489
  };
485
490
 
486
- 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; }
491
+ 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; }
487
492
  class WindowEthereum {
488
493
 
489
494
  static __initStatic() {this.info = {
@@ -494,18 +499,29 @@ class WindowEthereum {
494
499
 
495
500
  static __initStatic2() {this.isAvailable = async()=>{
496
501
  return (
497
- _optionalChain$i([window, 'optionalAccess', _25 => _25.ethereum]) &&
498
- Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length != 1 && // MetaMask
499
- !_optionalChain$i([window, 'optionalAccess', _26 => _26.coin98]) && // Coin98
500
- !(_optionalChain$i([window, 'optionalAccess', _27 => _27.ethereum, 'optionalAccess', _28 => _28.isTrust]) || _optionalChain$i([window, 'optionalAccess', _29 => _29.ethereum, 'optionalAccess', _30 => _30.isTrustWallet])) && // Trust Wallet
501
- !_optionalChain$i([window, 'optionalAccess', _31 => _31.ethereum, 'optionalAccess', _32 => _32.isDeficonnectProvider]) && // crypto.com
502
- !_optionalChain$i([window, 'optionalAccess', _33 => _33.ethereum, 'optionalAccess', _34 => _34.isHyperPay]) && // isHyperPay
503
- !_optionalChain$i([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isPhantom]) && // Phantom
504
- !_optionalChain$i([window, 'optionalAccess', _37 => _37.solana, 'optionalAccess', _38 => _38.isPhantom]) && // Phantom
505
- !_optionalChain$i([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isRabby]) && // Rabby
506
- !_optionalChain$i([window, 'optionalAccess', _41 => _41.backpack, 'optionalAccess', _42 => _42.isBackpack]) && // Backpack
507
- !_optionalChain$i([window, 'optionalAccess', _43 => _43.ethereum, 'optionalAccess', _44 => _44.isTokenPocket]) && // TokenPocket
508
- !(_optionalChain$i([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isCoinbaseWallet]) || _optionalChain$i([window, 'optionalAccess', _47 => _47.ethereum, 'optionalAccess', _48 => _48.isWalletLink]))
502
+ _optionalChain$j([window, 'optionalAccess', _27 => _27.ethereum]) &&
503
+ // not MetaMask
504
+ !(_optionalChain$j([window, 'optionalAccess', _28 => _28.ethereum, 'optionalAccess', _29 => _29.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
505
+ // not Coin98
506
+ !_optionalChain$j([window, 'optionalAccess', _30 => _30.coin98]) &&
507
+ // not Trust Wallet
508
+ !(_optionalChain$j([window, 'optionalAccess', _31 => _31.ethereum, 'optionalAccess', _32 => _32.isTrust]) || _optionalChain$j([window, 'optionalAccess', _33 => _33.ethereum, 'optionalAccess', _34 => _34.isTrustWallet])) &&
509
+ // not crypto.com
510
+ !_optionalChain$j([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isDeficonnectProvider]) &&
511
+ // not HyperPay
512
+ !_optionalChain$j([window, 'optionalAccess', _37 => _37.ethereum, 'optionalAccess', _38 => _38.isHyperPay]) &&
513
+ // not Phantom
514
+ !(window.phantom && !window.glow && !_optionalChain$j([window, 'optionalAccess', _39 => _39.solana, 'optionalAccess', _40 => _40.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
515
+ // not Rabby
516
+ !_optionalChain$j([window, 'optionalAccess', _41 => _41.ethereum, 'optionalAccess', _42 => _42.isRabby]) &&
517
+ // not Backpack
518
+ !_optionalChain$j([window, 'optionalAccess', _43 => _43.backpack, 'optionalAccess', _44 => _44.isBackpack]) &&
519
+ // not TokenPocket
520
+ !_optionalChain$j([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isTokenPocket]) &&
521
+ // not BitKeep
522
+ !_optionalChain$j([window, 'optionalAccess', _47 => _47.ethereum, 'optionalAccess', _48 => _48.isBitKeep]) &&
523
+ // not Coinbase
524
+ !(_optionalChain$j([window, 'optionalAccess', _49 => _49.ethereum, 'optionalAccess', _50 => _50.isCoinbaseWallet]) || _optionalChain$j([window, 'optionalAccess', _51 => _51.ethereum, 'optionalAccess', _52 => _52.isWalletLink]))
509
525
  )
510
526
  };}
511
527
 
@@ -631,7 +647,7 @@ class WindowEthereum {
631
647
  }
632
648
  } WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
633
649
 
634
- 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; }
650
+ 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; }
635
651
  class Binance extends WindowEthereum {
636
652
 
637
653
  static __initStatic() {this.info = {
@@ -641,7 +657,7 @@ class Binance extends WindowEthereum {
641
657
  };}
642
658
 
643
659
  static __initStatic2() {this.isAvailable = async()=>{
644
- return _optionalChain$h([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
660
+ return _optionalChain$i([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
645
661
  !window.coin98
646
662
  };}
647
663
 
@@ -649,7 +665,7 @@ class Binance extends WindowEthereum {
649
665
 
650
666
  } Binance.__initStatic(); Binance.__initStatic2();
651
667
 
652
- 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; }
668
+ 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; }
653
669
  class Brave extends WindowEthereum {
654
670
 
655
671
  static __initStatic() {this.info = {
@@ -658,10 +674,10 @@ class Brave extends WindowEthereum {
658
674
  blockchains: supported$1.evm
659
675
  };}
660
676
 
661
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
677
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
662
678
  } Brave.__initStatic(); Brave.__initStatic2();
663
679
 
664
- 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; }
680
+ 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; }
665
681
  class Coin98 extends WindowEthereum {
666
682
 
667
683
  static __initStatic() {this.info = {
@@ -670,10 +686,10 @@ class Coin98 extends WindowEthereum {
670
686
  blockchains: supported$1.evm
671
687
  };}
672
688
 
673
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _2 => _2.coin98]) };}
689
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _2 => _2.coin98]) };}
674
690
  } Coin98.__initStatic(); Coin98.__initStatic2();
675
691
 
676
- 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; }
692
+ 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; }
677
693
  class Coinbase extends WindowEthereum {
678
694
 
679
695
  static __initStatic() {this.info = {
@@ -682,10 +698,10 @@ class Coinbase extends WindowEthereum {
682
698
  blockchains: supported$1.evm
683
699
  };}
684
700
 
685
- static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$e([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isCoinbaseWallet]) || _optionalChain$e([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isWalletLink])) };}
701
+ static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$f([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isCoinbaseWallet]) || _optionalChain$f([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isWalletLink])) };}
686
702
  } Coinbase.__initStatic(); Coinbase.__initStatic2();
687
703
 
688
- 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; }
704
+ 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; }
689
705
  class CryptoCom extends WindowEthereum {
690
706
 
691
707
  static __initStatic() {this.info = {
@@ -694,7 +710,7 @@ class CryptoCom extends WindowEthereum {
694
710
  blockchains: supported$1.evm
695
711
  };}
696
712
 
697
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
713
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
698
714
  } CryptoCom.__initStatic(); CryptoCom.__initStatic2();
699
715
 
700
716
  class Glow extends WindowSolana {
@@ -713,7 +729,7 @@ class Glow extends WindowSolana {
713
729
  };}
714
730
  } Glow.__initStatic(); Glow.__initStatic2();
715
731
 
716
- 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; }
732
+ 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; }
717
733
  class HyperPay extends WindowEthereum {
718
734
 
719
735
  static __initStatic() {this.info = {
@@ -722,10 +738,10 @@ class HyperPay extends WindowEthereum {
722
738
  blockchains: supported$1.evm
723
739
  };}
724
740
 
725
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
741
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
726
742
  } HyperPay.__initStatic(); HyperPay.__initStatic2();
727
743
 
728
- 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; }
744
+ 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; }
729
745
  class MetaMask extends WindowEthereum {
730
746
 
731
747
  static __initStatic() {this.info = {
@@ -736,13 +752,13 @@ class MetaMask extends WindowEthereum {
736
752
 
737
753
  static __initStatic2() {this.isAvailable = async()=>{
738
754
  return(
739
- _optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMetaMask]) &&
755
+ _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMetaMask]) &&
740
756
  Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
741
757
  )
742
758
  };}
743
759
  } MetaMask.__initStatic(); MetaMask.__initStatic2();
744
760
 
745
- 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; }
761
+ 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; }
746
762
  class Opera extends WindowEthereum {
747
763
 
748
764
  static __initStatic() {this.info = {
@@ -751,9 +767,10 @@ class Opera extends WindowEthereum {
751
767
  blockchains: supported$1.evm
752
768
  };}
753
769
 
754
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$a([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
770
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
755
771
  } Opera.__initStatic(); Opera.__initStatic2();
756
772
 
773
+ 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; }
757
774
  class Phantom extends WindowSolana {
758
775
 
759
776
  static __initStatic() {this.info = {
@@ -764,7 +781,10 @@ class Phantom extends WindowSolana {
764
781
 
765
782
  static __initStatic2() {this.isAvailable = async()=>{
766
783
  return (
767
- window.phantom && !window.glow && !window.solana.isGlow
784
+ window.phantom &&
785
+ !window.glow &&
786
+ !_optionalChain$a([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isGlow]) &&
787
+ !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])
768
788
  )
769
789
  };}
770
790
  } Phantom.__initStatic(); Phantom.__initStatic2();
@@ -1622,6 +1642,36 @@ const CONFIGURATIONS = {
1622
1642
  ]
1623
1643
  },
1624
1644
 
1645
+ "BitGet (BitKeep)": {
1646
+ methods: [
1647
+ "eth_sendTransaction",
1648
+ "personal_sign",
1649
+ "eth_signTypedData",
1650
+ "eth_signTypedData_v4",
1651
+ ],
1652
+ requiredNamespaces: {
1653
+ eip155: {
1654
+ chains: ['ethereum', 'bsc', 'polygon', 'arbitrum', 'optimism'].map((blockchainName)=>`eip155:${Blockchains[blockchainName].networkId}`)
1655
+ }
1656
+ },
1657
+ optionalNamespaces: {},
1658
+ },
1659
+
1660
+ "BitGet": {
1661
+ methods: [
1662
+ "eth_sendTransaction",
1663
+ "personal_sign",
1664
+ "eth_signTypedData",
1665
+ "eth_signTypedData_v4",
1666
+ ],
1667
+ requiredNamespaces: {
1668
+ eip155: {
1669
+ chains: ['ethereum', 'bsc', 'polygon', 'arbitrum', 'optimism'].map((blockchainName)=>`eip155:${Blockchains[blockchainName].networkId}`)
1670
+ }
1671
+ },
1672
+ optionalNamespaces: {},
1673
+ },
1674
+
1625
1675
  "Uniswap Wallet": {
1626
1676
  methods: [
1627
1677
  "eth_sendTransaction",
@@ -1756,6 +1806,7 @@ class WalletConnectV2 {
1756
1806
  }
1757
1807
 
1758
1808
  async setSessionBlockchains() {
1809
+ if(!this.session) { return }
1759
1810
  if(_optionalChain$1([CONFIGURATIONS, 'access', _27 => _27[this.walletName], 'optionalAccess', _28 => _28.methods, 'optionalAccess', _29 => _29.includes, 'call', _30 => _30('wallet_switchEthereumChain')])) {
1760
1811
  this.blockchains = [this.session.namespaces.eip155.chains[this.session.namespaces.eip155.chains.length-1]].map((chainIdentifier)=>_optionalChain$1([Blockchains, 'access', _31 => _31.findByNetworkId, 'call', _32 => _32(chainIdentifier.split(':')[1]), 'optionalAccess', _33 => _33.name])).filter(Boolean);
1761
1812
  } else if(this.session.namespaces.eip155.chains) {