@depay/web3-wallets-evm 16.5.4 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@depay/web3-client'), require('@depay/web3-blockchains'), require('@depay/solana-web3.js'), require('ethers'), require('@depay/walletconnect-v1'), require('@depay/walletconnect-v2'), require('@depay/coinbase-wallet-sdk')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@depay/web3-client', '@depay/web3-blockchains', '@depay/solana-web3.js', 'ethers', '@depay/walletconnect-v1', '@depay/walletconnect-v2', '@depay/coinbase-wallet-sdk'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Web3Wallets = {}, global.Web3Client, global.Web3Blockchains, global.SolanaWeb3js, global.ethers, global.WalletConnect, global.WalletConnectV2, global.CoinbaseWalletSdk));
5
- }(this, (function (exports, web3Client, Blockchains, solanaWeb3_js, ethers, walletconnectV1, walletconnectV2, coinbaseWalletSdk) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@depay/web3-client'), require('@depay/web3-blockchains'), require('@depay/solana-web3.js'), require('ethers'), require('@depay/walletconnect-v2'), require('@depay/coinbase-wallet-sdk')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@depay/web3-client', '@depay/web3-blockchains', '@depay/solana-web3.js', 'ethers', '@depay/walletconnect-v2', '@depay/coinbase-wallet-sdk'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Web3Wallets = {}, global.Web3Client, global.Web3Blockchains, global.SolanaWeb3js, global.ethers, global.WalletConnectV2, global.CoinbaseWalletSdk));
5
+ }(this, (function (exports, web3Client, Blockchains, solanaWeb3_js, ethers, walletconnectV2, coinbaseWalletSdk) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
9
  var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains);
10
10
 
11
- function _optionalChain$z(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$x(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 @@
33
33
  this.to = (to && to.match('0x')) ? ethers.ethers.utils.getAddress(to) : to;
34
34
 
35
35
  // optional
36
- this.value = _optionalChain$z([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
36
+ this.value = _optionalChain$x([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 @@
73
73
  }
74
74
 
75
75
  getParamType(param) {
76
- if(_optionalChain$z([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
76
+ if(_optionalChain$x([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,15 +146,15 @@
146
146
  }
147
147
  }
148
148
 
149
- function _optionalChain$y(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$w(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 POLL_SPEED = 500; // 0.5 seconds
152
152
  const MAX_POLLS = 240; // 120 seconds
153
153
 
154
- const sendTransaction$4 = async ({ transaction, wallet })=> {
154
+ const sendTransaction$3 = async ({ transaction, wallet })=> {
155
155
  transaction = new Transaction(transaction);
156
156
  await transaction.prepare({ wallet });
157
- await submit$4({ transaction, wallet }).then((signature)=>{
157
+ await submit$3({ transaction, wallet }).then((signature)=>{
158
158
  if(signature) {
159
159
  transaction.id = signature;
160
160
  transaction.url = Blockchains__default['default'].findByName(transaction.blockchain).explorerUrlFor({ transaction });
@@ -167,14 +167,14 @@
167
167
 
168
168
  const provider = await web3Client.getProvider(transaction.blockchain);
169
169
  const { value } = await provider.getSignatureStatus(signature);
170
- const confirmationStatus = _optionalChain$y([value, 'optionalAccess', _ => _.confirmationStatus]);
170
+ const confirmationStatus = _optionalChain$w([value, 'optionalAccess', _ => _.confirmationStatus]);
171
171
  if(confirmationStatus) {
172
172
  const hasReachedSufficientCommitment = confirmationStatus === 'confirmed' || confirmationStatus === 'finalized';
173
173
  if (hasReachedSufficientCommitment) {
174
174
  if(value.err) {
175
175
  transaction._failed = true;
176
176
  const confirmedTransaction = await provider.getConfirmedTransaction(signature);
177
- const failedReason = _optionalChain$y([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
177
+ const failedReason = _optionalChain$w([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
178
178
  if(transaction.failed) transaction.failed(transaction, failedReason);
179
179
  } else {
180
180
  transaction._succeeded = true;
@@ -191,7 +191,7 @@
191
191
  return transaction
192
192
  };
193
193
 
194
- const submit$4 = async({ transaction, wallet })=> {
194
+ const submit$3 = async({ transaction, wallet })=> {
195
195
 
196
196
  let result = await submitThroughWallet({ transaction, wallet });
197
197
 
@@ -217,11 +217,11 @@
217
217
  if(transaction.instructions) {
218
218
  return submitInstructions({ transaction, wallet })
219
219
  } else {
220
- return submitSimpleTransfer$4({ transaction, wallet })
220
+ return submitSimpleTransfer$3({ transaction, wallet })
221
221
  }
222
222
  };
223
223
 
224
- const submitSimpleTransfer$4 = async ({ transaction, wallet })=> {
224
+ const submitSimpleTransfer$3 = async ({ transaction, wallet })=> {
225
225
  let fromPubkey = new solanaWeb3_js.PublicKey(await wallet.account());
226
226
  let toPubkey = new solanaWeb3_js.PublicKey(transaction.to);
227
227
  const provider = await web3Client.getProvider(transaction.blockchain);
@@ -265,7 +265,7 @@
265
265
  supported$1.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
266
266
  supported$1.solana = ['solana'];
267
267
 
268
- function _optionalChain$x(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; }
268
+ function _optionalChain$v(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; }
269
269
  class WindowSolana {
270
270
 
271
271
  static __initStatic() {this.info = {
@@ -276,13 +276,13 @@
276
276
 
277
277
  static __initStatic2() {this.isAvailable = async()=>{
278
278
  return (
279
- _optionalChain$x([window, 'optionalAccess', _6 => _6.solana]) &&
279
+ _optionalChain$v([window, 'optionalAccess', _6 => _6.solana]) &&
280
280
  // not Phantom
281
281
  !(window.phantom && !window.glow && !window.solana.isGlow && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
282
282
  // not Coin98
283
283
  !window.coin98 &&
284
284
  // not BitKeep
285
- !(_optionalChain$x([window, 'optionalAccess', _7 => _7.solana]) && _optionalChain$x([window, 'optionalAccess', _8 => _8.solana, 'access', _9 => _9.isBitKeep])) &&
285
+ !(_optionalChain$v([window, 'optionalAccess', _7 => _7.solana]) && _optionalChain$v([window, 'optionalAccess', _8 => _8.solana, 'access', _9 => _9.isBitKeep])) &&
286
286
  // not Glow
287
287
  !window.solana.isGlow &&
288
288
  // not trust
@@ -290,7 +290,7 @@
290
290
  // Brave Wallet
291
291
  !window.solana.isBraveWallet &&
292
292
  // OKX Wallet
293
- !_optionalChain$x([window, 'optionalAccess', _10 => _10.okxwallet])
293
+ !_optionalChain$v([window, 'optionalAccess', _10 => _10.okxwallet])
294
294
  )
295
295
  };}
296
296
 
@@ -299,7 +299,7 @@
299
299
  this.logo = this.constructor.info.logo;
300
300
  this.blockchains = this.constructor.info.blockchains;
301
301
  this.sendTransaction = (transaction)=>{
302
- return sendTransaction$4({
302
+ return sendTransaction$3({
303
303
  wallet: this,
304
304
  transaction
305
305
  })
@@ -337,7 +337,7 @@
337
337
  let internalCallback;
338
338
  switch (event) {
339
339
  case 'account':
340
- internalCallback = (publicKey) => callback(_optionalChain$x([publicKey, 'optionalAccess', _11 => _11.toString, 'call', _12 => _12()]));
340
+ internalCallback = (publicKey) => callback(_optionalChain$v([publicKey, 'optionalAccess', _11 => _11.toString, 'call', _12 => _12()]));
341
341
  this.getProvider().on('accountChanged', internalCallback);
342
342
  break
343
343
  }
@@ -390,7 +390,7 @@
390
390
  }
391
391
  } WindowSolana.__initStatic(); WindowSolana.__initStatic2();
392
392
 
393
- function _optionalChain$w(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; }
393
+ function _optionalChain$u(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; }
394
394
 
395
395
  class Backpack extends WindowSolana {
396
396
 
@@ -402,7 +402,7 @@
402
402
 
403
403
  static __initStatic2() {this.isAvailable = async()=>{
404
404
  return (
405
- _optionalChain$w([window, 'optionalAccess', _2 => _2.backpack]) &&
405
+ _optionalChain$u([window, 'optionalAccess', _2 => _2.backpack]) &&
406
406
  window.backpack.isBackpack
407
407
  )
408
408
  };}
@@ -420,9 +420,9 @@
420
420
  }
421
421
  } Backpack.__initStatic(); Backpack.__initStatic2();
422
422
 
423
- function _optionalChain$v(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; }
423
+ function _optionalChain$t(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; }
424
424
 
425
- const sendTransaction$3 = async ({ transaction, wallet })=> {
425
+ const sendTransaction$2 = async ({ transaction, wallet })=> {
426
426
  transaction = new Transaction(transaction);
427
427
  if((await wallet.connectedTo(transaction.blockchain)) == false) {
428
428
  await wallet.switchTo(transaction.blockchain);
@@ -435,13 +435,13 @@
435
435
  transaction.nonce = transactionCount;
436
436
  let provider = new ethers.ethers.providers.Web3Provider(wallet.getProvider(), 'any');
437
437
  let signer = provider.getSigner(0);
438
- await submit$3({ transaction, provider, signer }).then((sentTransaction)=>{
438
+ await submit$2({ transaction, provider, signer }).then((sentTransaction)=>{
439
439
  if (sentTransaction) {
440
440
  transaction.id = sentTransaction.hash;
441
441
  transaction.nonce = sentTransaction.nonce || transactionCount;
442
442
  transaction.url = Blockchains__default['default'].findByName(transaction.blockchain).explorerUrlFor({ transaction });
443
443
  if (transaction.sent) transaction.sent(transaction);
444
- retrieveConfirmedTransaction$3(sentTransaction).then(() => {
444
+ retrieveConfirmedTransaction$2(sentTransaction).then(() => {
445
445
  transaction._succeeded = true;
446
446
  if (transaction.succeeded) transaction.succeeded(transaction);
447
447
  }).catch((error)=>{
@@ -469,17 +469,17 @@
469
469
  return transaction
470
470
  };
471
471
 
472
- const retrieveConfirmedTransaction$3 = (sentTransaction)=>{
472
+ const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
473
473
  return new Promise((resolve, reject)=>{
474
474
  try {
475
475
 
476
476
  sentTransaction.wait(1).then(resolve).catch((error)=>{
477
477
  if(
478
- (error && _optionalChain$v([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
478
+ (error && _optionalChain$t([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
479
479
  (error && error.toString().match('undefined'))
480
480
  ) {
481
481
  setTimeout(()=>{
482
- retrieveConfirmedTransaction$3(sentTransaction)
482
+ retrieveConfirmedTransaction$2(sentTransaction)
483
483
  .then(resolve)
484
484
  .catch(reject);
485
485
  }, 500);
@@ -489,11 +489,11 @@
489
489
  });
490
490
  } catch(error) {
491
491
  if(
492
- (error && _optionalChain$v([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
492
+ (error && _optionalChain$t([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
493
493
  (error && error.toString().match('undefined'))
494
494
  ) {
495
495
  setTimeout(()=>{
496
- retrieveConfirmedTransaction$3(sentTransaction)
496
+ retrieveConfirmedTransaction$2(sentTransaction)
497
497
  .then(resolve)
498
498
  .catch(reject);
499
499
  }, 500);
@@ -504,15 +504,15 @@
504
504
  })
505
505
  };
506
506
 
507
- const submit$3 = ({ transaction, provider, signer }) => {
507
+ const submit$2 = ({ transaction, provider, signer }) => {
508
508
  if(transaction.method) {
509
- return submitContractInteraction$3({ transaction, signer, provider })
509
+ return submitContractInteraction$2({ transaction, signer, provider })
510
510
  } else {
511
- return submitSimpleTransfer$3({ transaction, signer })
511
+ return submitSimpleTransfer$2({ transaction, signer })
512
512
  }
513
513
  };
514
514
 
515
- const submitContractInteraction$3 = async ({ transaction, signer, provider })=>{
515
+ const submitContractInteraction$2 = async ({ transaction, signer, provider })=>{
516
516
  let contract = new ethers.ethers.Contract(transaction.to, transaction.api, provider);
517
517
  let contractArguments = transaction.getContractArguments({ contract });
518
518
  let method = contract.connect(signer)[transaction.getMethodNameWithSignature()];
@@ -524,24 +524,24 @@
524
524
  if(contractArguments) {
525
525
  return await method(...contractArguments, {
526
526
  value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
527
- gasLimit: _optionalChain$v([gas, 'optionalAccess', _7 => _7.toHexString, 'call', _8 => _8()])
527
+ gasLimit: _optionalChain$t([gas, 'optionalAccess', _7 => _7.toHexString, 'call', _8 => _8()])
528
528
  })
529
529
  } else {
530
530
  return await method({
531
531
  value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
532
- gasLimit: _optionalChain$v([gas, 'optionalAccess', _9 => _9.toHexString, 'call', _10 => _10()])
532
+ gasLimit: _optionalChain$t([gas, 'optionalAccess', _9 => _9.toHexString, 'call', _10 => _10()])
533
533
  })
534
534
  }
535
535
  };
536
536
 
537
- const submitSimpleTransfer$3 = ({ transaction, signer })=>{
537
+ const submitSimpleTransfer$2 = ({ transaction, signer })=>{
538
538
  return signer.sendTransaction({
539
539
  to: transaction.to,
540
540
  value: Transaction.bigNumberify(transaction.value, transaction.blockchain)
541
541
  })
542
542
  };
543
543
 
544
- function _optionalChain$u(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$s(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; }
545
545
 
546
546
  class WindowEthereum {
547
547
 
@@ -553,35 +553,35 @@
553
553
 
554
554
  static __initStatic2() {this.isAvailable = async()=>{
555
555
  return (
556
- _optionalChain$u([window, 'optionalAccess', _34 => _34.ethereum]) &&
556
+ _optionalChain$s([window, 'optionalAccess', _34 => _34.ethereum]) &&
557
557
  // not MetaMask
558
- !(_optionalChain$u([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
558
+ !(_optionalChain$s([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
559
559
  // not Coin98
560
- !_optionalChain$u([window, 'optionalAccess', _37 => _37.coin98]) &&
560
+ !_optionalChain$s([window, 'optionalAccess', _37 => _37.coin98]) &&
561
561
  // not Trust Wallet
562
- !(_optionalChain$u([window, 'optionalAccess', _38 => _38.ethereum, 'optionalAccess', _39 => _39.isTrust]) || _optionalChain$u([window, 'optionalAccess', _40 => _40.ethereum, 'optionalAccess', _41 => _41.isTrustWallet])) &&
562
+ !(_optionalChain$s([window, 'optionalAccess', _38 => _38.ethereum, 'optionalAccess', _39 => _39.isTrust]) || _optionalChain$s([window, 'optionalAccess', _40 => _40.ethereum, 'optionalAccess', _41 => _41.isTrustWallet])) &&
563
563
  // not crypto.com
564
- !_optionalChain$u([window, 'optionalAccess', _42 => _42.ethereum, 'optionalAccess', _43 => _43.isDeficonnectProvider]) &&
564
+ !_optionalChain$s([window, 'optionalAccess', _42 => _42.ethereum, 'optionalAccess', _43 => _43.isDeficonnectProvider]) &&
565
565
  // not HyperPay
566
- !_optionalChain$u([window, 'optionalAccess', _44 => _44.ethereum, 'optionalAccess', _45 => _45.isHyperPay]) &&
566
+ !_optionalChain$s([window, 'optionalAccess', _44 => _44.ethereum, 'optionalAccess', _45 => _45.isHyperPay]) &&
567
567
  // not Phantom
568
- !(window.phantom && !window.glow && !_optionalChain$u([window, 'optionalAccess', _46 => _46.solana, 'optionalAccess', _47 => _47.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
568
+ !(window.phantom && !window.glow && !_optionalChain$s([window, 'optionalAccess', _46 => _46.solana, 'optionalAccess', _47 => _47.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
569
569
  // not Rabby
570
- !_optionalChain$u([window, 'optionalAccess', _48 => _48.ethereum, 'optionalAccess', _49 => _49.isRabby]) &&
570
+ !_optionalChain$s([window, 'optionalAccess', _48 => _48.ethereum, 'optionalAccess', _49 => _49.isRabby]) &&
571
571
  // not Backpack
572
- !_optionalChain$u([window, 'optionalAccess', _50 => _50.backpack, 'optionalAccess', _51 => _51.isBackpack]) &&
572
+ !_optionalChain$s([window, 'optionalAccess', _50 => _50.backpack, 'optionalAccess', _51 => _51.isBackpack]) &&
573
573
  // not TokenPocket
574
- !_optionalChain$u([window, 'optionalAccess', _52 => _52.ethereum, 'optionalAccess', _53 => _53.isTokenPocket]) &&
574
+ !_optionalChain$s([window, 'optionalAccess', _52 => _52.ethereum, 'optionalAccess', _53 => _53.isTokenPocket]) &&
575
575
  // not BitKeep
576
- !_optionalChain$u([window, 'optionalAccess', _54 => _54.ethereum, 'optionalAccess', _55 => _55.isBitKeep]) &&
576
+ !_optionalChain$s([window, 'optionalAccess', _54 => _54.ethereum, 'optionalAccess', _55 => _55.isBitKeep]) &&
577
577
  // not Coinbase
578
- !(_optionalChain$u([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isCoinbaseWallet]) || _optionalChain$u([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isWalletLink])) &&
578
+ !(_optionalChain$s([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isCoinbaseWallet]) || _optionalChain$s([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isWalletLink])) &&
579
579
  // MetaMask through ProviderMap
580
- !_optionalChain$u([window, 'optionalAccess', _60 => _60.ethereum, 'optionalAccess', _61 => _61.providerMap, 'optionalAccess', _62 => _62.has, 'call', _63 => _63('MetaMask')]) &&
580
+ !_optionalChain$s([window, 'optionalAccess', _60 => _60.ethereum, 'optionalAccess', _61 => _61.providerMap, 'optionalAccess', _62 => _62.has, 'call', _63 => _63('MetaMask')]) &&
581
581
  // Brave Wallet
582
- !_optionalChain$u([window, 'optionalAccess', _64 => _64.ethereum, 'optionalAccess', _65 => _65.isBraveWallet]) &&
582
+ !_optionalChain$s([window, 'optionalAccess', _64 => _64.ethereum, 'optionalAccess', _65 => _65.isBraveWallet]) &&
583
583
  // OKX Wallet
584
- !_optionalChain$u([window, 'optionalAccess', _66 => _66.okxwallet])
584
+ !_optionalChain$s([window, 'optionalAccess', _66 => _66.okxwallet])
585
585
  )
586
586
  };}
587
587
 
@@ -590,7 +590,7 @@
590
590
  this.logo = this.constructor.info.logo;
591
591
  this.blockchains = this.constructor.info.blockchains;
592
592
  this.sendTransaction = (transaction)=>{
593
- return sendTransaction$3({
593
+ return sendTransaction$2({
594
594
  wallet: this,
595
595
  transaction
596
596
  })
@@ -707,7 +707,7 @@
707
707
  }
708
708
  } WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
709
709
 
710
- function _optionalChain$t(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; }
710
+ function _optionalChain$r(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
711
  class Binance extends WindowEthereum {
712
712
 
713
713
  static __initStatic() {this.info = {
@@ -717,7 +717,7 @@
717
717
  };}
718
718
 
719
719
  static __initStatic2() {this.isAvailable = async()=>{
720
- return _optionalChain$t([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
720
+ return _optionalChain$r([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
721
721
  !window.coin98 &&
722
722
  !window.trustwallet
723
723
  };}
@@ -737,7 +737,7 @@
737
737
  okx: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMzYuMSAzMzYuMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzM2LjEgMzM2LjE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPHBhdGggZD0iTTMxMy43LDBIMjIuNEMxMCwwLDAsMTAsMCwyMi40djI5MS4zYzAsMTIuNCwxMCwyMi40LDIyLjQsMjIuNGgyOTEuM2MxMi40LDAsMjIuNC0xMCwyMi40LTIyLjRWMjIuNAoJQzMzNi4xLDEwLDMyNi4xLDAsMzEzLjcsMHoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIwNC41LDEzMC43aC02NC43Yy0yLjcsMC01LDIuMi01LDV2NjQuN2MwLDIuNywyLjIsNSw1LDVoNjQuN2MyLjcsMCw1LTIuMiw1LTV2LTY0LjcKCUMyMDkuNSwxMzIuOSwyMDcuMiwxMzAuNywyMDQuNSwxMzAuN3oiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyOS44LDU2LjFINjUuMWMtMi43LDAtNSwyLjItNSw1djY0LjdjMCwyLjcsMi4yLDUsNSw1aDY0LjdjMi44LDAsNS0yLjIsNS01VjYxCglDMTM0LjgsNTguMywxMzIuNSw1Ni4xLDEyOS44LDU2LjF6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNzkuMSw1Ni4xaC02NC43Yy0yLjcsMC01LDIuMi01LDV2NjQuN2MwLDIuNywyLjIsNSw1LDVoNjQuN2MyLjcsMCw1LTIuMiw1LTVWNjEKCUMyODQuMSw1OC4zLDI4MS45LDU2LjEsMjc5LjEsNTYuMXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyOS44LDIwNS40SDY1LjFjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuOCwwLDUtMi4yLDUtNXYtNjQuNwoJQzEzNC44LDIwNy42LDEzMi41LDIwNS40LDEyOS44LDIwNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjc5LjEsMjA1LjRoLTY0LjdjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuNywwLDUtMi4yLDUtNXYtNjQuNwoJQzI4NC4xLDIwNy42LDI4MS45LDIwNS40LDI3OS4xLDIwNS40eiIvPgo8L3N2Zz4K",
738
738
  };
739
739
 
740
- function _optionalChain$s(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; }
740
+ function _optionalChain$q(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; }
741
741
  class BraveEVM extends WindowEthereum {
742
742
 
743
743
  static __initStatic() {this.info = {
@@ -747,14 +747,14 @@
747
747
  platform: 'evm',
748
748
  };}
749
749
 
750
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$s([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
750
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$q([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
751
751
 
752
752
  getProvider() {
753
753
  return window.ethereum
754
754
  }
755
755
  } BraveEVM.__initStatic(); BraveEVM.__initStatic2();
756
756
 
757
- function _optionalChain$r(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
+ function _optionalChain$p(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; }
758
758
  class BraveSVM extends WindowSolana {
759
759
 
760
760
  static __initStatic() {this.info = {
@@ -764,14 +764,14 @@
764
764
  platform: 'svm',
765
765
  };}
766
766
 
767
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$r([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isBraveWallet]) };}
767
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$p([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isBraveWallet]) };}
768
768
 
769
769
  getProvider() {
770
770
  return window.braveSolana
771
771
  }
772
772
  } BraveSVM.__initStatic(); BraveSVM.__initStatic2();
773
773
 
774
- function _optionalChain$q(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; }
774
+ 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; }
775
775
  class Coin98EVM extends WindowEthereum {
776
776
 
777
777
  static __initStatic() {this.info = {
@@ -781,13 +781,13 @@
781
781
  platform: 'evm',
782
782
  };}
783
783
 
784
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$q([window, 'optionalAccess', _2 => _2.coin98]) };}
784
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$o([window, 'optionalAccess', _2 => _2.coin98]) };}
785
785
 
786
786
  getProvider() { return window.coin98.provider }
787
787
 
788
788
  } Coin98EVM.__initStatic(); Coin98EVM.__initStatic2();
789
789
 
790
- function _optionalChain$p(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; }
790
+ 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; }
791
791
  class Coin98SVM extends WindowSolana {
792
792
 
793
793
  static __initStatic() {this.info = {
@@ -797,13 +797,13 @@
797
797
  platform: 'svm',
798
798
  };}
799
799
 
800
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$p([window, 'optionalAccess', _3 => _3.coin98, 'optionalAccess', _4 => _4.sol]) };}
800
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$n([window, 'optionalAccess', _3 => _3.coin98, 'optionalAccess', _4 => _4.sol]) };}
801
801
 
802
802
  getProvider() { return window.coin98.sol }
803
803
 
804
804
  } Coin98SVM.__initStatic(); Coin98SVM.__initStatic2();
805
805
 
806
- 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; }
806
+ 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; }
807
807
  class CoinbaseEVM extends WindowEthereum {
808
808
 
809
809
  static __initStatic() {this.info = {
@@ -814,8 +814,8 @@
814
814
  };}
815
815
 
816
816
  getProvider() {
817
- if(_optionalChain$o([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
818
- return _optionalChain$o([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
817
+ if(_optionalChain$m([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
818
+ return _optionalChain$m([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
819
819
  } else {
820
820
  return window.ethereum
821
821
  }
@@ -824,9 +824,9 @@
824
824
  static __initStatic2() {this.isAvailable = async()=>{
825
825
  return(
826
826
  (
827
- _optionalChain$o([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$o([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
827
+ _optionalChain$m([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$m([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
828
828
  ) || (
829
- _optionalChain$o([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
829
+ _optionalChain$m([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
830
830
  )
831
831
  )
832
832
  };}
@@ -850,7 +850,7 @@
850
850
  };}
851
851
  } CoinbaseSVM.__initStatic(); CoinbaseSVM.__initStatic2();
852
852
 
853
- 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; }
853
+ 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; }
854
854
  class CryptoCom extends WindowEthereum {
855
855
 
856
856
  static __initStatic() {this.info = {
@@ -859,10 +859,10 @@
859
859
  blockchains: supported$1.evm
860
860
  };}
861
861
 
862
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$n([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
862
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$l([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
863
863
  } CryptoCom.__initStatic(); CryptoCom.__initStatic2();
864
864
 
865
- 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; }
865
+ 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; }
866
866
  class ExodusEVM extends WindowEthereum {
867
867
 
868
868
  static __initStatic() {this.info = {
@@ -872,10 +872,10 @@
872
872
  platform: 'evm',
873
873
  };}
874
874
 
875
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$m([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
875
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$k([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
876
876
  } ExodusEVM.__initStatic(); ExodusEVM.__initStatic2();
877
877
 
878
- 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; }
878
+ 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; }
879
879
  class ExodusSVM extends WindowSolana {
880
880
 
881
881
  static __initStatic() {this.info = {
@@ -885,7 +885,7 @@
885
885
  platform: 'svm',
886
886
  };}
887
887
 
888
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$l([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isExodus]) };}
888
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$j([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isExodus]) };}
889
889
  } ExodusSVM.__initStatic(); ExodusSVM.__initStatic2();
890
890
 
891
891
  class Glow extends WindowSolana {
@@ -904,7 +904,7 @@
904
904
  };}
905
905
  } Glow.__initStatic(); Glow.__initStatic2();
906
906
 
907
- 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; }
907
+ 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; }
908
908
  class HyperPay extends WindowEthereum {
909
909
 
910
910
  static __initStatic() {this.info = {
@@ -913,10 +913,10 @@
913
913
  blockchains: supported$1.evm
914
914
  };}
915
915
 
916
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$k([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
916
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$i([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
917
917
  } HyperPay.__initStatic(); HyperPay.__initStatic2();
918
918
 
919
- 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; }
919
+ 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; }
920
920
  class MagicEdenEVM extends WindowEthereum {
921
921
 
922
922
  static __initStatic() {this.info = {
@@ -928,12 +928,12 @@
928
928
 
929
929
  static __initStatic2() {this.isAvailable = async()=>{
930
930
  return (
931
- _optionalChain$j([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMagicEden])
931
+ _optionalChain$h([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMagicEden])
932
932
  )
933
933
  };}
934
934
  } MagicEdenEVM.__initStatic(); MagicEdenEVM.__initStatic2();
935
935
 
936
- 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; }
936
+ 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; }
937
937
  class MagicEdenSVM extends WindowSolana {
938
938
 
939
939
  static __initStatic() {this.info = {
@@ -945,12 +945,12 @@
945
945
 
946
946
  static __initStatic2() {this.isAvailable = async()=>{
947
947
  return (
948
- _optionalChain$i([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isMagicEden])
948
+ _optionalChain$g([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isMagicEden])
949
949
  )
950
950
  };}
951
951
  } MagicEdenSVM.__initStatic(); MagicEdenSVM.__initStatic2();
952
952
 
953
- 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; }
953
+ 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; }
954
954
  class OKXEVM extends WindowEthereum {
955
955
 
956
956
  static __initStatic() {this.info = {
@@ -962,12 +962,12 @@
962
962
 
963
963
  static __initStatic2() {this.isAvailable = async()=>{
964
964
  return (
965
- _optionalChain$h([window, 'optionalAccess', _2 => _2.okxwallet])
965
+ _optionalChain$f([window, 'optionalAccess', _2 => _2.okxwallet])
966
966
  )
967
967
  };}
968
968
  } OKXEVM.__initStatic(); OKXEVM.__initStatic2();
969
969
 
970
- 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; }
970
+ 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; }
971
971
  class OKXSVM extends WindowSolana {
972
972
 
973
973
  static __initStatic() {this.info = {
@@ -979,12 +979,12 @@
979
979
 
980
980
  static __initStatic2() {this.isAvailable = async()=>{
981
981
  return (
982
- _optionalChain$g([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isOkxWallet])
982
+ _optionalChain$e([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isOkxWallet])
983
983
  )
984
984
  };}
985
985
  } OKXSVM.__initStatic(); OKXSVM.__initStatic2();
986
986
 
987
- 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; }
987
+ 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; }
988
988
  class MetaMask extends WindowEthereum {
989
989
 
990
990
  static __initStatic() {this.info = {
@@ -994,8 +994,8 @@
994
994
  };}
995
995
 
996
996
  getProvider() {
997
- if(_optionalChain$f([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.providerMap, 'optionalAccess', _9 => _9.has, 'call', _10 => _10('MetaMask')])) {
998
- return _optionalChain$f([window, 'optionalAccess', _11 => _11.ethereum, 'optionalAccess', _12 => _12.providerMap, 'optionalAccess', _13 => _13.get, 'call', _14 => _14('MetaMask')])
997
+ if(_optionalChain$d([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.providerMap, 'optionalAccess', _9 => _9.has, 'call', _10 => _10('MetaMask')])) {
998
+ return _optionalChain$d([window, 'optionalAccess', _11 => _11.ethereum, 'optionalAccess', _12 => _12.providerMap, 'optionalAccess', _13 => _13.get, 'call', _14 => _14('MetaMask')])
999
999
  } else {
1000
1000
  return window.ethereum
1001
1001
  }
@@ -1004,16 +1004,16 @@
1004
1004
  static __initStatic2() {this.isAvailable = async()=>{
1005
1005
  return(
1006
1006
  (
1007
- _optionalChain$f([window, 'optionalAccess', _15 => _15.ethereum, 'optionalAccess', _16 => _16.isMetaMask]) &&
1007
+ _optionalChain$d([window, 'optionalAccess', _15 => _15.ethereum, 'optionalAccess', _16 => _16.isMetaMask]) &&
1008
1008
  Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
1009
1009
  ) || (
1010
- _optionalChain$f([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.providerMap, 'optionalAccess', _19 => _19.has, 'call', _20 => _20('MetaMask')])
1010
+ _optionalChain$d([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.providerMap, 'optionalAccess', _19 => _19.has, 'call', _20 => _20('MetaMask')])
1011
1011
  )
1012
1012
  )
1013
1013
  };}
1014
1014
  } MetaMask.__initStatic(); MetaMask.__initStatic2();
1015
1015
 
1016
- 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; }
1016
+ 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; }
1017
1017
  class Opera extends WindowEthereum {
1018
1018
 
1019
1019
  static __initStatic() {this.info = {
@@ -1022,10 +1022,10 @@
1022
1022
  blockchains: supported$1.evm
1023
1023
  };}
1024
1024
 
1025
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
1025
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
1026
1026
  } Opera.__initStatic(); Opera.__initStatic2();
1027
1027
 
1028
- 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; }
1028
+ 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; }
1029
1029
  class PhantomEVM extends WindowEthereum {
1030
1030
 
1031
1031
  static __initStatic() {this.info = {
@@ -1039,13 +1039,13 @@
1039
1039
  return (
1040
1040
  window.phantom &&
1041
1041
  window.phantom.ethereum &&
1042
- ! _optionalChain$d([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
1043
- ! _optionalChain$d([window, 'optionalAccess', _6 => _6.okxwallet])
1042
+ ! _optionalChain$b([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
1043
+ ! _optionalChain$b([window, 'optionalAccess', _6 => _6.okxwallet])
1044
1044
  )
1045
1045
  };}
1046
1046
  } PhantomEVM.__initStatic(); PhantomEVM.__initStatic2();
1047
1047
 
1048
- 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; }
1048
+ 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; }
1049
1049
  class PhantomSVM extends WindowSolana {
1050
1050
 
1051
1051
  static __initStatic() {this.info = {
@@ -1059,16 +1059,16 @@
1059
1059
  return (
1060
1060
  window.phantom &&
1061
1061
  !window.glow &&
1062
- !_optionalChain$c([window, 'optionalAccess', _8 => _8.solana, 'optionalAccess', _9 => _9.isGlow]) &&
1063
- !_optionalChain$c([window, 'optionalAccess', _10 => _10.solana, 'optionalAccess', _11 => _11.isExodus]) &&
1064
- ! _optionalChain$c([window, 'optionalAccess', _12 => _12.ethereum, 'optionalAccess', _13 => _13.isMagicEden]) &&
1065
- ! _optionalChain$c([window, 'optionalAccess', _14 => _14.okxwallet]) &&
1062
+ !_optionalChain$a([window, 'optionalAccess', _8 => _8.solana, 'optionalAccess', _9 => _9.isGlow]) &&
1063
+ !_optionalChain$a([window, 'optionalAccess', _10 => _10.solana, 'optionalAccess', _11 => _11.isExodus]) &&
1064
+ ! _optionalChain$a([window, 'optionalAccess', _12 => _12.ethereum, 'optionalAccess', _13 => _13.isMagicEden]) &&
1065
+ ! _optionalChain$a([window, 'optionalAccess', _14 => _14.okxwallet]) &&
1066
1066
  !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])
1067
1067
  )
1068
1068
  };}
1069
1069
  } PhantomSVM.__initStatic(); PhantomSVM.__initStatic2();
1070
1070
 
1071
- 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; }
1071
+ 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; }
1072
1072
  class Rabby extends WindowEthereum {
1073
1073
 
1074
1074
  static __initStatic() {this.info = {
@@ -1079,15 +1079,15 @@
1079
1079
 
1080
1080
  static __initStatic2() {this.isAvailable = async()=>{
1081
1081
  return(
1082
- _optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
1082
+ _optionalChain$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
1083
1083
  )
1084
1084
  };}
1085
1085
  } Rabby.__initStatic(); Rabby.__initStatic2();
1086
1086
 
1087
- 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; }
1087
+ 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; }
1088
1088
 
1089
1089
 
1090
- const KEY$2 = '_DePayWeb3WalletsConnectedSolanaMobileWalletInstance';
1090
+ const KEY$1 = '_DePayWeb3WalletsConnectedSolanaMobileWalletInstance';
1091
1091
 
1092
1092
  const base64StringToPublicKey = (base64String)=> {
1093
1093
  const binaryString = window.atob(base64String);
@@ -1132,11 +1132,11 @@
1132
1132
  };}
1133
1133
 
1134
1134
  constructor() {
1135
- this.name = (localStorage[KEY$2+'_name'] && localStorage[KEY$2+'_name'] != undefined) ? localStorage[KEY$2+'_name'] : this.constructor.info.name;
1136
- this.logo = (localStorage[KEY$2+'_logo'] && localStorage[KEY$2+'_logo'] != undefined) ? localStorage[KEY$2+'_logo'] : this.constructor.info.logo;
1135
+ this.name = (localStorage[KEY$1+'_name'] && localStorage[KEY$1+'_name'] != undefined) ? localStorage[KEY$1+'_name'] : this.constructor.info.name;
1136
+ this.logo = (localStorage[KEY$1+'_logo'] && localStorage[KEY$1+'_logo'] != undefined) ? localStorage[KEY$1+'_logo'] : this.constructor.info.logo;
1137
1137
  this.blockchains = this.constructor.info.blockchains;
1138
1138
  this.sendTransaction = (transaction)=>{
1139
- return sendTransaction$4({
1139
+ return sendTransaction$3({
1140
1140
  wallet: this,
1141
1141
  transaction
1142
1142
  })
@@ -1175,8 +1175,8 @@
1175
1175
  await solanaWeb3_js.transact(
1176
1176
  async (wallet) => {
1177
1177
  await this.authorize(wallet);
1178
- if(_optionalChain$a([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$2+'_name'] = this.name = options.name; }
1179
- if(_optionalChain$a([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$2+'_logo'] = this.logo = options.logo; }
1178
+ if(_optionalChain$8([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
1179
+ if(_optionalChain$8([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
1180
1180
  }
1181
1181
  );
1182
1182
  return this._account
@@ -1235,7 +1235,7 @@
1235
1235
  }
1236
1236
  } SolanaMobileWalletAdapter.__initStatic(); SolanaMobileWalletAdapter.__initStatic2();
1237
1237
 
1238
- 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; }
1238
+ 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; }
1239
1239
  class Solflare extends WindowSolana {
1240
1240
 
1241
1241
  static __initStatic() {this.info = {
@@ -1246,7 +1246,7 @@
1246
1246
 
1247
1247
  static __initStatic2() {this.isAvailable = async()=>{
1248
1248
  return (
1249
- _optionalChain$9([window, 'optionalAccess', _2 => _2.solflare]) &&
1249
+ _optionalChain$7([window, 'optionalAccess', _2 => _2.solflare]) &&
1250
1250
  window.solflare.isSolflare
1251
1251
  )
1252
1252
  };}
@@ -1256,7 +1256,7 @@
1256
1256
  _sendTransaction(transaction) { return this.getProvider().signTransaction(transaction) }
1257
1257
  } Solflare.__initStatic(); Solflare.__initStatic2();
1258
1258
 
1259
- 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; }
1259
+ 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; }
1260
1260
  class TokenPocket extends WindowEthereum {
1261
1261
 
1262
1262
  static __initStatic() {this.info = {
@@ -1267,12 +1267,12 @@
1267
1267
 
1268
1268
  static __initStatic2() {this.isAvailable = async()=>{
1269
1269
  return (
1270
- _optionalChain$8([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
1270
+ _optionalChain$6([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
1271
1271
  )
1272
1272
  };}
1273
1273
  } TokenPocket.__initStatic(); TokenPocket.__initStatic2();
1274
1274
 
1275
- 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; }
1275
+ 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; }
1276
1276
  class TrustEVM extends WindowEthereum {
1277
1277
 
1278
1278
  static __initStatic() {this.info = {
@@ -1284,13 +1284,13 @@
1284
1284
 
1285
1285
  static __initStatic2() {this.isAvailable = async()=>{
1286
1286
  return (
1287
- (_optionalChain$7([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$7([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
1287
+ (_optionalChain$5([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$5([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
1288
1288
  Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
1289
1289
  )
1290
1290
  };}
1291
1291
  } TrustEVM.__initStatic(); TrustEVM.__initStatic2();
1292
1292
 
1293
- 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; }
1293
+ 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; }
1294
1294
  class TrustSVM extends WindowSolana {
1295
1295
 
1296
1296
  static __initStatic() {this.info = {
@@ -1301,7 +1301,7 @@
1301
1301
  };}
1302
1302
 
1303
1303
  static __initStatic2() {this.isAvailable = async()=>{
1304
- return _optionalChain$6([window, 'access', _3 => _3.solana, 'optionalAccess', _4 => _4.isTrustWallet])
1304
+ return _optionalChain$4([window, 'access', _3 => _3.solana, 'optionalAccess', _4 => _4.isTrustWallet])
1305
1305
  };}
1306
1306
  } TrustSVM.__initStatic(); TrustSVM.__initStatic2();
1307
1307
 
@@ -1404,466 +1404,10 @@
1404
1404
  }
1405
1405
  };
1406
1406
 
1407
- 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; }
1408
-
1409
- const sendTransaction$2 = async ({ transaction, wallet })=> {
1410
- transaction = new Transaction(transaction);
1411
- if((await wallet.connectedTo(transaction.blockchain)) == false) {
1412
- throw({ code: 'WRONG_NETWORK' })
1413
- }
1414
- await transaction.prepare({ wallet });
1415
- const smartContractWallet = await getSmartContractWallet(transaction.blockchain, transaction.from);
1416
- let transactionCount = await wallet.transactionCount({ blockchain: transaction.blockchain, address: transaction.from });
1417
- transaction.nonce = transactionCount;
1418
- await submit$2({ transaction, wallet }).then((tx)=>{
1419
- if (tx) {
1420
- let blockchain = Blockchains__default['default'].findByName(transaction.blockchain);
1421
- transaction.id = tx;
1422
- transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
1423
- if (transaction.sent) transaction.sent(transaction);
1424
- retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet }).then((sentTransaction)=>{
1425
- transaction.id = sentTransaction.hash || transaction.id;
1426
- transaction.url = blockchain.explorerUrlFor({ transaction });
1427
- transaction.nonce = sentTransaction.nonce || transactionCount;
1428
- retrieveConfirmedTransaction$2(sentTransaction).then(()=>{
1429
- transaction._succeeded = true;
1430
- if (transaction.succeeded) transaction.succeeded(transaction);
1431
- }).catch((error)=>{
1432
- if(error && error.code && error.code == 'TRANSACTION_REPLACED') {
1433
- if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 1) {
1434
- transaction.id = error.replacement.hash;
1435
- transaction._succeeded = true;
1436
- if (transaction.succeeded) transaction.succeeded(transaction);
1437
- } else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
1438
- transaction.id = error.replacement.hash;
1439
- transaction._failed = true;
1440
- if(transaction.failed) transaction.failed(transaction, error);
1441
- }
1442
- } else {
1443
- transaction._failed = true;
1444
- if(transaction.failed) transaction.failed(transaction, error);
1445
- }
1446
- });
1447
- });
1448
- } else {
1449
- throw('Submitting transaction failed!')
1450
- }
1451
- });
1452
- return transaction
1453
- };
1454
-
1455
- const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
1456
- return new Promise((resolve, reject)=>{
1457
- try {
1458
-
1459
- sentTransaction.wait(1).then(resolve).catch((error)=>{
1460
- if(
1461
- (error && _optionalChain$5([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
1462
- (error && error.toString().match('undefined'))
1463
- ) {
1464
- setTimeout(()=>{
1465
- retrieveConfirmedTransaction$2(sentTransaction)
1466
- .then(resolve)
1467
- .catch(reject);
1468
- }, 500);
1469
- } else {
1470
- reject(error);
1471
- }
1472
- });
1473
- } catch (error) {
1474
- if(
1475
- (error && _optionalChain$5([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
1476
- (error && error.toString().match('undefined'))
1477
- ) {
1478
- setTimeout(()=>{
1479
- retrieveConfirmedTransaction$2(sentTransaction)
1480
- .then(resolve)
1481
- .catch(reject);
1482
- }, 500);
1483
- } else {
1484
- reject(error);
1485
- }
1486
- }
1487
- })
1488
- };
1489
-
1490
- const retrieveTransaction$1 = async ({ blockchain, tx, smartContractWallet })=>{
1491
- const provider = await web3Client.getProvider(blockchain);
1492
- let retrieve = async()=>{
1493
- try {
1494
- if(smartContractWallet && smartContractWallet.retrieveTransaction) {
1495
- return await smartContractWallet.retrieveTransaction({ blockchain, tx })
1496
- } else {
1497
- return await provider.getTransaction(tx)
1498
- }
1499
- } catch (e) {}
1500
- };
1501
-
1502
- let sentTransaction;
1503
- sentTransaction = await retrieve();
1504
- while (!sentTransaction) {
1505
- await (new Promise((resolve)=>setTimeout(resolve, 3000)));
1506
- sentTransaction = await retrieve();
1507
- }
1508
- return sentTransaction
1509
- };
1510
-
1511
- const submit$2 = ({ transaction, wallet }) => {
1512
- if(transaction.method) {
1513
- return submitContractInteraction$2({ transaction, wallet })
1514
- } else {
1515
- return submitSimpleTransfer$2({ transaction, wallet })
1516
- }
1517
- };
1518
-
1519
- const submitContractInteraction$2 = async ({ transaction, wallet })=>{
1520
- const provider = await web3Client.getProvider(transaction.blockchain);
1521
- let gasPrice = await provider.getGasPrice();
1522
- if(_optionalChain$5([wallet, 'access', _7 => _7.session, 'optionalAccess', _8 => _8.peerMeta, 'optionalAccess', _9 => _9.name]) === 'Uniswap Wallet') {
1523
- gasPrice = undefined;
1524
- } else {
1525
- gasPrice = gasPrice.toHexString();
1526
- }
1527
- let gas;
1528
- try {
1529
- gas = await web3Client.estimate(transaction);
1530
- gas = gas.add(gas.div(10));
1531
- } catch (e2) {}
1532
- const data = await transaction.getData();
1533
- const value = transaction.value ? ethers.ethers.utils.hexlify(ethers.ethers.BigNumber.from(transaction.value)) : undefined;
1534
- const nonce = ethers.ethers.utils.hexlify(transaction.nonce);
1535
- return wallet.connector.sendTransaction({
1536
- from: transaction.from,
1537
- to: transaction.to,
1538
- value,
1539
- data,
1540
- gas: _optionalChain$5([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
1541
- gasPrice,
1542
- nonce,
1543
- })
1544
- };
1545
-
1546
- const submitSimpleTransfer$2 = async ({ transaction, wallet })=>{
1547
- const provider = await web3Client.getProvider(transaction.blockchain);
1548
- let gasPrice = await provider.getGasPrice();
1549
- if(_optionalChain$5([wallet, 'access', _12 => _12.session, 'optionalAccess', _13 => _13.peerMeta, 'optionalAccess', _14 => _14.name]) === 'Uniswap Wallet') {
1550
- gasPrice = undefined;
1551
- } else {
1552
- gasPrice = gasPrice.toHexString();
1553
- }
1554
- let gas;
1555
- try {
1556
- gas = await web3Client.estimate(transaction);
1557
- gas = gas.add(gas.div(10));
1558
- } catch (e3) {}
1559
- const value = ethers.ethers.utils.hexlify(ethers.ethers.BigNumber.from(transaction.value));
1560
- const nonce = ethers.ethers.utils.hexlify(transaction.nonce);
1561
- return wallet.connector.sendTransaction({
1562
- from: transaction.from,
1563
- to: transaction.to,
1564
- value,
1565
- data: '0x',
1566
- gas: _optionalChain$5([gas, 'optionalAccess', _15 => _15.toHexString, 'call', _16 => _16()]),
1567
- gasPrice,
1568
- nonce,
1569
- })
1570
- };
1571
-
1572
- 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; }
1573
-
1574
- const KEY$1 = '_DePayWeb3WalletsConnectedWalletConnectV1Instance';
1575
-
1576
- let currentPlainInstance;
1577
-
1578
- const getPlainInstance = ()=>{
1579
- if(currentPlainInstance) { return currentPlainInstance }
1580
- currentPlainInstance = getWalletConnectInstance(()=>{});
1581
- return currentPlainInstance
1582
- };
1583
-
1584
- const isConnected = ()=>{
1585
- return new Promise(async(resolve, reject)=>{
1586
-
1587
- setTimeout(()=>{
1588
- delete localStorage['walletconnect'];
1589
- resolve(false);
1590
- }, 5000);
1591
-
1592
- if(!localStorage['walletconnect'] || JSON.parse(localStorage['walletconnect']).handshakeTopic.length == 0) {
1593
- delete localStorage['walletconnect'];
1594
- return resolve(false)
1595
- }
1596
-
1597
- let connector = getPlainInstance();
1598
- let accounts;
1599
-
1600
- try {
1601
- let blockNumber = await connector.sendCustomRequest({ method: 'eth_blockNumber' });
1602
- if(blockNumber) {
1603
- accounts = await connector.sendCustomRequest({ method: 'eth_accounts' });
1604
- } else {
1605
- delete localStorage['walletconnect'];
1606
- }
1607
- } catch (error) {
1608
- delete localStorage['walletconnect'];
1609
- resolve(false);
1610
- }
1611
-
1612
- return resolve(accounts && accounts.length)
1613
- })
1614
- };
1615
-
1616
- const getConnectedInstance$2 = async()=>{
1617
- if(window[KEY$1]) { return window[KEY$1] }
1618
- if(await isConnected()) { return new WalletConnectV1() }
1619
- };
1620
-
1621
- const setConnectedInstance$1 = (value)=>{
1622
- window[KEY$1] = value;
1623
- };
1624
-
1625
- const getWalletConnectInstance = (connect)=>{
1626
- return new walletconnectV1.WalletConnectClient({
1627
- bridge: "https://walletconnect.depay.com",
1628
- qrcodeModal: {
1629
- open: async(uri)=>connect({ uri }),
1630
- close: ()=>{},
1631
- }
1632
- })
1633
- };
1634
-
1635
- class WalletConnectV1 {
1636
-
1637
- static __initStatic() {this.info = {
1638
- name: 'WalletConnect',
1639
- logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz48IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMjUuNC4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAtLT48c3ZnIHZlcnNpb249JzEuMScgaWQ9J0xheWVyXzEnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycgeG1sbnM6eGxpbms9J2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnIHg9JzBweCcgeT0nMHB4JyB2aWV3Qm94PScwIDAgNTAwIDUwMCcgc3R5bGU9J2VuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTAwIDUwMDsnIHhtbDpzcGFjZT0ncHJlc2VydmUnPjxzdHlsZSB0eXBlPSd0ZXh0L2Nzcyc+IC5zdDB7ZmlsbDojNTk5MUNEO30KPC9zdHlsZT48ZyBpZD0nUGFnZS0xJz48ZyBpZD0nd2FsbGV0Y29ubmVjdC1sb2dvLWFsdCc+PHBhdGggaWQ9J1dhbGxldENvbm5lY3QnIGNsYXNzPSdzdDAnIGQ9J00xMDIuNywxNjJjODEuNS03OS44LDIxMy42LTc5LjgsMjk1LjEsMGw5LjgsOS42YzQuMSw0LDQuMSwxMC41LDAsMTQuNEwzNzQsMjE4LjkgYy0yLDItNS4zLDItNy40LDBsLTEzLjUtMTMuMmMtNTYuOC01NS43LTE0OS01NS43LTIwNS44LDBsLTE0LjUsMTQuMWMtMiwyLTUuMywyLTcuNCwwTDkxLjksMTg3Yy00LjEtNC00LjEtMTAuNSwwLTE0LjQgTDEwMi43LDE2MnogTTQ2Ny4xLDIyOS45bDI5LjksMjkuMmM0LjEsNCw0LjEsMTAuNSwwLDE0LjRMMzYyLjMsNDA1LjRjLTQuMSw0LTEwLjcsNC0xNC44LDBjMCwwLDAsMCwwLDBMMjUyLDMxMS45IGMtMS0xLTIuNy0xLTMuNywwaDBsLTk1LjUsOTMuNWMtNC4xLDQtMTAuNyw0LTE0LjgsMGMwLDAsMCwwLDAsMEwzLjQsMjczLjZjLTQuMS00LTQuMS0xMC41LDAtMTQuNGwyOS45LTI5LjIgYzQuMS00LDEwLjctNCwxNC44LDBsOTUuNSw5My41YzEsMSwyLjcsMSwzLjcsMGMwLDAsMCwwLDAsMGw5NS41LTkzLjVjNC4xLTQsMTAuNy00LDE0LjgsMGMwLDAsMCwwLDAsMGw5NS41LDkzLjUgYzEsMSwyLjcsMSwzLjcsMGw5NS41LTkzLjVDNDU2LjQsMjI1LjksNDYzLDIyNS45LDQ2Ny4xLDIyOS45eicvPjwvZz48L2c+PC9zdmc+Cg==",
1640
- blockchains: supported$1.evm
1641
- };}
1642
-
1643
- static __initStatic2() {this.isAvailable = async()=>{
1644
- return (await getConnectedInstance$2()) != undefined
1645
- };}
1646
-
1647
- constructor() {
1648
- this.name = (localStorage[KEY$1+'_name'] && localStorage[KEY$1+'_name'] != undefined) ? localStorage[KEY$1+'_name'] : this.constructor.info.name;
1649
- this.logo = (localStorage[KEY$1+'_logo'] && localStorage[KEY$1+'_logo'] != undefined) ? localStorage[KEY$1+'_logo'] : this.constructor.info.logo;
1650
- this.blockchains = this.constructor.info.blockchains;
1651
- this.sendTransaction = (transaction)=>{
1652
- return sendTransaction$2({
1653
- wallet: this,
1654
- transaction
1655
- })
1656
- };
1657
- }
1658
-
1659
- disconnect() {
1660
- setConnectedInstance$1(undefined);
1661
- localStorage[KEY$1+'_name'] = undefined;
1662
- localStorage[KEY$1+'_logo'] = undefined;
1663
- currentPlainInstance = undefined;
1664
- this.session = undefined;
1665
- }
1666
-
1667
- newWalletConnectInstance(connect) {
1668
- let instance = getWalletConnectInstance(connect);
1669
-
1670
- instance.on("disconnect", (error, payload) => {
1671
- this.disconnect();
1672
- if (error) { throw error }
1673
- });
1674
-
1675
- instance.on("modal_closed", ()=>{
1676
- setConnectedInstance$1(undefined);
1677
- this.connector = undefined;
1678
- this.session = undefined;
1679
- });
1680
-
1681
- return instance
1682
- }
1683
-
1684
- async account() {
1685
- if(!this.connector){ this.connector = getPlainInstance(); }
1686
- let accounts;
1687
- try{ accounts = await this.connector.sendCustomRequest({ method: 'eth_accounts' }); } catch (e) {}
1688
- if(accounts && accounts.length) { return ethers.ethers.utils.getAddress(accounts[0]) }
1689
- }
1690
-
1691
- async connect(options) {
1692
- let connect = (options && options.connect) ? options.connect : ({uri})=>{};
1693
- try {
1694
-
1695
- this.connector = WalletConnectV1.instance;
1696
-
1697
- if(this.connector == undefined){
1698
- this.connector = this.newWalletConnectInstance(connect);
1699
- }
1700
-
1701
- if(options && options.reconnect) {
1702
- if(this.connector) {
1703
- try{ await this.connector.killSession(); } catch (e2) {}
1704
- this.disconnect();
1705
- }
1706
- }
1707
-
1708
- if((await isConnected())) {
1709
- return await this.account()
1710
- } else {
1711
-
1712
- let session = await this.connector.connect();
1713
- this.session = session;
1714
-
1715
- if(_optionalChain$4([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
1716
- if(_optionalChain$4([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
1717
-
1718
- if(session.accounts instanceof Array && session.accounts.length) {
1719
- setConnectedInstance$1(this);
1720
- return ethers.ethers.utils.getAddress(session.accounts[0])
1721
- } else {
1722
- return
1723
- }
1724
- }
1725
-
1726
- } catch (error) {
1727
- console.log('WALLETCONNECT ERROR', error);
1728
- return undefined
1729
- }
1730
- }
1731
-
1732
- async connectedTo(input) {
1733
- let chainId = await this.connector.sendCustomRequest({ method: 'eth_chainId' });
1734
- const blockchain = Blockchains__default['default'].findById(chainId);
1735
- if(!blockchain) { return false }
1736
- if(input) {
1737
- return input === blockchain.name
1738
- } else {
1739
- return blockchain.name
1740
- }
1741
- }
1742
-
1743
- switchTo(blockchainName) {
1744
- return new Promise((resolve, reject)=>{
1745
- let resolved, rejected;
1746
- const blockchain = Blockchains__default['default'].findByName(blockchainName);
1747
- setTimeout(async()=>{
1748
- if(!(await this.connectedTo(blockchainName)) && !resolved && !rejected){
1749
- reject({ code: 'NOT_SUPPORTED' });
1750
- } else {
1751
- resolve();
1752
- }
1753
- }, 3000);
1754
- this.connector.sendCustomRequest({
1755
- method: 'wallet_switchEthereumChain',
1756
- params: [{ chainId: blockchain.id }],
1757
- }).then(()=>{
1758
- resolved = true;
1759
- resolve();
1760
- }).catch((error)=> {
1761
- if(error && typeof error.message == 'string' && error.message.match('addEthereumChain')){ // chain not yet added
1762
- this.addNetwork(blockchainName)
1763
- .then(()=>this.switchTo(blockchainName).then(()=>{
1764
- resolved = true;
1765
- resolve();
1766
- }))
1767
- .catch(()=>{
1768
- rejected = true;
1769
- reject({ code: 'NOT_SUPPORTED' });
1770
- });
1771
- } else {
1772
- rejected = true;
1773
- reject({ code: 'NOT_SUPPORTED' });
1774
- }
1775
- });
1776
- })
1777
- }
1778
-
1779
- addNetwork(blockchainName) {
1780
- return new Promise((resolve, reject)=>{
1781
- const blockchain = Blockchains__default['default'].findByName(blockchainName);
1782
- this.connector.sendCustomRequest({
1783
- method: 'wallet_addEthereumChain',
1784
- params: [{
1785
- chainId: blockchain.id,
1786
- chainName: blockchain.fullName,
1787
- nativeCurrency: {
1788
- name: blockchain.currency.name,
1789
- symbol: blockchain.currency.symbol,
1790
- decimals: blockchain.currency.decimals
1791
- },
1792
- rpcUrls: [blockchain.rpc],
1793
- blockExplorerUrls: [blockchain.explorer],
1794
- iconUrls: [blockchain.logo]
1795
- }],
1796
- }).then(resolve).catch(reject);
1797
- })
1798
- }
1799
-
1800
- on(event, callback) {
1801
- let internalCallback;
1802
- switch (event) {
1803
- case 'account':
1804
- internalCallback = (error, payload) => {
1805
- if(payload && payload.params && payload.params[0].accounts && payload.params[0].accounts instanceof Array) {
1806
- const accounts = payload.params[0].accounts.map((account)=>ethers.ethers.utils.getAddress(account));
1807
- callback(accounts[0]);
1808
- }
1809
- };
1810
- this.connector.on("session_update", internalCallback);
1811
- break
1812
- }
1813
- return internalCallback
1814
- }
1815
-
1816
- off(event, callback) {
1817
- switch (event) {
1818
- case 'account':
1819
- this.connector.off("session_update");
1820
- break
1821
- }
1822
- }
1823
-
1824
- async transactionCount({ blockchain, address }) {
1825
- const smartContractWallet = await getSmartContractWallet(blockchain, address);
1826
- if(smartContractWallet) {
1827
- return await smartContractWallet.transactionCount()
1828
- } else {
1829
- return await web3Client.request({ blockchain, method: 'transactionCount', address })
1830
- }
1831
- }
1832
-
1833
- async sign(message) {
1834
- if(typeof message === 'object') {
1835
- let account = await this.account();
1836
- if((await this.connectedTo(Blockchains__default['default'].findByNetworkId(message.domain.chainId).name)) === false) {
1837
- throw({ code: 'WRONG_NETWORK' })
1838
- }
1839
- let signature = await this.connector.sendCustomRequest({
1840
- jsonrpc: '2.0',
1841
- method: 'eth_signTypedData_v4',
1842
- params: [account, JSON.stringify(message)],
1843
- });
1844
- return signature
1845
- } else if (typeof message === 'string') {
1846
- let blockchain = await this.connectedTo();
1847
- let address = await this.account();
1848
- const smartContractWallet = await getSmartContractWallet(blockchain, address);
1849
- if(smartContractWallet){ throw({ message: 'Smart contract wallets are not supported for signing!', code: "SMART_CONTRACT_WALLET_NOT_SUPPORTED" }) }
1850
- var params = [ethers.ethers.utils.toUtf8Bytes(message), address];
1851
- let signature = await this.connector.signPersonalMessage(params);
1852
- return signature
1853
- }
1854
- }
1855
- } WalletConnectV1.__initStatic(); WalletConnectV1.__initStatic2();
1856
-
1857
- WalletConnectV1.getConnectedInstance = getConnectedInstance$2;
1858
- WalletConnectV1.setConnectedInstance = setConnectedInstance$1;
1859
-
1860
1407
  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; }
1861
1408
 
1862
1409
  const sendTransaction$1 = async ({ transaction, wallet })=> {
1863
1410
  transaction = new Transaction(transaction);
1864
- if((await wallet.connectedTo(transaction.blockchain)) == false) {
1865
- throw({ code: 'WRONG_NETWORK' })
1866
- }
1867
1411
  await transaction.prepare({ wallet });
1868
1412
  let transactionCount = await web3Client.request({ blockchain: transaction.blockchain, method: 'transactionCount', address: transaction.from });
1869
1413
  transaction.nonce = transactionCount;
@@ -1999,8 +1543,9 @@
1999
1543
  value: transaction.value ? ethers.ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
2000
1544
  data: await transaction.getData(),
2001
1545
  gas: _optionalChain$3([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
1546
+ gasLimit: _optionalChain$3([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
2002
1547
  gasPrice: gasPrice.toHexString(),
2003
- nonce: transaction.nonce,
1548
+ nonce: ethers.ethers.utils.hexlify(transaction.nonce),
2004
1549
  }]
2005
1550
  }
2006
1551
  }).catch((e)=>{console.log('ERROR', e);})
@@ -2024,9 +1569,11 @@
2024
1569
  from: transaction.from,
2025
1570
  to: transaction.to,
2026
1571
  value: transaction.value ? ethers.ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
2027
- gas: _optionalChain$3([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
2028
- gasPrice: gasPrice.toHexString(),
2029
- nonce: transaction.nonce
1572
+ data: '0x0',
1573
+ gas: _optionalChain$3([gas, 'optionalAccess', _14 => _14.toHexString, 'call', _15 => _15()]),
1574
+ gasLimit: _optionalChain$3([gas, 'optionalAccess', _16 => _16.toHexString, 'call', _17 => _17()]),
1575
+ gasPrice: _optionalChain$3([gasPrice, 'optionalAccess', _18 => _18.toHexString, 'call', _19 => _19()]),
1576
+ nonce: ethers.ethers.utils.hexlify(transaction.nonce)
2030
1577
  }]
2031
1578
  }
2032
1579
  }).catch((e)=>{console.log('ERROR', e);})
@@ -2036,88 +1583,6 @@
2036
1583
 
2037
1584
  const KEY = 'depay:wallets:wc2';
2038
1585
 
2039
- // configurations for wallets that require special handling
2040
- const CONFIGURATIONS = {
2041
-
2042
- "MetaMask": {
2043
- methods: [
2044
- "eth_sendTransaction",
2045
- "personal_sign",
2046
- "eth_signTypedData",
2047
- "eth_signTypedData_v4",
2048
- "wallet_switchEthereumChain"
2049
- ],
2050
- },
2051
-
2052
- "BitGet (BitKeep)": {
2053
- methods: [
2054
- "eth_sendTransaction",
2055
- "personal_sign",
2056
- "eth_signTypedData",
2057
- "eth_signTypedData_v4",
2058
- ],
2059
- requiredNamespaces: {
2060
- eip155: {
2061
- chains: ['ethereum', 'bsc', 'polygon', 'arbitrum', 'base'].map((blockchainName)=>`eip155:${Blockchains__default['default'][blockchainName].networkId}`)
2062
- }
2063
- },
2064
- optionalNamespaces: {},
2065
- },
2066
-
2067
- "BitGet": {
2068
- methods: [
2069
- "eth_sendTransaction",
2070
- "personal_sign",
2071
- "eth_signTypedData",
2072
- "eth_signTypedData_v4",
2073
- ],
2074
- requiredNamespaces: {
2075
- eip155: {
2076
- chains: ['ethereum', 'bsc', 'polygon', 'arbitrum', 'base'].map((blockchainName)=>`eip155:${Blockchains__default['default'][blockchainName].networkId}`)
2077
- }
2078
- },
2079
- optionalNamespaces: {},
2080
- },
2081
-
2082
- "Uniswap Wallet": {
2083
- methods: [
2084
- "eth_sendTransaction",
2085
- "personal_sign",
2086
- "eth_signTypedData",
2087
- "eth_signTypedData_v4",
2088
- ],
2089
- requiredNamespaces: {
2090
- eip155: {
2091
- chains: ['ethereum', 'polygon', 'arbitrum', 'optimism', 'base'].map((blockchainName)=>`eip155:${Blockchains__default['default'][blockchainName].networkId}`)
2092
- }
2093
- },
2094
- optionalNamespaces: {},
2095
- },
2096
-
2097
- "Ledger Live": {
2098
- methods: [
2099
- "eth_sendTransaction",
2100
- "personal_sign",
2101
- "eth_signTypedData",
2102
- "eth_signTypedData_v4",
2103
- ],
2104
- requiredNamespaces: {},
2105
- optionalNamespaces: {
2106
- eip155: {
2107
- chains: Blockchains__default['default'].all.map((blockchain)=>`eip155:${blockchain.networkId}`)
2108
- }
2109
- },
2110
- },
2111
-
2112
- "Enjin Wallet": {
2113
- methods: [
2114
- "eth_sendTransaction",
2115
- "personal_sign",
2116
- "eth_signTypedData",
2117
- ]
2118
- },
2119
- };
2120
-
2121
1586
  const DEFAULT_CONFIGURATION = {
2122
1587
  events: ['accountsChanged'],
2123
1588
  methods: [
@@ -2151,31 +1616,23 @@
2151
1616
  };
2152
1617
 
2153
1618
  const getWalletConnectV2Config = (walletName)=>{
2154
- const methods = _optionalChain$2([CONFIGURATIONS, 'access', _ => _[walletName], 'optionalAccess', _2 => _2.methods]) || DEFAULT_CONFIGURATION.methods;
2155
- const events = _optionalChain$2([CONFIGURATIONS, 'access', _3 => _3[walletName], 'optionalAccess', _4 => _4.events]) || DEFAULT_CONFIGURATION.events;
1619
+ const methods = DEFAULT_CONFIGURATION.methods;
1620
+ const events = DEFAULT_CONFIGURATION.events;
2156
1621
 
2157
1622
  let requiredNamespaces = {};
2158
- if(_optionalChain$2([CONFIGURATIONS, 'access', _5 => _5[walletName], 'optionalAccess', _6 => _6.requiredNamespaces])) {
2159
- requiredNamespaces = CONFIGURATIONS[walletName].requiredNamespaces;
2160
- } else {
2161
- requiredNamespaces['eip155'] = {
2162
- chains: [`eip155:1`],
2163
- };
2164
- }
1623
+ requiredNamespaces['eip155'] = {
1624
+ chains: [`eip155:1`],
1625
+ };
2165
1626
  if(requiredNamespaces['eip155']) {
2166
1627
  requiredNamespaces['eip155'].methods = methods;
2167
1628
  requiredNamespaces['eip155'].events = events;
2168
1629
  }
2169
1630
 
2170
1631
  let optionalNamespaces = {};
2171
- if(_optionalChain$2([CONFIGURATIONS, 'access', _7 => _7[walletName], 'optionalAccess', _8 => _8.optionalNamespaces])) {
2172
- optionalNamespaces = CONFIGURATIONS[walletName].optionalNamespaces;
2173
- } else {
2174
- optionalNamespaces['eip155'] = {
2175
- chains: supported$1.evm.map((blockchain)=>`${Blockchains__default['default'][blockchain].namespace}:${Blockchains__default['default'][blockchain].networkId}`),
2176
- };
2177
- }
2178
- if(_optionalChain$2([optionalNamespaces, 'optionalAccess', _9 => _9.eip155]) && _optionalChain$2([optionalNamespaces, 'optionalAccess', _10 => _10.eip155, 'optionalAccess', _11 => _11.chains, 'optionalAccess', _12 => _12.length])) {
1632
+ optionalNamespaces['eip155'] = {
1633
+ chains: supported$1.evm.map((blockchain)=>`${Blockchains__default['default'][blockchain].namespace}:${Blockchains__default['default'][blockchain].networkId}`),
1634
+ };
1635
+ if(_optionalChain$2([optionalNamespaces, 'optionalAccess', _ => _.eip155]) && _optionalChain$2([optionalNamespaces, 'optionalAccess', _2 => _2.eip155, 'optionalAccess', _3 => _3.chains, 'optionalAccess', _4 => _4.length])) {
2179
1636
  optionalNamespaces['eip155'].methods = methods;
2180
1637
  optionalNamespaces['eip155'].events = events;
2181
1638
  }
@@ -2190,9 +1647,9 @@
2190
1647
  projectId: localStorage[KEY+":projectId"],
2191
1648
  metadata: {
2192
1649
  name: document.title || 'dApp',
2193
- description: _optionalChain$2([document, 'access', _13 => _13.querySelector, 'call', _14 => _14('meta[name="description"]'), 'optionalAccess', _15 => _15.getAttribute, 'call', _16 => _16('content')]) || document.title || 'dApp',
1650
+ 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',
2194
1651
  url: location.href,
2195
- icons: [_optionalChain$2([document, 'access', _17 => _17.querySelector, 'call', _18 => _18("link[rel~='icon'], link[rel~='shortcut icon']"), 'optionalAccess', _19 => _19.href]) || `${location.origin}/favicon.ico`]
1652
+ 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`]
2196
1653
  }
2197
1654
  });
2198
1655
  resolve(signClient);
@@ -2210,7 +1667,7 @@
2210
1667
  };}
2211
1668
 
2212
1669
  static __initStatic2() {this.isAvailable = async(options)=>{
2213
- return !! await getLastSession(_optionalChain$2([options, 'optionalAccess', _21 => _21.walletName]))
1670
+ return !! await getLastSession(_optionalChain$2([options, 'optionalAccess', _13 => _13.walletName]))
2214
1671
  };}
2215
1672
 
2216
1673
  constructor() {
@@ -2225,17 +1682,17 @@
2225
1682
  }
2226
1683
 
2227
1684
  async account() {
2228
- if(_optionalChain$2([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.namespaces, 'optionalAccess', _24 => _24.eip155, 'optionalAccess', _25 => _25.accounts, 'optionalAccess', _26 => _26.length])) {
1685
+ if(_optionalChain$2([this, 'access', _14 => _14.session, 'optionalAccess', _15 => _15.namespaces, 'optionalAccess', _16 => _16.eip155, 'optionalAccess', _17 => _17.accounts, 'optionalAccess', _18 => _18.length])) {
2229
1686
  return this.session.namespaces.eip155.accounts[0].split(':')[2]
2230
1687
  }
2231
1688
  }
2232
1689
 
2233
1690
  async setSessionBlockchains() {
2234
- if(!this.session || (!_optionalChain$2([this, 'access', _27 => _27.session, 'optionalAccess', _28 => _28.namespaces, 'optionalAccess', _29 => _29.eip155]) && !_optionalChain$2([this, 'access', _30 => _30.session, 'optionalAccess', _31 => _31.optionalNamespaces, 'optionalAccess', _32 => _32.eip155]))) { return }
1691
+ 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 }
2235
1692
  if(this.session.namespaces.eip155.chains) {
2236
- this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$2([Blockchains__default['default'], 'access', _33 => _33.findByNetworkId, 'call', _34 => _34(chainIdentifier.split(':')[1]), 'optionalAccess', _35 => _35.name])).filter(Boolean);
1693
+ this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$2([Blockchains__default['default'], 'access', _25 => _25.findByNetworkId, 'call', _26 => _26(chainIdentifier.split(':')[1]), 'optionalAccess', _27 => _27.name])).filter(Boolean);
2237
1694
  } else if(this.session.namespaces.eip155.accounts) {
2238
- this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$2([Blockchains__default['default'], 'access', _36 => _36.findByNetworkId, 'call', _37 => _37(accountIdentifier.split(':')[1]), 'optionalAccess', _38 => _38.name])).filter(Boolean);
1695
+ this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$2([Blockchains__default['default'], 'access', _28 => _28.findByNetworkId, 'call', _29 => _29(accountIdentifier.split(':')[1]), 'optionalAccess', _30 => _30.name])).filter(Boolean);
2239
1696
  }
2240
1697
  }
2241
1698
 
@@ -2245,13 +1702,13 @@
2245
1702
 
2246
1703
  try {
2247
1704
 
2248
- this.walletName = _optionalChain$2([options, 'optionalAccess', _39 => _39.name]);
1705
+ this.walletName = _optionalChain$2([options, 'optionalAccess', _31 => _31.name]);
2249
1706
 
2250
1707
  // delete localStorage[`wc@2:client:0.3//session`] // DELETE WC SESSIONS
2251
1708
  this.signClient = await getSignClient();
2252
1709
 
2253
1710
  this.signClient.on("session_delete", (session)=> {
2254
- if(_optionalChain$2([session, 'optionalAccess', _40 => _40.topic]) === _optionalChain$2([this, 'access', _41 => _41.session, 'optionalAccess', _42 => _42.topic])) {
1711
+ if(_optionalChain$2([session, 'optionalAccess', _32 => _32.topic]) === _optionalChain$2([this, 'access', _33 => _33.session, 'optionalAccess', _34 => _34.topic])) {
2255
1712
  localStorage[KEY+':name'] = undefined;
2256
1713
  localStorage[KEY+':logo'] = undefined;
2257
1714
  this.signClient = undefined;
@@ -2260,14 +1717,14 @@
2260
1717
  });
2261
1718
 
2262
1719
  this.signClient.on("session_update", async(session)=> {
2263
- if(_optionalChain$2([session, 'optionalAccess', _43 => _43.topic]) === _optionalChain$2([this, 'access', _44 => _44.session, 'optionalAccess', _45 => _45.topic])) {
1720
+ if(_optionalChain$2([session, 'optionalAccess', _35 => _35.topic]) === _optionalChain$2([this, 'access', _36 => _36.session, 'optionalAccess', _37 => _37.topic])) {
2264
1721
  this.session = this.signClient.session.get(session.topic);
2265
1722
  await this.setSessionBlockchains();
2266
1723
  }
2267
1724
  });
2268
1725
 
2269
1726
  this.signClient.on("session_event", (event)=> {
2270
- if(_optionalChain$2([event, 'optionalAccess', _46 => _46.topic]) === _optionalChain$2([this, 'access', _47 => _47.session, 'optionalAccess', _48 => _48.topic])) {}
1727
+ if(_optionalChain$2([event, 'optionalAccess', _38 => _38.topic]) === _optionalChain$2([this, 'access', _39 => _39.session, 'optionalAccess', _40 => _40.topic])) {}
2271
1728
  });
2272
1729
 
2273
1730
  const connectWallet = async()=>{
@@ -2278,24 +1735,24 @@
2278
1735
  await new Promise(resolve=>setTimeout(resolve, 500)); // to prevent race condition within WalletConnect
2279
1736
  };
2280
1737
 
2281
- const lastSession = _optionalChain$2([this, 'optionalAccess', _49 => _49.walletName, 'optionalAccess', _50 => _50.length]) ? await getLastSession(this.walletName) : undefined;
1738
+ const lastSession = _optionalChain$2([this, 'optionalAccess', _41 => _41.walletName, 'optionalAccess', _42 => _42.length]) ? await getLastSession(this.walletName) : undefined;
2282
1739
  if(lastSession) {
2283
1740
  this.session = lastSession;
2284
1741
  } else {
2285
1742
  await connectWallet();
2286
1743
  }
2287
1744
 
2288
- let meta = _optionalChain$2([this, 'access', _51 => _51.session, 'optionalAccess', _52 => _52.peer, 'optionalAccess', _53 => _53.metadata]);
1745
+ let meta = _optionalChain$2([this, 'access', _43 => _43.session, 'optionalAccess', _44 => _44.peer, 'optionalAccess', _45 => _45.metadata]);
2289
1746
  if(meta && meta.name) {
2290
1747
  this.name = meta.name;
2291
1748
  localStorage[KEY+':name'] = meta.name;
2292
- if(_optionalChain$2([meta, 'optionalAccess', _54 => _54.icons]) && meta.icons.length) {
1749
+ if(_optionalChain$2([meta, 'optionalAccess', _46 => _46.icons]) && meta.icons.length) {
2293
1750
  this.logo = meta.icons[0];
2294
1751
  localStorage[KEY+':logo'] = this.logo;
2295
1752
  }
2296
1753
  }
2297
- if(_optionalChain$2([options, 'optionalAccess', _55 => _55.name])) { localStorage[KEY+':name'] = this.name = options.name; }
2298
- if(_optionalChain$2([options, 'optionalAccess', _56 => _56.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
1754
+ if(_optionalChain$2([options, 'optionalAccess', _47 => _47.name])) { localStorage[KEY+':name'] = this.name = options.name; }
1755
+ if(_optionalChain$2([options, 'optionalAccess', _48 => _48.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
2299
1756
 
2300
1757
  await this.setSessionBlockchains();
2301
1758
 
@@ -2320,24 +1777,7 @@
2320
1777
 
2321
1778
  switchTo(blockchainName) {
2322
1779
  return new Promise((resolve, reject)=>{
2323
-
2324
- const blockchain = Blockchains__default['default'][blockchainName];
2325
-
2326
- Promise.race([
2327
- this.signClient.request({
2328
- topic: this.session.topic,
2329
- chainId: this.getValidChainId(),
2330
- request:{
2331
- method: 'wallet_switchEthereumChain',
2332
- params: [{ chainId: blockchain.id }],
2333
- }
2334
- }),
2335
- new Promise((resolve, reject)=>setTimeout(()=>{
2336
- if(this.blockchains.indexOf(blockchainName) === -1) {
2337
- reject({ code: 'NOT_SUPPORTED' });
2338
- }
2339
- } , 8000))
2340
- ]).catch(reject);
1780
+ reject({ code: 'NOT_SUPPORTED' });
2341
1781
  })
2342
1782
  }
2343
1783
 
@@ -2352,7 +1792,7 @@
2352
1792
  switch (event) {
2353
1793
  case 'account':
2354
1794
  internalCallback = async(event)=> {
2355
- if(_optionalChain$2([event, 'optionalAccess', _57 => _57.topic]) === _optionalChain$2([this, 'access', _58 => _58.session, 'optionalAccess', _59 => _59.topic]) && event.params.event.name === 'accountsChanged') {
1795
+ if(_optionalChain$2([event, 'optionalAccess', _49 => _49.topic]) === _optionalChain$2([this, 'access', _50 => _50.session, 'optionalAccess', _51 => _51.topic]) && event.params.event.name === 'accountsChanged') {
2356
1796
  callback(await this.account());
2357
1797
  }
2358
1798
  };
@@ -2730,7 +2170,6 @@
2730
2170
  WindowEthereum,
2731
2171
  WindowSolana,
2732
2172
  SolanaMobileWalletAdapter,
2733
- WalletConnectV1,
2734
2173
  WalletConnectV2,
2735
2174
  WalletLink
2736
2175
  };
@@ -2795,7 +2234,6 @@
2795
2234
  wallets.ExodusSVM,
2796
2235
 
2797
2236
  // standards (not concrete wallets)
2798
- wallets.WalletConnectV1,
2799
2237
  wallets.WalletConnectV2,
2800
2238
  wallets.SolanaMobileWalletAdapter,
2801
2239
  wallets.WalletLink,