@pooflabs/web 0.0.85-rc3 → 0.0.86

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.
Files changed (50) hide show
  1. package/dist/{index-BaKs3A8s.js → index-BHkED2YI.js} +2 -2
  2. package/dist/{index-BaKs3A8s.js.map → index-BHkED2YI.js.map} +1 -1
  3. package/dist/{index-C4AnWFs_.esm.js → index-BQUfNEiY.esm.js} +12 -49
  4. package/dist/{index-C4AnWFs_.esm.js.map → index-BQUfNEiY.esm.js.map} +1 -1
  5. package/dist/{index-BE-VWSJT.esm.js → index-Cfp30Jm_.esm.js} +2 -2
  6. package/dist/{index-BE-VWSJT.esm.js.map → index-Cfp30Jm_.esm.js.map} +1 -1
  7. package/dist/{index-B5qYY4YM.js → index-D-Wbwevj.js} +2 -2
  8. package/dist/index-D-Wbwevj.js.map +1 -0
  9. package/dist/{index-dqqR5q7b.esm.js → index-DK28JaJm.esm.js} +3 -3
  10. package/dist/{index-dqqR5q7b.esm.js.map → index-DK28JaJm.esm.js.map} +1 -1
  11. package/dist/index-DKyWaxCB.esm.js +6 -0
  12. package/dist/index-DKyWaxCB.esm.js.map +1 -0
  13. package/dist/{index-BzeiIIwF.js → index-DUn32Hkh.js} +3 -3
  14. package/dist/{index-BzeiIIwF.js.map → index-DUn32Hkh.js.map} +1 -1
  15. package/dist/{index-bEXLwE7_.js → index-hEc5_KoM.js} +12 -49
  16. package/dist/{index-bEXLwE7_.js.map → index-hEc5_KoM.js.map} +1 -1
  17. package/dist/{index.browser-DQIwLToJ.esm.js → index.browser-C9gHoUen.esm.js} +2 -2
  18. package/dist/{index.browser-DQIwLToJ.esm.js.map → index.browser-C9gHoUen.esm.js.map} +1 -1
  19. package/dist/{index.browser-CN6obNQM.js → index.browser-CbawPvh6.js} +2 -2
  20. package/dist/{index.browser-CN6obNQM.js.map → index.browser-CbawPvh6.js.map} +1 -1
  21. package/dist/{index.browser-CZIJCtms.js → index.browser-DD8pg_L2.js} +2 -2
  22. package/dist/{index.browser-CZIJCtms.js.map → index.browser-DD8pg_L2.js.map} +1 -1
  23. package/dist/{index.browser-D8ttddP4.esm.js → index.browser-DQqKPfDA.esm.js} +2 -2
  24. package/dist/{index.browser-D8ttddP4.esm.js.map → index.browser-DQqKPfDA.esm.js.map} +1 -1
  25. package/dist/index.esm.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/{index.native-pG1NTZ0f.js → index.native-7hiNiSyC.js} +4 -4
  28. package/dist/{index.native-pG1NTZ0f.js.map → index.native-7hiNiSyC.js.map} +1 -1
  29. package/dist/{index.native-DLziTime.esm.js → index.native-BItnSD47.esm.js} +4 -4
  30. package/dist/{index.native-DLziTime.esm.js.map → index.native-BItnSD47.esm.js.map} +1 -1
  31. package/dist/index.native.esm.js +1 -1
  32. package/dist/index.native.js +1 -1
  33. package/dist/{phantom-wallet-provider-zBp7-uEw.js → phantom-wallet-provider-CjvLq_2_.js} +4 -4
  34. package/dist/{phantom-wallet-provider-zBp7-uEw.js.map → phantom-wallet-provider-CjvLq_2_.js.map} +1 -1
  35. package/dist/{phantom-wallet-provider-CP6NXRwG.esm.js → phantom-wallet-provider-DE3vit2Z.esm.js} +4 -4
  36. package/dist/{phantom-wallet-provider-CP6NXRwG.esm.js.map → phantom-wallet-provider-DE3vit2Z.esm.js.map} +1 -1
  37. package/dist/{privy-wallet-provider-CoyW5Gdg.js → privy-wallet-provider-DFZaQPss.js} +3 -3
  38. package/dist/{privy-wallet-provider-CoyW5Gdg.js.map → privy-wallet-provider-DFZaQPss.js.map} +1 -1
  39. package/dist/{privy-wallet-provider-CGYvf3-r.esm.js → privy-wallet-provider-ip2pqo_U.esm.js} +3 -3
  40. package/dist/{privy-wallet-provider-CGYvf3-r.esm.js.map → privy-wallet-provider-ip2pqo_U.esm.js.map} +1 -1
  41. package/dist/{solana-mobile-wallet-provider-B8rHfsPN.esm.js → solana-mobile-wallet-provider-D7BbSpez.esm.js} +11 -48
  42. package/dist/solana-mobile-wallet-provider-D7BbSpez.esm.js.map +1 -0
  43. package/dist/{solana-mobile-wallet-provider-CN-D_H4l.js → solana-mobile-wallet-provider-DwER68Rz.js} +11 -48
  44. package/dist/solana-mobile-wallet-provider-DwER68Rz.js.map +1 -0
  45. package/package.json +1 -1
  46. package/dist/index-B5qYY4YM.js.map +0 -1
  47. package/dist/index-TzHXEf3-.esm.js +0 -6
  48. package/dist/index-TzHXEf3-.esm.js.map +0 -1
  49. package/dist/solana-mobile-wallet-provider-B8rHfsPN.esm.js.map +0 -1
  50. package/dist/solana-mobile-wallet-provider-CN-D_H4l.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { b as bufferExports } from './index-TzHXEf3-.esm.js';
2
- import { g as getPlatform, k as setAuthLoading, W as WebSessionManager, s as setCurrentUser, l as genAuthNonce, m as genSolanaMessage, n as createSessionWithSignature, d as base58, e as confirmAndCheckTransaction, c as convertRemainingAccounts, b as buildSetDocumentsTransaction, a as SOLANA_DEVNET_RPC_URL, S as SOLANA_MAINNET_RPC_URL, h as SURFNET_RPC_URL } from './index.native-DLziTime.esm.js';
1
+ import { b as bufferExports } from './index-DKyWaxCB.esm.js';
2
+ import { g as getPlatform, k as setAuthLoading, W as WebSessionManager, s as setCurrentUser, l as genAuthNonce, m as genSolanaMessage, n as createSessionWithSignature, d as base58, e as confirmAndCheckTransaction, c as convertRemainingAccounts, b as buildSetDocumentsTransaction, a as SOLANA_DEVNET_RPC_URL, S as SOLANA_MAINNET_RPC_URL, h as SURFNET_RPC_URL } from './index.native-BItnSD47.esm.js';
3
3
  import { PublicKey, Connection, VersionedTransaction, VersionedMessage, Transaction } from '@solana/web3.js';
4
4
  import * as anchor from '@coral-xyz/anchor';
5
5
  import 'axios';
@@ -64,20 +64,11 @@ function isMwaAssociationRetryable(e) {
64
64
  * so a second attempt skips the consent sheet, jumps straight to
65
65
  * Verify/Approve, and completes inside the timeout.
66
66
  */
67
- async function withMwaAssociationRetry(label, fn) {
68
- const t0 = Date.now();
69
- console.log(`[MWA-DEBUG] ${label} attempt=1 start`);
67
+ async function withMwaAssociationRetry(fn) {
70
68
  try {
71
- const result = await fn();
72
- console.log(`[MWA-DEBUG] ${label} attempt=1 ok (${Date.now() - t0}ms)`);
73
- return result;
69
+ return await fn();
74
70
  }
75
71
  catch (e) {
76
- const info = findMwaError(e);
77
- console.log(`[MWA-DEBUG] ${label} attempt=1 err (${Date.now() - t0}ms)`, {
78
- outer: { name: e === null || e === void 0 ? void 0 : e.name, message: e === null || e === void 0 ? void 0 : e.message },
79
- mwa: info,
80
- });
81
72
  const retryable = isMwaAssociationRetryable(e);
82
73
  if (!retryable)
83
74
  throw e;
@@ -86,21 +77,11 @@ async function withMwaAssociationRetry(label, fn) {
86
77
  // so visibility-based waits fire too early. Use a fixed delay long
87
78
  // enough for Seeker to dismiss its sheet and the OS to release intent
88
79
  // state. 2.5s is empirically safe; tune from device traces if needed.
89
- console.log(`[MWA-DEBUG] ${label} retryable (${retryable.code}); waiting 2500ms before retry`);
90
80
  await new Promise(r => setTimeout(r, 2500));
91
- const t1 = Date.now();
92
- console.log(`[MWA-DEBUG] ${label} attempt=2 start`);
93
81
  try {
94
- const result = await fn();
95
- console.log(`[MWA-DEBUG] ${label} attempt=2 ok (${Date.now() - t1}ms)`);
96
- return result;
82
+ return await fn();
97
83
  }
98
84
  catch (e2) {
99
- const info2 = findMwaError(e2);
100
- console.log(`[MWA-DEBUG] ${label} attempt=2 err (${Date.now() - t1}ms)`, {
101
- outer: { name: e2 === null || e2 === void 0 ? void 0 : e2.name, message: e2 === null || e2 === void 0 ? void 0 : e2.message },
102
- mwa: info2,
103
- });
104
85
  // Only mask the error with the clean Seeker message when the
105
86
  // second failure is also an association-flavored error. If it's
106
87
  // a user cancel, wallet rejection, or unknown error, rethrow
@@ -139,7 +120,7 @@ async function withMwaAssociationRetry(label, fn) {
139
120
  * next tap is a new activation (a real retry). A timer-based retry would
140
121
  * just hit the same Chrome block. Cap at 3 attempts before giving up.
141
122
  */
142
- async function awaitSignInGestureAndSign(label, theme, signFn) {
123
+ async function awaitSignInGestureAndSign(theme, signFn) {
143
124
  if (typeof document === 'undefined' || typeof window === 'undefined') {
144
125
  // SSR / non-browser: skip the gesture, just call (the activation
145
126
  // model doesn't apply outside the browser).
@@ -306,18 +287,15 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
306
287
  finishReject(new Error('User cancelled wallet sign in'));
307
288
  };
308
289
  closeBtn.addEventListener('click', () => {
309
- console.log(`[MWA-DEBUG] ${label} gesture: close clicked`);
310
290
  handleCancel();
311
291
  });
312
292
  overlay.addEventListener('click', (e) => {
313
293
  if (e.target === overlay) {
314
- console.log(`[MWA-DEBUG] ${label} gesture: overlay clicked (cancel)`);
315
294
  handleCancel();
316
295
  }
317
296
  });
318
297
  const onKeydown = (e) => {
319
298
  if (e.key === 'Escape') {
320
- console.log(`[MWA-DEBUG] ${label} gesture: Escape pressed (cancel)`);
321
299
  handleCancel();
322
300
  }
323
301
  };
@@ -327,7 +305,6 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
327
305
  return;
328
306
  attemptCount++;
329
307
  const attempt = attemptCount;
330
- console.log(`[MWA-DEBUG] ${label} gesture: button click attempt=${attempt}`);
331
308
  // Disable to prevent double-clicks while the wallet popup is up.
332
309
  button.disabled = true;
333
310
  setButtonDisabledStyle();
@@ -339,29 +316,17 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
339
316
  // so Chrome's transient user activation propagates to the
340
317
  // protocol's window.location.assign(associationUrl) inside
341
318
  // launchAssociation(). Do not `await` before calling.
342
- const t0 = Date.now();
343
- console.log(`[MWA-DEBUG] ${label} gesture: signMessage start (attempt=${attempt})`);
344
319
  signFn().then((results) => {
345
- const elapsed = Date.now() - t0;
346
320
  if (!results || results.length === 0) {
347
- console.log(`[MWA-DEBUG] ${label} gesture: signMessage returned empty (attempt=${attempt}, ${elapsed}ms)`);
348
321
  finishReject(new Error('MWA returned no signature'));
349
322
  return;
350
323
  }
351
- console.log(`[MWA-DEBUG] ${label} gesture: signMessage ok (attempt=${attempt}, ${elapsed}ms)`);
352
324
  finishResolve(results[0]);
353
325
  }).catch((err) => {
354
- const elapsed = Date.now() - t0;
355
- const info = findMwaError(err);
356
- console.log(`[MWA-DEBUG] ${label} gesture: signMessage err (attempt=${attempt}, ${elapsed}ms)`, {
357
- outer: { name: err === null || err === void 0 ? void 0 : err.name, message: err === null || err === void 0 ? void 0 : err.message },
358
- mwa: info,
359
- });
360
326
  const retryable = isMwaAssociationRetryable(err);
361
327
  if (retryable && attempt < MAX_ATTEMPTS) {
362
328
  // Re-enable the button so the user's next tap provides a
363
329
  // fresh user activation. Show inline error text.
364
- console.log(`[MWA-DEBUG] ${label} gesture: retryable (${retryable.code}); awaiting user tap to retry (attempt ${attempt}/${MAX_ATTEMPTS})`);
365
330
  button.disabled = false;
366
331
  setButtonEnabledStyle();
367
332
  button.textContent = originalText;
@@ -371,7 +336,6 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
371
336
  }
372
337
  if (retryable) {
373
338
  // Hit the attempt cap with a still-retryable failure.
374
- console.log(`[MWA-DEBUG] ${label} gesture: retryable but attempt cap reached (${attempt})`);
375
339
  finishReject(new Error("Couldn't connect to your Seeker wallet. Please try again."));
376
340
  return;
377
341
  }
@@ -380,7 +344,6 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
380
344
  finishReject(err);
381
345
  });
382
346
  });
383
- console.log(`[MWA-DEBUG] ${label} gesture: modal shown`);
384
347
  });
385
348
  }
386
349
  /**
@@ -568,7 +531,7 @@ class SolanaMobileWalletProvider {
568
531
  async ensureWallet() {
569
532
  if (this.wallet)
570
533
  return this.wallet;
571
- const mod = await import('./index.browser-D8ttddP4.esm.js');
534
+ const mod = await import('./index.browser-DQqKPfDA.esm.js');
572
535
  const chain = mapChainToWalletStandard(this.cluster);
573
536
  this.wallet = new mod.LocalSolanaMobileWalletAdapterWallet({
574
537
  appIdentity: this.appIdentity,
@@ -582,7 +545,7 @@ class SolanaMobileWalletProvider {
582
545
  // login()'s withMwaAssociationRetry handles this case; on second
583
546
  // failure it surfaces a clean error message to the host app.
584
547
  onWalletNotFound: async () => {
585
- console.warn('[MWA-DEBUG] ensureWallet onWalletNotFound (suppressed)');
548
+ // intentional no-op
586
549
  },
587
550
  });
588
551
  return this.wallet;
@@ -656,7 +619,7 @@ class SolanaMobileWalletProvider {
656
619
  // consent on the second pass and completes quickly. See
657
620
  // withMwaAssociationRetry for details.
658
621
  const connectFeat = getConnectFeature(wallet);
659
- const { accounts } = await withMwaAssociationRetry('login:connect', () => connectFeat.connect());
622
+ const { accounts } = await withMwaAssociationRetry(() => connectFeat.connect());
660
623
  if (!accounts || accounts.length === 0) {
661
624
  throw new Error('MWA returned no accounts');
662
625
  }
@@ -689,7 +652,7 @@ class SolanaMobileWalletProvider {
689
652
  const messageText = await genSolanaMessage(base58Addr, nonce);
690
653
  const messageBytes = getPlatform().textEncode(messageText);
691
654
  const signMessageFeat = getSignMessageFeature(wallet);
692
- const signResult = await awaitSignInGestureAndSign('login:signMessage', this.config.theme, () => signMessageFeat.signMessage({ account, message: messageBytes }));
655
+ const signResult = await awaitSignInGestureAndSign(this.config.theme, () => signMessageFeat.signMessage({ account, message: messageBytes }));
693
656
  if (!signResult) {
694
657
  throw new Error('MWA returned no signature');
695
658
  }
@@ -1100,4 +1063,4 @@ class SolanaMobileWalletProvider {
1100
1063
  SolanaMobileWalletProvider.instance = null;
1101
1064
 
1102
1065
  export { SolanaMobileWalletProvider };
1103
- //# sourceMappingURL=solana-mobile-wallet-provider-B8rHfsPN.esm.js.map
1066
+ //# sourceMappingURL=solana-mobile-wallet-provider-D7BbSpez.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solana-mobile-wallet-provider-D7BbSpez.esm.js","sources":["../.rollup-tmp/auth/providers/solana-mobile-wallet-provider.js"],"sourcesContent":["import { Buffer } from 'buffer';\nimport { WebSessionManager as SessionManager, createSessionWithSignature, genAuthNonce, genSolanaMessage, buildSetDocumentsTransaction, convertRemainingAccounts } from '@pooflabs/core';\nimport { setCurrentUser, setAuthLoading } from '../../global';\nimport { getPlatform, detectAndroid } from '../../platform';\nimport { Connection, PublicKey, Transaction, VersionedMessage, VersionedTransaction } from '@solana/web3.js';\nimport * as anchor from '@coral-xyz/anchor';\nimport bs58 from 'bs58';\nimport { SOLANA_DEVNET_RPC_URL, SOLANA_MAINNET_RPC_URL, SURFNET_RPC_URL } from '..';\nimport { confirmAndCheckTransaction } from './transaction-utils';\n/**\n * Detects whether the current environment is a mobile browser capable of\n * Mobile Wallet Adapter (MWA) communication.\n *\n * Returns true on Android browsers (Chrome, etc.) where MWA intents work,\n * or inside a Seeker/Saga in-app browser context.\n */\nexport function isMobileWalletAvailable() {\n if (typeof window === 'undefined' || typeof navigator === 'undefined')\n return false;\n return detectAndroid();\n}\nconst ED25519_SIGNATURE_LENGTH = 64;\nconst STORED_AUTH_METHOD_KEY = 'tarobase_last_auth_method';\nconst MWA_AUTH_METHOD = 'mobile-wallet-adapter';\nfunction findMwaError(e, maxDepth = 5) {\n var _a;\n let cur = e;\n let depth = 0;\n while (cur && depth < maxDepth) {\n if ((cur === null || cur === void 0 ? void 0 : cur.name) === 'SolanaMobileWalletAdapterError' && typeof (cur === null || cur === void 0 ? void 0 : cur.code) === 'string') {\n return { code: cur.code, message: String((_a = cur.message) !== null && _a !== void 0 ? _a : '') };\n }\n cur = cur === null || cur === void 0 ? void 0 : cur.cause;\n depth++;\n }\n return null;\n}\n/**\n * Returns the matched MwaErrorInfo when the error is from an association\n * failure that an automatic retry can recover from (i.e. the wallet exists\n * on-device but the dApp's protocol session didn't complete in time). Returns\n * null for non-retryable errors (user cancel, unknown wallet errors, etc.).\n *\n * Specifically:\n * - ERROR_WALLET_NOT_FOUND: thrown from the protocol's startScenario when\n * it gave up waiting for a wallet to respond. On Seeker this races the\n * first-time-consent UI on the very first authorize.\n * - ERROR_SESSION_TIMEOUT: similar — the protocol's session-establishment\n * timer expired.\n * - ERROR_ASSOCIATION_CANCELLED: shared by user-cancel (\"Wallet connection\n * cancelled by user\") AND the 30s wallet-standard WALLET_ASSOCIATION_TIMEOUT\n * (\"Wallet connection timed out\"). Discriminate by message — never retry\n * a user cancel.\n */\nfunction isMwaAssociationRetryable(e) {\n const info = findMwaError(e);\n if (!info)\n return null;\n if (info.code === 'ERROR_WALLET_NOT_FOUND')\n return info;\n if (info.code === 'ERROR_SESSION_TIMEOUT')\n return info;\n if (info.code === 'ERROR_ASSOCIATION_CANCELLED' && /timed out/i.test(info.message))\n return info;\n return null;\n}\n/**\n * Single-retry wrapper for MWA association failures. Used ONLY for login's\n * `standard:connect` and `solana:signMessage` calls — never for\n * `signAndSendTransaction`/`runTransaction` because retry on a path that\n * may have already submitted a tx can double-send.\n *\n * The retry exists for one specific scenario: on first-time MWA usage from a\n * given origin on Seeker, the protocol's session-establishment timer races\n * Seeker's first-time consent UI. The user reads the consent sheet, taps\n * Connect — but by then the protocol has given up and thrown\n * ERROR_WALLET_NOT_FOUND. The consent itself IS persisted on Seeker though,\n * so a second attempt skips the consent sheet, jumps straight to\n * Verify/Approve, and completes inside the timeout.\n */\nasync function withMwaAssociationRetry(fn) {\n try {\n return await fn();\n }\n catch (e) {\n const retryable = isMwaAssociationRetryable(e);\n if (!retryable)\n throw e;\n // Seeker's consent sheet is a bottom-sheet overlay — Chrome doesn't\n // reliably flip document.visibilityState to 'hidden' while it's open,\n // so visibility-based waits fire too early. Use a fixed delay long\n // enough for Seeker to dismiss its sheet and the OS to release intent\n // state. 2.5s is empirically safe; tune from device traces if needed.\n await new Promise(r => setTimeout(r, 2500));\n try {\n return await fn();\n }\n catch (e2) {\n // Only mask the error with the clean Seeker message when the\n // second failure is also an association-flavored error. If it's\n // a user cancel, wallet rejection, or unknown error, rethrow\n // the original so the host app surfaces the real cause.\n if (isMwaAssociationRetryable(e2)) {\n throw new Error(\"Couldn't connect to your Seeker wallet. Please try again.\");\n }\n throw e2;\n }\n }\n}\n/**\n * User-gesture-mediated wallet-standard sign helper.\n *\n * Why this exists: login flows that go through wallet-standard call two\n * separate transacts (standard:connect, then solana:signMessage). Each\n * transact dispatches its own `solana-wallet:` Android intent navigation\n * via `window.location.assign(associationUrl)` (see\n * @solana-mobile/mobile-wallet-adapter-protocol/lib/cjs/index.browser.js\n * `launchAssociation()` at line 459). Chrome requires **transient user\n * activation** for each custom-scheme navigation. The first transact\n * consumes the activation from the user's \"Continue to Allow\" tap on the\n * LNA modal; by the time the second transact (signMessage) runs as a JS\n * continuation, the activation has decayed, Chrome blocks the navigation,\n * no `blur` event fires, the protocol's `getDetectionPromise` (3000ms\n * timeout, line 433) rejects, and we get `ERROR_WALLET_NOT_FOUND`.\n *\n * Fix: show a Tarobase-controlled modal between the two transacts. When the\n * user taps the modal's \"Sign in\" button, that tap IS a fresh user\n * activation. We invoke the sign function directly inside the click handler\n * — no `await` between the tap and the call — so the activation propagates\n * to the protocol's `location.assign`.\n *\n * Failure recovery is also user-gesture driven: if the sign function fails\n * with a retryable association error, we re-enable the button so the user's\n * next tap is a new activation (a real retry). A timer-based retry would\n * just hit the same Chrome block. Cap at 3 attempts before giving up.\n */\nasync function awaitSignInGestureAndSign(theme, signFn) {\n if (typeof document === 'undefined' || typeof window === 'undefined') {\n // SSR / non-browser: skip the gesture, just call (the activation\n // model doesn't apply outside the browser).\n const results = await signFn();\n if (!results || results.length === 0)\n throw new Error('MWA returned no signature');\n return results[0];\n }\n return new Promise((resolve, reject) => {\n const isDark = theme === 'dark'\n || (theme == null\n && typeof window.matchMedia === 'function'\n && window.matchMedia('(prefers-color-scheme: dark)').matches);\n // Palette\n const overlayBg = 'rgba(0, 0, 0, 0.62)';\n const cardBg = isDark ? '#1a1a1f' : '#ffffff';\n const titleColor = isDark ? '#ffffff' : '#0a0a0a';\n const subtitleColor = isDark ? '#a1a1aa' : '#52525b';\n const btnBg = isDark ? '#ffffff' : '#0a0a0a';\n const btnText = isDark ? '#0a0a0a' : '#ffffff';\n const btnDisabledBg = isDark ? '#3f3f46' : '#d4d4d8';\n const btnDisabledText = isDark ? '#71717a' : '#71717a';\n const errorColor = isDark ? '#fca5a5' : '#dc2626';\n const closeColor = isDark ? '#71717a' : '#a1a1aa';\n const fontStack = '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif';\n const overlay = document.createElement('div');\n overlay.setAttribute('data-tarobase-mwa-gesture', 'true');\n overlay.style.cssText = [\n 'position: fixed',\n 'inset: 0',\n 'z-index: 2147483646',\n `background: ${overlayBg}`,\n 'display: flex',\n 'align-items: center',\n 'justify-content: center',\n 'padding: 20px',\n 'box-sizing: border-box',\n `font-family: ${fontStack}`,\n ].join('; ');\n const card = document.createElement('div');\n card.style.cssText = [\n `background: ${cardBg}`,\n 'border-radius: 20px',\n 'padding: 28px 24px 24px',\n 'max-width: 340px',\n 'width: 100%',\n 'box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28)',\n 'position: relative',\n 'box-sizing: border-box',\n ].join('; ');\n const closeBtn = document.createElement('button');\n closeBtn.setAttribute('aria-label', 'Close');\n closeBtn.innerHTML = '&times;';\n closeBtn.style.cssText = [\n 'position: absolute',\n 'top: 12px',\n 'right: 12px',\n 'background: transparent',\n 'border: none',\n `color: ${closeColor}`,\n 'font-size: 24px',\n 'line-height: 1',\n 'cursor: pointer',\n 'padding: 6px 10px',\n 'border-radius: 8px',\n ].join('; ');\n const title = document.createElement('div');\n title.textContent = 'Almost there';\n title.style.cssText = [\n `color: ${titleColor}`,\n 'font-size: 20px',\n 'font-weight: 600',\n 'margin-bottom: 6px',\n 'text-align: center',\n ].join('; ');\n const subtitle = document.createElement('div');\n subtitle.textContent = 'Tap to sign in with your wallet';\n subtitle.style.cssText = [\n `color: ${subtitleColor}`,\n 'font-size: 14px',\n 'line-height: 1.4',\n 'margin-bottom: 22px',\n 'text-align: center',\n ].join('; ');\n const errorRow = document.createElement('div');\n errorRow.style.cssText = [\n `color: ${errorColor}`,\n 'font-size: 13px',\n 'line-height: 1.4',\n 'margin-bottom: 14px',\n 'text-align: center',\n 'min-height: 0',\n 'transition: min-height 100ms ease',\n ].join('; ');\n const button = document.createElement('button');\n button.textContent = 'Sign in';\n const setButtonEnabledStyle = () => {\n button.style.cssText = [\n `background: ${btnBg}`,\n `color: ${btnText}`,\n 'border: none',\n 'border-radius: 14px',\n 'padding: 14px 20px',\n 'font-size: 16px',\n 'font-weight: 600',\n 'width: 100%',\n 'cursor: pointer',\n '-webkit-tap-highlight-color: transparent',\n 'box-sizing: border-box',\n `font-family: ${fontStack}`,\n ].join('; ');\n };\n const setButtonDisabledStyle = () => {\n button.style.cssText = [\n `background: ${btnDisabledBg}`,\n `color: ${btnDisabledText}`,\n 'border: none',\n 'border-radius: 14px',\n 'padding: 14px 20px',\n 'font-size: 16px',\n 'font-weight: 600',\n 'width: 100%',\n 'cursor: default',\n '-webkit-tap-highlight-color: transparent',\n 'box-sizing: border-box',\n `font-family: ${fontStack}`,\n ].join('; ');\n };\n setButtonEnabledStyle();\n card.appendChild(closeBtn);\n card.appendChild(title);\n card.appendChild(subtitle);\n card.appendChild(errorRow);\n card.appendChild(button);\n overlay.appendChild(card);\n document.body.appendChild(overlay);\n let settled = false;\n let attemptCount = 0;\n const MAX_ATTEMPTS = 3;\n const cleanup = () => {\n try {\n overlay.remove();\n }\n catch ( /* ignore */_a) { /* ignore */ }\n document.removeEventListener('keydown', onKeydown);\n };\n const finishResolve = (value) => {\n if (settled)\n return;\n settled = true;\n cleanup();\n resolve(value);\n };\n const finishReject = (err) => {\n if (settled)\n return;\n settled = true;\n cleanup();\n reject(err);\n };\n const handleCancel = () => {\n // Phrasing matches login()'s isUserRejection substring check so\n // the existing catch suppresses error-log noise.\n finishReject(new Error('User cancelled wallet sign in'));\n };\n closeBtn.addEventListener('click', () => {\n handleCancel();\n });\n overlay.addEventListener('click', (e) => {\n if (e.target === overlay) {\n handleCancel();\n }\n });\n const onKeydown = (e) => {\n if (e.key === 'Escape') {\n handleCancel();\n }\n };\n document.addEventListener('keydown', onKeydown);\n button.addEventListener('click', () => {\n if (settled)\n return;\n attemptCount++;\n const attempt = attemptCount;\n // Disable to prevent double-clicks while the wallet popup is up.\n button.disabled = true;\n setButtonDisabledStyle();\n const originalText = 'Sign in';\n button.textContent = 'Signing in…';\n errorRow.textContent = '';\n errorRow.style.minHeight = '0';\n // CRITICAL: invoke signFn() synchronously inside the click handler\n // so Chrome's transient user activation propagates to the\n // protocol's window.location.assign(associationUrl) inside\n // launchAssociation(). Do not `await` before calling.\n signFn().then((results) => {\n if (!results || results.length === 0) {\n finishReject(new Error('MWA returned no signature'));\n return;\n }\n finishResolve(results[0]);\n }).catch((err) => {\n const retryable = isMwaAssociationRetryable(err);\n if (retryable && attempt < MAX_ATTEMPTS) {\n // Re-enable the button so the user's next tap provides a\n // fresh user activation. Show inline error text.\n button.disabled = false;\n setButtonEnabledStyle();\n button.textContent = originalText;\n errorRow.textContent = \"Couldn't connect — tap to try again\";\n errorRow.style.minHeight = '20px';\n return;\n }\n if (retryable) {\n // Hit the attempt cap with a still-retryable failure.\n finishReject(new Error(\"Couldn't connect to your Seeker wallet. Please try again.\"));\n return;\n }\n // Non-retryable error (user cancel inside Seeker, wallet\n // rejected sign, unknown error, etc.) — surface as-is.\n finishReject(err);\n });\n });\n });\n}\n/**\n * Normalize a chain string to a wallet-standard Solana chain identifier.\n *\n * Handles three input shapes that all show up in practice:\n * - Bare cluster name from `SolanaMobileWalletConfig.cluster` (e.g. 'devnet').\n * - Prefixed `solana:cluster` (e.g. 'solana:devnet').\n * - Double-prefixed `solana:solana:cluster` (constructor used to wrap cluster\n * with `solana:` blindly; if a caller already passed a prefixed string the\n * result was `solana:solana:devnet`).\n *\n * Wallet-standard Solana chains are exactly:\n * 'solana:mainnet' | 'solana:devnet' | 'solana:testnet' | 'solana:localnet'\n * — `mainnet-beta` is NOT a valid wallet-standard identifier and must be\n * normalized to `solana:mainnet`.\n */\nfunction mapChainToWalletStandard(input) {\n if (!input)\n return 'solana:mainnet';\n let s = String(input).toLowerCase();\n while (s.startsWith('solana:'))\n s = s.slice('solana:'.length);\n if (s === 'mainnet-beta' || s === 'mainnet')\n return 'solana:mainnet';\n if (s === 'devnet')\n return 'solana:devnet';\n if (s === 'testnet')\n return 'solana:testnet';\n if (s === 'localnet')\n return 'solana:localnet';\n return 'solana:mainnet';\n}\n/**\n * Serialize a Transaction/VersionedTransaction to a Uint8Array wire payload\n * that the wallet-standard `solana:signTransaction` /\n * `solana:signAndSendTransaction` features expect.\n *\n * Legacy transactions must serialize with `requireAllSignatures: false` and\n * `verifySignatures: false` — the wallet hasn't signed yet, and the default\n * `serialize()` would throw \"Signature verification failed\". Versioned\n * transactions use the default `serialize()` which already permits unsigned\n * payloads. Mirrors the helper at\n * `@solana-mobile/mobile-wallet-adapter-protocol-web3js/lib/esm/index.browser.js:13-18`.\n */\nfunction txToWireBytes(tx) {\n if ('version' in tx)\n return tx.serialize();\n return tx.serialize({ requireAllSignatures: false, verifySignatures: false });\n}\n/**\n * Deserialize a wire-format transaction returned by the wallet\n * `solana:signTransaction` feature. Mirrors the helper at\n * `@solana-mobile/mobile-wallet-adapter-protocol-web3js/lib/esm/index.browser.js:19-23`\n * so legacy and versioned bytes both round-trip correctly.\n */\nfunction txFromWireBytes(byteArray) {\n const messageOffset = byteArray[0] * ED25519_SIGNATURE_LENGTH + 1;\n const messageVersion = VersionedMessage.deserializeMessageVersion(byteArray.slice(messageOffset, byteArray.length));\n if (messageVersion === 'legacy') {\n return Transaction.from(byteArray);\n }\n return VersionedTransaction.deserialize(byteArray);\n}\n/**\n * Per-method runtime narrowing of wallet-standard features. The wallet's\n * `.features` type is a union (`signAndSendTransaction` | `signTransaction`),\n * and after authorization the wallet may also narrow `#optionalFeatures`\n * based on actual wallet capabilities. Narrow at the call site so a method\n * that needs only `signMessage` doesn't fail when a wallet lacks\n * `signTransaction`.\n */\nfunction getSignMessageFeature(wallet) {\n const f = wallet.features;\n const feat = f['solana:signMessage'];\n if (!feat || typeof feat.signMessage !== 'function') {\n throw new Error('Wallet does not support solana:signMessage');\n }\n return feat;\n}\nfunction getSignTransactionFeature(wallet) {\n const f = wallet.features;\n const feat = f['solana:signTransaction'];\n if (!feat || typeof feat.signTransaction !== 'function') {\n throw new Error('Wallet does not support solana:signTransaction');\n }\n return feat;\n}\nfunction getSignAndSendTransactionFeature(wallet) {\n const f = wallet.features;\n const feat = f['solana:signAndSendTransaction'];\n if (!feat || typeof feat.signAndSendTransaction !== 'function') {\n throw new Error('Wallet does not support solana:signAndSendTransaction');\n }\n return feat;\n}\nfunction getConnectFeature(wallet) {\n const f = wallet.features;\n const feat = f['standard:connect'];\n if (!feat || typeof feat.connect !== 'function') {\n throw new Error('Wallet does not support standard:connect');\n }\n return feat;\n}\nfunction getDisconnectFeature(wallet) {\n const f = wallet.features;\n const feat = f['standard:disconnect'];\n return feat && typeof feat.disconnect === 'function' ? feat : null;\n}\nfunction writeAuthMethod(method) {\n try {\n if (method === null) {\n getPlatform().storage.removeItem(STORED_AUTH_METHOD_KEY);\n }\n else {\n getPlatform().storage.setItem(STORED_AUTH_METHOD_KEY, method);\n }\n }\n catch (_a) {\n // storage may be unavailable\n }\n}\nfunction readAuthMethod() {\n try {\n return getPlatform().storage.getItem(STORED_AUTH_METHOD_KEY);\n }\n catch (_a) {\n return null;\n }\n}\n/**\n * Registers Mobile Wallet Adapter as a wallet-standard wallet so it appears\n * in wallet selection UIs and can be discovered by other wallet-standard consumers.\n *\n * Call this once at app startup (in a browser-only / non-SSR context).\n *\n * @param config - App identity and optional remote host authority for desktop QR code support\n */\nexport async function registerMobileWalletAdapter(config) {\n var _a, _b;\n if (typeof window === 'undefined')\n return;\n try {\n const walletStandardMobile = await import('@solana-mobile/wallet-standard-mobile');\n const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);\n if (!registerMwa) {\n console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');\n return;\n }\n const options = {};\n if (config === null || config === void 0 ? void 0 : config.appIdentity) {\n options.appIdentity = config.appIdentity;\n }\n if (config === null || config === void 0 ? void 0 : config.chains) {\n options.chains = config.chains;\n }\n if (config === null || config === void 0 ? void 0 : config.remoteHostAuthority) {\n options.remoteHostAuthority = config.remoteHostAuthority;\n }\n // Use the library's default helpers if available\n if (walletStandardMobile.createDefaultAuthorizationCache) {\n options.authorizationCache = walletStandardMobile.createDefaultAuthorizationCache();\n }\n if (walletStandardMobile.createDefaultChainSelector) {\n options.chainSelector = walletStandardMobile.createDefaultChainSelector();\n }\n // Default: suppress the \"We can't find a wallet\" modal — see\n // SolanaMobileWalletProvider.ensureWallet() for why. Consumers that\n // want their own UX can pass config.onWalletNotFound.\n options.onWalletNotFound = (_b = config === null || config === void 0 ? void 0 : config.onWalletNotFound) !== null && _b !== void 0 ? _b : (async () => {\n // intentional no-op\n });\n registerMwa(options);\n }\n catch (e) {\n console.debug('[SolanaMobileWallet] @solana-mobile/wallet-standard-mobile not available, skipping wallet-standard registration');\n }\n}\n/**\n * SolanaMobileWalletProvider implements the AuthProvider interface using\n * Solana Mobile's wallet-standard wrapper (`LocalSolanaMobileWalletAdapterWallet`).\n *\n * Why wallet-standard and not the raw MWA protocol: as of\n * `@solana-mobile/wallet-standard-mobile@0.5.0+`, the wallet's internal\n * `#transact` calls `checkLocalNetworkAccessPermission()` before opening the\n * localhost WebSocket. That helper renders a three-stage UX flow Solana\n * Mobile designed specifically to defuse Chrome's Local Network Access\n * permission dialog (which renders with disabled buttons on Android Chrome,\n * the source of the long-running Seeker MWA bug):\n *\n * 1. \"Allow connections to your wallet\" informational modal.\n * 2. Chrome's permission prompt (interactive because it's spawned as a\n * fresh user gesture from step 1).\n * 3. \"Ready to connect!\" success modal.\n *\n * `checkLocalNetworkAccessPermission` is internal to the library — it's not\n * exported. The only way to invoke it is to go through the wallet's\n * `standard:connect` / `solana:sign*` features, which is what this provider\n * does.\n *\n * Notes on UX: login uses two wallet popups in succession — `standard:connect`\n * (authorize) and `solana:signMessage` (sign the Tarobase nonce). The\n * previous implementation combined both inside a single `transact` callback;\n * splitting them is the cost of going through wallet-standard, and is\n * acceptable given the alternative was broken on Seeker.\n */\nexport class SolanaMobileWalletProvider {\n constructor(networkUrl = null, config = {}) {\n /** LocalSolanaMobileWalletAdapterWallet, lazy-constructed in ensureWallet(). */\n this.wallet = null;\n this.networkUrl = networkUrl;\n this.config = config;\n if (typeof window === 'undefined') {\n throw new Error('SolanaMobileWalletProvider can only be instantiated in a browser environment');\n }\n if (SolanaMobileWalletProvider.instance) {\n return SolanaMobileWalletProvider.instance;\n }\n this.appIdentity = config.appIdentity || {\n name: 'TaroBase App',\n uri: getPlatform().getLocationOrigin(),\n };\n this.cluster = config.cluster || 'mainnet-beta';\n SolanaMobileWalletProvider.instance = this;\n }\n static getInstance(networkUrl, config) {\n if (!SolanaMobileWalletProvider.instance) {\n new SolanaMobileWalletProvider(networkUrl, config);\n }\n return SolanaMobileWalletProvider.instance;\n }\n /** Lazy-construct LocalSolanaMobileWalletAdapterWallet on first need. */\n async ensureWallet() {\n if (this.wallet)\n return this.wallet;\n const mod = await import('@solana-mobile/wallet-standard-mobile');\n const chain = mapChainToWalletStandard(this.cluster);\n this.wallet = new mod.LocalSolanaMobileWalletAdapterWallet({\n appIdentity: this.appIdentity,\n authorizationCache: mod.createDefaultAuthorizationCache(),\n chains: [chain],\n chainSelector: mod.createDefaultChainSelector(),\n // Suppress the default \"We can't find a wallet\" modal — that\n // modal is misleading when ERROR_WALLET_NOT_FOUND fires during\n // a first-time-consent race on Seeker (the wallet IS installed,\n // the protocol just gave up before the user finished consenting).\n // login()'s withMwaAssociationRetry handles this case; on second\n // failure it surfaces a clean error message to the host app.\n onWalletNotFound: async () => {\n // intentional no-op\n },\n });\n return this.wallet;\n }\n /**\n * Ensure the wallet has an active authorization. After a Tarobase session\n * is restored from storage on cold-start, `wallet.accounts` is empty until\n * we silently reconnect from the AuthorizationCache. If the cache is also\n * empty, fall back to interactive `login()` (which surfaces the three-stage\n * Solana Mobile LNA flow + wallet popups).\n *\n * Returns the wallet-standard `WalletAccount` to use for sign operations.\n */\n async ensureAuthorized() {\n const wallet = await this.ensureWallet();\n if (wallet.accounts.length === 0) {\n try {\n const connectFeat = getConnectFeature(wallet);\n await connectFeat.connect({ silent: true });\n }\n catch (e) {\n console.warn('[SolanaMobileWallet] silent connect failed:', e === null || e === void 0 ? void 0 : e.message);\n }\n }\n if (wallet.accounts.length === 0) {\n const user = await this.login();\n if (!user)\n throw new Error('MWA not connected');\n }\n return wallet.accounts[0];\n }\n /** Returns the active wallet-standard chain identifier (e.g. 'solana:mainnet'). */\n getChain() {\n return mapChainToWalletStandard(this.cluster);\n }\n async login() {\n var _a, _b, _c, _d, _e;\n setAuthLoading(true);\n // Mark the auth method early so a concurrent Phantom auto-create-session\n // effect (see phantom-wallet-provider) sees 'mobile-wallet-adapter'\n // during our slow connect/sign roundtrip and backs off. Capture the\n // previous value so we can restore it if login fails.\n const prevAuthMethod = readAuthMethod();\n writeAuthMethod(MWA_AUTH_METHOD);\n try {\n const wallet = await this.ensureWallet();\n // Quick-check: wallet may already have authorization (e.g. from a\n // previous in-page login) and a matching Tarobase session — skip\n // popups in that case.\n if (wallet.accounts.length > 0) {\n const accountPubkey = new PublicKey(wallet.accounts[0].publicKey);\n const base58Addr = accountPubkey.toBase58();\n const existingSession = await SessionManager.getSession();\n if (existingSession && existingSession.address === base58Addr) {\n const user = { provider: this, address: base58Addr };\n setCurrentUser(user);\n return user;\n }\n }\n // Pre-fetch nonce while the wallet popup is not yet open.\n const nonce = await genAuthNonce();\n // Wallet popup #1: standard:connect performs MWA authorize. This\n // is where wallet-standard's checkLocalNetworkAccessPermission()\n // fires the three-stage LNA UX (info modal → permission prompt →\n // success modal) before opening the localhost WebSocket.\n //\n // Wrap with single-retry: on a Seeker origin's first MWA usage,\n // the protocol's session-establishment timer often races Seeker's\n // first-time consent UI and throws ERROR_WALLET_NOT_FOUND before\n // the user finishes tapping. The retry hits Seeker's cached\n // consent on the second pass and completes quickly. See\n // withMwaAssociationRetry for details.\n const connectFeat = getConnectFeature(wallet);\n const { accounts } = await withMwaAssociationRetry(() => connectFeat.connect());\n if (!accounts || accounts.length === 0) {\n throw new Error('MWA returned no accounts');\n }\n const account = accounts[0];\n const accountPubkey = new PublicKey(account.publicKey);\n const base58Addr = accountPubkey.toBase58();\n // If we happen to already have a matching Tarobase session, reuse it.\n const existingSession = await SessionManager.getSession();\n if (existingSession && existingSession.address === base58Addr) {\n const user = { provider: this, address: base58Addr };\n setCurrentUser(user);\n return user;\n }\n // Wallet popup #2: sign the Tarobase nonce message.\n //\n // We cannot call signMessageFeat.signMessage() directly here:\n // it would run as a JS continuation from the connect() resolve,\n // with no fresh Chrome transient user activation. The wallet-\n // standard sign path internally dispatches a new solana-wallet:\n // Android intent via window.location.assign() (see\n // @solana-mobile/mobile-wallet-adapter-protocol launchAssociation\n // at lib/cjs/index.browser.js:459). Chrome blocks the assign\n // without activation, the blur event never fires, and the\n // protocol's 3-second getDetectionPromise rejects with\n // ERROR_WALLET_NOT_FOUND.\n //\n // Insert a Tarobase modal: the user's tap on \"Sign in\" provides a\n // fresh activation, and signMessage is invoked synchronously\n // inside the click handler so the activation propagates.\n const messageText = await genSolanaMessage(base58Addr, nonce);\n const messageBytes = getPlatform().textEncode(messageText);\n const signMessageFeat = getSignMessageFeature(wallet);\n const signResult = await awaitSignInGestureAndSign(this.config.theme, () => signMessageFeat.signMessage({ account, message: messageBytes }));\n if (!signResult) {\n throw new Error('MWA returned no signature');\n }\n const { signature: sigBytes } = signResult;\n const signatureBase64 = Buffer.from(sigBytes).toString('base64');\n // Create Tarobase session on the server.\n const createSessionResult = await createSessionWithSignature(base58Addr, messageText, signatureBase64);\n await SessionManager.storeSession(base58Addr, createSessionResult.accessToken, createSessionResult.idToken, createSessionResult.refreshToken);\n // Auth-method marker is already 'mobile-wallet-adapter' from above.\n const user = { provider: this, address: base58Addr };\n setCurrentUser(user);\n return user;\n }\n catch (error) {\n // Restore the previous auth-method marker since this login attempt failed.\n writeAuthMethod(prevAuthMethod);\n const isUserRejection = (error === null || error === void 0 ? void 0 : error.code) === 4001 ||\n ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('user rejected')) ||\n ((_b = error === null || error === void 0 ? void 0 : error.message) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes('user denied')) ||\n ((_c = error === null || error === void 0 ? void 0 : error.message) === null || _c === void 0 ? void 0 : _c.toLowerCase().includes('user cancelled')) ||\n ((_d = error === null || error === void 0 ? void 0 : error.message) === null || _d === void 0 ? void 0 : _d.toLowerCase().includes('user canceled')) ||\n ((_e = error === null || error === void 0 ? void 0 : error.message) === null || _e === void 0 ? void 0 : _e.toLowerCase().includes('user declined'));\n if (!isUserRejection) {\n console.error('[SolanaMobileWallet] Login failed:', error);\n }\n throw error;\n }\n finally {\n setAuthLoading(false);\n }\n }\n async restoreSession() {\n const session = await SessionManager.getSession();\n if (session) {\n return { provider: this, address: session.address };\n }\n return null;\n }\n async logout() {\n try {\n const wallet = await this.ensureWallet();\n const disconnectFeat = getDisconnectFeature(wallet);\n if (disconnectFeat) {\n // Disconnect clears the AuthorizationCache and resets\n // wallet.#authorization internally (no LNA dialog).\n await disconnectFeat.disconnect();\n }\n }\n catch (error) {\n console.error('[SolanaMobileWallet] Disconnect error:', error);\n }\n SessionManager.clearSession();\n // Clear the auth-method marker so Phantom auto-create is unblocked\n // for any subsequent fresh login on this device.\n writeAuthMethod(null);\n setCurrentUser(null);\n }\n async signMessage(message) {\n var _a, _b;\n const account = await this.ensureAuthorized();\n const wallet = await this.ensureWallet();\n try {\n const signMessageFeat = getSignMessageFeature(wallet);\n const messageBytes = getPlatform().textEncode(message);\n const results = await signMessageFeat.signMessage({ account, message: messageBytes });\n if (!results || results.length === 0) {\n throw new Error('MWA returned no signature');\n }\n const { signature: sigBytes } = results[0];\n return Buffer.from(sigBytes).toString('base64');\n }\n catch (error) {\n if (((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes('not connected')) || ((_b = error === null || error === void 0 ? void 0 : error.message) === null || _b === void 0 ? void 0 : _b.includes('not authorized')) ||\n (error === null || error === void 0 ? void 0 : error.code) === 'ERROR_AUTHORIZATION_FAILED') {\n await this.logout();\n throw new Error('Wallet connection lost. Please reconnect.');\n }\n throw new Error(`Failed to sign message: ${error.message}`);\n }\n }\n async signTransaction(transaction) {\n var _a, _b;\n const account = await this.ensureAuthorized();\n const connectedPubkey = new PublicKey(account.publicKey);\n const wallet = await this.ensureWallet();\n const chain = this.getChain();\n // Preserve existing prep: fill missing blockhash / fee payer so call\n // sites that build a tx without these fields don't regress.\n const isLegacyTransaction = 'recentBlockhash' in transaction && !('message' in transaction && 'staticAccountKeys' in transaction.message);\n if (isLegacyTransaction) {\n const legacyTx = transaction;\n if (!legacyTx.recentBlockhash) {\n const conn = new Connection(this.getRpcUrl(), 'confirmed');\n const { blockhash, lastValidBlockHeight } = await conn.getLatestBlockhash('confirmed');\n legacyTx.recentBlockhash = blockhash;\n legacyTx.lastValidBlockHeight = lastValidBlockHeight;\n }\n if (!legacyTx.feePayer) {\n legacyTx.feePayer = connectedPubkey;\n }\n }\n else {\n const versionedTx = transaction;\n if (!versionedTx.message.recentBlockhash) {\n const conn = new Connection(this.getRpcUrl(), 'confirmed');\n const { blockhash } = await conn.getLatestBlockhash('confirmed');\n versionedTx.message.recentBlockhash = blockhash;\n }\n }\n try {\n const signTxFeat = getSignTransactionFeature(wallet);\n const wireBytes = txToWireBytes(transaction);\n const results = await signTxFeat.signTransaction({ account, transaction: wireBytes, chain });\n if (!results || results.length === 0) {\n throw new Error('MWA returned no signed transaction');\n }\n const { signedTransaction: signedBytes } = results[0];\n return txFromWireBytes(new Uint8Array(signedBytes));\n }\n catch (error) {\n if (((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes('not connected')) || ((_b = error === null || error === void 0 ? void 0 : error.message) === null || _b === void 0 ? void 0 : _b.includes('not authorized')) ||\n (error === null || error === void 0 ? void 0 : error.code) === 'ERROR_AUTHORIZATION_FAILED') {\n await this.logout();\n throw new Error('Wallet connection lost. Please reconnect.');\n }\n throw new Error(`Failed to sign transaction: ${error.message}`);\n }\n }\n async signAndSubmitTransaction(transaction, feePayer) {\n var _a, _b, _c, _d, _e, _f;\n const account = await this.ensureAuthorized();\n const connectedPubkey = new PublicKey(account.publicKey);\n const wallet = await this.ensureWallet();\n const chain = this.getChain();\n const rpcUrl = this.getRpcUrl();\n const connection = new Connection(rpcUrl, 'confirmed');\n const isSurfnet = rpcUrl === SURFNET_RPC_URL;\n try {\n // Preserve existing prep: refresh blockhash and set fee payer.\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');\n const isLegacyTransaction = 'recentBlockhash' in transaction && !('message' in transaction && 'staticAccountKeys' in transaction.message);\n if (isLegacyTransaction) {\n const legacyTx = transaction;\n legacyTx.recentBlockhash = blockhash;\n legacyTx.lastValidBlockHeight = lastValidBlockHeight;\n if (!legacyTx.feePayer) {\n legacyTx.feePayer = feePayer !== null && feePayer !== void 0 ? feePayer : connectedPubkey;\n }\n }\n else {\n const versionedTx = transaction;\n versionedTx.message.recentBlockhash = blockhash;\n }\n if (isSurfnet) {\n // Surfnet: sign locally via wallet-standard, submit manually\n // to the Surfnet RPC. Don't route through signAndSendTransaction\n // because the wallet would submit to its own RPC.\n const signTxFeat = getSignTransactionFeature(wallet);\n const wireBytes = txToWireBytes(transaction);\n const results = await signTxFeat.signTransaction({ account, transaction: wireBytes, chain });\n if (!results || results.length === 0) {\n throw new Error('MWA returned no signed transaction');\n }\n const { signedTransaction: signedBytes } = results[0];\n const signedTx = txFromWireBytes(new Uint8Array(signedBytes));\n const signature = await connection.sendRawTransaction(signedTx.serialize(), {\n preflightCommitment: 'confirmed',\n });\n const confirmation = await connection.confirmTransaction({\n signature,\n blockhash,\n lastValidBlockHeight,\n }, 'confirmed');\n if (confirmation.value.err) {\n throw new Error(`Transaction failed: ${confirmation.value.err.toString()}`);\n }\n return signature;\n }\n // Non-Surfnet: wallet signs and submits to its own RPC.\n const signSendFeat = getSignAndSendTransactionFeature(wallet);\n const wireBytes = txToWireBytes(transaction);\n const results = await signSendFeat.signAndSendTransaction({\n account,\n transaction: wireBytes,\n chain,\n options: { commitment: 'confirmed' },\n });\n if (!results || results.length === 0) {\n throw new Error('MWA returned no signature');\n }\n const { signature: sigBytes } = results[0];\n const signature = bs58.encode(sigBytes);\n await confirmAndCheckTransaction(connection, signature);\n return signature;\n }\n catch (error) {\n if (((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes('not connected')) || ((_b = error === null || error === void 0 ? void 0 : error.message) === null || _b === void 0 ? void 0 : _b.includes('not authorized')) ||\n (error === null || error === void 0 ? void 0 : error.code) === 'ERROR_AUTHORIZATION_FAILED') {\n await this.logout();\n throw new Error('Wallet connection lost. Please reconnect.');\n }\n const isUserRejection = (error === null || error === void 0 ? void 0 : error.code) === 4001 ||\n ((_c = error === null || error === void 0 ? void 0 : error.message) === null || _c === void 0 ? void 0 : _c.toLowerCase().includes('user rejected')) ||\n ((_d = error === null || error === void 0 ? void 0 : error.message) === null || _d === void 0 ? void 0 : _d.toLowerCase().includes('user denied')) ||\n ((_e = error === null || error === void 0 ? void 0 : error.message) === null || _e === void 0 ? void 0 : _e.toLowerCase().includes('user cancelled')) ||\n ((_f = error === null || error === void 0 ? void 0 : error.message) === null || _f === void 0 ? void 0 : _f.toLowerCase().includes('user canceled'));\n if (!isUserRejection) {\n console.error('[SolanaMobileWallet] Transaction failed:', error);\n }\n throw new Error(`Failed to execute transaction: ${error.message}`);\n }\n }\n async runTransaction(_evmTransactionData, solTransactionData, options) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (!solTransactionData) {\n throw new Error('Solana transaction data is required for mobile wallet');\n }\n const account = await this.ensureAuthorized();\n const connectedPubkey = new PublicKey(account.publicKey);\n const wallet = await this.ensureWallet();\n const chain = this.getChain();\n const rpcUrl = this.getRpcUrl(solTransactionData.network);\n const connection = new Connection(rpcUrl, 'confirmed');\n const isSurfnet = rpcUrl === SURFNET_RPC_URL;\n try {\n const remainingAccounts = convertRemainingAccounts(solTransactionData.txArgs[0].remainingAccounts);\n let app_id = solTransactionData.appId;\n if (typeof window !== 'undefined' && window.CUSTOM_TAROBASE_APP_ID_HEADER) {\n app_id = window.CUSTOM_TAROBASE_APP_ID_HEADER;\n }\n if (!app_id) {\n throw new Error('App ID is required');\n }\n // Mock wallet adapter for Anchor — only publicKey is read during build.\n const mockWalletAdapter = {\n publicKey: connectedPubkey,\n signTransaction: async (tx) => tx,\n signAllTransactions: async (txs) => txs,\n };\n const anchorProvider = new anchor.AnchorProvider(connection, mockWalletAdapter, anchor.AnchorProvider.defaultOptions());\n const finalDeduped = [];\n for (const acc of remainingAccounts) {\n const existing = finalDeduped.find((d) => d.pubkey.equals(acc.pubkey));\n if (existing) {\n existing.isSigner = existing.isSigner || acc.isSigner;\n existing.isWritable = existing.isWritable || acc.isWritable;\n }\n else {\n finalDeduped.push(acc);\n }\n }\n let tx;\n if (solTransactionData.signedTransaction) {\n // Server has co-signed a CPI attestation. Do NOT mutate its\n // blockhash — that would invalidate the server's signature.\n tx = VersionedTransaction.deserialize(Buffer.from(solTransactionData.signedTransaction, 'base64'));\n }\n else {\n const result = await buildSetDocumentsTransaction(connection, solTransactionData.txArgs[0].idl, anchorProvider, connectedPubkey, {\n app_id,\n documents: solTransactionData.txArgs[0].setDocumentData,\n delete_paths: solTransactionData.txArgs[0].deletePaths,\n txData: solTransactionData.txArgs[0].txData\n }, finalDeduped, solTransactionData.lutKey, solTransactionData.preInstructions, false, solTransactionData.additionalLutAddresses);\n tx = result.tx;\n }\n // Sign-only branch — sign the tx but don't submit.\n if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {\n const signTxFeat = getSignTransactionFeature(wallet);\n const wireBytes = txToWireBytes(tx);\n const results = await signTxFeat.signTransaction({ account, transaction: wireBytes, chain });\n if (!results || results.length === 0) {\n throw new Error('MWA returned no signed transaction');\n }\n const { signedTransaction: signedBytes } = results[0];\n const signedTx = txFromWireBytes(new Uint8Array(signedBytes));\n return {\n signedTransaction: signedTx,\n blockNumber: 0,\n gasUsed: '0',\n data: ''\n };\n }\n if (isSurfnet) {\n // Surfnet: sign locally via wallet-standard, submit manually.\n const signTxFeat = getSignTransactionFeature(wallet);\n const wireBytes = txToWireBytes(tx);\n const results = await signTxFeat.signTransaction({ account, transaction: wireBytes, chain });\n if (!results || results.length === 0) {\n throw new Error('MWA returned no signed transaction');\n }\n const { signedTransaction: signedBytes } = results[0];\n const signedTx = txFromWireBytes(new Uint8Array(signedBytes));\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');\n const signature = await connection.sendRawTransaction(signedTx.serialize(), {\n preflightCommitment: 'confirmed',\n });\n const confirmation = await connection.confirmTransaction({\n signature,\n blockhash,\n lastValidBlockHeight,\n }, 'confirmed');\n if (confirmation.value.err) {\n throw new Error(`Transaction failed: ${confirmation.value.err.toString()}`);\n }\n const txInfo = await connection.getParsedTransaction(signature, {\n maxSupportedTransactionVersion: 0,\n commitment: 'confirmed',\n });\n return {\n transactionSignature: signature,\n blockNumber: (txInfo === null || txInfo === void 0 ? void 0 : txInfo.slot) || 0,\n gasUsed: ((_a = txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta) === null || _a === void 0 ? void 0 : _a.fee.toString()) || '0',\n data: txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta,\n };\n }\n // Non-Surfnet: wallet signs and submits to its own RPC.\n const signSendFeat = getSignAndSendTransactionFeature(wallet);\n const wireBytes = txToWireBytes(tx);\n const results = await signSendFeat.signAndSendTransaction({\n account,\n transaction: wireBytes,\n chain,\n options: { commitment: 'confirmed' },\n });\n if (!results || results.length === 0) {\n throw new Error('MWA returned no signature');\n }\n const { signature: sigBytes } = results[0];\n const signature = bs58.encode(sigBytes);\n const txInfo = await confirmAndCheckTransaction(connection, signature);\n return {\n transactionSignature: signature,\n blockNumber: (txInfo === null || txInfo === void 0 ? void 0 : txInfo.slot) || 0,\n gasUsed: ((_b = txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta) === null || _b === void 0 ? void 0 : _b.fee.toString()) || '0',\n data: txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta,\n };\n }\n catch (error) {\n if (((_c = error === null || error === void 0 ? void 0 : error.message) === null || _c === void 0 ? void 0 : _c.includes('not connected')) || ((_d = error === null || error === void 0 ? void 0 : error.message) === null || _d === void 0 ? void 0 : _d.includes('not authorized')) ||\n (error === null || error === void 0 ? void 0 : error.code) === 'ERROR_AUTHORIZATION_FAILED') {\n await this.logout();\n throw new Error('Wallet connection lost. Please reconnect.');\n }\n const isUserRejection = (error === null || error === void 0 ? void 0 : error.code) === 4001 ||\n ((_e = error === null || error === void 0 ? void 0 : error.message) === null || _e === void 0 ? void 0 : _e.toLowerCase().includes('user rejected')) ||\n ((_f = error === null || error === void 0 ? void 0 : error.message) === null || _f === void 0 ? void 0 : _f.toLowerCase().includes('user denied')) ||\n ((_g = error === null || error === void 0 ? void 0 : error.message) === null || _g === void 0 ? void 0 : _g.toLowerCase().includes('user cancelled')) ||\n ((_h = error === null || error === void 0 ? void 0 : error.message) === null || _h === void 0 ? void 0 : _h.toLowerCase().includes('user canceled'));\n if (!isUserRejection) {\n console.error('[SolanaMobileWallet] Transaction failed:', error);\n }\n throw new Error(`Failed to execute transaction: ${error.message}`);\n }\n }\n async getNativeMethods() {\n var _a, _b, _c;\n // Synchronous-ish state read; tolerate the wallet being unauthorized\n // (return nulls). Don't trigger ensureAuthorized() here — callers that\n // need the wallet active should sign through one of the sign methods.\n const wallet = this.wallet;\n if (!wallet) {\n return {\n authToken: null,\n walletUriBase: null,\n publicKey: null,\n base64Address: null,\n wallet: null,\n currentAuthorization: null,\n };\n }\n const acct = (_a = wallet.accounts) === null || _a === void 0 ? void 0 : _a[0];\n const auth = wallet.currentAuthorization;\n let publicKey = null;\n let base64Address = null;\n if (acct) {\n publicKey = new PublicKey(acct.publicKey);\n base64Address = btoa(String.fromCharCode(...acct.publicKey));\n }\n return {\n authToken: (_b = auth === null || auth === void 0 ? void 0 : auth.auth_token) !== null && _b !== void 0 ? _b : null,\n walletUriBase: (_c = auth === null || auth === void 0 ? void 0 : auth.wallet_uri_base) !== null && _c !== void 0 ? _c : null,\n publicKey,\n base64Address,\n wallet,\n currentAuthorization: auth !== null && auth !== void 0 ? auth : null,\n };\n }\n /* ----------------------------------------------------------- *\n * Private Helpers\n * ----------------------------------------------------------- */\n getRpcUrl(network) {\n if (this.networkUrl) {\n return this.networkUrl;\n }\n if (network === 'solana_devnet') {\n return SOLANA_DEVNET_RPC_URL;\n }\n else if (network === 'solana_mainnet') {\n return SOLANA_MAINNET_RPC_URL;\n }\n else if (network === 'surfnet') {\n return SURFNET_RPC_URL;\n }\n return SOLANA_MAINNET_RPC_URL;\n }\n}\nSolanaMobileWalletProvider.instance = null;\n"],"names":["SessionManager","Buffer","bs58"],"mappings":";;;;;;;AAqBA,MAAM,wBAAwB,GAAG,EAAE;AACnC,MAAM,sBAAsB,GAAG,2BAA2B;AAC1D,MAAM,eAAe,GAAG,uBAAuB;AAC/C,SAAS,YAAY,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE;AACvC,IAAI,IAAI,EAAE;AACV,IAAI,IAAI,GAAG,GAAG,CAAC;AACf,IAAI,IAAI,KAAK,GAAG,CAAC;AACjB,IAAI,OAAO,GAAG,IAAI,KAAK,GAAG,QAAQ,EAAE;AACpC,QAAQ,IAAI,CAAC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC,IAAI,MAAM,gCAAgC,IAAI,QAAQ,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KA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I,IAAI,IAAI,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,eAAe,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,IAAI;AACxI,YAAY,SAAS;AACrB,YAAY,aAAa;AACzB,YAAY,MAAM;AAClB,YAAY,oBAAoB,EAAE,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,IAAI;AAChF,SAAS;AACT,IAAI;AACJ;AACA;AACA;AACA,IAAI,SAAS,CAAC,OAAO,EAAE;AACvB,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;AAC7B,YAAY,OAAO,IAAI,CAAC,UAAU;AAClC,QAAQ;AACR,QAAQ,IAAI,OAAO,KAAK,eAAe,EAAE;AACzC,YAAY,OAAO,qBAAqB;AACxC,QAAQ;AACR,aAAa,IAAI,OAAO,KAAK,gBAAgB,EAAE;AAC/C,YAAY,OAAO,sBAAsB;AACzC,QAAQ;AACR,aAAa,IAAI,OAAO,KAAK,SAAS,EAAE;AACxC,YAAY,OAAO,eAAe;AAClC,QAAQ;AACR,QAAQ,OAAO,sBAAsB;AACrC,IAAI;AACJ;AACA,0BAA0B,CAAC,QAAQ,GAAG,IAAI;;;;"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B5qYY4YM.js');
4
- var index_native = require('./index.native-pG1NTZ0f.js');
3
+ var index = require('./index-D-Wbwevj.js');
4
+ var index_native = require('./index.native-7hiNiSyC.js');
5
5
  var web3_js = require('@solana/web3.js');
6
6
  var anchor = require('@coral-xyz/anchor');
7
7
  require('axios');
@@ -85,20 +85,11 @@ function isMwaAssociationRetryable(e) {
85
85
  * so a second attempt skips the consent sheet, jumps straight to
86
86
  * Verify/Approve, and completes inside the timeout.
87
87
  */
88
- async function withMwaAssociationRetry(label, fn) {
89
- const t0 = Date.now();
90
- console.log(`[MWA-DEBUG] ${label} attempt=1 start`);
88
+ async function withMwaAssociationRetry(fn) {
91
89
  try {
92
- const result = await fn();
93
- console.log(`[MWA-DEBUG] ${label} attempt=1 ok (${Date.now() - t0}ms)`);
94
- return result;
90
+ return await fn();
95
91
  }
96
92
  catch (e) {
97
- const info = findMwaError(e);
98
- console.log(`[MWA-DEBUG] ${label} attempt=1 err (${Date.now() - t0}ms)`, {
99
- outer: { name: e === null || e === void 0 ? void 0 : e.name, message: e === null || e === void 0 ? void 0 : e.message },
100
- mwa: info,
101
- });
102
93
  const retryable = isMwaAssociationRetryable(e);
103
94
  if (!retryable)
104
95
  throw e;
@@ -107,21 +98,11 @@ async function withMwaAssociationRetry(label, fn) {
107
98
  // so visibility-based waits fire too early. Use a fixed delay long
108
99
  // enough for Seeker to dismiss its sheet and the OS to release intent
109
100
  // state. 2.5s is empirically safe; tune from device traces if needed.
110
- console.log(`[MWA-DEBUG] ${label} retryable (${retryable.code}); waiting 2500ms before retry`);
111
101
  await new Promise(r => setTimeout(r, 2500));
112
- const t1 = Date.now();
113
- console.log(`[MWA-DEBUG] ${label} attempt=2 start`);
114
102
  try {
115
- const result = await fn();
116
- console.log(`[MWA-DEBUG] ${label} attempt=2 ok (${Date.now() - t1}ms)`);
117
- return result;
103
+ return await fn();
118
104
  }
119
105
  catch (e2) {
120
- const info2 = findMwaError(e2);
121
- console.log(`[MWA-DEBUG] ${label} attempt=2 err (${Date.now() - t1}ms)`, {
122
- outer: { name: e2 === null || e2 === void 0 ? void 0 : e2.name, message: e2 === null || e2 === void 0 ? void 0 : e2.message },
123
- mwa: info2,
124
- });
125
106
  // Only mask the error with the clean Seeker message when the
126
107
  // second failure is also an association-flavored error. If it's
127
108
  // a user cancel, wallet rejection, or unknown error, rethrow
@@ -160,7 +141,7 @@ async function withMwaAssociationRetry(label, fn) {
160
141
  * next tap is a new activation (a real retry). A timer-based retry would
161
142
  * just hit the same Chrome block. Cap at 3 attempts before giving up.
162
143
  */
163
- async function awaitSignInGestureAndSign(label, theme, signFn) {
144
+ async function awaitSignInGestureAndSign(theme, signFn) {
164
145
  if (typeof document === 'undefined' || typeof window === 'undefined') {
165
146
  // SSR / non-browser: skip the gesture, just call (the activation
166
147
  // model doesn't apply outside the browser).
@@ -327,18 +308,15 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
327
308
  finishReject(new Error('User cancelled wallet sign in'));
328
309
  };
329
310
  closeBtn.addEventListener('click', () => {
330
- console.log(`[MWA-DEBUG] ${label} gesture: close clicked`);
331
311
  handleCancel();
332
312
  });
333
313
  overlay.addEventListener('click', (e) => {
334
314
  if (e.target === overlay) {
335
- console.log(`[MWA-DEBUG] ${label} gesture: overlay clicked (cancel)`);
336
315
  handleCancel();
337
316
  }
338
317
  });
339
318
  const onKeydown = (e) => {
340
319
  if (e.key === 'Escape') {
341
- console.log(`[MWA-DEBUG] ${label} gesture: Escape pressed (cancel)`);
342
320
  handleCancel();
343
321
  }
344
322
  };
@@ -348,7 +326,6 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
348
326
  return;
349
327
  attemptCount++;
350
328
  const attempt = attemptCount;
351
- console.log(`[MWA-DEBUG] ${label} gesture: button click attempt=${attempt}`);
352
329
  // Disable to prevent double-clicks while the wallet popup is up.
353
330
  button.disabled = true;
354
331
  setButtonDisabledStyle();
@@ -360,29 +337,17 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
360
337
  // so Chrome's transient user activation propagates to the
361
338
  // protocol's window.location.assign(associationUrl) inside
362
339
  // launchAssociation(). Do not `await` before calling.
363
- const t0 = Date.now();
364
- console.log(`[MWA-DEBUG] ${label} gesture: signMessage start (attempt=${attempt})`);
365
340
  signFn().then((results) => {
366
- const elapsed = Date.now() - t0;
367
341
  if (!results || results.length === 0) {
368
- console.log(`[MWA-DEBUG] ${label} gesture: signMessage returned empty (attempt=${attempt}, ${elapsed}ms)`);
369
342
  finishReject(new Error('MWA returned no signature'));
370
343
  return;
371
344
  }
372
- console.log(`[MWA-DEBUG] ${label} gesture: signMessage ok (attempt=${attempt}, ${elapsed}ms)`);
373
345
  finishResolve(results[0]);
374
346
  }).catch((err) => {
375
- const elapsed = Date.now() - t0;
376
- const info = findMwaError(err);
377
- console.log(`[MWA-DEBUG] ${label} gesture: signMessage err (attempt=${attempt}, ${elapsed}ms)`, {
378
- outer: { name: err === null || err === void 0 ? void 0 : err.name, message: err === null || err === void 0 ? void 0 : err.message },
379
- mwa: info,
380
- });
381
347
  const retryable = isMwaAssociationRetryable(err);
382
348
  if (retryable && attempt < MAX_ATTEMPTS) {
383
349
  // Re-enable the button so the user's next tap provides a
384
350
  // fresh user activation. Show inline error text.
385
- console.log(`[MWA-DEBUG] ${label} gesture: retryable (${retryable.code}); awaiting user tap to retry (attempt ${attempt}/${MAX_ATTEMPTS})`);
386
351
  button.disabled = false;
387
352
  setButtonEnabledStyle();
388
353
  button.textContent = originalText;
@@ -392,7 +357,6 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
392
357
  }
393
358
  if (retryable) {
394
359
  // Hit the attempt cap with a still-retryable failure.
395
- console.log(`[MWA-DEBUG] ${label} gesture: retryable but attempt cap reached (${attempt})`);
396
360
  finishReject(new Error("Couldn't connect to your Seeker wallet. Please try again."));
397
361
  return;
398
362
  }
@@ -401,7 +365,6 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
401
365
  finishReject(err);
402
366
  });
403
367
  });
404
- console.log(`[MWA-DEBUG] ${label} gesture: modal shown`);
405
368
  });
406
369
  }
407
370
  /**
@@ -589,7 +552,7 @@ class SolanaMobileWalletProvider {
589
552
  async ensureWallet() {
590
553
  if (this.wallet)
591
554
  return this.wallet;
592
- const mod = await Promise.resolve().then(function () { return require('./index.browser-CN6obNQM.js'); });
555
+ const mod = await Promise.resolve().then(function () { return require('./index.browser-CbawPvh6.js'); });
593
556
  const chain = mapChainToWalletStandard(this.cluster);
594
557
  this.wallet = new mod.LocalSolanaMobileWalletAdapterWallet({
595
558
  appIdentity: this.appIdentity,
@@ -603,7 +566,7 @@ class SolanaMobileWalletProvider {
603
566
  // login()'s withMwaAssociationRetry handles this case; on second
604
567
  // failure it surfaces a clean error message to the host app.
605
568
  onWalletNotFound: async () => {
606
- console.warn('[MWA-DEBUG] ensureWallet onWalletNotFound (suppressed)');
569
+ // intentional no-op
607
570
  },
608
571
  });
609
572
  return this.wallet;
@@ -677,7 +640,7 @@ class SolanaMobileWalletProvider {
677
640
  // consent on the second pass and completes quickly. See
678
641
  // withMwaAssociationRetry for details.
679
642
  const connectFeat = getConnectFeature(wallet);
680
- const { accounts } = await withMwaAssociationRetry('login:connect', () => connectFeat.connect());
643
+ const { accounts } = await withMwaAssociationRetry(() => connectFeat.connect());
681
644
  if (!accounts || accounts.length === 0) {
682
645
  throw new Error('MWA returned no accounts');
683
646
  }
@@ -710,7 +673,7 @@ class SolanaMobileWalletProvider {
710
673
  const messageText = await index_native.genSolanaMessage(base58Addr, nonce);
711
674
  const messageBytes = index_native.getPlatform().textEncode(messageText);
712
675
  const signMessageFeat = getSignMessageFeature(wallet);
713
- const signResult = await awaitSignInGestureAndSign('login:signMessage', this.config.theme, () => signMessageFeat.signMessage({ account, message: messageBytes }));
676
+ const signResult = await awaitSignInGestureAndSign(this.config.theme, () => signMessageFeat.signMessage({ account, message: messageBytes }));
714
677
  if (!signResult) {
715
678
  throw new Error('MWA returned no signature');
716
679
  }
@@ -1121,4 +1084,4 @@ class SolanaMobileWalletProvider {
1121
1084
  SolanaMobileWalletProvider.instance = null;
1122
1085
 
1123
1086
  exports.SolanaMobileWalletProvider = SolanaMobileWalletProvider;
1124
- //# sourceMappingURL=solana-mobile-wallet-provider-CN-D_H4l.js.map
1087
+ //# sourceMappingURL=solana-mobile-wallet-provider-DwER68Rz.js.map