@depay/web3-wallets-evm 18.0.7 → 18.0.9

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.
@@ -1,15 +1,14 @@
1
- import { request, estimate, getProvider } from '@depay/web3-client-evm';
1
+ import { request, estimate, getProvider, rpcRequest } from '@depay/web3-client-evm';
2
2
  import Blockchains from '@depay/web3-blockchains';
3
3
  import { ethers } from 'ethers';
4
4
  import { SignClient } from '@depay/walletconnect-v2';
5
5
  import { CoinbaseWalletSDK } from '@depay/coinbase-wallet-sdk';
6
- import { MiniKit, ResponseEvent } from '@depay/worldcoin-precompiled';
7
6
 
8
7
  let supported$1 = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base', 'worldchain'];
9
8
  supported$1.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base', 'worldchain'];
10
9
  supported$1.svm = [];
11
10
 
12
- 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; }
11
+ 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; }
13
12
  class Transaction {
14
13
 
15
14
  constructor({
@@ -35,7 +34,7 @@ class Transaction {
35
34
  this.to = (to && to.match('0x')) ? ethers.utils.getAddress(to) : to;
36
35
 
37
36
  // optional
38
- this.value = _optionalChain$p([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
37
+ this.value = _optionalChain$q([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
39
38
  this.api = api;
40
39
  this.method = method;
41
40
  this.params = params;
@@ -76,7 +75,7 @@ class Transaction {
76
75
  }
77
76
 
78
77
  getParamType(param) {
79
- if(_optionalChain$p([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
78
+ if(_optionalChain$q([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
80
79
  return `(${param.components.map((param)=>this.getParamType(param)).join(',')})`
81
80
  } else {
82
81
  return param.type
@@ -149,7 +148,7 @@ class Transaction {
149
148
  }
150
149
  }
151
150
 
152
- 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; }
151
+ 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; }
153
152
 
154
153
  const sendTransaction$2 = async ({ transaction, wallet })=> {
155
154
  transaction = new Transaction(transaction);
@@ -203,7 +202,7 @@ const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
203
202
  try {
204
203
  sentTransaction.wait(1).then(resolve).catch((error)=>{
205
204
  if(
206
- (error && _optionalChain$o([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
205
+ (error && _optionalChain$p([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
207
206
  (error && error.toString().match('undefined'))
208
207
  ) {
209
208
  setTimeout(()=>{
@@ -217,7 +216,7 @@ const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
217
216
  });
218
217
  } catch(error) {
219
218
  if(
220
- (error && _optionalChain$o([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
219
+ (error && _optionalChain$p([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
221
220
  (error && error.toString().match('undefined'))
222
221
  ) {
223
222
  setTimeout(()=>{
@@ -252,12 +251,12 @@ const submitContractInteraction$2 = async ({ transaction, signer, provider })=>{
252
251
  if(contractArguments) {
253
252
  return await method(...contractArguments, {
254
253
  value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
255
- gasLimit: _optionalChain$o([gas, 'optionalAccess', _7 => _7.toHexString, 'call', _8 => _8()])
254
+ gasLimit: _optionalChain$p([gas, 'optionalAccess', _7 => _7.toHexString, 'call', _8 => _8()])
256
255
  })
257
256
  } else {
258
257
  return await method({
259
258
  value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
260
- gasLimit: _optionalChain$o([gas, 'optionalAccess', _9 => _9.toHexString, 'call', _10 => _10()])
259
+ gasLimit: _optionalChain$p([gas, 'optionalAccess', _9 => _9.toHexString, 'call', _10 => _10()])
261
260
  })
262
261
  }
263
262
  };
@@ -269,7 +268,7 @@ const submitSimpleTransfer$2 = ({ transaction, signer })=>{
269
268
  })
270
269
  };
271
270
 
272
- 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; }
271
+ 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; }
273
272
 
274
273
  class WindowEthereum {
275
274
 
@@ -281,39 +280,39 @@ class WindowEthereum {
281
280
 
282
281
  static __initStatic2() {this.isAvailable = async()=>{
283
282
  return (
284
- _optionalChain$n([window, 'optionalAccess', _38 => _38.ethereum]) &&
283
+ _optionalChain$o([window, 'optionalAccess', _38 => _38.ethereum]) &&
285
284
  // not MetaMask
286
- !(_optionalChain$n([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
285
+ !(_optionalChain$o([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
287
286
  // not Coin98
288
- !_optionalChain$n([window, 'optionalAccess', _41 => _41.coin98]) &&
287
+ !_optionalChain$o([window, 'optionalAccess', _41 => _41.coin98]) &&
289
288
  // not Trust Wallet
290
- !(_optionalChain$n([window, 'optionalAccess', _42 => _42.ethereum, 'optionalAccess', _43 => _43.isTrust]) || _optionalChain$n([window, 'optionalAccess', _44 => _44.ethereum, 'optionalAccess', _45 => _45.isTrustWallet])) &&
289
+ !(_optionalChain$o([window, 'optionalAccess', _42 => _42.ethereum, 'optionalAccess', _43 => _43.isTrust]) || _optionalChain$o([window, 'optionalAccess', _44 => _44.ethereum, 'optionalAccess', _45 => _45.isTrustWallet])) &&
291
290
  // not crypto.com
292
- !_optionalChain$n([window, 'optionalAccess', _46 => _46.ethereum, 'optionalAccess', _47 => _47.isDeficonnectProvider]) &&
291
+ !_optionalChain$o([window, 'optionalAccess', _46 => _46.ethereum, 'optionalAccess', _47 => _47.isDeficonnectProvider]) &&
293
292
  // not HyperPay
294
- !_optionalChain$n([window, 'optionalAccess', _48 => _48.ethereum, 'optionalAccess', _49 => _49.isHyperPay]) &&
293
+ !_optionalChain$o([window, 'optionalAccess', _48 => _48.ethereum, 'optionalAccess', _49 => _49.isHyperPay]) &&
295
294
  // not Phantom
296
- !(window.phantom && !window.glow && !_optionalChain$n([window, 'optionalAccess', _50 => _50.solana, 'optionalAccess', _51 => _51.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
295
+ !(window.phantom && !window.glow && !_optionalChain$o([window, 'optionalAccess', _50 => _50.solana, 'optionalAccess', _51 => _51.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
297
296
  // not Rabby
298
- !_optionalChain$n([window, 'optionalAccess', _52 => _52.ethereum, 'optionalAccess', _53 => _53.isRabby]) &&
297
+ !_optionalChain$o([window, 'optionalAccess', _52 => _52.ethereum, 'optionalAccess', _53 => _53.isRabby]) &&
299
298
  // not Backpack
300
- !_optionalChain$n([window, 'optionalAccess', _54 => _54.backpack, 'optionalAccess', _55 => _55.isBackpack]) &&
299
+ !_optionalChain$o([window, 'optionalAccess', _54 => _54.backpack, 'optionalAccess', _55 => _55.isBackpack]) &&
301
300
  // not TokenPocket
302
- !_optionalChain$n([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isTokenPocket]) &&
301
+ !_optionalChain$o([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isTokenPocket]) &&
303
302
  // not BitKeep
304
- !_optionalChain$n([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isBitKeep]) &&
303
+ !_optionalChain$o([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isBitKeep]) &&
305
304
  // not Coinbase
306
- !(_optionalChain$n([window, 'optionalAccess', _60 => _60.ethereum, 'optionalAccess', _61 => _61.isCoinbaseWallet]) || _optionalChain$n([window, 'optionalAccess', _62 => _62.ethereum, 'optionalAccess', _63 => _63.isWalletLink])) &&
305
+ !(_optionalChain$o([window, 'optionalAccess', _60 => _60.ethereum, 'optionalAccess', _61 => _61.isCoinbaseWallet]) || _optionalChain$o([window, 'optionalAccess', _62 => _62.ethereum, 'optionalAccess', _63 => _63.isWalletLink])) &&
307
306
  // MetaMask through ProviderMap
308
- !_optionalChain$n([window, 'optionalAccess', _64 => _64.ethereum, 'optionalAccess', _65 => _65.providerMap, 'optionalAccess', _66 => _66.has, 'call', _67 => _67('MetaMask')]) &&
307
+ !_optionalChain$o([window, 'optionalAccess', _64 => _64.ethereum, 'optionalAccess', _65 => _65.providerMap, 'optionalAccess', _66 => _66.has, 'call', _67 => _67('MetaMask')]) &&
309
308
  // Brave Wallet
310
- !_optionalChain$n([window, 'optionalAccess', _68 => _68.ethereum, 'optionalAccess', _69 => _69.isBraveWallet]) &&
309
+ !_optionalChain$o([window, 'optionalAccess', _68 => _68.ethereum, 'optionalAccess', _69 => _69.isBraveWallet]) &&
311
310
  // Uniswap Wallet
312
- !_optionalChain$n([window, 'optionalAccess', _70 => _70.ethereum, 'optionalAccess', _71 => _71.isUniswapWallet]) &&
311
+ !_optionalChain$o([window, 'optionalAccess', _70 => _70.ethereum, 'optionalAccess', _71 => _71.isUniswapWallet]) &&
313
312
  // Rainbow
314
- !_optionalChain$n([window, 'optionalAccess', _72 => _72.ethereum, 'optionalAccess', _73 => _73.isRainbow]) &&
313
+ !_optionalChain$o([window, 'optionalAccess', _72 => _72.ethereum, 'optionalAccess', _73 => _73.isRainbow]) &&
315
314
  // OKX Wallet
316
- !_optionalChain$n([window, 'optionalAccess', _74 => _74.okxwallet])
315
+ !_optionalChain$o([window, 'optionalAccess', _74 => _74.okxwallet])
317
316
  )
318
317
  };}
319
318
 
@@ -445,7 +444,7 @@ class WindowEthereum {
445
444
  }
446
445
  } WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
447
446
 
448
- 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; }
447
+ 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; }
449
448
  class Binance extends WindowEthereum {
450
449
 
451
450
  static __initStatic() {this.info = {
@@ -455,7 +454,7 @@ class Binance extends WindowEthereum {
455
454
  };}
456
455
 
457
456
  static __initStatic2() {this.isAvailable = async()=>{
458
- return _optionalChain$m([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
457
+ return _optionalChain$n([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
459
458
  !window.coin98 &&
460
459
  !window.trustwallet
461
460
  };}
@@ -471,11 +470,11 @@ var logos = {
471
470
  coinbase: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiBmaWxsPSIjMDA1MkZGIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUyIDUxMkMxNTIgNzEwLjgyMyAzMTMuMTc3IDg3MiA1MTIgODcyQzcxMC44MjMgODcyIDg3MiA3MTAuODIzIDg3MiA1MTJDODcyIDMxMy4xNzcgNzEwLjgyMyAxNTIgNTEyIDE1MkMzMTMuMTc3IDE1MiAxNTIgMzEzLjE3NyAxNTIgNTEyWk00MjAgMzk2QzQwNi43NDUgMzk2IDM5NiA0MDYuNzQ1IDM5NiA0MjBWNjA0QzM5NiA2MTcuMjU1IDQwNi43NDUgNjI4IDQyMCA2MjhINjA0QzYxNy4yNTUgNjI4IDYyOCA2MTcuMjU1IDYyOCA2MDRWNDIwQzYyOCA0MDYuNzQ1IDYxNy4yNTUgMzk2IDYwNCAzOTZINDIwWiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",
472
471
  trust: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzE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c3M9InN0MCIgZD0iTTEyOS44LDIwNS40SDY1LjFjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuOCwwLDUtMi4yLDUtNXYtNjQuNwoJQzEzNC44LDIwNy42LDEzMi41LDIwNS40LDEyOS44LDIwNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjc5LjEsMjA1LjRoLTY0LjdjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuNywwLDUtMi4yLDUtNXYtNjQuNwoJQzI4NC4xLDIwNy42LDI4MS45LDIwNS40LDI3OS4xLDIwNS40eiIvPgo8L3N2Zz4K",
476
475
  };
477
476
 
478
- 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; }
477
+ 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; }
479
478
  class BraveEVM extends WindowEthereum {
480
479
 
481
480
  static __initStatic() {this.info = {
@@ -485,14 +484,14 @@ class BraveEVM extends WindowEthereum {
485
484
  platform: 'evm',
486
485
  };}
487
486
 
488
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$l([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
487
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$m([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
489
488
 
490
489
  getProvider() {
491
490
  return window.ethereum
492
491
  }
493
492
  } BraveEVM.__initStatic(); BraveEVM.__initStatic2();
494
493
 
495
- 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; }
494
+ 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; }
496
495
  class Coin98EVM extends WindowEthereum {
497
496
 
498
497
  static __initStatic() {this.info = {
@@ -502,13 +501,13 @@ class Coin98EVM extends WindowEthereum {
502
501
  platform: 'evm',
503
502
  };}
504
503
 
505
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$k([window, 'optionalAccess', _2 => _2.coin98]) };}
504
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$l([window, 'optionalAccess', _2 => _2.coin98]) };}
506
505
 
507
506
  getProvider() { return window.coin98.provider }
508
507
 
509
508
  } Coin98EVM.__initStatic(); Coin98EVM.__initStatic2();
510
509
 
511
- 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; }
510
+ 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; }
512
511
  class CoinbaseEVM extends WindowEthereum {
513
512
 
514
513
  static __initStatic() {this.info = {
@@ -519,8 +518,8 @@ class CoinbaseEVM extends WindowEthereum {
519
518
  };}
520
519
 
521
520
  getProvider() {
522
- if(_optionalChain$j([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
523
- return _optionalChain$j([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
521
+ if(_optionalChain$k([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
522
+ return _optionalChain$k([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
524
523
  } else {
525
524
  return window.ethereum
526
525
  }
@@ -529,15 +528,15 @@ class CoinbaseEVM extends WindowEthereum {
529
528
  static __initStatic2() {this.isAvailable = async()=>{
530
529
  return(
531
530
  (
532
- _optionalChain$j([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$j([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
531
+ _optionalChain$k([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$k([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
533
532
  ) || (
534
- _optionalChain$j([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
533
+ _optionalChain$k([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
535
534
  )
536
535
  )
537
536
  };}
538
537
  } CoinbaseEVM.__initStatic(); CoinbaseEVM.__initStatic2();
539
538
 
540
- 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; }
539
+ 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; }
541
540
  class CryptoCom extends WindowEthereum {
542
541
 
543
542
  static __initStatic() {this.info = {
@@ -546,10 +545,10 @@ class CryptoCom extends WindowEthereum {
546
545
  blockchains: supported$1.evm
547
546
  };}
548
547
 
549
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$i([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
548
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$j([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
550
549
  } CryptoCom.__initStatic(); CryptoCom.__initStatic2();
551
550
 
552
- 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; }
551
+ 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; }
553
552
  class ExodusEVM extends WindowEthereum {
554
553
 
555
554
  static __initStatic() {this.info = {
@@ -559,10 +558,10 @@ class ExodusEVM extends WindowEthereum {
559
558
  platform: 'evm',
560
559
  };}
561
560
 
562
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
561
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$i([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
563
562
  } ExodusEVM.__initStatic(); ExodusEVM.__initStatic2();
564
563
 
565
- 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; }
564
+ 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; }
566
565
  class HyperPay extends WindowEthereum {
567
566
 
568
567
  static __initStatic() {this.info = {
@@ -571,10 +570,10 @@ class HyperPay extends WindowEthereum {
571
570
  blockchains: supported$1.evm
572
571
  };}
573
572
 
574
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
573
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
575
574
  } HyperPay.__initStatic(); HyperPay.__initStatic2();
576
575
 
577
- 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; }
576
+ 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; }
578
577
  class MagicEdenEVM extends WindowEthereum {
579
578
 
580
579
  static __initStatic() {this.info = {
@@ -586,12 +585,12 @@ class MagicEdenEVM extends WindowEthereum {
586
585
 
587
586
  static __initStatic2() {this.isAvailable = async()=>{
588
587
  return (
589
- _optionalChain$f([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMagicEden])
588
+ _optionalChain$g([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMagicEden])
590
589
  )
591
590
  };}
592
591
  } MagicEdenEVM.__initStatic(); MagicEdenEVM.__initStatic2();
593
592
 
594
- 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; }
593
+ 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; }
595
594
  class MetaMask extends WindowEthereum {
596
595
 
597
596
  static __initStatic() {this.info = {
@@ -602,7 +601,7 @@ class MetaMask extends WindowEthereum {
602
601
 
603
602
  static __initStatic2() {this.isMetaMask = (provider)=> {
604
603
  return(
605
- _optionalChain$e([provider, 'optionalAccess', _3 => _3.isMetaMask]) &&
604
+ _optionalChain$f([provider, 'optionalAccess', _3 => _3.isMetaMask]) &&
606
605
  Object.keys(provider).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!WalletGuard)(?!RevokeCash)/)).length == 1
607
606
  )
608
607
  };}
@@ -616,16 +615,16 @@ class MetaMask extends WindowEthereum {
616
615
  static __initStatic4() {this.isAvailable = async()=>{
617
616
  return(
618
617
  MetaMask.getEip6963Provider() ||
619
- MetaMask.isMetaMask(_optionalChain$e([window, 'optionalAccess', _4 => _4.ethereum]))
618
+ MetaMask.isMetaMask(_optionalChain$f([window, 'optionalAccess', _4 => _4.ethereum]))
620
619
  )
621
620
  };}
622
621
 
623
622
  getProvider() {
624
- return MetaMask.getEip6963Provider() || (MetaMask.isMetaMask(_optionalChain$e([window, 'optionalAccess', _5 => _5.ethereum])) && _optionalChain$e([window, 'optionalAccess', _6 => _6.ethereum]))
623
+ return MetaMask.getEip6963Provider() || (MetaMask.isMetaMask(_optionalChain$f([window, 'optionalAccess', _5 => _5.ethereum])) && _optionalChain$f([window, 'optionalAccess', _6 => _6.ethereum]))
625
624
  }
626
625
  } MetaMask.__initStatic(); MetaMask.__initStatic2(); MetaMask.__initStatic3(); MetaMask.__initStatic4();
627
626
 
628
- 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; }
627
+ 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; }
629
628
  class OKXEVM extends WindowEthereum {
630
629
 
631
630
  static __initStatic() {this.info = {
@@ -637,12 +636,12 @@ class OKXEVM extends WindowEthereum {
637
636
 
638
637
  static __initStatic2() {this.isAvailable = async()=>{
639
638
  return (
640
- _optionalChain$d([window, 'optionalAccess', _2 => _2.okxwallet])
639
+ _optionalChain$e([window, 'optionalAccess', _2 => _2.okxwallet])
641
640
  )
642
641
  };}
643
642
  } OKXEVM.__initStatic(); OKXEVM.__initStatic2();
644
643
 
645
- 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; }
644
+ 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; }
646
645
  class Opera extends WindowEthereum {
647
646
 
648
647
  static __initStatic() {this.info = {
@@ -651,10 +650,10 @@ class Opera extends WindowEthereum {
651
650
  blockchains: supported$1.evm
652
651
  };}
653
652
 
654
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
653
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
655
654
  } Opera.__initStatic(); Opera.__initStatic2();
656
655
 
657
- 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; }
656
+ 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; }
658
657
  class PhantomEVM extends WindowEthereum {
659
658
 
660
659
  static __initStatic() {this.info = {
@@ -668,17 +667,17 @@ class PhantomEVM extends WindowEthereum {
668
667
  return (
669
668
  window.phantom &&
670
669
  window.phantom.ethereum &&
671
- ! _optionalChain$b([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
672
- ! _optionalChain$b([window, 'optionalAccess', _6 => _6.okxwallet])
670
+ ! _optionalChain$c([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
671
+ ! _optionalChain$c([window, 'optionalAccess', _6 => _6.okxwallet])
673
672
  )
674
673
  };}
675
674
 
676
675
  getProvider() {
677
- return _optionalChain$b([window, 'optionalAccess', _7 => _7.phantom, 'optionalAccess', _8 => _8.ethereum]) || window.ethereum
676
+ return _optionalChain$c([window, 'optionalAccess', _7 => _7.phantom, 'optionalAccess', _8 => _8.ethereum]) || window.ethereum
678
677
  }
679
678
  } PhantomEVM.__initStatic(); PhantomEVM.__initStatic2();
680
679
 
681
- 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; }
680
+ 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; }
682
681
  class Rabby extends WindowEthereum {
683
682
 
684
683
  static __initStatic() {this.info = {
@@ -689,12 +688,12 @@ class Rabby extends WindowEthereum {
689
688
 
690
689
  static __initStatic2() {this.isAvailable = async()=>{
691
690
  return(
692
- _optionalChain$a([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
691
+ _optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
693
692
  )
694
693
  };}
695
694
  } Rabby.__initStatic(); Rabby.__initStatic2();
696
695
 
697
- 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; }
696
+ 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; }
698
697
  class Rainbow extends WindowEthereum {
699
698
 
700
699
  static __initStatic() {this.info = {
@@ -705,24 +704,24 @@ class Rainbow extends WindowEthereum {
705
704
 
706
705
  static __initStatic2() {this.getEip6963Provider = ()=>{
707
706
  return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
708
- return _optionalChain$9([provider, 'optionalAccess', _4 => _4.isRainbow])
707
+ return _optionalChain$a([provider, 'optionalAccess', _4 => _4.isRainbow])
709
708
  }) : undefined
710
709
  };}
711
710
 
712
711
  static __initStatic3() {this.isAvailable = async()=>{
713
712
  return(
714
713
  Rainbow.getEip6963Provider() ||
715
- _optionalChain$9([window, 'optionalAccess', _5 => _5.rainbow, 'optionalAccess', _6 => _6.isRainbow])
714
+ _optionalChain$a([window, 'optionalAccess', _5 => _5.rainbow, 'optionalAccess', _6 => _6.isRainbow])
716
715
  )
717
716
  };}
718
717
 
719
718
  getProvider() {
720
- return Rainbow.getEip6963Provider() || _optionalChain$9([window, 'optionalAccess', _7 => _7.rainbow])
719
+ return Rainbow.getEip6963Provider() || _optionalChain$a([window, 'optionalAccess', _7 => _7.rainbow])
721
720
  }
722
721
 
723
722
  } Rainbow.__initStatic(); Rainbow.__initStatic2(); Rainbow.__initStatic3();
724
723
 
725
- 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; }
724
+ 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; }
726
725
  class TokenPocket extends WindowEthereum {
727
726
 
728
727
  static __initStatic() {this.info = {
@@ -733,12 +732,12 @@ class TokenPocket extends WindowEthereum {
733
732
 
734
733
  static __initStatic2() {this.isAvailable = async()=>{
735
734
  return (
736
- _optionalChain$8([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
735
+ _optionalChain$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
737
736
  )
738
737
  };}
739
738
  } TokenPocket.__initStatic(); TokenPocket.__initStatic2();
740
739
 
741
- 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; }
740
+ 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; }
742
741
  class TrustEVM extends WindowEthereum {
743
742
 
744
743
  static __initStatic() {this.info = {
@@ -750,13 +749,13 @@ class TrustEVM extends WindowEthereum {
750
749
 
751
750
  static __initStatic2() {this.isAvailable = async()=>{
752
751
  return (
753
- (_optionalChain$7([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$7([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
752
+ (_optionalChain$8([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$8([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
754
753
  Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
755
754
  )
756
755
  };}
757
756
  } TrustEVM.__initStatic(); TrustEVM.__initStatic2();
758
757
 
759
- 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; }
758
+ 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; }
760
759
  class Uniswap extends WindowEthereum {
761
760
 
762
761
  static __initStatic() {this.info = {
@@ -767,19 +766,19 @@ class Uniswap extends WindowEthereum {
767
766
 
768
767
  static __initStatic2() {this.getEip6963Provider = ()=>{
769
768
  return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
770
- return _optionalChain$6([provider, 'optionalAccess', _4 => _4.isUniswapWallet])
769
+ return _optionalChain$7([provider, 'optionalAccess', _4 => _4.isUniswapWallet])
771
770
  }) : undefined
772
771
  };}
773
772
 
774
773
  static __initStatic3() {this.isAvailable = async()=>{
775
774
  return(
776
775
  Uniswap.getEip6963Provider() ||
777
- _optionalChain$6([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isUniswapWallet])
776
+ _optionalChain$7([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isUniswapWallet])
778
777
  )
779
778
  };}
780
779
 
781
780
  getProvider() {
782
- return Uniswap.getEip6963Provider() || (_optionalChain$6([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isUniswapWallet]) && _optionalChain$6([window, 'optionalAccess', _9 => _9.ethereum]))
781
+ return Uniswap.getEip6963Provider() || (_optionalChain$7([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isUniswapWallet]) && _optionalChain$7([window, 'optionalAccess', _9 => _9.ethereum]))
783
782
  }
784
783
  } Uniswap.__initStatic(); Uniswap.__initStatic2(); Uniswap.__initStatic3();
785
784
 
@@ -884,7 +883,7 @@ const getSmartContractWallet = async(blockchain, address)=> {
884
883
  }
885
884
  };
886
885
 
887
- 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; }
886
+ 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; }
888
887
 
889
888
  const sendTransaction$1 = async ({ transaction, wallet })=> {
890
889
  transaction = new Transaction(transaction);
@@ -935,7 +934,7 @@ const retrieveConfirmedTransaction$1 = (sentTransaction)=>{
935
934
  try {
936
935
  sentTransaction.wait(1).then(resolve).catch((error)=>{
937
936
  if(
938
- (error && _optionalChain$5([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
937
+ (error && _optionalChain$6([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
939
938
  (error && error.toString().match('undefined'))
940
939
  ) {
941
940
  setTimeout(()=>{
@@ -949,7 +948,7 @@ const retrieveConfirmedTransaction$1 = (sentTransaction)=>{
949
948
  });
950
949
  } catch (error) {
951
950
  if(
952
- (error && _optionalChain$5([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
951
+ (error && _optionalChain$6([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
953
952
  (error && error.toString().match('undefined'))
954
953
  ) {
955
954
  setTimeout(()=>{
@@ -980,7 +979,7 @@ const retrieveTransaction = (tx, blockchain)=>{
980
979
  resolve(sentTransaction);
981
980
  } catch (error) {
982
981
  if(
983
- (error && _optionalChain$5([error, 'optionalAccess', _7 => _7.stack, 'optionalAccess', _8 => _8.match, 'call', _9 => _9('JSON-RPC error')])) ||
982
+ (error && _optionalChain$6([error, 'optionalAccess', _7 => _7.stack, 'optionalAccess', _8 => _8.match, 'call', _9 => _9('JSON-RPC error')])) ||
984
983
  (error && error.toString().match('undefined'))
985
984
  ) {
986
985
  setTimeout(()=>{
@@ -1022,8 +1021,8 @@ const submitContractInteraction$1 = async ({ transaction, wallet })=>{
1022
1021
  to: transaction.to,
1023
1022
  value: transaction.value ? ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
1024
1023
  data: await transaction.getData(),
1025
- gas: _optionalChain$5([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
1026
- gasLimit: _optionalChain$5([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
1024
+ gas: _optionalChain$6([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
1025
+ gasLimit: _optionalChain$6([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
1027
1026
  gasPrice: gasPrice.toHexString(),
1028
1027
  nonce: ethers.utils.hexlify(transaction.nonce),
1029
1028
  }]
@@ -1050,16 +1049,16 @@ const submitSimpleTransfer$1 = async ({ transaction, wallet })=>{
1050
1049
  to: transaction.to,
1051
1050
  value: transaction.value ? ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
1052
1051
  data: '0x0',
1053
- gas: _optionalChain$5([gas, 'optionalAccess', _14 => _14.toHexString, 'call', _15 => _15()]),
1054
- gasLimit: _optionalChain$5([gas, 'optionalAccess', _16 => _16.toHexString, 'call', _17 => _17()]),
1055
- gasPrice: _optionalChain$5([gasPrice, 'optionalAccess', _18 => _18.toHexString, 'call', _19 => _19()]),
1052
+ gas: _optionalChain$6([gas, 'optionalAccess', _14 => _14.toHexString, 'call', _15 => _15()]),
1053
+ gasLimit: _optionalChain$6([gas, 'optionalAccess', _16 => _16.toHexString, 'call', _17 => _17()]),
1054
+ gasPrice: _optionalChain$6([gasPrice, 'optionalAccess', _18 => _18.toHexString, 'call', _19 => _19()]),
1056
1055
  nonce: ethers.utils.hexlify(transaction.nonce)
1057
1056
  }]
1058
1057
  }
1059
1058
  }).catch((e)=>{console.log('ERROR', e);})
1060
1059
  };
1061
1060
 
1062
- 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; }
1061
+ 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; }
1063
1062
 
1064
1063
  const KEY = 'depay:wallets:wc2';
1065
1064
 
@@ -1112,7 +1111,7 @@ const getWalletConnectV2Config = (walletName)=>{
1112
1111
  optionalNamespaces['eip155'] = {
1113
1112
  chains: supported$1.evm.map((blockchain)=>`${Blockchains[blockchain].namespace}:${Blockchains[blockchain].networkId}`),
1114
1113
  };
1115
- if(_optionalChain$4([optionalNamespaces, 'optionalAccess', _ => _.eip155]) && _optionalChain$4([optionalNamespaces, 'optionalAccess', _2 => _2.eip155, 'optionalAccess', _3 => _3.chains, 'optionalAccess', _4 => _4.length])) {
1114
+ if(_optionalChain$5([optionalNamespaces, 'optionalAccess', _ => _.eip155]) && _optionalChain$5([optionalNamespaces, 'optionalAccess', _2 => _2.eip155, 'optionalAccess', _3 => _3.chains, 'optionalAccess', _4 => _4.length])) {
1116
1115
  optionalNamespaces['eip155'].methods = methods;
1117
1116
  optionalNamespaces['eip155'].events = events;
1118
1117
  }
@@ -1127,9 +1126,9 @@ const getSignClient = ()=>{
1127
1126
  projectId: localStorage[KEY+":projectId"],
1128
1127
  metadata: {
1129
1128
  name: document.title || 'dApp',
1130
- description: _optionalChain$4([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('meta[name="description"]'), 'optionalAccess', _7 => _7.getAttribute, 'call', _8 => _8('content')]) || document.title || 'dApp',
1129
+ description: _optionalChain$5([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('meta[name="description"]'), 'optionalAccess', _7 => _7.getAttribute, 'call', _8 => _8('content')]) || document.title || 'dApp',
1131
1130
  url: location.href,
1132
- icons: [_optionalChain$4([document, 'access', _9 => _9.querySelector, 'call', _10 => _10("link[rel~='icon'], link[rel~='shortcut icon']"), 'optionalAccess', _11 => _11.href]) || `${location.origin}/favicon.ico`]
1131
+ icons: [_optionalChain$5([document, 'access', _9 => _9.querySelector, 'call', _10 => _10("link[rel~='icon'], link[rel~='shortcut icon']"), 'optionalAccess', _11 => _11.href]) || `${location.origin}/favicon.ico`]
1133
1132
  }
1134
1133
  });
1135
1134
  resolve(signClient);
@@ -1147,7 +1146,7 @@ class WalletConnectV2 {
1147
1146
  };}
1148
1147
 
1149
1148
  static __initStatic2() {this.isAvailable = async(options)=>{
1150
- return !! await getLastSession(_optionalChain$4([options, 'optionalAccess', _13 => _13.walletName]))
1149
+ return !! await getLastSession(_optionalChain$5([options, 'optionalAccess', _13 => _13.walletName]))
1151
1150
  };}
1152
1151
 
1153
1152
  constructor() {
@@ -1162,17 +1161,17 @@ class WalletConnectV2 {
1162
1161
  }
1163
1162
 
1164
1163
  async account() {
1165
- if(_optionalChain$4([this, 'access', _14 => _14.session, 'optionalAccess', _15 => _15.namespaces, 'optionalAccess', _16 => _16.eip155, 'optionalAccess', _17 => _17.accounts, 'optionalAccess', _18 => _18.length])) {
1164
+ if(_optionalChain$5([this, 'access', _14 => _14.session, 'optionalAccess', _15 => _15.namespaces, 'optionalAccess', _16 => _16.eip155, 'optionalAccess', _17 => _17.accounts, 'optionalAccess', _18 => _18.length])) {
1166
1165
  return this.session.namespaces.eip155.accounts[0].split(':')[2]
1167
1166
  }
1168
1167
  }
1169
1168
 
1170
1169
  async setSessionBlockchains() {
1171
- if(!this.session || (!_optionalChain$4([this, 'access', _19 => _19.session, 'optionalAccess', _20 => _20.namespaces, 'optionalAccess', _21 => _21.eip155]) && !_optionalChain$4([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.optionalNamespaces, 'optionalAccess', _24 => _24.eip155]))) { return }
1170
+ if(!this.session || (!_optionalChain$5([this, 'access', _19 => _19.session, 'optionalAccess', _20 => _20.namespaces, 'optionalAccess', _21 => _21.eip155]) && !_optionalChain$5([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.optionalNamespaces, 'optionalAccess', _24 => _24.eip155]))) { return }
1172
1171
  if(this.session.namespaces.eip155.chains) {
1173
- this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$4([Blockchains, 'access', _25 => _25.findByNetworkId, 'call', _26 => _26(chainIdentifier.split(':')[1]), 'optionalAccess', _27 => _27.name])).filter(Boolean);
1172
+ this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$5([Blockchains, 'access', _25 => _25.findByNetworkId, 'call', _26 => _26(chainIdentifier.split(':')[1]), 'optionalAccess', _27 => _27.name])).filter(Boolean);
1174
1173
  } else if(this.session.namespaces.eip155.accounts) {
1175
- this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$4([Blockchains, 'access', _28 => _28.findByNetworkId, 'call', _29 => _29(accountIdentifier.split(':')[1]), 'optionalAccess', _30 => _30.name])).filter(Boolean);
1174
+ this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$5([Blockchains, 'access', _28 => _28.findByNetworkId, 'call', _29 => _29(accountIdentifier.split(':')[1]), 'optionalAccess', _30 => _30.name])).filter(Boolean);
1176
1175
  }
1177
1176
  }
1178
1177
 
@@ -1182,13 +1181,13 @@ class WalletConnectV2 {
1182
1181
 
1183
1182
  try {
1184
1183
 
1185
- this.walletName = _optionalChain$4([options, 'optionalAccess', _31 => _31.name]);
1184
+ this.walletName = _optionalChain$5([options, 'optionalAccess', _31 => _31.name]);
1186
1185
 
1187
1186
  // delete localStorage[`wc@2:client:0.3//session`] // DELETE WC SESSIONS
1188
1187
  this.signClient = await getSignClient();
1189
1188
 
1190
1189
  this.signClient.on("session_delete", (session)=> {
1191
- if(_optionalChain$4([session, 'optionalAccess', _32 => _32.topic]) === _optionalChain$4([this, 'access', _33 => _33.session, 'optionalAccess', _34 => _34.topic])) {
1190
+ if(_optionalChain$5([session, 'optionalAccess', _32 => _32.topic]) === _optionalChain$5([this, 'access', _33 => _33.session, 'optionalAccess', _34 => _34.topic])) {
1192
1191
  localStorage[KEY+':name'] = undefined;
1193
1192
  localStorage[KEY+':logo'] = undefined;
1194
1193
  this.signClient = undefined;
@@ -1197,14 +1196,14 @@ class WalletConnectV2 {
1197
1196
  });
1198
1197
 
1199
1198
  this.signClient.on("session_update", async(session)=> {
1200
- if(_optionalChain$4([session, 'optionalAccess', _35 => _35.topic]) === _optionalChain$4([this, 'access', _36 => _36.session, 'optionalAccess', _37 => _37.topic])) {
1199
+ if(_optionalChain$5([session, 'optionalAccess', _35 => _35.topic]) === _optionalChain$5([this, 'access', _36 => _36.session, 'optionalAccess', _37 => _37.topic])) {
1201
1200
  this.session = this.signClient.session.get(session.topic);
1202
1201
  await this.setSessionBlockchains();
1203
1202
  }
1204
1203
  });
1205
1204
 
1206
1205
  this.signClient.on("session_event", (event)=> {
1207
- if(_optionalChain$4([event, 'optionalAccess', _38 => _38.topic]) === _optionalChain$4([this, 'access', _39 => _39.session, 'optionalAccess', _40 => _40.topic])) {}
1206
+ if(_optionalChain$5([event, 'optionalAccess', _38 => _38.topic]) === _optionalChain$5([this, 'access', _39 => _39.session, 'optionalAccess', _40 => _40.topic])) {}
1208
1207
  });
1209
1208
 
1210
1209
  const connectWallet = async()=>{
@@ -1215,24 +1214,24 @@ class WalletConnectV2 {
1215
1214
  await new Promise(resolve=>setTimeout(resolve, 500)); // to prevent race condition within WalletConnect
1216
1215
  };
1217
1216
 
1218
- const lastSession = _optionalChain$4([this, 'optionalAccess', _41 => _41.walletName, 'optionalAccess', _42 => _42.length]) ? await getLastSession(this.walletName) : undefined;
1217
+ const lastSession = _optionalChain$5([this, 'optionalAccess', _41 => _41.walletName, 'optionalAccess', _42 => _42.length]) ? await getLastSession(this.walletName) : undefined;
1219
1218
  if(lastSession) {
1220
1219
  this.session = lastSession;
1221
1220
  } else {
1222
1221
  await connectWallet();
1223
1222
  }
1224
1223
 
1225
- let meta = _optionalChain$4([this, 'access', _43 => _43.session, 'optionalAccess', _44 => _44.peer, 'optionalAccess', _45 => _45.metadata]);
1224
+ let meta = _optionalChain$5([this, 'access', _43 => _43.session, 'optionalAccess', _44 => _44.peer, 'optionalAccess', _45 => _45.metadata]);
1226
1225
  if(meta && meta.name) {
1227
1226
  this.name = meta.name;
1228
1227
  localStorage[KEY+':name'] = meta.name;
1229
- if(_optionalChain$4([meta, 'optionalAccess', _46 => _46.icons]) && meta.icons.length) {
1228
+ if(_optionalChain$5([meta, 'optionalAccess', _46 => _46.icons]) && meta.icons.length) {
1230
1229
  this.logo = meta.icons[0];
1231
1230
  localStorage[KEY+':logo'] = this.logo;
1232
1231
  }
1233
1232
  }
1234
- if(_optionalChain$4([options, 'optionalAccess', _47 => _47.name])) { localStorage[KEY+':name'] = this.name = options.name; }
1235
- if(_optionalChain$4([options, 'optionalAccess', _48 => _48.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
1233
+ if(_optionalChain$5([options, 'optionalAccess', _47 => _47.name])) { localStorage[KEY+':name'] = this.name = options.name; }
1234
+ if(_optionalChain$5([options, 'optionalAccess', _48 => _48.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
1236
1235
 
1237
1236
  await this.setSessionBlockchains();
1238
1237
 
@@ -1272,7 +1271,7 @@ class WalletConnectV2 {
1272
1271
  switch (event) {
1273
1272
  case 'account':
1274
1273
  internalCallback = async(event)=> {
1275
- if(_optionalChain$4([event, 'optionalAccess', _49 => _49.topic]) === _optionalChain$4([this, 'access', _50 => _50.session, 'optionalAccess', _51 => _51.topic]) && event.params.event.name === 'accountsChanged') {
1274
+ if(_optionalChain$5([event, 'optionalAccess', _49 => _49.topic]) === _optionalChain$5([this, 'access', _50 => _50.session, 'optionalAccess', _51 => _51.topic]) && event.params.event.name === 'accountsChanged') {
1276
1275
  callback(await this.account());
1277
1276
  }
1278
1277
  };
@@ -1332,7 +1331,7 @@ class WalletConnectV2 {
1332
1331
 
1333
1332
  WalletConnectV2.getConnectedInstance = getConnectedInstance$1;
1334
1333
 
1335
- 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; }
1334
+ 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; }
1336
1335
  const sendTransaction = async ({ transaction, wallet })=> {
1337
1336
  transaction = new Transaction(transaction);
1338
1337
  if((await wallet.connectedTo(transaction.blockchain)) == false) {
@@ -1384,7 +1383,7 @@ const retrieveConfirmedTransaction = (sentTransaction)=>{
1384
1383
 
1385
1384
  sentTransaction.wait(1).then(resolve).catch((error)=>{
1386
1385
  if(
1387
- (error && _optionalChain$3([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
1386
+ (error && _optionalChain$4([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
1388
1387
  (error && error.toString().match('undefined'))
1389
1388
  ) {
1390
1389
  setTimeout(()=>{
@@ -1398,7 +1397,7 @@ const retrieveConfirmedTransaction = (sentTransaction)=>{
1398
1397
  });
1399
1398
  } catch(error) {
1400
1399
  if(
1401
- (error && _optionalChain$3([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
1400
+ (error && _optionalChain$4([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
1402
1401
  (error && error.toString().match('undefined'))
1403
1402
  ) {
1404
1403
  setTimeout(()=>{
@@ -1443,7 +1442,7 @@ const submitSimpleTransfer = ({ transaction, signer })=>{
1443
1442
  })
1444
1443
  };
1445
1444
 
1446
- 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; }
1445
+ 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; }
1447
1446
 
1448
1447
  const getConnectedInstance = ()=>{
1449
1448
  return window._connectedWalletLinkInstance
@@ -1497,10 +1496,10 @@ class WalletLink {
1497
1496
  let connect = (options && options.connect) ? options.connect : ({uri})=>{};
1498
1497
  await connect({ uri: this.connector.qrUrl });
1499
1498
 
1500
- _optionalChain$2([document, 'access', _ => _.querySelector, 'call', _2 => _2('.-cbwsdk-css-reset'), 'optionalAccess', _3 => _3.setAttribute, 'call', _4 => _4('style', 'display: none;')]);
1501
- _optionalChain$2([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('.-cbwsdk-extension-dialog-container'), 'optionalAccess', _7 => _7.setAttribute, 'call', _8 => _8('style', 'display: none;')]);
1499
+ _optionalChain$3([document, 'access', _ => _.querySelector, 'call', _2 => _2('.-cbwsdk-css-reset'), 'optionalAccess', _3 => _3.setAttribute, 'call', _4 => _4('style', 'display: none;')]);
1500
+ _optionalChain$3([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('.-cbwsdk-extension-dialog-container'), 'optionalAccess', _7 => _7.setAttribute, 'call', _8 => _8('style', 'display: none;')]);
1502
1501
  setTimeout(()=>{
1503
- if(_optionalChain$2([this, 'optionalAccess', _9 => _9.connector, 'optionalAccess', _10 => _10._relay, 'optionalAccess', _11 => _11.ui, 'optionalAccess', _12 => _12.linkFlow, 'optionalAccess', _13 => _13.isOpen])){
1502
+ if(_optionalChain$3([this, 'optionalAccess', _9 => _9.connector, 'optionalAccess', _10 => _10._relay, 'optionalAccess', _11 => _11.ui, 'optionalAccess', _12 => _12.linkFlow, 'optionalAccess', _13 => _13.isOpen])){
1504
1503
  this.connector._relay.ui.linkFlow.isOpen = false;
1505
1504
  }
1506
1505
  }, 10);
@@ -1624,17 +1623,363 @@ class WalletLink {
1624
1623
  WalletLink.getConnectedInstance = getConnectedInstance;
1625
1624
  WalletLink.setConnectedInstance = setConnectedInstance;
1626
1625
 
1626
+ function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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; }// https://github.com/worldcoin/minikit-js/blob/main/packages/core/helpers/siwe/siwe.ts
1627
+ const generateSiweMessage = (siweMessageData) => {
1628
+ let siweMessage = '';
1629
+
1630
+ if (siweMessageData.scheme) {
1631
+ siweMessage += `${siweMessageData.scheme}://${siweMessageData.domain} wants you to sign in with your Ethereum account:\n`;
1632
+ } else {
1633
+ siweMessage += `${siweMessageData.domain} wants you to sign in with your Ethereum account:\n`;
1634
+ }
1635
+
1636
+ // NOTE: This differs from the ERC-4361 spec where the address is required
1637
+ if (siweMessageData.address) {
1638
+ siweMessage += `${siweMessageData.address}\n`;
1639
+ } else {
1640
+ siweMessage += '{address}\n';
1641
+ }
1642
+ siweMessage += '\n';
1643
+
1644
+ if (siweMessageData.statement) {
1645
+ siweMessage += `${siweMessageData.statement}\n`;
1646
+ }
1647
+
1648
+ siweMessage += '\n';
1649
+
1650
+ siweMessage += `URI: ${siweMessageData.uri}\n`;
1651
+ siweMessage += `Version: ${siweMessageData.version}\n`;
1652
+ siweMessage += `Chain ID: ${siweMessageData.chain_id}\n`;
1653
+ siweMessage += `Nonce: ${siweMessageData.nonce}\n`;
1654
+ siweMessage += `Issued At: ${siweMessageData.issued_at}\n`;
1655
+
1656
+ if (siweMessageData.expiration_time) {
1657
+ siweMessage += `Expiration Time: ${siweMessageData.expiration_time}\n`;
1658
+ }
1659
+
1660
+ if (siweMessageData.not_before) {
1661
+ siweMessage += `Not Before: ${siweMessageData.not_before}\n`;
1662
+ }
1663
+
1664
+ if (siweMessageData.request_id) {
1665
+ siweMessage += `Request ID: ${siweMessageData.request_id}\n`;
1666
+ }
1667
+
1668
+ return siweMessage
1669
+ };
1670
+
1671
+ // https://github.com/worldcoin/minikit-js/blob/main/packages/core/helpers/transaction/validate-payload.ts
1672
+ const isValidHex = (str) => {
1673
+ return /^0x[0-9A-Fa-f]+$/.test(str)
1674
+ };
1675
+ const processTransactionPayload = (payload) => {
1676
+ // Handle primitives directly
1677
+ if (
1678
+ typeof payload === 'boolean' ||
1679
+ typeof payload === 'string' ||
1680
+ payload === null ||
1681
+ payload === undefined
1682
+ ) {
1683
+ return payload
1684
+ }
1685
+
1686
+ // Convert numbers to strings to prevent overflow issues
1687
+ if (typeof payload === 'number' || typeof payload === 'bigint') {
1688
+ return String(payload)
1689
+ }
1690
+
1691
+ // Handle arrays by processing each element
1692
+ if (Array.isArray(payload)) {
1693
+ return payload.map((value) => processTransactionPayload(value))
1694
+ }
1695
+
1696
+ // Handle objects
1697
+ if (typeof payload === 'object') {
1698
+ const result = { ...payload };
1699
+
1700
+ // Special handling for transaction value fields
1701
+ if ('value' in result && result.value !== undefined) {
1702
+ // Ensure it's a string
1703
+ if (typeof result.value !== 'string') {
1704
+ result.value = String(result.value);
1705
+ }
1706
+
1707
+ if (!isValidHex(result.value)) {
1708
+ console.error(
1709
+ 'Transaction value must be a valid hex string',
1710
+ result.value,
1711
+ );
1712
+ throw new Error(
1713
+ `Transaction value must be a valid hex string: ${result.value}`,
1714
+ )
1715
+ }
1716
+ }
1717
+
1718
+ // Process all object properties recursively
1719
+ for (const key in result) {
1720
+ if (Object.prototype.hasOwnProperty.call(result, key)) {
1721
+ result[key] = processTransactionPayload(result[key]);
1722
+ }
1723
+ }
1724
+
1725
+ return result
1726
+ }
1727
+
1728
+ // Fallback for any other types
1729
+ return payload
1730
+ };
1731
+
1732
+ // https://github.com/worldcoin/minikit-js/blob/main/packages/core/helpers/send-webview-event.ts
1733
+ const sendMiniKitEvent = function(payload) {
1734
+ if (window.webkit) {
1735
+ if (
1736
+ window.webkit.messageHandlers &&
1737
+ window.webkit.messageHandlers.minikit &&
1738
+ window.webkit.messageHandlers.minikit.postMessage
1739
+ ) {
1740
+ window.webkit.messageHandlers.minikit.postMessage(payload);
1741
+ }
1742
+ } else if (window.Android && window.Android.postMessage) {
1743
+ window.Android.postMessage(JSON.stringify(payload));
1744
+ }
1745
+ };
1746
+
1747
+ // https://github.com/worldcoin/minikit-js/blob/main/packages/core/types/commands.ts
1748
+ let Command = {
1749
+ "Verify": 'verify',
1750
+ "Pay": 'pay',
1751
+ "WalletAuth": 'wallet-auth',
1752
+ "SendTransaction": 'send-transaction',
1753
+ "SignMessage": 'sign-message',
1754
+ "SignTypedData": 'sign-typed-data',
1755
+ "ShareContacts": 'share-contacts',
1756
+ "RequestPermission": 'request-permission',
1757
+ "GetPermissions": 'get-permissions',
1758
+ "SendHapticFeedback": 'send-haptic-feedback',
1759
+ "ShareFiles": 'share-files',
1760
+ };
1761
+
1762
+ // https://github.com/worldcoin/minikit-js/blob/main/packages/core/types/responses.ts
1763
+ let ResponseEvent = {
1764
+ "MiniAppVerifyAction": "miniapp-verify-action",
1765
+ "MiniAppPayment": "miniapp-payment",
1766
+ "MiniAppWalletAuth": "miniapp-wallet-auth",
1767
+ "MiniAppSendTransaction": "miniapp-send-transaction",
1768
+ "MiniAppSignMessage": "miniapp-sign-message",
1769
+ "MiniAppSignTypedData": "miniapp-sign-typed-data",
1770
+ "MiniAppShareContacts": "miniapp-share-contacts",
1771
+ "MiniAppRequestPermission": "miniapp-request-permission",
1772
+ "MiniAppGetPermissions": "miniapp-get-permissions",
1773
+ "MiniAppSendHapticFeedback": "miniapp-send-haptic-feedback",
1774
+ "MiniAppShareFiles": "miniapp-share-files",
1775
+ };
1776
+
1777
+ // https://github.com/worldcoin/minikit-js/blob/main/packages/core/index.ts
1778
+ // https://github.com/worldcoin/minikit-js/blob/main/packages/core/minikit.ts
1779
+
1780
+ class MiniKit {
1781
+
1782
+ static __initStatic() {this.MINIKIT_VERSION = 1;}
1783
+
1784
+ static __initStatic2() {this.miniKitCommandVersion = {
1785
+ [Command.Verify]: 1,
1786
+ [Command.Pay]: 1,
1787
+ [Command.WalletAuth]: 1,
1788
+ [Command.SendTransaction]: 1,
1789
+ [Command.SignMessage]: 1,
1790
+ [Command.SignTypedData]: 1,
1791
+ [Command.ShareContacts]: 1,
1792
+ [Command.RequestPermission]: 1,
1793
+ [Command.GetPermissions]: 1,
1794
+ [Command.SendHapticFeedback]: 1,
1795
+ [Command.ShareFiles]: 1,
1796
+ };}
1797
+
1798
+ static __initStatic3() {this.listeners = {
1799
+ [ResponseEvent.MiniAppVerifyAction]: () => {},
1800
+ [ResponseEvent.MiniAppPayment]: () => {},
1801
+ [ResponseEvent.MiniAppWalletAuth]: () => {},
1802
+ [ResponseEvent.MiniAppSendTransaction]: () => {},
1803
+ [ResponseEvent.MiniAppSignMessage]: () => {},
1804
+ [ResponseEvent.MiniAppSignTypedData]: () => {},
1805
+ [ResponseEvent.MiniAppShareContacts]: () => {},
1806
+ [ResponseEvent.MiniAppRequestPermission]: () => {},
1807
+ [ResponseEvent.MiniAppGetPermissions]: () => {},
1808
+ [ResponseEvent.MiniAppSendHapticFeedback]: () => {},
1809
+ [ResponseEvent.MiniAppShareFiles]: () => {},
1810
+ };}
1811
+
1812
+ static __initStatic4() {this.appId = null;}
1813
+ static __initStatic5() {this.user = {};}
1814
+ static __initStatic6() {this.isReady = false;}
1815
+
1816
+ static install(appId) {
1817
+
1818
+ if (typeof window === "undefined" || Boolean(window.MiniKit)) {
1819
+ return {
1820
+ success: false,
1821
+ errorCode: 'already_installed',
1822
+ errorMessage: 'MiniKit is already installed.'
1823
+ }
1824
+ }
1825
+
1826
+ if (!appId) {
1827
+ console.warn("App ID not provided during install");
1828
+ } else {
1829
+ MiniKit.appId = appId;
1830
+ }
1831
+
1832
+ if (!window.WorldApp) {
1833
+ return {
1834
+ success: false,
1835
+ errorCode: 'outside_of_worldapp',
1836
+ errorMessage: 'MiniApp launched outside of WorldApp.'
1837
+ }
1838
+ }
1839
+
1840
+ // Set user properties
1841
+ MiniKit.user.optedIntoOptionalAnalytics = window.WorldApp.is_optional_analytics;
1842
+ MiniKit.user.deviceOS = window.WorldApp.device_os;
1843
+ MiniKit.user.worldAppVersion = window.WorldApp.world_app_version;
1844
+
1845
+ try {
1846
+ window.MiniKit = MiniKit;
1847
+ this.sendInit();
1848
+ } catch (error) {
1849
+ console.error(
1850
+ 'Failed to install MiniKit.',
1851
+ error
1852
+ );
1853
+
1854
+ return {
1855
+ success: false,
1856
+ errorCode: 'unknown',
1857
+ errorMessage: 'Failed to install MiniKit.'
1858
+ }
1859
+ }
1860
+
1861
+ MiniKit.isReady = true;
1862
+ return { success: true }
1863
+ }
1864
+
1865
+ static sendInit() {
1866
+ sendWebviewEvent({
1867
+ command: 'init',
1868
+ payload: { version: this.MINIKIT_VERSION },
1869
+ });
1870
+ }
1871
+
1872
+ static subscribe(event, handler) {
1873
+ if (event === ResponseEvent.MiniAppWalletAuth) {
1874
+ const originalHandler = handler;
1875
+ const wrappedHandler = async (payload) => {
1876
+ if (payload.status === 'success') {
1877
+ MiniKit.user.walletAddress = payload.address;
1878
+ }
1879
+ originalHandler(payload);
1880
+ };
1881
+ this.listeners[event] = wrappedHandler;
1882
+ } else if (event === ResponseEvent.MiniAppVerifyAction) {
1883
+ const originalHandler = handler;
1884
+ const wrappedHandler = (payload) => {
1885
+ originalHandler(payload);
1886
+ };
1887
+ this.listeners[event] = wrappedHandler;
1888
+ } else {
1889
+ this.listeners[event] = handler;
1890
+ }
1891
+ }
1892
+
1893
+ static unsubscribe(event) {
1894
+ delete this.listeners[event];
1895
+ }
1896
+
1897
+ static trigger(event, payload) {
1898
+ if (!this.listeners[event]) {
1899
+ console.error(
1900
+ `No handler for event ${event}, payload: ${JSON.stringify(payload)}`
1901
+ );
1902
+ return
1903
+ }
1904
+ this.listeners[event](payload);
1905
+ }
1906
+
1907
+ static __initStatic7() {this.commands = {
1908
+
1909
+ walletAuth: (payload) => {
1910
+
1911
+ let protocol = null;
1912
+ try {
1913
+ const currentUrl = new URL(window.location.href);
1914
+ protocol = currentUrl.protocol.split(':')[0];
1915
+ } catch (error) {
1916
+ console.error('Failed to get current URL', error);
1917
+ return null
1918
+ }
1919
+
1920
+ const siweMessage = generateSiweMessage({
1921
+ scheme: protocol,
1922
+ domain: window.location.host,
1923
+ statement: _nullishCoalesce(payload.statement, () => ( undefined)),
1924
+ uri: window.location.href,
1925
+ version: '1',
1926
+ chain_id: 480,
1927
+ nonce: payload.nonce,
1928
+ issued_at: new Date().toISOString(),
1929
+ expiration_time: _optionalChain$2([payload, 'access', _7 => _7.expirationTime, 'optionalAccess', _8 => _8.toISOString, 'call', _9 => _9()]),
1930
+ not_before: _optionalChain$2([payload, 'access', _10 => _10.notBefore, 'optionalAccess', _11 => _11.toISOString, 'call', _12 => _12()]),
1931
+ request_id: _nullishCoalesce(payload.requestId, () => ( undefined)),
1932
+ });
1933
+
1934
+ const walletAuthPayload = { siweMessage };
1935
+ sendMiniKitEvent({
1936
+ command: Command.WalletAuth,
1937
+ version: this.miniKitCommandVersion[Command.WalletAuth],
1938
+ payload: walletAuthPayload,
1939
+ });
1940
+
1941
+ return walletAuthPayload
1942
+ },
1943
+
1944
+ sendTransaction: (payload) => {
1945
+
1946
+ const validatedPayload = processTransactionPayload(payload);
1947
+
1948
+ sendMiniKitEvent({
1949
+ command: Command.SendTransaction,
1950
+ version: this.miniKitCommandVersion[Command.SendTransaction],
1951
+ payload: validatedPayload,
1952
+ });
1953
+
1954
+ return validatedPayload
1955
+ },
1956
+
1957
+ signMessage: (payload) => {
1958
+
1959
+ sendMiniKitEvent({
1960
+ command: Command.SignMessage,
1961
+ version: this.miniKitCommandVersion[Command.SignMessage],
1962
+ payload,
1963
+ });
1964
+
1965
+ return payload
1966
+ },
1967
+ };}
1968
+ } MiniKit.__initStatic(); MiniKit.__initStatic2(); MiniKit.__initStatic3(); MiniKit.__initStatic4(); MiniKit.__initStatic5(); MiniKit.__initStatic6(); MiniKit.__initStatic7();
1969
+
1627
1970
  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; }
1628
1971
 
1629
1972
  class WorldApp {
1630
1973
 
1631
- static __initStatic() {this.info = {
1974
+ static __initStatic() {this.MiniKit = MiniKit;}
1975
+
1976
+ static __initStatic2() {this.info = {
1632
1977
  name: 'World App',
1633
1978
  logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMzIDMyIj4KICA8Zz4KICAgIDxnPgogICAgICA8cmVjdCBmaWxsPSIjMDAwMDAwIiB3aWR0aD0iMzMiIGhlaWdodD0iMzIiLz4KICAgIDwvZz4KICAgIDxnPgogICAgICA8cGF0aCBmaWxsPSIjRkZGRkZGIiBkPSJNMjQuNywxMi41Yy0uNS0xLjEtMS4xLTItMS45LTIuOHMtMS44LTEuNS0yLjgtMS45Yy0xLjEtLjUtMi4zLS43LTMuNS0uN3MtMi40LjItMy41LjdjLTEuMS41LTIsMS4xLTIuOCwxLjlzLTEuNSwxLjgtMS45LDIuOGMtLjUsMS4xLS43LDIuMy0uNywzLjVzLjIsMi40LjcsMy41LDEuMSwyLDEuOSwyLjhjLjguOCwxLjgsMS41LDIuOCwxLjksMS4xLjUsMi4zLjcsMy41LjdzMi40LS4yLDMuNS0uNywyLTEuMSwyLjgtMS45LDEuNS0xLjgsMS45LTIuOGMuNS0xLjEuNy0yLjMuNy0zLjVzLS4yLTIuNC0uNy0zLjVaTTEzLjUsMTUuMmMuNC0xLjQsMS43LTIuNSwzLjItMi41aDYuMmMuNC44LjcsMS42LjcsMi41aC0xMC4xWk0yMy43LDE2LjhjMCwuOS0uNCwxLjctLjcsMi41aC02LjJjLTEuNSwwLTIuOC0xLjEtMy4yLTIuNWgxMC4xWk0xMS40LDEwLjljMS40LTEuNCwzLjItMi4xLDUuMS0yLjFzMy44LjcsNS4xLDIuMWguMWMwLC4xLTUsLjEtNSwuMS0xLjMsMC0yLjYuNS0zLjUsMS41LS43LjctMS4yLDEuNy0xLjQsMi43aC0yLjVjLjItMS42LjktMy4xLDIuMS00LjNaTTE2LjUsMjMuMmMtMS45LDAtMy44LS43LTUuMS0yLjEtMS4yLTEuMi0xLjktMi43LTIuMS00LjNoMi41Yy4yLDEsLjcsMS45LDEuNCwyLjcuOS45LDIuMiwxLjUsMy41LDEuNWg1LS4xYy0xLjQsMS41LTMuMiwyLjItNS4xLDIuMloiLz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo=",
1634
1979
  blockchains: ["worldchain"]
1635
1980
  };}
1636
1981
 
1637
- static __initStatic2() {this.isAvailable = async()=>{
1982
+ static __initStatic3() {this.isAvailable = async()=>{
1638
1983
  return Boolean(
1639
1984
  _optionalChain$1([window, 'optionalAccess', _2 => _2.WorldApp])
1640
1985
  )
@@ -1649,25 +1994,17 @@ class WorldApp {
1649
1994
  }
1650
1995
 
1651
1996
  sendTransaction(transaction) {
1652
- console.log('sendTransaction', transaction);
1653
1997
  transaction = new Transaction(transaction);
1654
- console.log('after transaction wrapping transaction.sent', transaction.sent);
1655
- console.log('after transaction wrapping transaction.succeeded', transaction.succeeded);
1656
- console.log('after transaction wrapping transaction.failed', transaction.failed);
1657
1998
 
1658
1999
  return new Promise(async(resolve, reject)=>{
1659
2000
  await transaction.prepare({ wallet: this });
1660
- console.log('after prepare transaction', transaction);
1661
2001
  transaction.nonce = (await this.transactionCount({ blockchain: 'worldchain', address: transaction.from })).toString();
1662
- console.log('after nonce transaction', transaction);
2002
+ transaction.fromBlock = await request('worldchain://latestBlockNumber');
1663
2003
 
1664
- console.log('before MiniKit.subscribe');
1665
2004
  MiniKit.subscribe(ResponseEvent.MiniAppSendTransaction, (payload)=> {
1666
- console.log('payload', payload);
2005
+ MiniKit.unsubscribe(ResponseEvent.MiniAppSendTransaction);
1667
2006
  if (payload.status == "success") {
1668
- console.log('before transaction.accepted', transaction);
1669
2007
  if (transaction.accepted) { transaction.accepted(); }
1670
- console.log('after transaction.accepted', transaction);
1671
2008
  this.fetchTransaction(transaction, payload).then((transactionHash)=>{
1672
2009
  if(transactionHash) {
1673
2010
  resolve(transaction);
@@ -1679,9 +2016,7 @@ class WorldApp {
1679
2016
  reject('Submitting transaction failed!');
1680
2017
  }
1681
2018
  });
1682
- console.log('after MiniKit.subscribe');
1683
-
1684
- console.log('before MiniKit.commands.sendTransaction', {
2019
+ MiniKit.commands.sendTransaction({
1685
2020
  transaction: [
1686
2021
  {
1687
2022
  address: transaction.to,
@@ -1692,70 +2027,107 @@ class WorldApp {
1692
2027
  ],
1693
2028
  permit2: [_optionalChain$1([transaction, 'access', _13 => _13.params, 'optionalAccess', _14 => _14.permit2])]
1694
2029
  });
1695
- MiniKit.commands.sendTransaction({
1696
- transaction: [
1697
- {
1698
- address: transaction.to,
1699
- abi: _optionalChain$1([transaction, 'access', _15 => _15.api, 'optionalAccess', _16 => _16.filter, 'call', _17 => _17((fragment)=>fragment.name === transaction.method && _optionalChain$1([fragment, 'optionalAccess', _18 => _18.inputs, 'optionalAccess', _19 => _19.length]) === _optionalChain$1([transaction, 'access', _20 => _20.params, 'optionalAccess', _21 => _21.args, 'optionalAccess', _22 => _22.length]))]),
1700
- functionName: transaction.method,
1701
- args: _optionalChain$1([transaction, 'access', _23 => _23.params, 'optionalAccess', _24 => _24.args])
1702
- },
1703
- ],
1704
- permit2: [_optionalChain$1([transaction, 'access', _25 => _25.params, 'optionalAccess', _26 => _26.permit2])]
1705
- });
1706
- console.log('after MiniKit.commands.sendTransaction');
1707
2030
  })
1708
2031
  }
1709
2032
 
1710
2033
  retryFetchTransaction(transaction, payload, attempt) {
1711
- console.log('Retry Fetch transaction', attempt);
1712
2034
  return new Promise((resolve, reject)=>{
1713
2035
  setTimeout(()=>{
1714
2036
  this.fetchTransaction(transaction, payload, attempt+1).then(resolve).catch(reject);
1715
- }, (attempt < 30 ? 500 : 1000));
2037
+ }, (attempt < 30 ? 500 : 2000));
1716
2038
  })
1717
2039
  }
1718
2040
 
1719
- fetchTransaction(transaction, payload, attempt = 1) {
1720
- return new Promise((resolve, reject)=>{
1721
- console.log('Before fetch');
1722
- fetch(`https://public.depay.com/transactions/worldchain/${payload.transaction_id}`, {
2041
+ pollTransactionIdFromWorldchain(payload) {
2042
+
2043
+ return new Promise((resolve)=>{
2044
+
2045
+ fetch(`https://public.depay.com/transactions/worldchain/${payload.transaction_id}?app_id=${payload.mini_app_id}`, {
1723
2046
  headers: { "Content-Type": "application/json" },
1724
2047
  }).then((response)=>{
1725
- console.log('After fetch', response);
1726
2048
  if(response.ok) {
1727
- console.log('Before json');
1728
2049
  response.json().then((transactionJSON)=>{
1729
- console.log('After json', transactionJSON);
1730
- if(_optionalChain$1([transactionJSON, 'optionalAccess', _27 => _27.external_id])) {
1731
- transaction.id = _optionalChain$1([transactionJSON, 'optionalAccess', _28 => _28.external_id]);
1732
- transaction.url = Blockchains['worldchain'].explorerUrlFor({ transaction });
1733
- console.log('before transaction.sent', transaction.sent);
1734
- if (transaction.sent) { transaction.sent(transaction); }
1735
- console.log('Before provider');
1736
- getProvider('worldchain').then((provider)=>{
1737
- console.log('After provider', provider);
1738
- console.log('Before wait transaction', transactionJSON.external_id);
1739
- provider.waitForTransaction(transactionJSON.external_id).then((receipt)=>{
1740
- console.log('After receipt', receipt);
1741
- if(receipt && receipt.status == 1) {
1742
- transaction._succeeded = true;
1743
- console.log('before transaction.succeeded', transaction.succeeded);
1744
- if (transaction.succeeded) { transaction.succeeded(transaction); }
1745
- resolve(transaction);
1746
- } else {
1747
- if (transaction.failed) { transaction.failed(transaction, 'Transaction failed'); }
1748
- }
1749
- }).catch(reject);
1750
- }).catch(reject);
2050
+ if(_optionalChain$1([transactionJSON, 'optionalAccess', _15 => _15.external_id])) {
2051
+ resolve(_optionalChain$1([transactionJSON, 'optionalAccess', _16 => _16.external_id]));
1751
2052
  } else {
1752
- this.retryFetchTransaction(transaction, payload, attempt).then(resolve).catch(reject);
2053
+ resolve();
1753
2054
  }
1754
- }).catch(()=>this.retryFetchTransaction(transaction, payload, attempt).then(resolve).catch(reject));
2055
+ }).catch(()=>resolve());
2056
+ } else {
2057
+ resolve();
2058
+ }
2059
+ }).catch((error)=>{
2060
+ console.log('CATCH ERROR', error);
2061
+ resolve();
2062
+ });
2063
+ })
2064
+ }
2065
+
2066
+ pollEventForUserOp(transaction, payload) {
2067
+
2068
+ return new Promise((resolve)=>{
2069
+
2070
+ rpcRequest({
2071
+ blockchain: 'worldchain',
2072
+ method: "eth_getLogs",
2073
+ params: [
2074
+ {
2075
+ "fromBlock": ethers.utils.hexValue(transaction.fromBlock),
2076
+ "toBlock": "latest",
2077
+ "address": "0x0000000071727De22E5E9d8BAf0edAc6f37da032", // entry point
2078
+ "topics": [
2079
+ "0x49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f",
2080
+ payload.userOpHash
2081
+ ]
2082
+ }
2083
+ ]
2084
+ }).then((responseData)=>{
2085
+ if(responseData && responseData instanceof Array) {
2086
+ let event = responseData.find((event)=>{
2087
+ return(!event.removed)
2088
+ });
2089
+ if(event && event.transactionHash) {
2090
+ return resolve(event.transactionHash)
2091
+ }
2092
+ }
2093
+ resolve();
2094
+ }).catch(()=>resolve());
2095
+ })
2096
+ }
2097
+
2098
+
2099
+
2100
+ fetchTransaction(transaction, payload, attempt = 1) {
2101
+ return new Promise((resolve, reject)=>{
2102
+
2103
+ Promise.all([
2104
+ this.pollTransactionIdFromWorldchain(payload),
2105
+ this.pollEventForUserOp(transaction, payload),
2106
+ ]).then((results)=>{
2107
+ let transactionHash = results ? results.filter(Boolean)[0] : undefined;
2108
+ if(transactionHash) {
2109
+ transaction.id = transactionHash;
2110
+ transaction.url = Blockchains['worldchain'].explorerUrlFor({ transaction });
2111
+ if (transaction.sent) { transaction.sent(transaction); }
2112
+ getProvider('worldchain').then((provider)=>{
2113
+ provider.waitForTransaction(transactionHash).then((receipt)=>{
2114
+ if(receipt && receipt.status == 1) {
2115
+ transaction._succeeded = true;
2116
+ if (transaction.succeeded) { transaction.succeeded(transaction); }
2117
+ resolve(transaction);
2118
+ } else {
2119
+ if (transaction.failed) { transaction.failed(transaction, 'Transaction failed'); }
2120
+ reject(transaction);
2121
+ }
2122
+ }).catch(reject);
2123
+ }).catch(reject);
1755
2124
  } else {
1756
2125
  this.retryFetchTransaction(transaction, payload, attempt).then(resolve).catch(reject);
1757
2126
  }
1758
- }).catch(()=>this.retryFetchTransaction(transaction, payload, attempt).then(resolve).catch(reject));
2127
+ }).catch((error)=>{
2128
+ console.log('CATCH ERROR!', error);
2129
+ this.retryFetchTransaction(transaction, payload, attempt).then(resolve).catch(reject);
2130
+ });
1759
2131
  })
1760
2132
  }
1761
2133
 
@@ -1765,37 +2137,33 @@ class WorldApp {
1765
2137
 
1766
2138
  async account() {
1767
2139
  if(!this.getProvider()) { return undefined }
1768
- return MiniKit.walletAddress
2140
+ return this.walletAddress()
2141
+ }
2142
+
2143
+ walletAddress() {
2144
+ return (_optionalChain$1([window, 'access', _17 => _17.MiniKit, 'access', _18 => _18.user, 'optionalAccess', _19 => _19.walletAddress]) || _optionalChain$1([MiniKit, 'access', _20 => _20.user, 'optionalAccess', _21 => _21.walletAddress]))
1769
2145
  }
1770
2146
 
1771
2147
  connect() {
1772
2148
 
1773
2149
  return new Promise( async(resolve, reject)=>{
1774
2150
 
1775
- if(MiniKit.walletAddress) {
1776
- return resolve(MiniKit.walletAddress)
2151
+ if(this.walletAddress()) {
2152
+ return resolve(this.walletAddress())
1777
2153
  }
1778
2154
 
1779
2155
  MiniKit.subscribe(ResponseEvent.MiniAppWalletAuth, async (payload) => {
2156
+ MiniKit.unsubscribe(ResponseEvent.MiniAppWalletAuth);
1780
2157
  if (payload.status === "error") {
1781
2158
  return reject(payload.message)
1782
2159
  } else {
1783
- return resolve(MiniKit.walletAddress || _optionalChain$1([window, 'access', _29 => _29.MiniKit, 'optionalAccess', _30 => _30.walletAddress]))
2160
+ return resolve(this.walletAddress())
1784
2161
  }
1785
2162
  });
1786
2163
 
1787
- const { finalPayload } = await MiniKit.commandsAsync.walletAuth({
1788
- nonce: crypto.randomUUID().replace(/-/g, ""),
1789
- expirationTime: new Date(new Date().getTime() + 7 * 24 * 60 * 60 * 1000),
1790
- notBefore: new Date(new Date().getTime() - 24 * 60 * 60 * 1000),
1791
- statement: "Connect World App (v17.6.2)"
2164
+ MiniKit.commands.walletAuth({
2165
+ nonce: crypto.randomUUID().replace(/-/g, "")
1792
2166
  });
1793
-
1794
- if(finalPayload.status == 'error') {
1795
- return reject(finalPayload.message)
1796
- } else {
1797
- return resolve(MiniKit.walletAddress || _optionalChain$1([window, 'access', _31 => _31.MiniKit, 'optionalAccess', _32 => _32.walletAddress]))
1798
- }
1799
2167
  })
1800
2168
  }
1801
2169
 
@@ -1824,12 +2192,12 @@ class WorldApp {
1824
2192
  }
1825
2193
 
1826
2194
  async transactionCount({ blockchain, address }) {
1827
- if(!_optionalChain$1([MiniKit, 'optionalAccess', _33 => _33.walletAddress])) {
2195
+ if(!this.walletAddress()) {
1828
2196
  return 0
1829
2197
  } else {
1830
2198
  return request({
1831
2199
  blockchain: 'worldchain',
1832
- address: _optionalChain$1([MiniKit, 'optionalAccess', _34 => _34.walletAddress]),
2200
+ address: this.walletAddress(),
1833
2201
  api: [{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"AddedOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"approvedHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"ApproveHash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"handler","type":"address"}],"name":"ChangedFallbackHandler","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"guard","type":"address"}],"name":"ChangedGuard","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"ChangedThreshold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"}],"name":"DisabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"}],"name":"EnabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"ExecutionFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"ExecutionSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"RemovedOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":false,"internalType":"address[]","name":"owners","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"threshold","type":"uint256"},{"indexed":false,"internalType":"address","name":"initializer","type":"address"},{"indexed":false,"internalType":"address","name":"fallbackHandler","type":"address"}],"name":"SafeSetup","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"msgHash","type":"bytes32"}],"name":"SignMsg","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"addOwnerWithThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hashToApprove","type":"bytes32"}],"name":"approveHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"approvedHashes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"changeThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dataHash","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"signatures","type":"bytes"},{"internalType":"uint256","name":"requiredSignatures","type":"uint256"}],"name":"checkNSignatures","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dataHash","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"checkSignatures","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"prevModule","type":"address"},{"internalType":"address","name":"module","type":"address"}],"name":"disableModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"enableModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enumEnum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"safeTxGas","type":"uint256"},{"internalType":"uint256","name":"baseGas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"address","name":"refundReceiver","type":"address"},{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"encodeTransactionData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enumEnum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"safeTxGas","type":"uint256"},{"internalType":"uint256","name":"baseGas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"addresspayable","name":"refundReceiver","type":"address"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"execTransaction","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enumEnum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModule","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enumEnum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModuleReturnData","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"start","type":"address"},{"internalType":"uint256","name":"pageSize","type":"uint256"}],"name":"getModulesPaginated","outputs":[{"internalType":"address[]","name":"array","type":"address[]"},{"internalType":"address","name":"next","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"getStorageAt","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enumEnum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"safeTxGas","type":"uint256"},{"internalType":"uint256","name":"baseGas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"address","name":"refundReceiver","type":"address"},{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"getTransactionHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"isModuleEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"prevOwner","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"removeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enumEnum.Operation","name":"operation","type":"uint8"}],"name":"requiredTxGas","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"handler","type":"address"}],"name":"setFallbackHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"guard","type":"address"}],"name":"setGuard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256","name":"_threshold","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"address","name":"fallbackHandler","type":"address"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"payment","type":"uint256"},{"internalType":"addresspayable","name":"paymentReceiver","type":"address"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"signedMessages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetContract","type":"address"},{"internalType":"bytes","name":"calldataPayload","type":"bytes"}],"name":"simulateAndRevert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"prevOwner","type":"address"},{"internalType":"address","name":"oldOwner","type":"address"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"swapOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}],
1834
2202
  method: 'nonce'
1835
2203
  })
@@ -1841,18 +2209,17 @@ class WorldApp {
1841
2209
  return new Promise((resolve, reject)=>{
1842
2210
 
1843
2211
  MiniKit.subscribe(ResponseEvent.MiniAppSignMessage, async (payload) => {
2212
+ MiniKit.unsubscribe(ResponseEvent.MiniAppSignMessage);
1844
2213
  if (payload.status === "error") {
1845
2214
  return reject()
1846
2215
  } else {
1847
2216
  return resolve(payload.signature)
1848
2217
  }
1849
2218
  });
1850
-
1851
2219
  MiniKit.commands.signMessage({ message });
1852
-
1853
2220
  })
1854
2221
  }
1855
- } WorldApp.__initStatic(); WorldApp.__initStatic2();
2222
+ } WorldApp.__initStatic(); WorldApp.__initStatic2(); WorldApp.__initStatic3();
1856
2223
 
1857
2224
  var wallets = {
1858
2225
  MetaMask,