@pooflabs/web 0.0.81-rc2 → 0.0.81
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/index.d.ts +10 -1
- package/dist/auth/providers/phantom-wallet-provider.d.ts +20 -21
- package/dist/global.d.ts +3 -1
- package/dist/{index-DHm4usay.js → index-B2WGCssJ.js} +347 -414
- package/dist/index-B2WGCssJ.js.map +1 -0
- package/dist/{index-CHqM9n4K.esm.js → index-CjHbp7Dq.esm.js} +3697 -562
- package/dist/index-CjHbp7Dq.esm.js.map +1 -0
- package/dist/{index-CL4JIAAR.js → index-DXPkkq81.js} +3698 -563
- package/dist/index-DXPkkq81.js.map +1 -0
- package/dist/{index-BjlCinic.js → index-D_DiP8XQ.js} +3698 -563
- package/dist/index-D_DiP8XQ.js.map +1 -0
- package/dist/{index-DCo85UGg.esm.js → index-dcJIjFrs.esm.js} +3697 -562
- package/dist/index-dcJIjFrs.esm.js.map +1 -0
- package/dist/{index-Bx_lLXRT.esm.js → index-nt_HQVrk.esm.js} +345 -414
- package/dist/index-nt_HQVrk.esm.js.map +1 -0
- package/dist/{index.browser-7dDfRU5G.esm.js → index.browser-BNdFfyIg.esm.js} +1571 -1368
- package/dist/index.browser-BNdFfyIg.esm.js.map +1 -0
- package/dist/{index.browser-CmlqbyPr.js → index.browser-CT6PUv9G.js} +1571 -1368
- package/dist/index.browser-CT6PUv9G.js.map +1 -0
- package/dist/index.browser-Cy21yaX0.esm.js +1096 -0
- package/dist/index.browser-Cy21yaX0.esm.js.map +1 -0
- package/dist/index.browser-OvGNsMPu.esm.js +1002 -0
- package/dist/index.browser-OvGNsMPu.esm.js.map +1 -0
- package/dist/index.browser-ZD7Tz2bn.js +1099 -0
- package/dist/index.browser-ZD7Tz2bn.js.map +1 -0
- package/dist/index.browser-d0PlOXpF.js +105 -0
- package/dist/index.browser-d0PlOXpF.js.map +1 -0
- package/dist/index.browser-pE1s68e9.esm.js +102 -0
- package/dist/index.browser-pE1s68e9.esm.js.map +1 -0
- package/dist/index.browser-vuTr40so.js +1008 -0
- package/dist/index.browser-vuTr40so.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-TLhfXfe6.esm.js → index.native-BqYr--vb.esm.js} +202 -178
- package/dist/index.native-BqYr--vb.esm.js.map +1 -0
- package/dist/{index.native-DJA9_K3i.js → index.native-CyA-RdvW.js} +204 -178
- package/dist/index.native-CyA-RdvW.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-BegJFoWW.js → phantom-wallet-provider-DWCaMkyz.js} +148 -192
- package/dist/phantom-wallet-provider-DWCaMkyz.js.map +1 -0
- package/dist/{phantom-wallet-provider-DzUAMhbm.esm.js → phantom-wallet-provider-K2V96G-G.esm.js} +148 -192
- package/dist/phantom-wallet-provider-K2V96G-G.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-Du-QHaaG.js → privy-wallet-provider-BMg_S_d0.js} +4 -4
- package/dist/privy-wallet-provider-BMg_S_d0.js.map +1 -0
- package/dist/{privy-wallet-provider-BspbiyOr.esm.js → privy-wallet-provider-DoX8q99w.esm.js} +4 -4
- package/dist/privy-wallet-provider-DoX8q99w.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-Bh7SBFpQ.esm.js → solana-mobile-wallet-provider-Cmphb3oB.esm.js} +3 -52
- package/dist/solana-mobile-wallet-provider-Cmphb3oB.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-DPp4SYem.js → solana-mobile-wallet-provider-t22Ie8lY.js} +3 -52
- package/dist/solana-mobile-wallet-provider-t22Ie8lY.js.map +1 -0
- package/package.json +3 -3
- package/dist/index-BjlCinic.js.map +0 -1
- package/dist/index-Bx_lLXRT.esm.js.map +0 -1
- package/dist/index-CHqM9n4K.esm.js.map +0 -1
- package/dist/index-CL4JIAAR.js.map +0 -1
- package/dist/index-DCo85UGg.esm.js.map +0 -1
- package/dist/index-DHm4usay.js.map +0 -1
- package/dist/index.browser-7dDfRU5G.esm.js.map +0 -1
- package/dist/index.browser-Bg_-PAgT.esm.js +0 -1250
- package/dist/index.browser-Bg_-PAgT.esm.js.map +0 -1
- package/dist/index.browser-C-_FEr5M.esm.js +0 -1134
- package/dist/index.browser-C-_FEr5M.esm.js.map +0 -1
- package/dist/index.browser-CmlqbyPr.js.map +0 -1
- package/dist/index.browser-CxXQ2RhF.js +0 -122
- package/dist/index.browser-CxXQ2RhF.js.map +0 -1
- package/dist/index.browser-DjEZSiqI.js +0 -1137
- package/dist/index.browser-DjEZSiqI.js.map +0 -1
- package/dist/index.browser-DuVkpEzB.js +0 -1253
- package/dist/index.browser-DuVkpEzB.js.map +0 -1
- package/dist/index.browser-xJkO73vw.esm.js +0 -119
- package/dist/index.browser-xJkO73vw.esm.js.map +0 -1
- package/dist/index.native-DJA9_K3i.js.map +0 -1
- package/dist/index.native-TLhfXfe6.esm.js.map +0 -1
- package/dist/phantom-wallet-provider-BegJFoWW.js.map +0 -1
- package/dist/phantom-wallet-provider-DzUAMhbm.esm.js.map +0 -1
- package/dist/privy-wallet-provider-BspbiyOr.esm.js.map +0 -1
- package/dist/privy-wallet-provider-Du-QHaaG.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-Bh7SBFpQ.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-DPp4SYem.js.map +0 -1
|
@@ -1,51 +1,11 @@
|
|
|
1
1
|
import { b as bufferExports } from './index-CrOVJFX9.esm.js';
|
|
2
|
-
import { g as getPlatform,
|
|
2
|
+
import { g as getPlatform, l as setAuthLoading, W as WebSessionManager, s as setCurrentUser, m as genAuthNonce, n as genSolanaMessage, o as createSessionWithSignature, e as confirmAndCheckTransaction, c as convertRemainingAccounts, b as buildSetDocumentsTransaction, a as SOLANA_DEVNET_RPC_URL, S as SOLANA_MAINNET_RPC_URL, h as SURFNET_RPC_URL } from './index.native-BqYr--vb.esm.js';
|
|
3
3
|
import { PublicKey, Connection, VersionedTransaction } from '@solana/web3.js';
|
|
4
4
|
import * as anchor from '@coral-xyz/anchor';
|
|
5
5
|
import 'axios';
|
|
6
6
|
import 'react';
|
|
7
7
|
|
|
8
8
|
const ED25519_SIGNATURE_LENGTH = 64;
|
|
9
|
-
/**
|
|
10
|
-
* On Android Chrome PWA (e.g. Solana Seeker in standalone mode), MWA's
|
|
11
|
-
* transact() opens a WebSocket to ws://localhost:<port>/solana-wallet to
|
|
12
|
-
* handshake with the wallet app on the device. Chrome guards localhost
|
|
13
|
-
* connections behind the Local Network Access ("Apps on Device") permission
|
|
14
|
-
* dialog. The dialog inherits the activity's window-focus state at spawn
|
|
15
|
-
* time — so if focus is in transit (e.g. just after a Phantom-modal close
|
|
16
|
-
* triggers a React commit), the dialog renders with grayed-out Allow/Block
|
|
17
|
-
* buttons and only becomes interactive after a manual background→resume
|
|
18
|
-
* (which forces an onPause→onResume cycle on the activity).
|
|
19
|
-
*
|
|
20
|
-
* Wait for window focus to settle, then yield one frame, before opening
|
|
21
|
-
* the WebSocket. This makes the system dialog spawn into a focused activity
|
|
22
|
-
* so its buttons are immediately tappable.
|
|
23
|
-
*/
|
|
24
|
-
async function awaitActivityFocus() {
|
|
25
|
-
if (typeof document === 'undefined' || typeof window === 'undefined')
|
|
26
|
-
return;
|
|
27
|
-
if (!document.hasFocus()) {
|
|
28
|
-
await new Promise((resolve) => {
|
|
29
|
-
const onFocus = () => {
|
|
30
|
-
window.removeEventListener('focus', onFocus);
|
|
31
|
-
resolve();
|
|
32
|
-
};
|
|
33
|
-
window.addEventListener('focus', onFocus);
|
|
34
|
-
// Fallback in case the focus event never fires (e.g. activity
|
|
35
|
-
// already focused but document.hasFocus() momentarily lies during
|
|
36
|
-
// a React commit). 600ms is a perceptual ceiling — beyond this
|
|
37
|
-
// the user notices a stall, so we'd rather take the focus race
|
|
38
|
-
// than block forever.
|
|
39
|
-
setTimeout(() => {
|
|
40
|
-
window.removeEventListener('focus', onFocus);
|
|
41
|
-
resolve();
|
|
42
|
-
}, 600);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
// Yield to next paint so any pending React commits / focus changes have
|
|
46
|
-
// flushed before the WebSocket open spawns the system dialog.
|
|
47
|
-
await new Promise((r) => requestAnimationFrame(() => r()));
|
|
48
|
-
}
|
|
49
9
|
// Dynamically imported MWA protocol module
|
|
50
10
|
let mwaProtocolModule = null;
|
|
51
11
|
let mwaProtocolLoadPromise = null;
|
|
@@ -58,7 +18,7 @@ async function loadMwaProtocol() {
|
|
|
58
18
|
return mwaProtocolLoadPromise;
|
|
59
19
|
mwaProtocolLoadPromise = (async () => {
|
|
60
20
|
try {
|
|
61
|
-
mwaProtocolModule = await import('./index.browser-
|
|
21
|
+
mwaProtocolModule = await import('./index.browser-Cy21yaX0.esm.js');
|
|
62
22
|
}
|
|
63
23
|
catch (e) {
|
|
64
24
|
console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
|
|
@@ -176,7 +136,6 @@ class SolanaMobileWalletProvider {
|
|
|
176
136
|
}
|
|
177
137
|
// Pre-fetch nonce from server while wallet is not yet connected
|
|
178
138
|
const nonce = await genAuthNonce();
|
|
179
|
-
await awaitActivityFocus();
|
|
180
139
|
// Single transact() call: authorize + signMessages — one wallet popup
|
|
181
140
|
const result = await transact(async (wallet) => {
|
|
182
141
|
// Step 1: Authorize — user approves the dApp
|
|
@@ -265,7 +224,6 @@ class SolanaMobileWalletProvider {
|
|
|
265
224
|
await loadMwaProtocol();
|
|
266
225
|
const { transact } = mwaProtocolModule;
|
|
267
226
|
const authToken = this.authToken;
|
|
268
|
-
await awaitActivityFocus();
|
|
269
227
|
await transact(async (wallet) => {
|
|
270
228
|
await wallet.deauthorize({ auth_token: authToken });
|
|
271
229
|
}, this.getAssociationConfig());
|
|
@@ -291,7 +249,6 @@ class SolanaMobileWalletProvider {
|
|
|
291
249
|
const { transact } = mwaProtocolModule;
|
|
292
250
|
const base64Addr = this.base64Address;
|
|
293
251
|
try {
|
|
294
|
-
await awaitActivityFocus();
|
|
295
252
|
const signedMessages = await transact(async (wallet) => {
|
|
296
253
|
await this.reauthorizeWallet(wallet);
|
|
297
254
|
const messageBytes = getPlatform().textEncode(message);
|
|
@@ -345,7 +302,6 @@ class SolanaMobileWalletProvider {
|
|
|
345
302
|
}
|
|
346
303
|
}
|
|
347
304
|
try {
|
|
348
|
-
await awaitActivityFocus();
|
|
349
305
|
const signedTransactions = await transact(async (wallet) => {
|
|
350
306
|
await this.reauthorizeWallet(wallet);
|
|
351
307
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -393,7 +349,6 @@ class SolanaMobileWalletProvider {
|
|
|
393
349
|
}
|
|
394
350
|
if (isSurfnet) {
|
|
395
351
|
// Surfnet: sign-only, then submit to our specific RPC
|
|
396
|
-
await awaitActivityFocus();
|
|
397
352
|
const signedTransactions = await transact(async (wallet) => {
|
|
398
353
|
await this.reauthorizeWallet(wallet);
|
|
399
354
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -413,7 +368,6 @@ class SolanaMobileWalletProvider {
|
|
|
413
368
|
return signature;
|
|
414
369
|
}
|
|
415
370
|
// Non-surfnet: use signAndSendTransactions for wallet-optimized submission
|
|
416
|
-
await awaitActivityFocus();
|
|
417
371
|
const signatures = await transact(async (wallet) => {
|
|
418
372
|
await this.reauthorizeWallet(wallet);
|
|
419
373
|
return wallet.signAndSendTransactions({
|
|
@@ -497,7 +451,6 @@ class SolanaMobileWalletProvider {
|
|
|
497
451
|
tx = result.tx;
|
|
498
452
|
}
|
|
499
453
|
if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {
|
|
500
|
-
await awaitActivityFocus();
|
|
501
454
|
const [signedTx] = await transact(async (wallet) => {
|
|
502
455
|
await this.reauthorizeWallet(wallet);
|
|
503
456
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -511,7 +464,6 @@ class SolanaMobileWalletProvider {
|
|
|
511
464
|
}
|
|
512
465
|
if (isSurfnet) {
|
|
513
466
|
// Surfnet: sign then submit manually to our RPC
|
|
514
|
-
await awaitActivityFocus();
|
|
515
467
|
const [signedTx] = await transact(async (wallet) => {
|
|
516
468
|
await this.reauthorizeWallet(wallet);
|
|
517
469
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -540,7 +492,6 @@ class SolanaMobileWalletProvider {
|
|
|
540
492
|
};
|
|
541
493
|
}
|
|
542
494
|
// Non-surfnet: use signAndSendTransactions
|
|
543
|
-
await awaitActivityFocus();
|
|
544
495
|
const signatures = await transact(async (wallet) => {
|
|
545
496
|
await this.reauthorizeWallet(wallet);
|
|
546
497
|
return wallet.signAndSendTransactions({
|
|
@@ -604,4 +555,4 @@ class SolanaMobileWalletProvider {
|
|
|
604
555
|
SolanaMobileWalletProvider.instance = null;
|
|
605
556
|
|
|
606
557
|
export { SolanaMobileWalletProvider };
|
|
607
|
-
//# sourceMappingURL=solana-mobile-wallet-provider-
|
|
558
|
+
//# sourceMappingURL=solana-mobile-wallet-provider-Cmphb3oB.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solana-mobile-wallet-provider-Cmphb3oB.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, VersionedTransaction } from '@solana/web3.js';\nimport * as anchor from '@coral-xyz/anchor';\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;\n// Dynamically imported MWA protocol module\nlet mwaProtocolModule = null;\nlet mwaProtocolLoadPromise = null;\nasync function loadMwaProtocol() {\n if (mwaProtocolModule)\n return;\n if (typeof window === 'undefined')\n return;\n if (mwaProtocolLoadPromise)\n return mwaProtocolLoadPromise;\n mwaProtocolLoadPromise = (async () => {\n try {\n mwaProtocolModule = await import('@solana-mobile/mobile-wallet-adapter-protocol-web3js');\n }\n catch (e) {\n console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');\n throw new Error('Missing @solana-mobile/mobile-wallet-adapter-protocol-web3js dependency');\n }\n })();\n return mwaProtocolLoadPromise;\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;\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 if (walletStandardMobile.createDefaultWalletNotFoundHandler) {\n options.onWalletNotFound = walletStandardMobile.createDefaultWalletNotFoundHandler();\n }\n registerMwa(options);\n }\n catch (e) {\n // @solana-mobile/wallet-standard-mobile is an optional dependency\n // Silently skip if not installed — the provider still works via\n // @solana-mobile/mobile-wallet-adapter-protocol-web3js directly\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 the\n * Solana Mobile Wallet Adapter (MWA) protocol's low-level `transact` API.\n *\n * This enables TaroBase dApps to work with any MWA-compliant wallet on Solana\n * mobile devices (Seeker, Saga) — including the native Seed Vault Wallet,\n * Phantom, Solflare, and any other wallet that implements the MWA protocol.\n *\n * By using `transact()` directly (instead of the wallet-adapter wrapper),\n * login combines authorize + signMessage into a single wallet session —\n * meaning one popup/approval instead of two.\n */\nexport class SolanaMobileWalletProvider {\n constructor(networkUrl = null, config = {}) {\n // MWA authorization state\n this.authToken = null;\n this.walletUriBase = null;\n this.base64Address = null;\n this.authorizedPublicKey = null;\n this.publicKeyObj = 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.chain = `solana:${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 /** Config for transact() — routes to the same wallet if we've already authorized */\n getAssociationConfig() {\n if (this.walletUriBase) {\n return { baseUri: this.walletUriBase };\n }\n return undefined;\n }\n /** Reauthorize within a transact callback using a stored auth_token */\n async reauthorizeWallet(wallet) {\n if (!this.authToken) {\n // No existing auth — do a fresh authorize\n const authResult = await wallet.authorize({\n identity: this.appIdentity,\n chain: this.chain,\n });\n this.storeAuthResult(authResult);\n return authResult;\n }\n try {\n const authResult = await wallet.reauthorize({\n auth_token: this.authToken,\n identity: this.appIdentity,\n });\n this.storeAuthResult(authResult);\n return authResult;\n }\n catch (e) {\n // Reauth failed (token expired, wallet reset, etc.) — try fresh authorize\n console.warn('[SolanaMobileWallet] Reauthorization failed, attempting fresh authorize:', e === null || e === void 0 ? void 0 : e.message);\n const authResult = await wallet.authorize({\n identity: this.appIdentity,\n chain: this.chain,\n });\n this.storeAuthResult(authResult);\n return authResult;\n }\n }\n /** Persist auth result from an authorize/reauthorize call */\n storeAuthResult(authResult) {\n var _a;\n this.authToken = authResult.auth_token;\n this.walletUriBase = authResult.wallet_uri_base;\n if (((_a = authResult.accounts) === null || _a === void 0 ? void 0 : _a.length) > 0) {\n const account = authResult.accounts[0];\n this.base64Address = account.address;\n // Decode base64 address → PublicKey → base58\n const addressBytes = Uint8Array.from(getPlatform().atob(account.address), c => c.charCodeAt(0));\n this.publicKeyObj = new PublicKey(addressBytes);\n this.authorizedPublicKey = this.publicKeyObj.toBase58();\n }\n }\n async login() {\n var _a, _b, _c, _d, _e;\n setAuthLoading(true);\n try {\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n // Quick check: if we already have auth state and a valid session, skip\n if (this.authorizedPublicKey) {\n const existingSession = await SessionManager.getSession();\n if (existingSession && existingSession.address === this.authorizedPublicKey) {\n const user = { provider: this, address: this.authorizedPublicKey };\n setCurrentUser(user);\n return user;\n }\n }\n // Pre-fetch nonce from server while wallet is not yet connected\n const nonce = await genAuthNonce();\n // Single transact() call: authorize + signMessages — one wallet popup\n const result = await transact(async (wallet) => {\n // Step 1: Authorize — user approves the dApp\n const authResult = await wallet.authorize({\n identity: this.appIdentity,\n chain: this.chain,\n });\n const base64Addr = authResult.accounts[0].address;\n const addressBytes = Uint8Array.from(getPlatform().atob(base64Addr), c => c.charCodeAt(0));\n const pubkey = new PublicKey(addressBytes);\n const base58Addr = pubkey.toBase58();\n // Step 2: Sign the auth message — still in the same wallet session\n const messageText = await genSolanaMessage(base58Addr, nonce);\n const messageBytes = getPlatform().textEncode(messageText);\n const signedMessages = await wallet.signMessages({\n addresses: [base64Addr],\n payloads: [messageBytes],\n });\n // The signed payload is [original message bytes][64-byte ed25519 signature]\n const signedPayload = signedMessages[0];\n const signatureBytes = signedPayload.slice(-ED25519_SIGNATURE_LENGTH);\n return {\n base58Address: base58Addr,\n base64Address: base64Addr,\n publicKey: pubkey,\n signature: Buffer.from(signatureBytes).toString('base64'),\n messageText,\n authToken: authResult.auth_token,\n walletUriBase: authResult.wallet_uri_base,\n };\n }, this.getAssociationConfig());\n // Store MWA auth state for reauthorization in subsequent transact() calls\n this.authToken = result.authToken;\n this.walletUriBase = result.walletUriBase;\n this.base64Address = result.base64Address;\n this.authorizedPublicKey = result.base58Address;\n this.publicKeyObj = result.publicKey;\n // Check if we already have a valid session for this address\n const existingSession = await SessionManager.getSession();\n if (existingSession && existingSession.address === result.base58Address) {\n const user = { provider: this, address: result.base58Address };\n setCurrentUser(user);\n return user;\n }\n // Create new session on the server\n const createSessionResult = await createSessionWithSignature(result.base58Address, result.messageText, result.signature);\n await SessionManager.storeSession(result.base58Address, createSessionResult.accessToken, createSessionResult.idToken, createSessionResult.refreshToken);\n // Mark auth method\n try {\n getPlatform().storage.setItem('tarobase_last_auth_method', 'mobile-wallet-adapter');\n }\n catch (_f) { }\n const user = { provider: this, address: result.base58Address };\n setCurrentUser(user);\n return user;\n }\n catch (error) {\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 this.authorizedPublicKey = session.address;\n this.publicKeyObj = new PublicKey(session.address);\n return { provider: this, address: session.address };\n }\n return null;\n }\n async logout() {\n // Deauthorize with the wallet if we have an auth_token\n if (this.authToken) {\n try {\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n const authToken = this.authToken;\n await transact(async (wallet) => {\n await wallet.deauthorize({ auth_token: authToken });\n }, this.getAssociationConfig());\n }\n catch (error) {\n console.error('[SolanaMobileWallet] Deauthorize error:', error);\n }\n }\n this.authToken = null;\n this.walletUriBase = null;\n this.base64Address = null;\n this.authorizedPublicKey = null;\n this.publicKeyObj = null;\n SessionManager.clearSession();\n setCurrentUser(null);\n }\n async signMessage(message) {\n var _a, _b;\n if (!this.authorizedPublicKey || !this.base64Address) {\n throw new Error('Not connected. Call login() first.');\n }\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n const base64Addr = this.base64Address;\n try {\n const signedMessages = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n const messageBytes = getPlatform().textEncode(message);\n return wallet.signMessages({\n addresses: [base64Addr],\n payloads: [messageBytes],\n });\n }, this.getAssociationConfig());\n const signedPayload = signedMessages[0];\n const signatureBytes = signedPayload.slice(-ED25519_SIGNATURE_LENGTH);\n return Buffer.from(signatureBytes).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 if (!this.publicKeyObj) {\n throw new Error('Not connected. Call login() first.');\n }\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n // Ensure blockhash and fee payer are set before signing\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 rpcUrl = this.getRpcUrl();\n const connection = new Connection(rpcUrl, 'confirmed');\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');\n legacyTx.recentBlockhash = blockhash;\n legacyTx.lastValidBlockHeight = lastValidBlockHeight;\n }\n if (!legacyTx.feePayer && this.publicKeyObj) {\n legacyTx.feePayer = this.publicKeyObj;\n }\n }\n else {\n const versionedTx = transaction;\n if (!versionedTx.message.recentBlockhash) {\n const rpcUrl = this.getRpcUrl();\n const connection = new Connection(rpcUrl, 'confirmed');\n const { blockhash } = await connection.getLatestBlockhash('confirmed');\n versionedTx.message.recentBlockhash = blockhash;\n }\n }\n try {\n const signedTransactions = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signTransactions({ transactions: [transaction] });\n }, this.getAssociationConfig());\n return signedTransactions[0];\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 if (!this.publicKeyObj) {\n throw new Error('Not connected. Call login() first.');\n }\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n const rpcUrl = this.getRpcUrl();\n const connection = new Connection(rpcUrl, 'confirmed');\n const isSurfnet = rpcUrl === SURFNET_RPC_URL;\n try {\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 if (feePayer) {\n legacyTx.feePayer = feePayer;\n }\n else if (this.publicKeyObj) {\n legacyTx.feePayer = this.publicKeyObj;\n }\n }\n }\n else {\n const versionedTx = transaction;\n versionedTx.message.recentBlockhash = blockhash;\n }\n if (isSurfnet) {\n // Surfnet: sign-only, then submit to our specific RPC\n const signedTransactions = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signTransactions({ transactions: [transaction] });\n }, this.getAssociationConfig());\n const signedTx = signedTransactions[0];\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: use signAndSendTransactions for wallet-optimized submission\n const signatures = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signAndSendTransactions({\n transactions: [transaction],\n commitment: 'confirmed',\n });\n }, this.getAssociationConfig());\n const signature = signatures[0];\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 if (!this.publicKeyObj || !this.authorizedPublicKey) {\n await this.login();\n }\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\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 publicKey = this.publicKeyObj;\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 // Create a mock wallet adapter for Anchor (only publicKey is needed for building TX)\n const mockWalletAdapter = {\n publicKey,\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 tx = VersionedTransaction.deserialize(Buffer.from(solTransactionData.signedTransaction, 'base64'));\n }\n else {\n const result = await buildSetDocumentsTransaction(connection, solTransactionData.txArgs[0].idl, anchorProvider, publicKey, {\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 if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {\n const [signedTx] = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signTransactions({ transactions: [tx] });\n }, this.getAssociationConfig());\n return {\n signedTransaction: signedTx,\n blockNumber: 0,\n gasUsed: '0',\n data: ''\n };\n }\n if (isSurfnet) {\n // Surfnet: sign then submit manually to our RPC\n const [signedTx] = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signTransactions({ transactions: [tx] });\n }, this.getAssociationConfig());\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: use signAndSendTransactions\n const signatures = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signAndSendTransactions({\n transactions: [tx],\n commitment: 'confirmed',\n });\n }, this.getAssociationConfig());\n const signature = signatures[0];\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 return {\n authToken: this.authToken,\n walletUriBase: this.walletUriBase,\n publicKey: this.publicKeyObj,\n base64Address: this.base64Address,\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"],"mappings":";;;;;;;AAoBA,MAAM,wBAAwB,GAAG,EAAE;AACnC;AACA,IAAI,iBAAiB,GAAG,IAAI;AAC5B,IAAI,sBAAsB,GAAG,IAAI;AACjC,eAAe,eAAe,GAAG;AACjC,IAAI,IAAI,iBAAiB;AACzB,QAAQ;AACR,IAAI,IAAI,OAAO,MAAM,KAAK,WAAW;AACrC,QAAQ;AACR,IAAI,IAAI,sBAAsB;AAC9B,QAAQ,OAAO,sBAAsB;AACrC,IAAI,sBAAsB,GAAG,CAAC,YAAY;AAC1C,QAAQ,IAAI;AACZ,YAAY,iBAAiB,GAAG,MAAM,OAAO,iCAAsD,CAAC;AACpG,QAAQ;AACR,QAAQ,OAAO,CAAC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EAAE,IAAI,CAAC,aAAa;AAC7C,SAAS;AACT,IAAI;AACJ;AACA;AACA;AACA,IAAI,SAAS,CAAC,OAAO,EAAE;AACvB,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;AAC7B,YAAY,OAAO,IAAI,CAAC,UAAU;AAClC,QAAQ;AACR,QAAQ,IAAI,OAAO,KAAK,eAAe,EAAE;AACzC,YAAY,OAAO,qBAAqB;AACxC,QAAQ;AACR,aAAa,IAAI,OAAO,KAAK,gBAAgB,EAAE;AAC/C,YAAY,OAAO,sBAAsB;AACzC,QAAQ;AACR,aAAa,IAAI,OAAO,KAAK,SAAS,EAAE;AACxC,YAAY,OAAO,eAAe;AAClC,QAAQ;AACR,QAAQ,OAAO,sBAAsB;AACrC,IAAI;AACJ;AACA,0BAA0B,CAAC,QAAQ,GAAG,IAAI;;;;"}
|
package/dist/{solana-mobile-wallet-provider-DPp4SYem.js → solana-mobile-wallet-provider-t22Ie8lY.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-Bdcc5821.js');
|
|
4
|
-
var index_native = require('./index.native-
|
|
4
|
+
var index_native = require('./index.native-CyA-RdvW.js');
|
|
5
5
|
var web3_js = require('@solana/web3.js');
|
|
6
6
|
var anchor = require('@coral-xyz/anchor');
|
|
7
7
|
require('axios');
|
|
@@ -27,46 +27,6 @@ function _interopNamespaceDefault(e) {
|
|
|
27
27
|
var anchor__namespace = /*#__PURE__*/_interopNamespaceDefault(anchor);
|
|
28
28
|
|
|
29
29
|
const ED25519_SIGNATURE_LENGTH = 64;
|
|
30
|
-
/**
|
|
31
|
-
* On Android Chrome PWA (e.g. Solana Seeker in standalone mode), MWA's
|
|
32
|
-
* transact() opens a WebSocket to ws://localhost:<port>/solana-wallet to
|
|
33
|
-
* handshake with the wallet app on the device. Chrome guards localhost
|
|
34
|
-
* connections behind the Local Network Access ("Apps on Device") permission
|
|
35
|
-
* dialog. The dialog inherits the activity's window-focus state at spawn
|
|
36
|
-
* time — so if focus is in transit (e.g. just after a Phantom-modal close
|
|
37
|
-
* triggers a React commit), the dialog renders with grayed-out Allow/Block
|
|
38
|
-
* buttons and only becomes interactive after a manual background→resume
|
|
39
|
-
* (which forces an onPause→onResume cycle on the activity).
|
|
40
|
-
*
|
|
41
|
-
* Wait for window focus to settle, then yield one frame, before opening
|
|
42
|
-
* the WebSocket. This makes the system dialog spawn into a focused activity
|
|
43
|
-
* so its buttons are immediately tappable.
|
|
44
|
-
*/
|
|
45
|
-
async function awaitActivityFocus() {
|
|
46
|
-
if (typeof document === 'undefined' || typeof window === 'undefined')
|
|
47
|
-
return;
|
|
48
|
-
if (!document.hasFocus()) {
|
|
49
|
-
await new Promise((resolve) => {
|
|
50
|
-
const onFocus = () => {
|
|
51
|
-
window.removeEventListener('focus', onFocus);
|
|
52
|
-
resolve();
|
|
53
|
-
};
|
|
54
|
-
window.addEventListener('focus', onFocus);
|
|
55
|
-
// Fallback in case the focus event never fires (e.g. activity
|
|
56
|
-
// already focused but document.hasFocus() momentarily lies during
|
|
57
|
-
// a React commit). 600ms is a perceptual ceiling — beyond this
|
|
58
|
-
// the user notices a stall, so we'd rather take the focus race
|
|
59
|
-
// than block forever.
|
|
60
|
-
setTimeout(() => {
|
|
61
|
-
window.removeEventListener('focus', onFocus);
|
|
62
|
-
resolve();
|
|
63
|
-
}, 600);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
// Yield to next paint so any pending React commits / focus changes have
|
|
67
|
-
// flushed before the WebSocket open spawns the system dialog.
|
|
68
|
-
await new Promise((r) => requestAnimationFrame(() => r()));
|
|
69
|
-
}
|
|
70
30
|
// Dynamically imported MWA protocol module
|
|
71
31
|
let mwaProtocolModule = null;
|
|
72
32
|
let mwaProtocolLoadPromise = null;
|
|
@@ -79,7 +39,7 @@ async function loadMwaProtocol() {
|
|
|
79
39
|
return mwaProtocolLoadPromise;
|
|
80
40
|
mwaProtocolLoadPromise = (async () => {
|
|
81
41
|
try {
|
|
82
|
-
mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-
|
|
42
|
+
mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-ZD7Tz2bn.js'); });
|
|
83
43
|
}
|
|
84
44
|
catch (e) {
|
|
85
45
|
console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
|
|
@@ -197,7 +157,6 @@ class SolanaMobileWalletProvider {
|
|
|
197
157
|
}
|
|
198
158
|
// Pre-fetch nonce from server while wallet is not yet connected
|
|
199
159
|
const nonce = await index_native.genAuthNonce();
|
|
200
|
-
await awaitActivityFocus();
|
|
201
160
|
// Single transact() call: authorize + signMessages — one wallet popup
|
|
202
161
|
const result = await transact(async (wallet) => {
|
|
203
162
|
// Step 1: Authorize — user approves the dApp
|
|
@@ -286,7 +245,6 @@ class SolanaMobileWalletProvider {
|
|
|
286
245
|
await loadMwaProtocol();
|
|
287
246
|
const { transact } = mwaProtocolModule;
|
|
288
247
|
const authToken = this.authToken;
|
|
289
|
-
await awaitActivityFocus();
|
|
290
248
|
await transact(async (wallet) => {
|
|
291
249
|
await wallet.deauthorize({ auth_token: authToken });
|
|
292
250
|
}, this.getAssociationConfig());
|
|
@@ -312,7 +270,6 @@ class SolanaMobileWalletProvider {
|
|
|
312
270
|
const { transact } = mwaProtocolModule;
|
|
313
271
|
const base64Addr = this.base64Address;
|
|
314
272
|
try {
|
|
315
|
-
await awaitActivityFocus();
|
|
316
273
|
const signedMessages = await transact(async (wallet) => {
|
|
317
274
|
await this.reauthorizeWallet(wallet);
|
|
318
275
|
const messageBytes = index_native.getPlatform().textEncode(message);
|
|
@@ -366,7 +323,6 @@ class SolanaMobileWalletProvider {
|
|
|
366
323
|
}
|
|
367
324
|
}
|
|
368
325
|
try {
|
|
369
|
-
await awaitActivityFocus();
|
|
370
326
|
const signedTransactions = await transact(async (wallet) => {
|
|
371
327
|
await this.reauthorizeWallet(wallet);
|
|
372
328
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -414,7 +370,6 @@ class SolanaMobileWalletProvider {
|
|
|
414
370
|
}
|
|
415
371
|
if (isSurfnet) {
|
|
416
372
|
// Surfnet: sign-only, then submit to our specific RPC
|
|
417
|
-
await awaitActivityFocus();
|
|
418
373
|
const signedTransactions = await transact(async (wallet) => {
|
|
419
374
|
await this.reauthorizeWallet(wallet);
|
|
420
375
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -434,7 +389,6 @@ class SolanaMobileWalletProvider {
|
|
|
434
389
|
return signature;
|
|
435
390
|
}
|
|
436
391
|
// Non-surfnet: use signAndSendTransactions for wallet-optimized submission
|
|
437
|
-
await awaitActivityFocus();
|
|
438
392
|
const signatures = await transact(async (wallet) => {
|
|
439
393
|
await this.reauthorizeWallet(wallet);
|
|
440
394
|
return wallet.signAndSendTransactions({
|
|
@@ -518,7 +472,6 @@ class SolanaMobileWalletProvider {
|
|
|
518
472
|
tx = result.tx;
|
|
519
473
|
}
|
|
520
474
|
if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {
|
|
521
|
-
await awaitActivityFocus();
|
|
522
475
|
const [signedTx] = await transact(async (wallet) => {
|
|
523
476
|
await this.reauthorizeWallet(wallet);
|
|
524
477
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -532,7 +485,6 @@ class SolanaMobileWalletProvider {
|
|
|
532
485
|
}
|
|
533
486
|
if (isSurfnet) {
|
|
534
487
|
// Surfnet: sign then submit manually to our RPC
|
|
535
|
-
await awaitActivityFocus();
|
|
536
488
|
const [signedTx] = await transact(async (wallet) => {
|
|
537
489
|
await this.reauthorizeWallet(wallet);
|
|
538
490
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -561,7 +513,6 @@ class SolanaMobileWalletProvider {
|
|
|
561
513
|
};
|
|
562
514
|
}
|
|
563
515
|
// Non-surfnet: use signAndSendTransactions
|
|
564
|
-
await awaitActivityFocus();
|
|
565
516
|
const signatures = await transact(async (wallet) => {
|
|
566
517
|
await this.reauthorizeWallet(wallet);
|
|
567
518
|
return wallet.signAndSendTransactions({
|
|
@@ -625,4 +576,4 @@ class SolanaMobileWalletProvider {
|
|
|
625
576
|
SolanaMobileWalletProvider.instance = null;
|
|
626
577
|
|
|
627
578
|
exports.SolanaMobileWalletProvider = SolanaMobileWalletProvider;
|
|
628
|
-
//# sourceMappingURL=solana-mobile-wallet-provider-
|
|
579
|
+
//# sourceMappingURL=solana-mobile-wallet-provider-t22Ie8lY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solana-mobile-wallet-provider-t22Ie8lY.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, VersionedTransaction } from '@solana/web3.js';\nimport * as anchor from '@coral-xyz/anchor';\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;\n// Dynamically imported MWA protocol module\nlet mwaProtocolModule = null;\nlet mwaProtocolLoadPromise = null;\nasync function loadMwaProtocol() {\n if (mwaProtocolModule)\n return;\n if (typeof window === 'undefined')\n return;\n if (mwaProtocolLoadPromise)\n return mwaProtocolLoadPromise;\n mwaProtocolLoadPromise = (async () => {\n try {\n mwaProtocolModule = await import('@solana-mobile/mobile-wallet-adapter-protocol-web3js');\n }\n catch (e) {\n console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');\n throw new Error('Missing @solana-mobile/mobile-wallet-adapter-protocol-web3js dependency');\n }\n })();\n return mwaProtocolLoadPromise;\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;\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 if (walletStandardMobile.createDefaultWalletNotFoundHandler) {\n options.onWalletNotFound = walletStandardMobile.createDefaultWalletNotFoundHandler();\n }\n registerMwa(options);\n }\n catch (e) {\n // @solana-mobile/wallet-standard-mobile is an optional dependency\n // Silently skip if not installed — the provider still works via\n // @solana-mobile/mobile-wallet-adapter-protocol-web3js directly\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 the\n * Solana Mobile Wallet Adapter (MWA) protocol's low-level `transact` API.\n *\n * This enables TaroBase dApps to work with any MWA-compliant wallet on Solana\n * mobile devices (Seeker, Saga) — including the native Seed Vault Wallet,\n * Phantom, Solflare, and any other wallet that implements the MWA protocol.\n *\n * By using `transact()` directly (instead of the wallet-adapter wrapper),\n * login combines authorize + signMessage into a single wallet session —\n * meaning one popup/approval instead of two.\n */\nexport class SolanaMobileWalletProvider {\n constructor(networkUrl = null, config = {}) {\n // MWA authorization state\n this.authToken = null;\n this.walletUriBase = null;\n this.base64Address = null;\n this.authorizedPublicKey = null;\n this.publicKeyObj = 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.chain = `solana:${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 /** Config for transact() — routes to the same wallet if we've already authorized */\n getAssociationConfig() {\n if (this.walletUriBase) {\n return { baseUri: this.walletUriBase };\n }\n return undefined;\n }\n /** Reauthorize within a transact callback using a stored auth_token */\n async reauthorizeWallet(wallet) {\n if (!this.authToken) {\n // No existing auth — do a fresh authorize\n const authResult = await wallet.authorize({\n identity: this.appIdentity,\n chain: this.chain,\n });\n this.storeAuthResult(authResult);\n return authResult;\n }\n try {\n const authResult = await wallet.reauthorize({\n auth_token: this.authToken,\n identity: this.appIdentity,\n });\n this.storeAuthResult(authResult);\n return authResult;\n }\n catch (e) {\n // Reauth failed (token expired, wallet reset, etc.) — try fresh authorize\n console.warn('[SolanaMobileWallet] Reauthorization failed, attempting fresh authorize:', e === null || e === void 0 ? void 0 : e.message);\n const authResult = await wallet.authorize({\n identity: this.appIdentity,\n chain: this.chain,\n });\n this.storeAuthResult(authResult);\n return authResult;\n }\n }\n /** Persist auth result from an authorize/reauthorize call */\n storeAuthResult(authResult) {\n var _a;\n this.authToken = authResult.auth_token;\n this.walletUriBase = authResult.wallet_uri_base;\n if (((_a = authResult.accounts) === null || _a === void 0 ? void 0 : _a.length) > 0) {\n const account = authResult.accounts[0];\n this.base64Address = account.address;\n // Decode base64 address → PublicKey → base58\n const addressBytes = Uint8Array.from(getPlatform().atob(account.address), c => c.charCodeAt(0));\n this.publicKeyObj = new PublicKey(addressBytes);\n this.authorizedPublicKey = this.publicKeyObj.toBase58();\n }\n }\n async login() {\n var _a, _b, _c, _d, _e;\n setAuthLoading(true);\n try {\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n // Quick check: if we already have auth state and a valid session, skip\n if (this.authorizedPublicKey) {\n const existingSession = await SessionManager.getSession();\n if (existingSession && existingSession.address === this.authorizedPublicKey) {\n const user = { provider: this, address: this.authorizedPublicKey };\n setCurrentUser(user);\n return user;\n }\n }\n // Pre-fetch nonce from server while wallet is not yet connected\n const nonce = await genAuthNonce();\n // Single transact() call: authorize + signMessages — one wallet popup\n const result = await transact(async (wallet) => {\n // Step 1: Authorize — user approves the dApp\n const authResult = await wallet.authorize({\n identity: this.appIdentity,\n chain: this.chain,\n });\n const base64Addr = authResult.accounts[0].address;\n const addressBytes = Uint8Array.from(getPlatform().atob(base64Addr), c => c.charCodeAt(0));\n const pubkey = new PublicKey(addressBytes);\n const base58Addr = pubkey.toBase58();\n // Step 2: Sign the auth message — still in the same wallet session\n const messageText = await genSolanaMessage(base58Addr, nonce);\n const messageBytes = getPlatform().textEncode(messageText);\n const signedMessages = await wallet.signMessages({\n addresses: [base64Addr],\n payloads: [messageBytes],\n });\n // The signed payload is [original message bytes][64-byte ed25519 signature]\n const signedPayload = signedMessages[0];\n const signatureBytes = signedPayload.slice(-ED25519_SIGNATURE_LENGTH);\n return {\n base58Address: base58Addr,\n base64Address: base64Addr,\n publicKey: pubkey,\n signature: Buffer.from(signatureBytes).toString('base64'),\n messageText,\n authToken: authResult.auth_token,\n walletUriBase: authResult.wallet_uri_base,\n };\n }, this.getAssociationConfig());\n // Store MWA auth state for reauthorization in subsequent transact() calls\n this.authToken = result.authToken;\n this.walletUriBase = result.walletUriBase;\n this.base64Address = result.base64Address;\n this.authorizedPublicKey = result.base58Address;\n this.publicKeyObj = result.publicKey;\n // Check if we already have a valid session for this address\n const existingSession = await SessionManager.getSession();\n if (existingSession && existingSession.address === result.base58Address) {\n const user = { provider: this, address: result.base58Address };\n setCurrentUser(user);\n return user;\n }\n // Create new session on the server\n const createSessionResult = await createSessionWithSignature(result.base58Address, result.messageText, result.signature);\n await SessionManager.storeSession(result.base58Address, createSessionResult.accessToken, createSessionResult.idToken, createSessionResult.refreshToken);\n // Mark auth method\n try {\n getPlatform().storage.setItem('tarobase_last_auth_method', 'mobile-wallet-adapter');\n }\n catch (_f) { }\n const user = { provider: this, address: result.base58Address };\n setCurrentUser(user);\n return user;\n }\n catch (error) {\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 this.authorizedPublicKey = session.address;\n this.publicKeyObj = new PublicKey(session.address);\n return { provider: this, address: session.address };\n }\n return null;\n }\n async logout() {\n // Deauthorize with the wallet if we have an auth_token\n if (this.authToken) {\n try {\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n const authToken = this.authToken;\n await transact(async (wallet) => {\n await wallet.deauthorize({ auth_token: authToken });\n }, this.getAssociationConfig());\n }\n catch (error) {\n console.error('[SolanaMobileWallet] Deauthorize error:', error);\n }\n }\n this.authToken = null;\n this.walletUriBase = null;\n this.base64Address = null;\n this.authorizedPublicKey = null;\n this.publicKeyObj = null;\n SessionManager.clearSession();\n setCurrentUser(null);\n }\n async signMessage(message) {\n var _a, _b;\n if (!this.authorizedPublicKey || !this.base64Address) {\n throw new Error('Not connected. Call login() first.');\n }\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n const base64Addr = this.base64Address;\n try {\n const signedMessages = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n const messageBytes = getPlatform().textEncode(message);\n return wallet.signMessages({\n addresses: [base64Addr],\n payloads: [messageBytes],\n });\n }, this.getAssociationConfig());\n const signedPayload = signedMessages[0];\n const signatureBytes = signedPayload.slice(-ED25519_SIGNATURE_LENGTH);\n return Buffer.from(signatureBytes).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 if (!this.publicKeyObj) {\n throw new Error('Not connected. Call login() first.');\n }\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n // Ensure blockhash and fee payer are set before signing\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 rpcUrl = this.getRpcUrl();\n const connection = new Connection(rpcUrl, 'confirmed');\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');\n legacyTx.recentBlockhash = blockhash;\n legacyTx.lastValidBlockHeight = lastValidBlockHeight;\n }\n if (!legacyTx.feePayer && this.publicKeyObj) {\n legacyTx.feePayer = this.publicKeyObj;\n }\n }\n else {\n const versionedTx = transaction;\n if (!versionedTx.message.recentBlockhash) {\n const rpcUrl = this.getRpcUrl();\n const connection = new Connection(rpcUrl, 'confirmed');\n const { blockhash } = await connection.getLatestBlockhash('confirmed');\n versionedTx.message.recentBlockhash = blockhash;\n }\n }\n try {\n const signedTransactions = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signTransactions({ transactions: [transaction] });\n }, this.getAssociationConfig());\n return signedTransactions[0];\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 if (!this.publicKeyObj) {\n throw new Error('Not connected. Call login() first.');\n }\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\n const rpcUrl = this.getRpcUrl();\n const connection = new Connection(rpcUrl, 'confirmed');\n const isSurfnet = rpcUrl === SURFNET_RPC_URL;\n try {\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 if (feePayer) {\n legacyTx.feePayer = feePayer;\n }\n else if (this.publicKeyObj) {\n legacyTx.feePayer = this.publicKeyObj;\n }\n }\n }\n else {\n const versionedTx = transaction;\n versionedTx.message.recentBlockhash = blockhash;\n }\n if (isSurfnet) {\n // Surfnet: sign-only, then submit to our specific RPC\n const signedTransactions = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signTransactions({ transactions: [transaction] });\n }, this.getAssociationConfig());\n const signedTx = signedTransactions[0];\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: use signAndSendTransactions for wallet-optimized submission\n const signatures = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signAndSendTransactions({\n transactions: [transaction],\n commitment: 'confirmed',\n });\n }, this.getAssociationConfig());\n const signature = signatures[0];\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 if (!this.publicKeyObj || !this.authorizedPublicKey) {\n await this.login();\n }\n await loadMwaProtocol();\n const { transact } = mwaProtocolModule;\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 publicKey = this.publicKeyObj;\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 // Create a mock wallet adapter for Anchor (only publicKey is needed for building TX)\n const mockWalletAdapter = {\n publicKey,\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 tx = VersionedTransaction.deserialize(Buffer.from(solTransactionData.signedTransaction, 'base64'));\n }\n else {\n const result = await buildSetDocumentsTransaction(connection, solTransactionData.txArgs[0].idl, anchorProvider, publicKey, {\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 if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {\n const [signedTx] = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signTransactions({ transactions: [tx] });\n }, this.getAssociationConfig());\n return {\n signedTransaction: signedTx,\n blockNumber: 0,\n gasUsed: '0',\n data: ''\n };\n }\n if (isSurfnet) {\n // Surfnet: sign then submit manually to our RPC\n const [signedTx] = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signTransactions({ transactions: [tx] });\n }, this.getAssociationConfig());\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: use signAndSendTransactions\n const signatures = await transact(async (wallet) => {\n await this.reauthorizeWallet(wallet);\n return wallet.signAndSendTransactions({\n transactions: [tx],\n commitment: 'confirmed',\n });\n }, this.getAssociationConfig());\n const signature = signatures[0];\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 return {\n authToken: this.authToken,\n walletUriBase: this.walletUriBase,\n publicKey: this.publicKeyObj,\n base64Address: this.base64Address,\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":["getPlatform","PublicKey","setAuthLoading","SessionManager","setCurrentUser","genAuthNonce","genSolanaMessage","Buffer","createSessionWithSignature","Connection","SURFNET_RPC_URL","confirmAndCheckTransaction","convertRemainingAccounts","anchor","VersionedTransaction","buildSetDocumentsTransaction","SOLANA_DEVNET_RPC_URL","SOLANA_MAINNET_RPC_URL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAM,wBAAwB,GAAG,EAAE;AACnC;AACA,IAAI,iBAAiB,GAAG,IAAI;AAC5B,IAAI,sBAAsB,GAAG,IAAI;AACjC,eAAe,eAAe,GAAG;AACjC,IAAI,IAAI,iBAAiB;AACzB,QAAQ;AACR,IAAI,IAAI,OAAO,MAAM,KAAK,WAAW;AACrC,QAAQ;AACR,IAAI,IAAI,sBAAsB;AAC9B,QAAQ,OAAO,sBAAsB;AACrC,IAAI,sBAAsB,GAAG,CAAC,YAAY;AAC1C,QAAQ,IAAI;AACZ,YAAY,iBAAiB,GAAG,MAAM,oDAAO,6BAAsD,KAAC;AACpG,QAAQ;AACR,QAAQ,OAAO,CAAC,EAAE;AAClB,YAAY,OAAO,CAAC,IAAI,CAAC,sIAAsI,CAAC;AAChK,YAAY,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC;AACtG,QAAQ;AACR,IAAI,CAAC,GAAG;AACR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AC,OAAO,EAAE;AACvB,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;AAC7B,YAAY,OAAO,IAAI,CAAC,UAAU;AAClC,QAAQ;AACR,QAAQ,IAAI,OAAO,KAAK,eAAe,EAAE;AACzC,YAAY,OAAOK,kCAAqB;AACxC,QAAQ;AACR,aAAa,IAAI,OAAO,KAAK,gBAAgB,EAAE;AAC/C,YAAY,OAAOC,mCAAsB;AACzC,QAAQ;AACR,aAAa,IAAI,OAAO,KAAK,SAAS,EAAE;AACxC,YAAY,OAAOP,4BAAe;AAClC,QAAQ;AACR,QAAQ,OAAOO,mCAAsB;AACrC,IAAI;AACJ;AACA,0BAA0B,CAAC,QAAQ,GAAG,IAAI;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pooflabs/web",
|
|
3
|
-
"version": "0.0.81
|
|
3
|
+
"version": "0.0.81",
|
|
4
4
|
"description": "JavaScript SDK for Tarobase API",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"react-native": "./dist/index.native.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "rm -rf ./dist && rollup -c && tsc -p tsconfig.build.json --emitDeclarationOnly --declarationDir dist",
|
|
24
|
+
"build": "rm -rf ./dist ./.rollup-tmp && tsc -p tsconfig.build.json --outDir .rollup-tmp --declarationDir .rollup-tmp --emitDeclarationOnly false && rollup -c && tsc -p tsconfig.build.json --emitDeclarationOnly --declarationDir dist && rm -rf ./.rollup-tmp",
|
|
25
25
|
"build:with-core": "cd ../tarobase-core && npm run build && cd ../js-sdk && npm run build",
|
|
26
26
|
"use-local-core": "cp -r ../tarobase-core/. ./node_modules/@pooflabs/core/",
|
|
27
27
|
"watch": "rollup -c -w",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@coral-xyz/anchor": "0.31.1",
|
|
70
70
|
"@phantom/react-sdk": "1.0.2",
|
|
71
|
-
"@pooflabs/core": "0.0.
|
|
71
|
+
"@pooflabs/core": "0.0.45",
|
|
72
72
|
"@privy-io/react-auth": "3.11.0",
|
|
73
73
|
"@solana-mobile/mobile-wallet-adapter-protocol-web3js": "2.2.8",
|
|
74
74
|
"@solana-mobile/wallet-adapter-mobile": "2.2.8",
|