@pooflabs/web 0.0.85-rc3 → 0.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/providers/solana-mobile-wallet-provider.d.ts +43 -0
- package/dist/{index-B5qYY4YM.js → index-B-x9RTF7.js} +2 -2
- package/dist/index-B-x9RTF7.js.map +1 -0
- package/dist/{index-BaKs3A8s.js → index-BKN0IwAx.js} +3054 -300
- package/dist/index-BKN0IwAx.js.map +1 -0
- package/dist/{index-C4AnWFs_.esm.js → index-BTwX7FYW.esm.js} +425 -119
- package/dist/index-BTwX7FYW.esm.js.map +1 -0
- package/dist/{index-BzeiIIwF.js → index-DYBdUxnT.js} +3055 -301
- package/dist/index-DYBdUxnT.js.map +1 -0
- package/dist/{index-bEXLwE7_.js → index-Dj1tZr6X.js} +426 -118
- package/dist/index-Dj1tZr6X.js.map +1 -0
- package/dist/{index-dqqR5q7b.esm.js → index-DofM-ue2.esm.js} +3054 -301
- package/dist/index-DofM-ue2.esm.js.map +1 -0
- package/dist/index-_k6pjuwx.esm.js +6 -0
- package/dist/index-_k6pjuwx.esm.js.map +1 -0
- package/dist/{index-BE-VWSJT.esm.js → index-x7a-wH2l.esm.js} +3055 -300
- package/dist/index-x7a-wH2l.esm.js.map +1 -0
- package/dist/{index.browser-D8ttddP4.esm.js → index.browser-Cndx2raY.esm.js} +506 -1876
- package/dist/index.browser-Cndx2raY.esm.js.map +1 -0
- package/dist/{index.browser-CN6obNQM.js → index.browser-D7-FFk3q.js} +506 -1876
- package/dist/index.browser-D7-FFk3q.js.map +1 -0
- package/dist/{index.browser-CZIJCtms.js → index.browser-DlA-NKvf.js} +1223 -2565
- package/dist/index.browser-DlA-NKvf.js.map +1 -0
- package/dist/{index.browser-DQIwLToJ.esm.js → index.browser-nVGFrIHK.esm.js} +1223 -2565
- package/dist/index.browser-nVGFrIHK.esm.js.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-DLziTime.esm.js → index.native-19VsREMJ.esm.js} +43 -62
- package/dist/index.native-19VsREMJ.esm.js.map +1 -0
- package/dist/{index.native-pG1NTZ0f.js → index.native-D8vj3Lbr.js} +44 -61
- package/dist/index.native-D8vj3Lbr.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-zBp7-uEw.js → phantom-wallet-provider-BlZZa_3s.js} +4 -4
- package/dist/{phantom-wallet-provider-zBp7-uEw.js.map → phantom-wallet-provider-BlZZa_3s.js.map} +1 -1
- package/dist/{phantom-wallet-provider-CP6NXRwG.esm.js → phantom-wallet-provider-Bz3qEFzX.esm.js} +4 -4
- package/dist/{phantom-wallet-provider-CP6NXRwG.esm.js.map → phantom-wallet-provider-Bz3qEFzX.esm.js.map} +1 -1
- package/dist/{privy-wallet-provider-CoyW5Gdg.js → privy-wallet-provider-CqCgq7uT.js} +3 -3
- package/dist/privy-wallet-provider-CqCgq7uT.js.map +1 -0
- package/dist/{privy-wallet-provider-CGYvf3-r.esm.js → privy-wallet-provider-DgNFzioA.esm.js} +3 -3
- package/dist/privy-wallet-provider-DgNFzioA.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-B8rHfsPN.esm.js → solana-mobile-wallet-provider-EeQsBTdr.esm.js} +385 -60
- package/dist/solana-mobile-wallet-provider-EeQsBTdr.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-CN-D_H4l.js → solana-mobile-wallet-provider-VqIGfdMV.js} +385 -60
- package/dist/solana-mobile-wallet-provider-VqIGfdMV.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-B5qYY4YM.js.map +0 -1
- package/dist/index-BE-VWSJT.esm.js.map +0 -1
- package/dist/index-BaKs3A8s.js.map +0 -1
- package/dist/index-BzeiIIwF.js.map +0 -1
- package/dist/index-C4AnWFs_.esm.js.map +0 -1
- package/dist/index-TzHXEf3-.esm.js +0 -6
- package/dist/index-TzHXEf3-.esm.js.map +0 -1
- package/dist/index-bEXLwE7_.js.map +0 -1
- package/dist/index-dqqR5q7b.esm.js.map +0 -1
- package/dist/index.browser-CN6obNQM.js.map +0 -1
- package/dist/index.browser-CZIJCtms.js.map +0 -1
- package/dist/index.browser-D8ttddP4.esm.js.map +0 -1
- package/dist/index.browser-DQIwLToJ.esm.js.map +0 -1
- package/dist/index.native-DLziTime.esm.js.map +0 -1
- package/dist/index.native-pG1NTZ0f.js.map +0 -1
- package/dist/privy-wallet-provider-CGYvf3-r.esm.js.map +0 -1
- package/dist/privy-wallet-provider-CoyW5Gdg.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-B8rHfsPN.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-CN-D_H4l.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solana-mobile-wallet-provider-B8rHfsPN.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(label, fn) {\n const t0 = Date.now();\n console.log(`[MWA-DEBUG] ${label} attempt=1 start`);\n try {\n const result = await fn();\n console.log(`[MWA-DEBUG] ${label} attempt=1 ok (${Date.now() - t0}ms)`);\n return result;\n }\n catch (e) {\n const info = findMwaError(e);\n console.log(`[MWA-DEBUG] ${label} attempt=1 err (${Date.now() - t0}ms)`, {\n outer: { name: e === null || e === void 0 ? void 0 : e.name, message: e === null || e === void 0 ? void 0 : e.message },\n mwa: info,\n });\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 console.log(`[MWA-DEBUG] ${label} retryable (${retryable.code}); waiting 2500ms before retry`);\n await new Promise(r => setTimeout(r, 2500));\n const t1 = Date.now();\n console.log(`[MWA-DEBUG] ${label} attempt=2 start`);\n try {\n const result = await fn();\n console.log(`[MWA-DEBUG] ${label} attempt=2 ok (${Date.now() - t1}ms)`);\n return result;\n }\n catch (e2) {\n const info2 = findMwaError(e2);\n console.log(`[MWA-DEBUG] ${label} attempt=2 err (${Date.now() - t1}ms)`, {\n outer: { name: e2 === null || e2 === void 0 ? void 0 : e2.name, message: e2 === null || e2 === void 0 ? void 0 : e2.message },\n mwa: info2,\n });\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(label, 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 = '×';\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 console.log(`[MWA-DEBUG] ${label} gesture: close clicked`);\n handleCancel();\n });\n overlay.addEventListener('click', (e) => {\n if (e.target === overlay) {\n console.log(`[MWA-DEBUG] ${label} gesture: overlay clicked (cancel)`);\n handleCancel();\n }\n });\n const onKeydown = (e) => {\n if (e.key === 'Escape') {\n console.log(`[MWA-DEBUG] ${label} gesture: Escape pressed (cancel)`);\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 console.log(`[MWA-DEBUG] ${label} gesture: button click attempt=${attempt}`);\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 const t0 = Date.now();\n console.log(`[MWA-DEBUG] ${label} gesture: signMessage start (attempt=${attempt})`);\n signFn().then((results) => {\n const elapsed = Date.now() - t0;\n if (!results || results.length === 0) {\n console.log(`[MWA-DEBUG] ${label} gesture: signMessage returned empty (attempt=${attempt}, ${elapsed}ms)`);\n finishReject(new Error('MWA returned no signature'));\n return;\n }\n console.log(`[MWA-DEBUG] ${label} gesture: signMessage ok (attempt=${attempt}, ${elapsed}ms)`);\n finishResolve(results[0]);\n }).catch((err) => {\n const elapsed = Date.now() - t0;\n const info = findMwaError(err);\n console.log(`[MWA-DEBUG] ${label} gesture: signMessage err (attempt=${attempt}, ${elapsed}ms)`, {\n outer: { name: err === null || err === void 0 ? void 0 : err.name, message: err === null || err === void 0 ? void 0 : err.message },\n mwa: info,\n });\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 console.log(`[MWA-DEBUG] ${label} gesture: retryable (${retryable.code}); awaiting user tap to retry (attempt ${attempt}/${MAX_ATTEMPTS})`);\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 console.log(`[MWA-DEBUG] ${label} gesture: retryable but attempt cap reached (${attempt})`);\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 console.log(`[MWA-DEBUG] ${label} gesture: modal shown`);\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 console.warn('[MWA-DEBUG] registerMobileWalletAdapter onWalletNotFound (suppressed)');\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 console.warn('[MWA-DEBUG] ensureWallet onWalletNotFound (suppressed)');\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('login:connect', () => 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('login:signMessage', 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,KAAK,QAAQ,EAAE;AACnL,YAAY,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE;AAC9G,QAAQ;AACR,QAAQ,GAAG,GAAG,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC,KA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AAC,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solana-mobile-wallet-provider-CN-D_H4l.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(label, fn) {\n const t0 = Date.now();\n console.log(`[MWA-DEBUG] ${label} attempt=1 start`);\n try {\n const result = await fn();\n console.log(`[MWA-DEBUG] ${label} attempt=1 ok (${Date.now() - t0}ms)`);\n return result;\n }\n catch (e) {\n const info = findMwaError(e);\n console.log(`[MWA-DEBUG] ${label} attempt=1 err (${Date.now() - t0}ms)`, {\n outer: { name: e === null || e === void 0 ? void 0 : e.name, message: e === null || e === void 0 ? void 0 : e.message },\n mwa: info,\n });\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 console.log(`[MWA-DEBUG] ${label} retryable (${retryable.code}); waiting 2500ms before retry`);\n await new Promise(r => setTimeout(r, 2500));\n const t1 = Date.now();\n console.log(`[MWA-DEBUG] ${label} attempt=2 start`);\n try {\n const result = await fn();\n console.log(`[MWA-DEBUG] ${label} attempt=2 ok (${Date.now() - t1}ms)`);\n return result;\n }\n catch (e2) {\n const info2 = findMwaError(e2);\n console.log(`[MWA-DEBUG] ${label} attempt=2 err (${Date.now() - t1}ms)`, {\n outer: { name: e2 === null || e2 === void 0 ? void 0 : e2.name, message: e2 === null || e2 === void 0 ? void 0 : e2.message },\n mwa: info2,\n });\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(label, 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 = '×';\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 console.log(`[MWA-DEBUG] ${label} gesture: close clicked`);\n handleCancel();\n });\n overlay.addEventListener('click', (e) => {\n if (e.target === overlay) {\n console.log(`[MWA-DEBUG] ${label} gesture: overlay clicked (cancel)`);\n handleCancel();\n }\n });\n const onKeydown = (e) => {\n if (e.key === 'Escape') {\n console.log(`[MWA-DEBUG] ${label} gesture: Escape pressed (cancel)`);\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 console.log(`[MWA-DEBUG] ${label} gesture: button click attempt=${attempt}`);\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 const t0 = Date.now();\n console.log(`[MWA-DEBUG] ${label} gesture: signMessage start (attempt=${attempt})`);\n signFn().then((results) => {\n const elapsed = Date.now() - t0;\n if (!results || results.length === 0) {\n console.log(`[MWA-DEBUG] ${label} gesture: signMessage returned empty (attempt=${attempt}, ${elapsed}ms)`);\n finishReject(new Error('MWA returned no signature'));\n return;\n }\n console.log(`[MWA-DEBUG] ${label} gesture: signMessage ok (attempt=${attempt}, ${elapsed}ms)`);\n finishResolve(results[0]);\n }).catch((err) => {\n const elapsed = Date.now() - t0;\n const info = findMwaError(err);\n console.log(`[MWA-DEBUG] ${label} gesture: signMessage err (attempt=${attempt}, ${elapsed}ms)`, {\n outer: { name: err === null || err === void 0 ? void 0 : err.name, message: err === null || err === void 0 ? void 0 : err.message },\n mwa: info,\n });\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 console.log(`[MWA-DEBUG] ${label} gesture: retryable (${retryable.code}); awaiting user tap to retry (attempt ${attempt}/${MAX_ATTEMPTS})`);\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 console.log(`[MWA-DEBUG] ${label} gesture: retryable but attempt cap reached (${attempt})`);\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 console.log(`[MWA-DEBUG] ${label} gesture: modal shown`);\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 console.warn('[MWA-DEBUG] registerMobileWalletAdapter onWalletNotFound (suppressed)');\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 console.warn('[MWA-DEBUG] ensureWallet onWalletNotFound (suppressed)');\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('login:connect', () => 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('login:signMessage', 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":["VersionedMessage","Transaction","VersionedTransaction","getPlatform","setAuthLoading","PublicKey","SessionManager","setCurrentUser","genAuthNonce","genSolanaMessage","Buffer","createSessionWithSignature","Connection","SURFNET_RPC_URL","bs58","confirmAndCheckTransaction","convertRemainingAccounts","anchor","buildSetDocumentsTransaction","SOLANA_DEVNET_RPC_URL","SOLANA_MAINNET_RPC_URL"],"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,KAAK,QAAQ,EAAE;AACnL,YAAY,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC,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