@depay/web3-wallets-evm 17.0.0 → 17.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@
8
8
 
9
9
  var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains);
10
10
 
11
- 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; }
11
+ 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; }
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$c([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
36
+ this.value = _optionalChain$d([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$c([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
76
+ if(_optionalChain$d([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
77
77
  return `(${param.components.map((param)=>this.getParamType(param)).join(',')})`
78
78
  } else {
79
79
  return param.type
@@ -146,7 +146,7 @@
146
146
  }
147
147
  }
148
148
 
149
- 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; }
149
+ 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; }
150
150
 
151
151
  const POLL_SPEED = 500; // 0.5 seconds
152
152
  const MAX_POLLS = 240; // 120 seconds
@@ -167,14 +167,14 @@
167
167
 
168
168
  const provider = await web3ClientSolana.getProvider(transaction.blockchain);
169
169
  const { value } = await provider.getSignatureStatus(signature);
170
- const confirmationStatus = _optionalChain$b([value, 'optionalAccess', _ => _.confirmationStatus]);
170
+ const confirmationStatus = _optionalChain$c([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$b([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
177
+ const failedReason = _optionalChain$c([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;
@@ -265,7 +265,7 @@
265
265
  supported$1.evm = [];
266
266
  supported$1.solana = ['solana'];
267
267
 
268
- 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; }
268
+ 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; }
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$a([window, 'optionalAccess', _6 => _6.solana]) &&
279
+ _optionalChain$b([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$a([window, 'optionalAccess', _7 => _7.solana]) && _optionalChain$a([window, 'optionalAccess', _8 => _8.solana, 'access', _9 => _9.isBitKeep])) &&
285
+ !(_optionalChain$b([window, 'optionalAccess', _7 => _7.solana]) && _optionalChain$b([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$a([window, 'optionalAccess', _10 => _10.okxwallet])
293
+ !_optionalChain$b([window, 'optionalAccess', _10 => _10.okxwallet])
294
294
  )
295
295
  };}
296
296
 
@@ -337,7 +337,7 @@
337
337
  let internalCallback;
338
338
  switch (event) {
339
339
  case 'account':
340
- internalCallback = (publicKey) => callback(_optionalChain$a([publicKey, 'optionalAccess', _11 => _11.toString, 'call', _12 => _12()]));
340
+ internalCallback = (publicKey) => callback(_optionalChain$b([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$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; }
393
+ 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; }
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$9([window, 'optionalAccess', _2 => _2.backpack]) &&
405
+ _optionalChain$a([window, 'optionalAccess', _2 => _2.backpack]) &&
406
406
  window.backpack.isBackpack
407
407
  )
408
408
  };}
@@ -431,7 +431,7 @@
431
431
  okx: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMzYuMSAzMzYuMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzM2LjEgMzM2LjE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPHBhdGggZD0iTTMxMy43LDBIMjIuNEMxMCwwLDAsMTAsMCwyMi40djI5MS4zYzAsMTIuNCwxMCwyMi40LDIyLjQsMjIuNGgyOTEuM2MxMi40LDAsMjIuNC0xMCwyMi40LTIyLjRWMjIuNAoJQzMzNi4xLDEwLDMyNi4xLDAsMzEzLjcsMHoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIwNC41LDEzMC43aC02NC43Yy0yLjcsMC01LDIuMi01LDV2NjQuN2MwLDIuNywyLjIsNSw1LDVoNjQuN2MyLjcsMCw1LTIuMiw1LTV2LTY0LjcKCUMyMDkuNSwxMzIuOSwyMDcuMiwxMzAuNywyMDQuNSwxMzAuN3oiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyOS44LDU2LjFINjUuMWMtMi43LDAtNSwyLjItNSw1djY0LjdjMCwyLjcsMi4yLDUsNSw1aDY0LjdjMi44LDAsNS0yLjIsNS01VjYxCglDMTM0LjgsNTguMywxMzIuNSw1Ni4xLDEyOS44LDU2LjF6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNzkuMSw1Ni4xaC02NC43Yy0yLjcsMC01LDIuMi01LDV2NjQuN2MwLDIuNywyLjIsNSw1LDVoNjQuN2MyLjcsMCw1LTIuMiw1LTVWNjEKCUMyODQuMSw1OC4zLDI4MS45LDU2LjEsMjc5LjEsNTYuMXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyOS44LDIwNS40SDY1LjFjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuOCwwLDUtMi4yLDUtNXYtNjQuNwoJQzEzNC44LDIwNy42LDEzMi41LDIwNS40LDEyOS44LDIwNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjc5LjEsMjA1LjRoLTY0LjdjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuNywwLDUtMi4yLDUtNXYtNjQuNwoJQzI4NC4xLDIwNy42LDI4MS45LDIwNS40LDI3OS4xLDIwNS40eiIvPgo8L3N2Zz4K",
432
432
  };
433
433
 
434
- 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; }
434
+ 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; }
435
435
  class BraveSVM extends WindowSolana {
436
436
 
437
437
  static __initStatic() {this.info = {
@@ -441,14 +441,14 @@
441
441
  platform: 'svm',
442
442
  };}
443
443
 
444
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$8([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isBraveWallet]) };}
444
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$9([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isBraveWallet]) };}
445
445
 
446
446
  getProvider() {
447
447
  return window.braveSolana
448
448
  }
449
449
  } BraveSVM.__initStatic(); BraveSVM.__initStatic2();
450
450
 
451
- 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; }
451
+ 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; }
452
452
  class Coin98SVM extends WindowSolana {
453
453
 
454
454
  static __initStatic() {this.info = {
@@ -458,7 +458,7 @@
458
458
  platform: 'svm',
459
459
  };}
460
460
 
461
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$7([window, 'optionalAccess', _3 => _3.coin98, 'optionalAccess', _4 => _4.sol]) };}
461
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$8([window, 'optionalAccess', _3 => _3.coin98, 'optionalAccess', _4 => _4.sol]) };}
462
462
 
463
463
  getProvider() { return window.coin98.sol }
464
464
 
@@ -482,7 +482,7 @@
482
482
  };}
483
483
  } CoinbaseSVM.__initStatic(); CoinbaseSVM.__initStatic2();
484
484
 
485
- 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; }
485
+ 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; }
486
486
  class ExodusSVM extends WindowSolana {
487
487
 
488
488
  static __initStatic() {this.info = {
@@ -492,7 +492,7 @@
492
492
  platform: 'svm',
493
493
  };}
494
494
 
495
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$6([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isExodus]) };}
495
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$7([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isExodus]) };}
496
496
  } ExodusSVM.__initStatic(); ExodusSVM.__initStatic2();
497
497
 
498
498
  class Glow extends WindowSolana {
@@ -511,7 +511,7 @@
511
511
  };}
512
512
  } Glow.__initStatic(); Glow.__initStatic2();
513
513
 
514
- 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; }
514
+ 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; }
515
515
  class MagicEdenSVM extends WindowSolana {
516
516
 
517
517
  static __initStatic() {this.info = {
@@ -523,12 +523,12 @@
523
523
 
524
524
  static __initStatic2() {this.isAvailable = async()=>{
525
525
  return (
526
- _optionalChain$5([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isMagicEden])
526
+ _optionalChain$6([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isMagicEden])
527
527
  )
528
528
  };}
529
529
  } MagicEdenSVM.__initStatic(); MagicEdenSVM.__initStatic2();
530
530
 
531
- 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; }
531
+ 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; }
532
532
  class OKXSVM extends WindowSolana {
533
533
 
534
534
  static __initStatic() {this.info = {
@@ -540,12 +540,12 @@
540
540
 
541
541
  static __initStatic2() {this.isAvailable = async()=>{
542
542
  return (
543
- _optionalChain$4([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isOkxWallet])
543
+ _optionalChain$5([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isOkxWallet])
544
544
  )
545
545
  };}
546
546
  } OKXSVM.__initStatic(); OKXSVM.__initStatic2();
547
547
 
548
- 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; }
548
+ 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; }
549
549
  class PhantomSVM extends WindowSolana {
550
550
 
551
551
  static __initStatic() {this.info = {
@@ -559,16 +559,16 @@
559
559
  return (
560
560
  window.phantom &&
561
561
  !window.glow &&
562
- !_optionalChain$3([window, 'optionalAccess', _8 => _8.solana, 'optionalAccess', _9 => _9.isGlow]) &&
563
- !_optionalChain$3([window, 'optionalAccess', _10 => _10.solana, 'optionalAccess', _11 => _11.isExodus]) &&
564
- ! _optionalChain$3([window, 'optionalAccess', _12 => _12.ethereum, 'optionalAccess', _13 => _13.isMagicEden]) &&
565
- ! _optionalChain$3([window, 'optionalAccess', _14 => _14.okxwallet]) &&
562
+ !_optionalChain$4([window, 'optionalAccess', _8 => _8.solana, 'optionalAccess', _9 => _9.isGlow]) &&
563
+ !_optionalChain$4([window, 'optionalAccess', _10 => _10.solana, 'optionalAccess', _11 => _11.isExodus]) &&
564
+ ! _optionalChain$4([window, 'optionalAccess', _12 => _12.ethereum, 'optionalAccess', _13 => _13.isMagicEden]) &&
565
+ ! _optionalChain$4([window, 'optionalAccess', _14 => _14.okxwallet]) &&
566
566
  !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])
567
567
  )
568
568
  };}
569
569
  } PhantomSVM.__initStatic(); PhantomSVM.__initStatic2();
570
570
 
571
- function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
571
+ 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; }
572
572
 
573
573
 
574
574
  const KEY = '_DePayWeb3WalletsConnectedSolanaMobileWalletInstance';
@@ -659,8 +659,8 @@
659
659
  await solanaWeb3_js.transact(
660
660
  async (wallet) => {
661
661
  await this.authorize(wallet);
662
- if(_optionalChain$2([options, 'optionalAccess', _ => _.name])) { localStorage[KEY+'_name'] = this.name = options.name; }
663
- if(_optionalChain$2([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY+'_logo'] = this.logo = options.logo; }
662
+ if(_optionalChain$3([options, 'optionalAccess', _ => _.name])) { localStorage[KEY+'_name'] = this.name = options.name; }
663
+ if(_optionalChain$3([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY+'_logo'] = this.logo = options.logo; }
664
664
  }
665
665
  );
666
666
  return this._account
@@ -719,7 +719,7 @@
719
719
  }
720
720
  } SolanaMobileWalletAdapter.__initStatic(); SolanaMobileWalletAdapter.__initStatic2();
721
721
 
722
- function _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
722
+ function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
723
723
  class Solflare extends WindowSolana {
724
724
 
725
725
  static __initStatic() {this.info = {
@@ -730,7 +730,7 @@
730
730
 
731
731
  static __initStatic2() {this.isAvailable = async()=>{
732
732
  return (
733
- _optionalChain$1([window, 'optionalAccess', _2 => _2.solflare]) &&
733
+ _optionalChain$2([window, 'optionalAccess', _2 => _2.solflare]) &&
734
734
  window.solflare.isSolflare
735
735
  )
736
736
  };}
@@ -740,7 +740,7 @@
740
740
  _sendTransaction(transaction) { return this.getProvider().signTransaction(transaction) }
741
741
  } Solflare.__initStatic(); Solflare.__initStatic2();
742
742
 
743
- function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
743
+ function _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
744
744
  class TrustSVM extends WindowSolana {
745
745
 
746
746
  static __initStatic() {this.info = {
@@ -751,7 +751,7 @@
751
751
  };}
752
752
 
753
753
  static __initStatic2() {this.isAvailable = async()=>{
754
- return _optionalChain([window, 'access', _3 => _3.solana, 'optionalAccess', _4 => _4.isTrustWallet])
754
+ return _optionalChain$1([window, 'access', _3 => _3.solana, 'optionalAccess', _4 => _4.isTrustWallet])
755
755
  };}
756
756
  } TrustSVM.__initStatic(); TrustSVM.__initStatic2();
757
757
 
@@ -773,10 +773,22 @@
773
773
  SolanaMobileWalletAdapter,
774
774
  };
775
775
 
776
+ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
776
777
  const getWallets = async(args)=>{
777
778
 
778
779
  let drip = (args && typeof args.drip === 'function') ? args.drip : undefined;
779
780
 
781
+ // eip6963
782
+ window['_eip6963Providers'] = {};
783
+ const announceProvider = (event)=>{
784
+ if(_optionalChain([event, 'optionalAccess', _ => _.detail, 'optionalAccess', _2 => _2.info, 'optionalAccess', _3 => _3.uuid])) {
785
+ window['_eip6963Providers'][_optionalChain([event, 'optionalAccess', _4 => _4.detail, 'optionalAccess', _5 => _5.info, 'optionalAccess', _6 => _6.uuid])] = event.detail.provider;
786
+ }
787
+ };
788
+ window.addEventListener("eip6963:announceProvider", announceProvider);
789
+ window.dispatchEvent(new Event("eip6963:requestProvider"));
790
+ window.removeEventListener("eip6963:announceProvider", announceProvider);
791
+
780
792
  let availableWallets = await Promise.all(
781
793
 
782
794
  Object.keys(wallets).map(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depay/web3-wallets-evm",
3
3
  "moduleName": "Web3Wallets",
4
- "version": "17.0.0",
4
+ "version": "17.2.0",
5
5
  "description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
6
6
  "main": "dist/umd/index.evm.js",
7
7
  "module": "dist/esm/index.evm.js",