@pooflabs/web 0.0.80 → 0.0.81-rc2
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/phantom-wallet-provider.d.ts +20 -0
- package/dist/index-Bdcc5821.js +2375 -0
- package/dist/index-Bdcc5821.js.map +1 -0
- package/dist/{index-BhfNMrC0.js → index-BjlCinic.js} +25 -883
- package/dist/index-BjlCinic.js.map +1 -0
- package/dist/{index-Db0NqU8R.esm.js → index-Bx_lLXRT.esm.js} +342 -277
- package/dist/index-Bx_lLXRT.esm.js.map +1 -0
- package/dist/{index-COIUWugk.esm.js → index-CHqM9n4K.esm.js} +24 -881
- package/dist/index-CHqM9n4K.esm.js.map +1 -0
- package/dist/{index-BVi7fTm2.js → index-CL4JIAAR.js} +24 -882
- package/dist/index-CL4JIAAR.js.map +1 -0
- package/dist/index-CrOVJFX9.esm.js +2373 -0
- package/dist/index-CrOVJFX9.esm.js.map +1 -0
- package/dist/{index-BbtYb8sE.esm.js → index-DCo85UGg.esm.js} +23 -882
- package/dist/index-DCo85UGg.esm.js.map +1 -0
- package/dist/{index-BNyxZ82q.js → index-DHm4usay.js} +342 -276
- package/dist/index-DHm4usay.js.map +1 -0
- package/dist/{index.browser-BuHl80dp.esm.js → index.browser-7dDfRU5G.esm.js} +1367 -1697
- package/dist/index.browser-7dDfRU5G.esm.js.map +1 -0
- package/dist/index.browser-Bg_-PAgT.esm.js +1250 -0
- package/dist/index.browser-Bg_-PAgT.esm.js.map +1 -0
- package/dist/index.browser-C-_FEr5M.esm.js +1134 -0
- package/dist/index.browser-C-_FEr5M.esm.js.map +1 -0
- package/dist/{index.browser-8hyi2LOX.js → index.browser-CmlqbyPr.js} +1367 -1697
- package/dist/index.browser-CmlqbyPr.js.map +1 -0
- package/dist/index.browser-CxXQ2RhF.js +122 -0
- package/dist/index.browser-CxXQ2RhF.js.map +1 -0
- package/dist/index.browser-DjEZSiqI.js +1137 -0
- package/dist/index.browser-DjEZSiqI.js.map +1 -0
- package/dist/index.browser-DuVkpEzB.js +1253 -0
- package/dist/index.browser-DuVkpEzB.js.map +1 -0
- package/dist/index.browser-xJkO73vw.esm.js +119 -0
- package/dist/index.browser-xJkO73vw.esm.js.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-DUnE51Mx.js → index.native-DJA9_K3i.js} +186 -2669
- package/dist/index.native-DJA9_K3i.js.map +1 -0
- package/dist/{index.native-DuKhZcus.esm.js → index.native-TLhfXfe6.esm.js} +187 -2669
- package/dist/index.native-TLhfXfe6.esm.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-Cg-srwP4.js → phantom-wallet-provider-BegJFoWW.js} +141 -12
- package/dist/{phantom-wallet-provider-Cg-srwP4.js.map → phantom-wallet-provider-BegJFoWW.js.map} +1 -1
- package/dist/{phantom-wallet-provider--BJjVUA1.esm.js → phantom-wallet-provider-DzUAMhbm.esm.js} +141 -12
- package/dist/{phantom-wallet-provider--BJjVUA1.esm.js.map → phantom-wallet-provider-DzUAMhbm.esm.js.map} +1 -1
- package/dist/{privy-wallet-provider-BLcur3Ue.esm.js → privy-wallet-provider-BspbiyOr.esm.js} +3 -3
- package/dist/privy-wallet-provider-BspbiyOr.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-DpNVyaXa.js → privy-wallet-provider-Du-QHaaG.js} +3 -3
- package/dist/privy-wallet-provider-Du-QHaaG.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js → solana-mobile-wallet-provider-Bh7SBFpQ.esm.js} +53 -4
- package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js.map → solana-mobile-wallet-provider-Bh7SBFpQ.esm.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js → solana-mobile-wallet-provider-DPp4SYem.js} +53 -4
- package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js.map → solana-mobile-wallet-provider-DPp4SYem.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BNyxZ82q.js.map +0 -1
- package/dist/index-BVi7fTm2.js.map +0 -1
- package/dist/index-BbtYb8sE.esm.js.map +0 -1
- package/dist/index-BhfNMrC0.js.map +0 -1
- package/dist/index-CKIoDkjJ.esm.js +0 -6
- package/dist/index-CKIoDkjJ.esm.js.map +0 -1
- package/dist/index-COIUWugk.esm.js.map +0 -1
- package/dist/index-CSraUgD6.js +0 -8
- package/dist/index-CSraUgD6.js.map +0 -1
- package/dist/index-Db0NqU8R.esm.js.map +0 -1
- package/dist/index.browser-8hyi2LOX.js.map +0 -1
- package/dist/index.browser-B4zXnffD.esm.js +0 -225
- package/dist/index.browser-B4zXnffD.esm.js.map +0 -1
- package/dist/index.browser-BJ_TdUVA.js +0 -228
- package/dist/index.browser-BJ_TdUVA.js.map +0 -1
- package/dist/index.browser-BkNaRRVe.js +0 -1222
- package/dist/index.browser-BkNaRRVe.js.map +0 -1
- package/dist/index.browser-BuHl80dp.esm.js.map +0 -1
- package/dist/index.browser-CnbxBj3-.esm.js +0 -1219
- package/dist/index.browser-CnbxBj3-.esm.js.map +0 -1
- package/dist/index.browser-OvGNsMPu.esm.js +0 -1002
- package/dist/index.browser-OvGNsMPu.esm.js.map +0 -1
- package/dist/index.browser-vuTr40so.js +0 -1008
- package/dist/index.browser-vuTr40so.js.map +0 -1
- package/dist/index.native-DUnE51Mx.js.map +0 -1
- package/dist/index.native-DuKhZcus.esm.js.map +0 -1
- package/dist/privy-wallet-provider-BLcur3Ue.esm.js.map +0 -1
- package/dist/privy-wallet-provider-DpNVyaXa.js.map +0 -1
|
@@ -22,21 +22,6 @@ function _interopNamespaceDefault(e) {
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function _mergeNamespaces(n, m) {
|
|
26
|
-
m.forEach(function (e) {
|
|
27
|
-
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
28
|
-
if (k !== 'default' && !(k in n)) {
|
|
29
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
30
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () { return e[k]; }
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
return Object.freeze(n);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
25
|
var anchor__namespace = /*#__PURE__*/_interopNamespaceDefault(anchor);
|
|
41
26
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React$2);
|
|
42
27
|
|
|
@@ -9273,15 +9258,15 @@ function requireBuffer$1 () {
|
|
|
9273
9258
|
|
|
9274
9259
|
var bufferExports$1 = requireBuffer$1();
|
|
9275
9260
|
|
|
9276
|
-
var safeBuffer
|
|
9261
|
+
var safeBuffer = {exports: {}};
|
|
9277
9262
|
|
|
9278
9263
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9279
9264
|
|
|
9280
|
-
var hasRequiredSafeBuffer
|
|
9265
|
+
var hasRequiredSafeBuffer;
|
|
9281
9266
|
|
|
9282
|
-
function requireSafeBuffer
|
|
9283
|
-
if (hasRequiredSafeBuffer
|
|
9284
|
-
hasRequiredSafeBuffer
|
|
9267
|
+
function requireSafeBuffer () {
|
|
9268
|
+
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
9269
|
+
hasRequiredSafeBuffer = 1;
|
|
9285
9270
|
(function (module, exports$1) {
|
|
9286
9271
|
/* eslint-disable node/no-deprecated-api */
|
|
9287
9272
|
var buffer = requireBuffer$1();
|
|
@@ -9347,23 +9332,23 @@ function requireSafeBuffer$1 () {
|
|
|
9347
9332
|
}
|
|
9348
9333
|
return buffer.SlowBuffer(size)
|
|
9349
9334
|
};
|
|
9350
|
-
} (safeBuffer
|
|
9351
|
-
return safeBuffer
|
|
9335
|
+
} (safeBuffer, safeBuffer.exports));
|
|
9336
|
+
return safeBuffer.exports;
|
|
9352
9337
|
}
|
|
9353
9338
|
|
|
9354
|
-
var src
|
|
9355
|
-
var hasRequiredSrc
|
|
9339
|
+
var src;
|
|
9340
|
+
var hasRequiredSrc;
|
|
9356
9341
|
|
|
9357
|
-
function requireSrc
|
|
9358
|
-
if (hasRequiredSrc
|
|
9359
|
-
hasRequiredSrc
|
|
9342
|
+
function requireSrc () {
|
|
9343
|
+
if (hasRequiredSrc) return src;
|
|
9344
|
+
hasRequiredSrc = 1;
|
|
9360
9345
|
// base-x encoding / decoding
|
|
9361
9346
|
// Copyright (c) 2018 base-x contributors
|
|
9362
9347
|
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
9363
9348
|
// Distributed under the MIT software license, see the accompanying
|
|
9364
9349
|
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
9365
9350
|
// @ts-ignore
|
|
9366
|
-
var _Buffer = requireSafeBuffer
|
|
9351
|
+
var _Buffer = requireSafeBuffer().Buffer;
|
|
9367
9352
|
function base (ALPHABET) {
|
|
9368
9353
|
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
9369
9354
|
var BASE_MAP = new Uint8Array(256);
|
|
@@ -9478,25 +9463,25 @@ function requireSrc$1 () {
|
|
|
9478
9463
|
decode: decode
|
|
9479
9464
|
}
|
|
9480
9465
|
}
|
|
9481
|
-
src
|
|
9482
|
-
return src
|
|
9466
|
+
src = base;
|
|
9467
|
+
return src;
|
|
9483
9468
|
}
|
|
9484
9469
|
|
|
9485
|
-
var bs58$1
|
|
9486
|
-
var hasRequiredBs58
|
|
9470
|
+
var bs58$1;
|
|
9471
|
+
var hasRequiredBs58;
|
|
9487
9472
|
|
|
9488
|
-
function requireBs58
|
|
9489
|
-
if (hasRequiredBs58
|
|
9490
|
-
hasRequiredBs58
|
|
9491
|
-
var basex = requireSrc
|
|
9473
|
+
function requireBs58 () {
|
|
9474
|
+
if (hasRequiredBs58) return bs58$1;
|
|
9475
|
+
hasRequiredBs58 = 1;
|
|
9476
|
+
var basex = requireSrc();
|
|
9492
9477
|
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9493
9478
|
|
|
9494
|
-
bs58$1
|
|
9495
|
-
return bs58$1
|
|
9479
|
+
bs58$1 = basex(ALPHABET);
|
|
9480
|
+
return bs58$1;
|
|
9496
9481
|
}
|
|
9497
9482
|
|
|
9498
|
-
var bs58Exports
|
|
9499
|
-
var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports
|
|
9483
|
+
var bs58Exports = requireBs58();
|
|
9484
|
+
var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
|
|
9500
9485
|
|
|
9501
9486
|
// ─────────────────────────────────────────────────────────────
|
|
9502
9487
|
// Local implementation of getSimulationComputeUnits
|
|
@@ -15684,7 +15669,7 @@ async function loadDependencies() {
|
|
|
15684
15669
|
const [reactModule, reactDomModule, phantomModule] = await Promise.all([
|
|
15685
15670
|
import('react'),
|
|
15686
15671
|
import('react-dom/client'),
|
|
15687
|
-
Promise.resolve().then(function () { return require('./index-
|
|
15672
|
+
Promise.resolve().then(function () { return require('./index-CL4JIAAR.js'); })
|
|
15688
15673
|
]);
|
|
15689
15674
|
// Extract default export from ESM module namespace
|
|
15690
15675
|
// Dynamic import() returns { default: Module, ...exports }, not the module directly
|
|
@@ -15727,8 +15712,13 @@ class PhantomWalletProvider {
|
|
|
15727
15712
|
async initializeAsync() {
|
|
15728
15713
|
// Lazy load dependencies only when actually instantiating
|
|
15729
15714
|
await loadDependencies();
|
|
15730
|
-
// Initialize React component
|
|
15731
|
-
|
|
15715
|
+
// Initialize React component eagerly only when there's a real reason to
|
|
15716
|
+
// (URL callback to consume, prior session to restore, in-page wallet,
|
|
15717
|
+
// or non-Android). Otherwise defer until ensureReady() is reached from
|
|
15718
|
+
// a user-gesture flow. See shouldMountEagerly() for the rationale.
|
|
15719
|
+
if (this.shouldMountEagerly()) {
|
|
15720
|
+
this.initialize();
|
|
15721
|
+
}
|
|
15732
15722
|
}
|
|
15733
15723
|
/**
|
|
15734
15724
|
* Check if social login providers are configured (non-injected providers).
|
|
@@ -15736,6 +15726,69 @@ class PhantomWalletProvider {
|
|
|
15736
15726
|
hasSocialProviders() {
|
|
15737
15727
|
return this.resolvedProviders.some(p => p !== 'injected');
|
|
15738
15728
|
}
|
|
15729
|
+
/**
|
|
15730
|
+
* Decide whether to mount the @phantom/react-sdk <PhantomProvider> tree
|
|
15731
|
+
* eagerly during init() or defer until the first user-triggered call
|
|
15732
|
+
* (login / sign / etc.) reaches ensureReady().
|
|
15733
|
+
*
|
|
15734
|
+
* Mounting the React tree synchronously constructs BrowserSDK, which runs
|
|
15735
|
+
* wallet-standard discovery in its constructor and fires sdk.autoConnect()
|
|
15736
|
+
* in a useEffect on mount. On Solana Seeker (Android Chrome PWA), both
|
|
15737
|
+
* pathways probe the Android intent surface to discover the Phantom mobile
|
|
15738
|
+
* app, which surfaces Chrome's system "wants to access other apps and
|
|
15739
|
+
* services" permission dialog *before* the PWA activity has window focus.
|
|
15740
|
+
* The dialog renders with grayed-out buttons until the user backgrounds
|
|
15741
|
+
* and resumes the app.
|
|
15742
|
+
*
|
|
15743
|
+
* Returns true when eager mount is needed (callback to handle, prior
|
|
15744
|
+
* session, in-page wallet present, or non-Android). Otherwise returns
|
|
15745
|
+
* false — the React tree is mounted lazily inside ensureReady() once a
|
|
15746
|
+
* user gesture brings us there.
|
|
15747
|
+
*/
|
|
15748
|
+
shouldMountEagerly() {
|
|
15749
|
+
if (typeof window === 'undefined')
|
|
15750
|
+
return false;
|
|
15751
|
+
// Preserve desktop behavior: always mount eagerly.
|
|
15752
|
+
if (!detectAndroid())
|
|
15753
|
+
return true;
|
|
15754
|
+
// In-page wallet present (Phantom in-app browser / desktop extension on
|
|
15755
|
+
// a desktop-mode Android UA): no Android intent probe needed, mount free.
|
|
15756
|
+
// Tighten beyond truthy `window.phantom` since arbitrary stubs can land
|
|
15757
|
+
// on that key — require a wallet-shaped surface.
|
|
15758
|
+
const ph = window.phantom;
|
|
15759
|
+
if (ph && (ph.solana || ph.ethereum || ph.app))
|
|
15760
|
+
return true;
|
|
15761
|
+
// Returning from a Phantom redirect (OAuth or deeplink hop). SDK must
|
|
15762
|
+
// be live to read these URL params via urlParamsAccessor.
|
|
15763
|
+
const callbackKeys = ['session_id', 'wallet_id', 'selected_account_index', 'error', 'error_description'];
|
|
15764
|
+
try {
|
|
15765
|
+
const params = new URLSearchParams(window.location.search);
|
|
15766
|
+
if (callbackKeys.some(k => params.has(k)))
|
|
15767
|
+
return true;
|
|
15768
|
+
}
|
|
15769
|
+
catch (_a) {
|
|
15770
|
+
return true; // conservative on URL access failure
|
|
15771
|
+
}
|
|
15772
|
+
// Returning user with a stored Phantom session. They've already
|
|
15773
|
+
// approved the Android intent permission for this origin on first
|
|
15774
|
+
// login, so the dialog is typically pre-granted by Chrome — eager
|
|
15775
|
+
// mount lets autoConnect silently restore the wallet handshake.
|
|
15776
|
+
// Require BOTH the marker AND a session storage entry so a stale
|
|
15777
|
+
// orphaned marker doesn't keep eager-mounting forever. Note
|
|
15778
|
+
// isAuthenticated() is a raw key-existence check, not a validity
|
|
15779
|
+
// check — restoreSession() above clears the marker on the next load
|
|
15780
|
+
// if the session is unusable, so the bug self-corrects after at
|
|
15781
|
+
// most one further cold start.
|
|
15782
|
+
try {
|
|
15783
|
+
const stored = getPlatform().storage.getItem('tarobase_last_auth_method');
|
|
15784
|
+
if (stored === 'phantom' && WebSessionManager.isAuthenticated())
|
|
15785
|
+
return true;
|
|
15786
|
+
}
|
|
15787
|
+
catch (_b) {
|
|
15788
|
+
return true;
|
|
15789
|
+
}
|
|
15790
|
+
return false;
|
|
15791
|
+
}
|
|
15739
15792
|
static getInstance(networkUrl, config) {
|
|
15740
15793
|
if (!PhantomWalletProvider.instance) {
|
|
15741
15794
|
new PhantomWalletProvider(networkUrl, config);
|
|
@@ -16096,11 +16149,20 @@ class PhantomWalletProvider {
|
|
|
16096
16149
|
const handleMobileWalletClick = async () => {
|
|
16097
16150
|
that.loginInProgress = false;
|
|
16098
16151
|
walletClickedRef.current = true;
|
|
16099
|
-
|
|
16152
|
+
// Don't close the wallet modal yet. On Android Chrome PWA,
|
|
16153
|
+
// closing the modal here triggers a React commit and a focus
|
|
16154
|
+
// transition that races MWA's transact() opening a localhost
|
|
16155
|
+
// WebSocket. Chrome's "Apps on Device" / Local Network Access
|
|
16156
|
+
// permission dialog spawns inheriting the activity's focus
|
|
16157
|
+
// state at that moment — and the in-transit focus produces a
|
|
16158
|
+
// dialog with grayed-out Allow/Block buttons. Keep the modal
|
|
16159
|
+
// mounted through MWA login so focus is stable when the
|
|
16160
|
+
// system dialog spawns; close it after login resolves.
|
|
16100
16161
|
if (that.onSwitchToMWA) {
|
|
16101
16162
|
try {
|
|
16102
16163
|
const mwaProvider = await that.onSwitchToMWA();
|
|
16103
16164
|
const user = await mwaProvider.login();
|
|
16165
|
+
setShowWalletModal(false);
|
|
16104
16166
|
if (that.pendingLogin && user) {
|
|
16105
16167
|
that.pendingLogin.resolve(user);
|
|
16106
16168
|
that.pendingLogin = null;
|
|
@@ -16111,12 +16173,16 @@ class PhantomWalletProvider {
|
|
|
16111
16173
|
}
|
|
16112
16174
|
}
|
|
16113
16175
|
catch (error) {
|
|
16176
|
+
setShowWalletModal(false);
|
|
16114
16177
|
if (that.pendingLogin) {
|
|
16115
16178
|
that.pendingLogin.reject(error);
|
|
16116
16179
|
that.pendingLogin = null;
|
|
16117
16180
|
}
|
|
16118
16181
|
}
|
|
16119
16182
|
}
|
|
16183
|
+
else {
|
|
16184
|
+
setShowWalletModal(false);
|
|
16185
|
+
}
|
|
16120
16186
|
};
|
|
16121
16187
|
const handleCloseModal = () => {
|
|
16122
16188
|
setShowWalletModal(false);
|
|
@@ -16412,6 +16478,13 @@ class PhantomWalletProvider {
|
|
|
16412
16478
|
if (this.initPromise) {
|
|
16413
16479
|
await this.initPromise;
|
|
16414
16480
|
}
|
|
16481
|
+
// Lazy-mount path: if initializeAsync deferred the React mount (e.g.
|
|
16482
|
+
// first-time visitor on Android Chrome PWA), do it now. We're being
|
|
16483
|
+
// called from a user-gesture flow like login(), so any Android intent
|
|
16484
|
+
// dialog that surfaces will appear with the activity already focused.
|
|
16485
|
+
if (!this.containerElement) {
|
|
16486
|
+
this.initialize();
|
|
16487
|
+
}
|
|
16415
16488
|
// Wait for SDK to be ready
|
|
16416
16489
|
await new Promise((resolve) => {
|
|
16417
16490
|
const check = () => {
|
|
@@ -16521,12 +16594,53 @@ class PhantomWalletProvider {
|
|
|
16521
16594
|
});
|
|
16522
16595
|
}
|
|
16523
16596
|
async restoreSession() {
|
|
16524
|
-
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
|
|
16597
|
+
// Read from storage directly. Do NOT ensureReady() here — that would
|
|
16598
|
+
// mount @phantom/react-sdk's <PhantomProvider> during init(), which
|
|
16599
|
+
// synchronously constructs BrowserSDK (running wallet-standard discovery)
|
|
16600
|
+
// and fires sdk.autoConnect() — both probing the Android intent surface
|
|
16601
|
+
// before the PWA activity has window focus on Solana Seeker. The
|
|
16602
|
+
// resulting "access other apps and services" system dialog renders
|
|
16603
|
+
// with grayed-out buttons.
|
|
16604
|
+
//
|
|
16605
|
+
// Wrap getSession() in try/catch: WebSessionManager.getSession() runs
|
|
16606
|
+
// JSON.parse on the stored session *outside* its internal try/catch,
|
|
16607
|
+
// so genuinely malformed JSON in localStorage would propagate through
|
|
16608
|
+
// restoreSession() and break init() entirely. Treat any throw as
|
|
16609
|
+
// "no session" and fall through to the cleanup path so corrupted
|
|
16610
|
+
// storage is recoverable on next load.
|
|
16611
|
+
let session;
|
|
16612
|
+
try {
|
|
16613
|
+
session = await WebSessionManager.getSession();
|
|
16528
16614
|
}
|
|
16529
|
-
|
|
16615
|
+
catch (_a) {
|
|
16616
|
+
session = null;
|
|
16617
|
+
}
|
|
16618
|
+
if (!session) {
|
|
16619
|
+
// Tidy up storage so we don't leave junk behind:
|
|
16620
|
+
// (a) clearSession() removes any stale or unparseable session
|
|
16621
|
+
// storage entry. WebSessionManager.getSession() can't reach
|
|
16622
|
+
// its own clearSession() if JSON.parse threw. Idempotent —
|
|
16623
|
+
// safe to call unconditionally here.
|
|
16624
|
+
// (b) Drop the auth-method marker if it's stale.
|
|
16625
|
+
// WebSessionManager.clearSession() only removes the session
|
|
16626
|
+
// storage key, not the marker — so without this cleanup
|
|
16627
|
+
// shouldMountEagerly() would keep eager-mounting on every
|
|
16628
|
+
// future cold start.
|
|
16629
|
+
try {
|
|
16630
|
+
WebSessionManager.clearSession();
|
|
16631
|
+
}
|
|
16632
|
+
catch ( /* best-effort */_b) { /* best-effort */ }
|
|
16633
|
+
try {
|
|
16634
|
+
if (getPlatform().storage.getItem('tarobase_last_auth_method') === 'phantom') {
|
|
16635
|
+
getPlatform().storage.removeItem('tarobase_last_auth_method');
|
|
16636
|
+
}
|
|
16637
|
+
}
|
|
16638
|
+
catch (_c) {
|
|
16639
|
+
// storage unavailable — best-effort cleanup
|
|
16640
|
+
}
|
|
16641
|
+
return null;
|
|
16642
|
+
}
|
|
16643
|
+
return { provider: this, address: session.address };
|
|
16530
16644
|
}
|
|
16531
16645
|
async address() {
|
|
16532
16646
|
var _a, _b, _c, _d;
|
|
@@ -20017,235 +20131,137 @@ function createSolanaRpcSubscriptionsFromTransport(transport) {
|
|
|
20017
20131
|
});
|
|
20018
20132
|
}
|
|
20019
20133
|
|
|
20020
|
-
|
|
20021
|
-
|
|
20022
|
-
|
|
20023
|
-
|
|
20024
|
-
|
|
20025
|
-
|
|
20026
|
-
|
|
20027
|
-
|
|
20028
|
-
|
|
20029
|
-
|
|
20030
|
-
|
|
20031
|
-
|
|
20032
|
-
|
|
20033
|
-
|
|
20034
|
-
|
|
20035
|
-
|
|
20036
|
-
|
|
20037
|
-
|
|
20038
|
-
|
|
20039
|
-
|
|
20040
|
-
|
|
20041
|
-
|
|
20042
|
-
|
|
20043
|
-
|
|
20044
|
-
|
|
20045
|
-
|
|
20046
|
-
|
|
20047
|
-
|
|
20048
|
-
|
|
20049
|
-
|
|
20050
|
-
|
|
20051
|
-
|
|
20052
|
-
|
|
20053
|
-
|
|
20054
|
-
|
|
20055
|
-
|
|
20056
|
-
|
|
20057
|
-
|
|
20058
|
-
|
|
20059
|
-
|
|
20060
|
-
|
|
20061
|
-
|
|
20062
|
-
|
|
20063
|
-
|
|
20064
|
-
|
|
20065
|
-
|
|
20066
|
-
|
|
20067
|
-
|
|
20068
|
-
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
|
|
20073
|
-
|
|
20074
|
-
|
|
20075
|
-
|
|
20076
|
-
|
|
20077
|
-
|
|
20078
|
-
|
|
20079
|
-
|
|
20080
|
-
|
|
20081
|
-
|
|
20082
|
-
|
|
20083
|
-
|
|
20084
|
-
|
|
20085
|
-
|
|
20086
|
-
|
|
20087
|
-
|
|
20088
|
-
|
|
20089
|
-
|
|
20090
|
-
|
|
20091
|
-
|
|
20092
|
-
|
|
20093
|
-
|
|
20094
|
-
|
|
20095
|
-
|
|
20096
|
-
}
|
|
20097
|
-
|
|
20098
|
-
|
|
20099
|
-
|
|
20100
|
-
|
|
20101
|
-
|
|
20102
|
-
|
|
20103
|
-
|
|
20104
|
-
|
|
20105
|
-
|
|
20106
|
-
|
|
20107
|
-
|
|
20108
|
-
|
|
20109
|
-
|
|
20110
|
-
|
|
20111
|
-
|
|
20112
|
-
|
|
20113
|
-
|
|
20114
|
-
|
|
20115
|
-
|
|
20116
|
-
|
|
20117
|
-
|
|
20118
|
-
|
|
20119
|
-
|
|
20120
|
-
|
|
20121
|
-
|
|
20122
|
-
|
|
20123
|
-
|
|
20124
|
-
|
|
20125
|
-
|
|
20126
|
-
|
|
20127
|
-
|
|
20128
|
-
|
|
20129
|
-
|
|
20130
|
-
|
|
20131
|
-
|
|
20132
|
-
|
|
20133
|
-
|
|
20134
|
-
|
|
20135
|
-
|
|
20136
|
-
|
|
20137
|
-
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
|
|
20142
|
-
var b58 = new Uint8Array(size);
|
|
20143
|
-
// Process the bytes.
|
|
20144
|
-
while (pbegin !== pend) {
|
|
20145
|
-
var carry = source[pbegin];
|
|
20146
|
-
// Apply "b58 = b58 * 256 + ch".
|
|
20147
|
-
var i = 0;
|
|
20148
|
-
for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
|
20149
|
-
carry += (256 * b58[it1]) >>> 0;
|
|
20150
|
-
b58[it1] = (carry % BASE) >>> 0;
|
|
20151
|
-
carry = (carry / BASE) >>> 0;
|
|
20152
|
-
}
|
|
20153
|
-
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20154
|
-
length = i;
|
|
20155
|
-
pbegin++;
|
|
20156
|
-
}
|
|
20157
|
-
// Skip leading zeroes in base58 result.
|
|
20158
|
-
var it2 = size - length;
|
|
20159
|
-
while (it2 !== size && b58[it2] === 0) {
|
|
20160
|
-
it2++;
|
|
20161
|
-
}
|
|
20162
|
-
// Translate the result into a string.
|
|
20163
|
-
var str = LEADER.repeat(zeroes);
|
|
20164
|
-
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
|
|
20165
|
-
return str
|
|
20166
|
-
}
|
|
20167
|
-
function decodeUnsafe (source) {
|
|
20168
|
-
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
|
20169
|
-
if (source.length === 0) { return _Buffer.alloc(0) }
|
|
20170
|
-
var psz = 0;
|
|
20171
|
-
// Skip and count leading '1's.
|
|
20172
|
-
var zeroes = 0;
|
|
20173
|
-
var length = 0;
|
|
20174
|
-
while (source[psz] === LEADER) {
|
|
20175
|
-
zeroes++;
|
|
20176
|
-
psz++;
|
|
20177
|
-
}
|
|
20178
|
-
// Allocate enough space in big-endian base256 representation.
|
|
20179
|
-
var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
|
|
20180
|
-
var b256 = new Uint8Array(size);
|
|
20181
|
-
// Process the characters.
|
|
20182
|
-
while (psz < source.length) {
|
|
20183
|
-
// Find code of next character
|
|
20184
|
-
var charCode = source.charCodeAt(psz);
|
|
20185
|
-
// Base map can not be indexed using char code
|
|
20186
|
-
if (charCode > 255) { return }
|
|
20187
|
-
// Decode character
|
|
20188
|
-
var carry = BASE_MAP[charCode];
|
|
20189
|
-
// Invalid character
|
|
20190
|
-
if (carry === 255) { return }
|
|
20191
|
-
var i = 0;
|
|
20192
|
-
for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
|
20193
|
-
carry += (BASE * b256[it3]) >>> 0;
|
|
20194
|
-
b256[it3] = (carry % 256) >>> 0;
|
|
20195
|
-
carry = (carry / 256) >>> 0;
|
|
20196
|
-
}
|
|
20197
|
-
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20198
|
-
length = i;
|
|
20199
|
-
psz++;
|
|
20200
|
-
}
|
|
20201
|
-
// Skip leading zeroes in b256.
|
|
20202
|
-
var it4 = size - length;
|
|
20203
|
-
while (it4 !== size && b256[it4] === 0) {
|
|
20204
|
-
it4++;
|
|
20205
|
-
}
|
|
20206
|
-
var vch = _Buffer.allocUnsafe(zeroes + (size - it4));
|
|
20207
|
-
vch.fill(0x00, 0, zeroes);
|
|
20208
|
-
var j = zeroes;
|
|
20209
|
-
while (it4 !== size) {
|
|
20210
|
-
vch[j++] = b256[it4++];
|
|
20211
|
-
}
|
|
20212
|
-
return vch
|
|
20213
|
-
}
|
|
20214
|
-
function decode (string) {
|
|
20215
|
-
var buffer = decodeUnsafe(string);
|
|
20216
|
-
if (buffer) { return buffer }
|
|
20217
|
-
throw new Error('Non-base' + BASE + ' character')
|
|
20218
|
-
}
|
|
20219
|
-
return {
|
|
20220
|
-
encode: encode,
|
|
20221
|
-
decodeUnsafe: decodeUnsafe,
|
|
20222
|
-
decode: decode
|
|
20223
|
-
}
|
|
20224
|
-
}
|
|
20225
|
-
src = base;
|
|
20226
|
-
return src;
|
|
20227
|
-
}
|
|
20228
|
-
|
|
20229
|
-
var bs58$1;
|
|
20230
|
-
var hasRequiredBs58;
|
|
20231
|
-
|
|
20232
|
-
function requireBs58 () {
|
|
20233
|
-
if (hasRequiredBs58) return bs58$1;
|
|
20234
|
-
hasRequiredBs58 = 1;
|
|
20235
|
-
var basex = requireSrc();
|
|
20236
|
-
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
20237
|
-
|
|
20238
|
-
bs58$1 = basex(ALPHABET);
|
|
20239
|
-
return bs58$1;
|
|
20134
|
+
// base-x encoding / decoding
|
|
20135
|
+
// Copyright (c) 2018 base-x contributors
|
|
20136
|
+
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
20137
|
+
// Distributed under the MIT software license, see the accompanying
|
|
20138
|
+
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
20139
|
+
function base (ALPHABET) {
|
|
20140
|
+
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
20141
|
+
const BASE_MAP = new Uint8Array(256);
|
|
20142
|
+
for (let j = 0; j < BASE_MAP.length; j++) {
|
|
20143
|
+
BASE_MAP[j] = 255;
|
|
20144
|
+
}
|
|
20145
|
+
for (let i = 0; i < ALPHABET.length; i++) {
|
|
20146
|
+
const x = ALPHABET.charAt(i);
|
|
20147
|
+
const xc = x.charCodeAt(0);
|
|
20148
|
+
if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
|
|
20149
|
+
BASE_MAP[xc] = i;
|
|
20150
|
+
}
|
|
20151
|
+
const BASE = ALPHABET.length;
|
|
20152
|
+
const LEADER = ALPHABET.charAt(0);
|
|
20153
|
+
const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
|
|
20154
|
+
const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
|
|
20155
|
+
function encode (source) {
|
|
20156
|
+
// eslint-disable-next-line no-empty
|
|
20157
|
+
if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
|
|
20158
|
+
source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
20159
|
+
} else if (Array.isArray(source)) {
|
|
20160
|
+
source = Uint8Array.from(source);
|
|
20161
|
+
}
|
|
20162
|
+
if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
|
|
20163
|
+
if (source.length === 0) { return '' }
|
|
20164
|
+
// Skip & count leading zeroes.
|
|
20165
|
+
let zeroes = 0;
|
|
20166
|
+
let length = 0;
|
|
20167
|
+
let pbegin = 0;
|
|
20168
|
+
const pend = source.length;
|
|
20169
|
+
while (pbegin !== pend && source[pbegin] === 0) {
|
|
20170
|
+
pbegin++;
|
|
20171
|
+
zeroes++;
|
|
20172
|
+
}
|
|
20173
|
+
// Allocate enough space in big-endian base58 representation.
|
|
20174
|
+
const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
|
|
20175
|
+
const b58 = new Uint8Array(size);
|
|
20176
|
+
// Process the bytes.
|
|
20177
|
+
while (pbegin !== pend) {
|
|
20178
|
+
let carry = source[pbegin];
|
|
20179
|
+
// Apply "b58 = b58 * 256 + ch".
|
|
20180
|
+
let i = 0;
|
|
20181
|
+
for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
|
20182
|
+
carry += (256 * b58[it1]) >>> 0;
|
|
20183
|
+
b58[it1] = (carry % BASE) >>> 0;
|
|
20184
|
+
carry = (carry / BASE) >>> 0;
|
|
20185
|
+
}
|
|
20186
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20187
|
+
length = i;
|
|
20188
|
+
pbegin++;
|
|
20189
|
+
}
|
|
20190
|
+
// Skip leading zeroes in base58 result.
|
|
20191
|
+
let it2 = size - length;
|
|
20192
|
+
while (it2 !== size && b58[it2] === 0) {
|
|
20193
|
+
it2++;
|
|
20194
|
+
}
|
|
20195
|
+
// Translate the result into a string.
|
|
20196
|
+
let str = LEADER.repeat(zeroes);
|
|
20197
|
+
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
|
|
20198
|
+
return str
|
|
20199
|
+
}
|
|
20200
|
+
function decodeUnsafe (source) {
|
|
20201
|
+
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
|
20202
|
+
if (source.length === 0) { return new Uint8Array() }
|
|
20203
|
+
let psz = 0;
|
|
20204
|
+
// Skip and count leading '1's.
|
|
20205
|
+
let zeroes = 0;
|
|
20206
|
+
let length = 0;
|
|
20207
|
+
while (source[psz] === LEADER) {
|
|
20208
|
+
zeroes++;
|
|
20209
|
+
psz++;
|
|
20210
|
+
}
|
|
20211
|
+
// Allocate enough space in big-endian base256 representation.
|
|
20212
|
+
const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
|
|
20213
|
+
const b256 = new Uint8Array(size);
|
|
20214
|
+
// Process the characters.
|
|
20215
|
+
while (psz < source.length) {
|
|
20216
|
+
// Find code of next character
|
|
20217
|
+
const charCode = source.charCodeAt(psz);
|
|
20218
|
+
// Base map can not be indexed using char code
|
|
20219
|
+
if (charCode > 255) { return }
|
|
20220
|
+
// Decode character
|
|
20221
|
+
let carry = BASE_MAP[charCode];
|
|
20222
|
+
// Invalid character
|
|
20223
|
+
if (carry === 255) { return }
|
|
20224
|
+
let i = 0;
|
|
20225
|
+
for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
|
20226
|
+
carry += (BASE * b256[it3]) >>> 0;
|
|
20227
|
+
b256[it3] = (carry % 256) >>> 0;
|
|
20228
|
+
carry = (carry / 256) >>> 0;
|
|
20229
|
+
}
|
|
20230
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20231
|
+
length = i;
|
|
20232
|
+
psz++;
|
|
20233
|
+
}
|
|
20234
|
+
// Skip leading zeroes in b256.
|
|
20235
|
+
let it4 = size - length;
|
|
20236
|
+
while (it4 !== size && b256[it4] === 0) {
|
|
20237
|
+
it4++;
|
|
20238
|
+
}
|
|
20239
|
+
const vch = new Uint8Array(zeroes + (size - it4));
|
|
20240
|
+
let j = zeroes;
|
|
20241
|
+
while (it4 !== size) {
|
|
20242
|
+
vch[j++] = b256[it4++];
|
|
20243
|
+
}
|
|
20244
|
+
return vch
|
|
20245
|
+
}
|
|
20246
|
+
function decode (string) {
|
|
20247
|
+
const buffer = decodeUnsafe(string);
|
|
20248
|
+
if (buffer) { return buffer }
|
|
20249
|
+
throw new Error('Non-base' + BASE + ' character')
|
|
20250
|
+
}
|
|
20251
|
+
return {
|
|
20252
|
+
encode,
|
|
20253
|
+
decodeUnsafe,
|
|
20254
|
+
decode
|
|
20255
|
+
}
|
|
20240
20256
|
}
|
|
20241
20257
|
|
|
20242
|
-
var
|
|
20243
|
-
var bs58 =
|
|
20258
|
+
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
20259
|
+
var bs58 = base(ALPHABET);
|
|
20244
20260
|
|
|
20245
|
-
var index = /*#__PURE__*/
|
|
20261
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
20246
20262
|
__proto__: null,
|
|
20247
20263
|
default: bs58
|
|
20248
|
-
}
|
|
20264
|
+
});
|
|
20249
20265
|
|
|
20250
20266
|
const SURFNET_RPC_URL$1 = "https://surfpool.fly.dev";
|
|
20251
20267
|
let React;
|
|
@@ -21147,6 +21163,46 @@ function isMobileWalletAvailable() {
|
|
|
21147
21163
|
return detectAndroid();
|
|
21148
21164
|
}
|
|
21149
21165
|
const ED25519_SIGNATURE_LENGTH = 64;
|
|
21166
|
+
/**
|
|
21167
|
+
* On Android Chrome PWA (e.g. Solana Seeker in standalone mode), MWA's
|
|
21168
|
+
* transact() opens a WebSocket to ws://localhost:<port>/solana-wallet to
|
|
21169
|
+
* handshake with the wallet app on the device. Chrome guards localhost
|
|
21170
|
+
* connections behind the Local Network Access ("Apps on Device") permission
|
|
21171
|
+
* dialog. The dialog inherits the activity's window-focus state at spawn
|
|
21172
|
+
* time — so if focus is in transit (e.g. just after a Phantom-modal close
|
|
21173
|
+
* triggers a React commit), the dialog renders with grayed-out Allow/Block
|
|
21174
|
+
* buttons and only becomes interactive after a manual background→resume
|
|
21175
|
+
* (which forces an onPause→onResume cycle on the activity).
|
|
21176
|
+
*
|
|
21177
|
+
* Wait for window focus to settle, then yield one frame, before opening
|
|
21178
|
+
* the WebSocket. This makes the system dialog spawn into a focused activity
|
|
21179
|
+
* so its buttons are immediately tappable.
|
|
21180
|
+
*/
|
|
21181
|
+
async function awaitActivityFocus() {
|
|
21182
|
+
if (typeof document === 'undefined' || typeof window === 'undefined')
|
|
21183
|
+
return;
|
|
21184
|
+
if (!document.hasFocus()) {
|
|
21185
|
+
await new Promise((resolve) => {
|
|
21186
|
+
const onFocus = () => {
|
|
21187
|
+
window.removeEventListener('focus', onFocus);
|
|
21188
|
+
resolve();
|
|
21189
|
+
};
|
|
21190
|
+
window.addEventListener('focus', onFocus);
|
|
21191
|
+
// Fallback in case the focus event never fires (e.g. activity
|
|
21192
|
+
// already focused but document.hasFocus() momentarily lies during
|
|
21193
|
+
// a React commit). 600ms is a perceptual ceiling — beyond this
|
|
21194
|
+
// the user notices a stall, so we'd rather take the focus race
|
|
21195
|
+
// than block forever.
|
|
21196
|
+
setTimeout(() => {
|
|
21197
|
+
window.removeEventListener('focus', onFocus);
|
|
21198
|
+
resolve();
|
|
21199
|
+
}, 600);
|
|
21200
|
+
});
|
|
21201
|
+
}
|
|
21202
|
+
// Yield to next paint so any pending React commits / focus changes have
|
|
21203
|
+
// flushed before the WebSocket open spawns the system dialog.
|
|
21204
|
+
await new Promise((r) => requestAnimationFrame(() => r()));
|
|
21205
|
+
}
|
|
21150
21206
|
// Dynamically imported MWA protocol module
|
|
21151
21207
|
let mwaProtocolModule = null;
|
|
21152
21208
|
let mwaProtocolLoadPromise = null;
|
|
@@ -21159,7 +21215,7 @@ async function loadMwaProtocol() {
|
|
|
21159
21215
|
return mwaProtocolLoadPromise;
|
|
21160
21216
|
mwaProtocolLoadPromise = (async () => {
|
|
21161
21217
|
try {
|
|
21162
|
-
mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-
|
|
21218
|
+
mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-CxXQ2RhF.js'); });
|
|
21163
21219
|
}
|
|
21164
21220
|
catch (e) {
|
|
21165
21221
|
console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
|
|
@@ -21181,7 +21237,7 @@ async function registerMobileWalletAdapter(config) {
|
|
|
21181
21237
|
if (typeof window === 'undefined')
|
|
21182
21238
|
return;
|
|
21183
21239
|
try {
|
|
21184
|
-
const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-
|
|
21240
|
+
const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-CmlqbyPr.js'); });
|
|
21185
21241
|
const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
|
|
21186
21242
|
if (!registerMwa) {
|
|
21187
21243
|
console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
|
|
@@ -21325,6 +21381,7 @@ class SolanaMobileWalletProvider {
|
|
|
21325
21381
|
}
|
|
21326
21382
|
// Pre-fetch nonce from server while wallet is not yet connected
|
|
21327
21383
|
const nonce = await genAuthNonce();
|
|
21384
|
+
await awaitActivityFocus();
|
|
21328
21385
|
// Single transact() call: authorize + signMessages — one wallet popup
|
|
21329
21386
|
const result = await transact(async (wallet) => {
|
|
21330
21387
|
// Step 1: Authorize — user approves the dApp
|
|
@@ -21413,6 +21470,7 @@ class SolanaMobileWalletProvider {
|
|
|
21413
21470
|
await loadMwaProtocol();
|
|
21414
21471
|
const { transact } = mwaProtocolModule;
|
|
21415
21472
|
const authToken = this.authToken;
|
|
21473
|
+
await awaitActivityFocus();
|
|
21416
21474
|
await transact(async (wallet) => {
|
|
21417
21475
|
await wallet.deauthorize({ auth_token: authToken });
|
|
21418
21476
|
}, this.getAssociationConfig());
|
|
@@ -21438,6 +21496,7 @@ class SolanaMobileWalletProvider {
|
|
|
21438
21496
|
const { transact } = mwaProtocolModule;
|
|
21439
21497
|
const base64Addr = this.base64Address;
|
|
21440
21498
|
try {
|
|
21499
|
+
await awaitActivityFocus();
|
|
21441
21500
|
const signedMessages = await transact(async (wallet) => {
|
|
21442
21501
|
await this.reauthorizeWallet(wallet);
|
|
21443
21502
|
const messageBytes = getPlatform().textEncode(message);
|
|
@@ -21491,6 +21550,7 @@ class SolanaMobileWalletProvider {
|
|
|
21491
21550
|
}
|
|
21492
21551
|
}
|
|
21493
21552
|
try {
|
|
21553
|
+
await awaitActivityFocus();
|
|
21494
21554
|
const signedTransactions = await transact(async (wallet) => {
|
|
21495
21555
|
await this.reauthorizeWallet(wallet);
|
|
21496
21556
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -21538,6 +21598,7 @@ class SolanaMobileWalletProvider {
|
|
|
21538
21598
|
}
|
|
21539
21599
|
if (isSurfnet) {
|
|
21540
21600
|
// Surfnet: sign-only, then submit to our specific RPC
|
|
21601
|
+
await awaitActivityFocus();
|
|
21541
21602
|
const signedTransactions = await transact(async (wallet) => {
|
|
21542
21603
|
await this.reauthorizeWallet(wallet);
|
|
21543
21604
|
return wallet.signTransactions({ transactions: [transaction] });
|
|
@@ -21557,6 +21618,7 @@ class SolanaMobileWalletProvider {
|
|
|
21557
21618
|
return signature;
|
|
21558
21619
|
}
|
|
21559
21620
|
// Non-surfnet: use signAndSendTransactions for wallet-optimized submission
|
|
21621
|
+
await awaitActivityFocus();
|
|
21560
21622
|
const signatures = await transact(async (wallet) => {
|
|
21561
21623
|
await this.reauthorizeWallet(wallet);
|
|
21562
21624
|
return wallet.signAndSendTransactions({
|
|
@@ -21640,6 +21702,7 @@ class SolanaMobileWalletProvider {
|
|
|
21640
21702
|
tx = result.tx;
|
|
21641
21703
|
}
|
|
21642
21704
|
if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {
|
|
21705
|
+
await awaitActivityFocus();
|
|
21643
21706
|
const [signedTx] = await transact(async (wallet) => {
|
|
21644
21707
|
await this.reauthorizeWallet(wallet);
|
|
21645
21708
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -21653,6 +21716,7 @@ class SolanaMobileWalletProvider {
|
|
|
21653
21716
|
}
|
|
21654
21717
|
if (isSurfnet) {
|
|
21655
21718
|
// Surfnet: sign then submit manually to our RPC
|
|
21719
|
+
await awaitActivityFocus();
|
|
21656
21720
|
const [signedTx] = await transact(async (wallet) => {
|
|
21657
21721
|
await this.reauthorizeWallet(wallet);
|
|
21658
21722
|
return wallet.signTransactions({ transactions: [tx] });
|
|
@@ -21681,6 +21745,7 @@ class SolanaMobileWalletProvider {
|
|
|
21681
21745
|
};
|
|
21682
21746
|
}
|
|
21683
21747
|
// Non-surfnet: use signAndSendTransactions
|
|
21748
|
+
await awaitActivityFocus();
|
|
21684
21749
|
const signatures = await transact(async (wallet) => {
|
|
21685
21750
|
await this.reauthorizeWallet(wallet);
|
|
21686
21751
|
return wallet.signAndSendTransactions({
|
|
@@ -22101,6 +22166,7 @@ exports.ServerSessionManager = ServerSessionManager;
|
|
|
22101
22166
|
exports.SolanaMobileWalletProvider = SolanaMobileWalletProvider;
|
|
22102
22167
|
exports.WebSessionManager = WebSessionManager;
|
|
22103
22168
|
exports.aggregate = aggregate;
|
|
22169
|
+
exports.bs58 = bs58;
|
|
22104
22170
|
exports.bufferExports = bufferExports;
|
|
22105
22171
|
exports.buildSetDocumentsTransaction = buildSetDocumentsTransaction;
|
|
22106
22172
|
exports.clearCache = clearCache;
|
|
@@ -22146,4 +22212,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
|
|
|
22146
22212
|
exports.signTransaction = signTransaction;
|
|
22147
22213
|
exports.subscribe = subscribe;
|
|
22148
22214
|
exports.useAuth = useAuth;
|
|
22149
|
-
//# sourceMappingURL=index-
|
|
22215
|
+
//# sourceMappingURL=index-DHm4usay.js.map
|