@pooflabs/web 0.0.85-rc2 → 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-B1_Q49qQ.js → index-BHkED2YI.js} +2 -2
  2. package/dist/{index-B1_Q49qQ.js.map → index-BHkED2YI.js.map} +1 -1
  3. package/dist/{index-QukWgaIi.esm.js → index-BQUfNEiY.esm.js} +282 -36
  4. package/dist/{index-QukWgaIi.esm.js.map → index-BQUfNEiY.esm.js.map} +1 -1
  5. package/dist/{index-B7tJ8TAn.esm.js → index-Cfp30Jm_.esm.js} +2 -2
  6. package/dist/{index-B7tJ8TAn.esm.js.map → index-Cfp30Jm_.esm.js.map} +1 -1
  7. package/dist/{index-DyRIXw-l.js → index-D-Wbwevj.js} +2 -2
  8. package/dist/index-D-Wbwevj.js.map +1 -0
  9. package/dist/{index-agGmWBn4.esm.js → index-DK28JaJm.esm.js} +3 -3
  10. package/dist/{index-agGmWBn4.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-DflG_JAB.js → index-DUn32Hkh.js} +3 -3
  14. package/dist/{index-DflG_JAB.js.map → index-DUn32Hkh.js.map} +1 -1
  15. package/dist/{index-BeFR3-cf.js → index-hEc5_KoM.js} +282 -36
  16. package/dist/{index-BeFR3-cf.js.map → index-hEc5_KoM.js.map} +1 -1
  17. package/dist/{index.browser-lHP9glAW.esm.js → index.browser-C9gHoUen.esm.js} +2 -2
  18. package/dist/{index.browser-lHP9glAW.esm.js.map → index.browser-C9gHoUen.esm.js.map} +1 -1
  19. package/dist/{index.browser-DZtZWdul.js → index.browser-CbawPvh6.js} +2 -2
  20. package/dist/{index.browser-DZtZWdul.js.map → index.browser-CbawPvh6.js.map} +1 -1
  21. package/dist/{index.browser-BJmFjY2f.js → index.browser-DD8pg_L2.js} +2 -2
  22. package/dist/{index.browser-BJmFjY2f.js.map → index.browser-DD8pg_L2.js.map} +1 -1
  23. package/dist/{index.browser-p-pgsxxW.esm.js → index.browser-DQqKPfDA.esm.js} +2 -2
  24. package/dist/{index.browser-p-pgsxxW.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-ANhb4jEB.js → index.native-7hiNiSyC.js} +4 -4
  28. package/dist/{index.native-ANhb4jEB.js.map → index.native-7hiNiSyC.js.map} +1 -1
  29. package/dist/{index.native-a3mhu9HP.esm.js → index.native-BItnSD47.esm.js} +4 -4
  30. package/dist/{index.native-a3mhu9HP.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-BOdn0D1Q.js → phantom-wallet-provider-CjvLq_2_.js} +4 -4
  34. package/dist/{phantom-wallet-provider-BOdn0D1Q.js.map → phantom-wallet-provider-CjvLq_2_.js.map} +1 -1
  35. package/dist/{phantom-wallet-provider-Dsza6TBv.esm.js → phantom-wallet-provider-DE3vit2Z.esm.js} +4 -4
  36. package/dist/{phantom-wallet-provider-Dsza6TBv.esm.js.map → phantom-wallet-provider-DE3vit2Z.esm.js.map} +1 -1
  37. package/dist/{privy-wallet-provider-BlPh3Gn_.js → privy-wallet-provider-DFZaQPss.js} +3 -3
  38. package/dist/{privy-wallet-provider-BlPh3Gn_.js.map → privy-wallet-provider-DFZaQPss.js.map} +1 -1
  39. package/dist/{privy-wallet-provider-bwwhkFjL.esm.js → privy-wallet-provider-ip2pqo_U.esm.js} +3 -3
  40. package/dist/{privy-wallet-provider-bwwhkFjL.esm.js.map → privy-wallet-provider-ip2pqo_U.esm.js.map} +1 -1
  41. package/dist/{solana-mobile-wallet-provider-fzLIgJBf.esm.js → solana-mobile-wallet-provider-D7BbSpez.esm.js} +281 -35
  42. package/dist/solana-mobile-wallet-provider-D7BbSpez.esm.js.map +1 -0
  43. package/dist/{solana-mobile-wallet-provider-S8yWHG6i.js → solana-mobile-wallet-provider-DwER68Rz.js} +281 -35
  44. package/dist/solana-mobile-wallet-provider-DwER68Rz.js.map +1 -0
  45. package/package.json +1 -1
  46. package/dist/index-DbJCCvVN.esm.js +0 -6
  47. package/dist/index-DbJCCvVN.esm.js.map +0 -1
  48. package/dist/index-DyRIXw-l.js.map +0 -1
  49. package/dist/solana-mobile-wallet-provider-S8yWHG6i.js.map +0 -1
  50. package/dist/solana-mobile-wallet-provider-fzLIgJBf.esm.js.map +0 -1
@@ -15709,7 +15709,7 @@ async function loadDependencies() {
15709
15709
  const [reactModule, reactDomModule, phantomModule] = await Promise.all([
15710
15710
  import('react'),
15711
15711
  import('react-dom/client'),
15712
- import('./index-B7tJ8TAn.esm.js')
15712
+ import('./index-Cfp30Jm_.esm.js')
15713
15713
  ]);
15714
15714
  // Extract default export from ESM module namespace
15715
15715
  // Dynamic import() returns { default: Module, ...exports }, not the module directly
@@ -21336,20 +21336,11 @@ function isMwaAssociationRetryable(e) {
21336
21336
  * so a second attempt skips the consent sheet, jumps straight to
21337
21337
  * Verify/Approve, and completes inside the timeout.
21338
21338
  */
21339
- async function withMwaAssociationRetry(label, fn) {
21340
- const t0 = Date.now();
21341
- console.log(`[MWA-DEBUG] ${label} attempt=1 start`);
21339
+ async function withMwaAssociationRetry(fn) {
21342
21340
  try {
21343
- const result = await fn();
21344
- console.log(`[MWA-DEBUG] ${label} attempt=1 ok (${Date.now() - t0}ms)`);
21345
- return result;
21341
+ return await fn();
21346
21342
  }
21347
21343
  catch (e) {
21348
- const info = findMwaError(e);
21349
- console.log(`[MWA-DEBUG] ${label} attempt=1 err (${Date.now() - t0}ms)`, {
21350
- outer: { name: e === null || e === void 0 ? void 0 : e.name, message: e === null || e === void 0 ? void 0 : e.message },
21351
- mwa: info,
21352
- });
21353
21344
  const retryable = isMwaAssociationRetryable(e);
21354
21345
  if (!retryable)
21355
21346
  throw e;
@@ -21358,21 +21349,11 @@ async function withMwaAssociationRetry(label, fn) {
21358
21349
  // so visibility-based waits fire too early. Use a fixed delay long
21359
21350
  // enough for Seeker to dismiss its sheet and the OS to release intent
21360
21351
  // state. 2.5s is empirically safe; tune from device traces if needed.
21361
- console.log(`[MWA-DEBUG] ${label} retryable (${retryable.code}); waiting 2500ms before retry`);
21362
21352
  await new Promise(r => setTimeout(r, 2500));
21363
- const t1 = Date.now();
21364
- console.log(`[MWA-DEBUG] ${label} attempt=2 start`);
21365
21353
  try {
21366
- const result = await fn();
21367
- console.log(`[MWA-DEBUG] ${label} attempt=2 ok (${Date.now() - t1}ms)`);
21368
- return result;
21354
+ return await fn();
21369
21355
  }
21370
21356
  catch (e2) {
21371
- const info2 = findMwaError(e2);
21372
- console.log(`[MWA-DEBUG] ${label} attempt=2 err (${Date.now() - t1}ms)`, {
21373
- outer: { name: e2 === null || e2 === void 0 ? void 0 : e2.name, message: e2 === null || e2 === void 0 ? void 0 : e2.message },
21374
- mwa: info2,
21375
- });
21376
21357
  // Only mask the error with the clean Seeker message when the
21377
21358
  // second failure is also an association-flavored error. If it's
21378
21359
  // a user cancel, wallet rejection, or unknown error, rethrow
@@ -21384,6 +21365,259 @@ async function withMwaAssociationRetry(label, fn) {
21384
21365
  }
21385
21366
  }
21386
21367
  }
21368
+ /**
21369
+ * User-gesture-mediated wallet-standard sign helper.
21370
+ *
21371
+ * Why this exists: login flows that go through wallet-standard call two
21372
+ * separate transacts (standard:connect, then solana:signMessage). Each
21373
+ * transact dispatches its own `solana-wallet:` Android intent navigation
21374
+ * via `window.location.assign(associationUrl)` (see
21375
+ * @solana-mobile/mobile-wallet-adapter-protocol/lib/cjs/index.browser.js
21376
+ * `launchAssociation()` at line 459). Chrome requires **transient user
21377
+ * activation** for each custom-scheme navigation. The first transact
21378
+ * consumes the activation from the user's "Continue to Allow" tap on the
21379
+ * LNA modal; by the time the second transact (signMessage) runs as a JS
21380
+ * continuation, the activation has decayed, Chrome blocks the navigation,
21381
+ * no `blur` event fires, the protocol's `getDetectionPromise` (3000ms
21382
+ * timeout, line 433) rejects, and we get `ERROR_WALLET_NOT_FOUND`.
21383
+ *
21384
+ * Fix: show a Tarobase-controlled modal between the two transacts. When the
21385
+ * user taps the modal's "Sign in" button, that tap IS a fresh user
21386
+ * activation. We invoke the sign function directly inside the click handler
21387
+ * — no `await` between the tap and the call — so the activation propagates
21388
+ * to the protocol's `location.assign`.
21389
+ *
21390
+ * Failure recovery is also user-gesture driven: if the sign function fails
21391
+ * with a retryable association error, we re-enable the button so the user's
21392
+ * next tap is a new activation (a real retry). A timer-based retry would
21393
+ * just hit the same Chrome block. Cap at 3 attempts before giving up.
21394
+ */
21395
+ async function awaitSignInGestureAndSign(theme, signFn) {
21396
+ if (typeof document === 'undefined' || typeof window === 'undefined') {
21397
+ // SSR / non-browser: skip the gesture, just call (the activation
21398
+ // model doesn't apply outside the browser).
21399
+ const results = await signFn();
21400
+ if (!results || results.length === 0)
21401
+ throw new Error('MWA returned no signature');
21402
+ return results[0];
21403
+ }
21404
+ return new Promise((resolve, reject) => {
21405
+ const isDark = theme === 'dark'
21406
+ || (theme == null
21407
+ && typeof window.matchMedia === 'function'
21408
+ && window.matchMedia('(prefers-color-scheme: dark)').matches);
21409
+ // Palette
21410
+ const overlayBg = 'rgba(0, 0, 0, 0.62)';
21411
+ const cardBg = isDark ? '#1a1a1f' : '#ffffff';
21412
+ const titleColor = isDark ? '#ffffff' : '#0a0a0a';
21413
+ const subtitleColor = isDark ? '#a1a1aa' : '#52525b';
21414
+ const btnBg = isDark ? '#ffffff' : '#0a0a0a';
21415
+ const btnText = isDark ? '#0a0a0a' : '#ffffff';
21416
+ const btnDisabledBg = isDark ? '#3f3f46' : '#d4d4d8';
21417
+ const btnDisabledText = isDark ? '#71717a' : '#71717a';
21418
+ const errorColor = isDark ? '#fca5a5' : '#dc2626';
21419
+ const closeColor = isDark ? '#71717a' : '#a1a1aa';
21420
+ const fontStack = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
21421
+ const overlay = document.createElement('div');
21422
+ overlay.setAttribute('data-tarobase-mwa-gesture', 'true');
21423
+ overlay.style.cssText = [
21424
+ 'position: fixed',
21425
+ 'inset: 0',
21426
+ 'z-index: 2147483646',
21427
+ `background: ${overlayBg}`,
21428
+ 'display: flex',
21429
+ 'align-items: center',
21430
+ 'justify-content: center',
21431
+ 'padding: 20px',
21432
+ 'box-sizing: border-box',
21433
+ `font-family: ${fontStack}`,
21434
+ ].join('; ');
21435
+ const card = document.createElement('div');
21436
+ card.style.cssText = [
21437
+ `background: ${cardBg}`,
21438
+ 'border-radius: 20px',
21439
+ 'padding: 28px 24px 24px',
21440
+ 'max-width: 340px',
21441
+ 'width: 100%',
21442
+ 'box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28)',
21443
+ 'position: relative',
21444
+ 'box-sizing: border-box',
21445
+ ].join('; ');
21446
+ const closeBtn = document.createElement('button');
21447
+ closeBtn.setAttribute('aria-label', 'Close');
21448
+ closeBtn.innerHTML = '×';
21449
+ closeBtn.style.cssText = [
21450
+ 'position: absolute',
21451
+ 'top: 12px',
21452
+ 'right: 12px',
21453
+ 'background: transparent',
21454
+ 'border: none',
21455
+ `color: ${closeColor}`,
21456
+ 'font-size: 24px',
21457
+ 'line-height: 1',
21458
+ 'cursor: pointer',
21459
+ 'padding: 6px 10px',
21460
+ 'border-radius: 8px',
21461
+ ].join('; ');
21462
+ const title = document.createElement('div');
21463
+ title.textContent = 'Almost there';
21464
+ title.style.cssText = [
21465
+ `color: ${titleColor}`,
21466
+ 'font-size: 20px',
21467
+ 'font-weight: 600',
21468
+ 'margin-bottom: 6px',
21469
+ 'text-align: center',
21470
+ ].join('; ');
21471
+ const subtitle = document.createElement('div');
21472
+ subtitle.textContent = 'Tap to sign in with your wallet';
21473
+ subtitle.style.cssText = [
21474
+ `color: ${subtitleColor}`,
21475
+ 'font-size: 14px',
21476
+ 'line-height: 1.4',
21477
+ 'margin-bottom: 22px',
21478
+ 'text-align: center',
21479
+ ].join('; ');
21480
+ const errorRow = document.createElement('div');
21481
+ errorRow.style.cssText = [
21482
+ `color: ${errorColor}`,
21483
+ 'font-size: 13px',
21484
+ 'line-height: 1.4',
21485
+ 'margin-bottom: 14px',
21486
+ 'text-align: center',
21487
+ 'min-height: 0',
21488
+ 'transition: min-height 100ms ease',
21489
+ ].join('; ');
21490
+ const button = document.createElement('button');
21491
+ button.textContent = 'Sign in';
21492
+ const setButtonEnabledStyle = () => {
21493
+ button.style.cssText = [
21494
+ `background: ${btnBg}`,
21495
+ `color: ${btnText}`,
21496
+ 'border: none',
21497
+ 'border-radius: 14px',
21498
+ 'padding: 14px 20px',
21499
+ 'font-size: 16px',
21500
+ 'font-weight: 600',
21501
+ 'width: 100%',
21502
+ 'cursor: pointer',
21503
+ '-webkit-tap-highlight-color: transparent',
21504
+ 'box-sizing: border-box',
21505
+ `font-family: ${fontStack}`,
21506
+ ].join('; ');
21507
+ };
21508
+ const setButtonDisabledStyle = () => {
21509
+ button.style.cssText = [
21510
+ `background: ${btnDisabledBg}`,
21511
+ `color: ${btnDisabledText}`,
21512
+ 'border: none',
21513
+ 'border-radius: 14px',
21514
+ 'padding: 14px 20px',
21515
+ 'font-size: 16px',
21516
+ 'font-weight: 600',
21517
+ 'width: 100%',
21518
+ 'cursor: default',
21519
+ '-webkit-tap-highlight-color: transparent',
21520
+ 'box-sizing: border-box',
21521
+ `font-family: ${fontStack}`,
21522
+ ].join('; ');
21523
+ };
21524
+ setButtonEnabledStyle();
21525
+ card.appendChild(closeBtn);
21526
+ card.appendChild(title);
21527
+ card.appendChild(subtitle);
21528
+ card.appendChild(errorRow);
21529
+ card.appendChild(button);
21530
+ overlay.appendChild(card);
21531
+ document.body.appendChild(overlay);
21532
+ let settled = false;
21533
+ let attemptCount = 0;
21534
+ const MAX_ATTEMPTS = 3;
21535
+ const cleanup = () => {
21536
+ try {
21537
+ overlay.remove();
21538
+ }
21539
+ catch ( /* ignore */_a) { /* ignore */ }
21540
+ document.removeEventListener('keydown', onKeydown);
21541
+ };
21542
+ const finishResolve = (value) => {
21543
+ if (settled)
21544
+ return;
21545
+ settled = true;
21546
+ cleanup();
21547
+ resolve(value);
21548
+ };
21549
+ const finishReject = (err) => {
21550
+ if (settled)
21551
+ return;
21552
+ settled = true;
21553
+ cleanup();
21554
+ reject(err);
21555
+ };
21556
+ const handleCancel = () => {
21557
+ // Phrasing matches login()'s isUserRejection substring check so
21558
+ // the existing catch suppresses error-log noise.
21559
+ finishReject(new Error('User cancelled wallet sign in'));
21560
+ };
21561
+ closeBtn.addEventListener('click', () => {
21562
+ handleCancel();
21563
+ });
21564
+ overlay.addEventListener('click', (e) => {
21565
+ if (e.target === overlay) {
21566
+ handleCancel();
21567
+ }
21568
+ });
21569
+ const onKeydown = (e) => {
21570
+ if (e.key === 'Escape') {
21571
+ handleCancel();
21572
+ }
21573
+ };
21574
+ document.addEventListener('keydown', onKeydown);
21575
+ button.addEventListener('click', () => {
21576
+ if (settled)
21577
+ return;
21578
+ attemptCount++;
21579
+ const attempt = attemptCount;
21580
+ // Disable to prevent double-clicks while the wallet popup is up.
21581
+ button.disabled = true;
21582
+ setButtonDisabledStyle();
21583
+ const originalText = 'Sign in';
21584
+ button.textContent = 'Signing in…';
21585
+ errorRow.textContent = '';
21586
+ errorRow.style.minHeight = '0';
21587
+ // CRITICAL: invoke signFn() synchronously inside the click handler
21588
+ // so Chrome's transient user activation propagates to the
21589
+ // protocol's window.location.assign(associationUrl) inside
21590
+ // launchAssociation(). Do not `await` before calling.
21591
+ signFn().then((results) => {
21592
+ if (!results || results.length === 0) {
21593
+ finishReject(new Error('MWA returned no signature'));
21594
+ return;
21595
+ }
21596
+ finishResolve(results[0]);
21597
+ }).catch((err) => {
21598
+ const retryable = isMwaAssociationRetryable(err);
21599
+ if (retryable && attempt < MAX_ATTEMPTS) {
21600
+ // Re-enable the button so the user's next tap provides a
21601
+ // fresh user activation. Show inline error text.
21602
+ button.disabled = false;
21603
+ setButtonEnabledStyle();
21604
+ button.textContent = originalText;
21605
+ errorRow.textContent = "Couldn't connect — tap to try again";
21606
+ errorRow.style.minHeight = '20px';
21607
+ return;
21608
+ }
21609
+ if (retryable) {
21610
+ // Hit the attempt cap with a still-retryable failure.
21611
+ finishReject(new Error("Couldn't connect to your Seeker wallet. Please try again."));
21612
+ return;
21613
+ }
21614
+ // Non-retryable error (user cancel inside Seeker, wallet
21615
+ // rejected sign, unknown error, etc.) — surface as-is.
21616
+ finishReject(err);
21617
+ });
21618
+ });
21619
+ });
21620
+ }
21387
21621
  /**
21388
21622
  * Normalize a chain string to a wallet-standard Solana chain identifier.
21389
21623
  *
@@ -21525,7 +21759,7 @@ async function registerMobileWalletAdapter(config) {
21525
21759
  if (typeof window === 'undefined')
21526
21760
  return;
21527
21761
  try {
21528
- const walletStandardMobile = await import('./index.browser-lHP9glAW.esm.js');
21762
+ const walletStandardMobile = await import('./index.browser-C9gHoUen.esm.js');
21529
21763
  const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
21530
21764
  if (!registerMwa) {
21531
21765
  console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
@@ -21552,7 +21786,7 @@ async function registerMobileWalletAdapter(config) {
21552
21786
  // SolanaMobileWalletProvider.ensureWallet() for why. Consumers that
21553
21787
  // want their own UX can pass config.onWalletNotFound.
21554
21788
  options.onWalletNotFound = (_b = config === null || config === void 0 ? void 0 : config.onWalletNotFound) !== null && _b !== void 0 ? _b : (async () => {
21555
- console.warn('[MWA-DEBUG] registerMobileWalletAdapter onWalletNotFound (suppressed)');
21789
+ // intentional no-op
21556
21790
  });
21557
21791
  registerMwa(options);
21558
21792
  }
@@ -21617,7 +21851,7 @@ class SolanaMobileWalletProvider {
21617
21851
  async ensureWallet() {
21618
21852
  if (this.wallet)
21619
21853
  return this.wallet;
21620
- const mod = await import('./index.browser-lHP9glAW.esm.js');
21854
+ const mod = await import('./index.browser-C9gHoUen.esm.js');
21621
21855
  const chain = mapChainToWalletStandard(this.cluster);
21622
21856
  this.wallet = new mod.LocalSolanaMobileWalletAdapterWallet({
21623
21857
  appIdentity: this.appIdentity,
@@ -21631,7 +21865,7 @@ class SolanaMobileWalletProvider {
21631
21865
  // login()'s withMwaAssociationRetry handles this case; on second
21632
21866
  // failure it surfaces a clean error message to the host app.
21633
21867
  onWalletNotFound: async () => {
21634
- console.warn('[MWA-DEBUG] ensureWallet onWalletNotFound (suppressed)');
21868
+ // intentional no-op
21635
21869
  },
21636
21870
  });
21637
21871
  return this.wallet;
@@ -21705,7 +21939,7 @@ class SolanaMobileWalletProvider {
21705
21939
  // consent on the second pass and completes quickly. See
21706
21940
  // withMwaAssociationRetry for details.
21707
21941
  const connectFeat = getConnectFeature(wallet);
21708
- const { accounts } = await withMwaAssociationRetry('login:connect', () => connectFeat.connect());
21942
+ const { accounts } = await withMwaAssociationRetry(() => connectFeat.connect());
21709
21943
  if (!accounts || accounts.length === 0) {
21710
21944
  throw new Error('MWA returned no accounts');
21711
21945
  }
@@ -21719,18 +21953,30 @@ class SolanaMobileWalletProvider {
21719
21953
  setCurrentUser(user);
21720
21954
  return user;
21721
21955
  }
21722
- // Wallet popup #2: sign the Tarobase nonce message. Wrap with the
21723
- // same retry for defense in depth — by now Seeker has cached the
21724
- // consent so this rarely hits the retry path, but if the
21725
- // protocol's session timer fires here too we recover transparently.
21956
+ // Wallet popup #2: sign the Tarobase nonce message.
21957
+ //
21958
+ // We cannot call signMessageFeat.signMessage() directly here:
21959
+ // it would run as a JS continuation from the connect() resolve,
21960
+ // with no fresh Chrome transient user activation. The wallet-
21961
+ // standard sign path internally dispatches a new solana-wallet:
21962
+ // Android intent via window.location.assign() (see
21963
+ // @solana-mobile/mobile-wallet-adapter-protocol launchAssociation
21964
+ // at lib/cjs/index.browser.js:459). Chrome blocks the assign
21965
+ // without activation, the blur event never fires, and the
21966
+ // protocol's 3-second getDetectionPromise rejects with
21967
+ // ERROR_WALLET_NOT_FOUND.
21968
+ //
21969
+ // Insert a Tarobase modal: the user's tap on "Sign in" provides a
21970
+ // fresh activation, and signMessage is invoked synchronously
21971
+ // inside the click handler so the activation propagates.
21726
21972
  const messageText = await genSolanaMessage(base58Addr, nonce);
21727
21973
  const messageBytes = getPlatform().textEncode(messageText);
21728
21974
  const signMessageFeat = getSignMessageFeature(wallet);
21729
- const signResults = await withMwaAssociationRetry('login:signMessage', () => signMessageFeat.signMessage({ account, message: messageBytes }));
21730
- if (!signResults || signResults.length === 0) {
21975
+ const signResult = await awaitSignInGestureAndSign(this.config.theme, () => signMessageFeat.signMessage({ account, message: messageBytes }));
21976
+ if (!signResult) {
21731
21977
  throw new Error('MWA returned no signature');
21732
21978
  }
21733
- const { signature: sigBytes } = signResults[0];
21979
+ const { signature: sigBytes } = signResult;
21734
21980
  const signatureBase64 = bufferExports.Buffer.from(sigBytes).toString('base64');
21735
21981
  // Create Tarobase session on the server.
21736
21982
  const createSessionResult = await createSessionWithSignature(base58Addr, messageText, signatureBase64);
@@ -22483,4 +22729,4 @@ class PrivyExpoProvider {
22483
22729
  }
22484
22730
 
22485
22731
  export { getCachedData as $, subscribe as A, useAuth as B, deserializeTransaction as C, getIdToken as D, setPlatform as E, getPlatform as F, PrivyWalletProvider as G, DEFAULT_TEST_ADDRESS as H, isMobileWalletAvailable as I, registerMobileWalletAdapter as J, PrivyExpoProvider as K, InsufficientBalanceError as L, MockAuthProvider as M, ServerSessionManager as N, OffchainAuthProvider as O, PhantomWalletProvider as P, buildSetDocumentsTransaction as Q, ReactNativeSessionManager as R, SolanaMobileWalletProvider as S, clearCache as T, closeAllSubscriptions as U, convertRemainingAccounts as V, WebSessionManager as W, createSessionWithPrivy as X, createSessionWithSignature as Y, genAuthNonce as Z, genSolanaMessage as _, base58 as a, getMany as a0, reconnectWithNewAuth as a1, refreshSession as a2, signSessionCreateMessage as a3, bufferExports as b, getCurrentUser as c, onAuthLoadingChanged as d, getAuthLoading as e, logout as f, getDefaultExportFromCjs$1 as g, getConfig as h, init as i, getAuthProvider as j, get as k, login as l, setMany as m, setFile as n, onAuthStateChanged as o, getFiles as p, runQueryMany as q, runQuery as r, set as s, runExpression as t, runExpressionMany as u, signMessage as v, signTransaction as w, signAndSubmitTransaction as x, count as y, aggregate as z };
22486
- //# sourceMappingURL=index-QukWgaIi.esm.js.map
22732
+ //# sourceMappingURL=index-BQUfNEiY.esm.js.map