@pooflabs/web 0.0.85-rc3 → 0.0.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BaKs3A8s.js → index-BHkED2YI.js} +2 -2
- package/dist/{index-BaKs3A8s.js.map → index-BHkED2YI.js.map} +1 -1
- package/dist/{index-C4AnWFs_.esm.js → index-BQUfNEiY.esm.js} +12 -49
- package/dist/{index-C4AnWFs_.esm.js.map → index-BQUfNEiY.esm.js.map} +1 -1
- package/dist/{index-BE-VWSJT.esm.js → index-Cfp30Jm_.esm.js} +2 -2
- package/dist/{index-BE-VWSJT.esm.js.map → index-Cfp30Jm_.esm.js.map} +1 -1
- package/dist/{index-B5qYY4YM.js → index-D-Wbwevj.js} +2 -2
- package/dist/index-D-Wbwevj.js.map +1 -0
- package/dist/{index-dqqR5q7b.esm.js → index-DK28JaJm.esm.js} +3 -3
- package/dist/{index-dqqR5q7b.esm.js.map → index-DK28JaJm.esm.js.map} +1 -1
- package/dist/index-DKyWaxCB.esm.js +6 -0
- package/dist/index-DKyWaxCB.esm.js.map +1 -0
- package/dist/{index-BzeiIIwF.js → index-DUn32Hkh.js} +3 -3
- package/dist/{index-BzeiIIwF.js.map → index-DUn32Hkh.js.map} +1 -1
- package/dist/{index-bEXLwE7_.js → index-hEc5_KoM.js} +12 -49
- package/dist/{index-bEXLwE7_.js.map → index-hEc5_KoM.js.map} +1 -1
- package/dist/{index.browser-DQIwLToJ.esm.js → index.browser-C9gHoUen.esm.js} +2 -2
- package/dist/{index.browser-DQIwLToJ.esm.js.map → index.browser-C9gHoUen.esm.js.map} +1 -1
- package/dist/{index.browser-CN6obNQM.js → index.browser-CbawPvh6.js} +2 -2
- package/dist/{index.browser-CN6obNQM.js.map → index.browser-CbawPvh6.js.map} +1 -1
- package/dist/{index.browser-CZIJCtms.js → index.browser-DD8pg_L2.js} +2 -2
- package/dist/{index.browser-CZIJCtms.js.map → index.browser-DD8pg_L2.js.map} +1 -1
- package/dist/{index.browser-D8ttddP4.esm.js → index.browser-DQqKPfDA.esm.js} +2 -2
- package/dist/{index.browser-D8ttddP4.esm.js.map → index.browser-DQqKPfDA.esm.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-pG1NTZ0f.js → index.native-7hiNiSyC.js} +4 -4
- package/dist/{index.native-pG1NTZ0f.js.map → index.native-7hiNiSyC.js.map} +1 -1
- package/dist/{index.native-DLziTime.esm.js → index.native-BItnSD47.esm.js} +4 -4
- package/dist/{index.native-DLziTime.esm.js.map → index.native-BItnSD47.esm.js.map} +1 -1
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-zBp7-uEw.js → phantom-wallet-provider-CjvLq_2_.js} +4 -4
- package/dist/{phantom-wallet-provider-zBp7-uEw.js.map → phantom-wallet-provider-CjvLq_2_.js.map} +1 -1
- package/dist/{phantom-wallet-provider-CP6NXRwG.esm.js → phantom-wallet-provider-DE3vit2Z.esm.js} +4 -4
- package/dist/{phantom-wallet-provider-CP6NXRwG.esm.js.map → phantom-wallet-provider-DE3vit2Z.esm.js.map} +1 -1
- package/dist/{privy-wallet-provider-CoyW5Gdg.js → privy-wallet-provider-DFZaQPss.js} +3 -3
- package/dist/{privy-wallet-provider-CoyW5Gdg.js.map → privy-wallet-provider-DFZaQPss.js.map} +1 -1
- package/dist/{privy-wallet-provider-CGYvf3-r.esm.js → privy-wallet-provider-ip2pqo_U.esm.js} +3 -3
- package/dist/{privy-wallet-provider-CGYvf3-r.esm.js.map → privy-wallet-provider-ip2pqo_U.esm.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-B8rHfsPN.esm.js → solana-mobile-wallet-provider-D7BbSpez.esm.js} +11 -48
- package/dist/solana-mobile-wallet-provider-D7BbSpez.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-CN-D_H4l.js → solana-mobile-wallet-provider-DwER68Rz.js} +11 -48
- package/dist/solana-mobile-wallet-provider-DwER68Rz.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-B5qYY4YM.js.map +0 -1
- package/dist/index-TzHXEf3-.esm.js +0 -6
- package/dist/index-TzHXEf3-.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-B8rHfsPN.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-CN-D_H4l.js.map +0 -1
|
@@ -15730,7 +15730,7 @@ async function loadDependencies() {
|
|
|
15730
15730
|
const [reactModule, reactDomModule, phantomModule] = await Promise.all([
|
|
15731
15731
|
import('react'),
|
|
15732
15732
|
import('react-dom/client'),
|
|
15733
|
-
Promise.resolve().then(function () { return require('./index-
|
|
15733
|
+
Promise.resolve().then(function () { return require('./index-BHkED2YI.js'); })
|
|
15734
15734
|
]);
|
|
15735
15735
|
// Extract default export from ESM module namespace
|
|
15736
15736
|
// Dynamic import() returns { default: Module, ...exports }, not the module directly
|
|
@@ -21357,20 +21357,11 @@ function isMwaAssociationRetryable(e) {
|
|
|
21357
21357
|
* so a second attempt skips the consent sheet, jumps straight to
|
|
21358
21358
|
* Verify/Approve, and completes inside the timeout.
|
|
21359
21359
|
*/
|
|
21360
|
-
async function withMwaAssociationRetry(
|
|
21361
|
-
const t0 = Date.now();
|
|
21362
|
-
console.log(`[MWA-DEBUG] ${label} attempt=1 start`);
|
|
21360
|
+
async function withMwaAssociationRetry(fn) {
|
|
21363
21361
|
try {
|
|
21364
|
-
|
|
21365
|
-
console.log(`[MWA-DEBUG] ${label} attempt=1 ok (${Date.now() - t0}ms)`);
|
|
21366
|
-
return result;
|
|
21362
|
+
return await fn();
|
|
21367
21363
|
}
|
|
21368
21364
|
catch (e) {
|
|
21369
|
-
const info = findMwaError(e);
|
|
21370
|
-
console.log(`[MWA-DEBUG] ${label} attempt=1 err (${Date.now() - t0}ms)`, {
|
|
21371
|
-
outer: { name: e === null || e === void 0 ? void 0 : e.name, message: e === null || e === void 0 ? void 0 : e.message },
|
|
21372
|
-
mwa: info,
|
|
21373
|
-
});
|
|
21374
21365
|
const retryable = isMwaAssociationRetryable(e);
|
|
21375
21366
|
if (!retryable)
|
|
21376
21367
|
throw e;
|
|
@@ -21379,21 +21370,11 @@ async function withMwaAssociationRetry(label, fn) {
|
|
|
21379
21370
|
// so visibility-based waits fire too early. Use a fixed delay long
|
|
21380
21371
|
// enough for Seeker to dismiss its sheet and the OS to release intent
|
|
21381
21372
|
// state. 2.5s is empirically safe; tune from device traces if needed.
|
|
21382
|
-
console.log(`[MWA-DEBUG] ${label} retryable (${retryable.code}); waiting 2500ms before retry`);
|
|
21383
21373
|
await new Promise(r => setTimeout(r, 2500));
|
|
21384
|
-
const t1 = Date.now();
|
|
21385
|
-
console.log(`[MWA-DEBUG] ${label} attempt=2 start`);
|
|
21386
21374
|
try {
|
|
21387
|
-
|
|
21388
|
-
console.log(`[MWA-DEBUG] ${label} attempt=2 ok (${Date.now() - t1}ms)`);
|
|
21389
|
-
return result;
|
|
21375
|
+
return await fn();
|
|
21390
21376
|
}
|
|
21391
21377
|
catch (e2) {
|
|
21392
|
-
const info2 = findMwaError(e2);
|
|
21393
|
-
console.log(`[MWA-DEBUG] ${label} attempt=2 err (${Date.now() - t1}ms)`, {
|
|
21394
|
-
outer: { name: e2 === null || e2 === void 0 ? void 0 : e2.name, message: e2 === null || e2 === void 0 ? void 0 : e2.message },
|
|
21395
|
-
mwa: info2,
|
|
21396
|
-
});
|
|
21397
21378
|
// Only mask the error with the clean Seeker message when the
|
|
21398
21379
|
// second failure is also an association-flavored error. If it's
|
|
21399
21380
|
// a user cancel, wallet rejection, or unknown error, rethrow
|
|
@@ -21432,7 +21413,7 @@ async function withMwaAssociationRetry(label, fn) {
|
|
|
21432
21413
|
* next tap is a new activation (a real retry). A timer-based retry would
|
|
21433
21414
|
* just hit the same Chrome block. Cap at 3 attempts before giving up.
|
|
21434
21415
|
*/
|
|
21435
|
-
async function awaitSignInGestureAndSign(
|
|
21416
|
+
async function awaitSignInGestureAndSign(theme, signFn) {
|
|
21436
21417
|
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
|
21437
21418
|
// SSR / non-browser: skip the gesture, just call (the activation
|
|
21438
21419
|
// model doesn't apply outside the browser).
|
|
@@ -21599,18 +21580,15 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
|
|
|
21599
21580
|
finishReject(new Error('User cancelled wallet sign in'));
|
|
21600
21581
|
};
|
|
21601
21582
|
closeBtn.addEventListener('click', () => {
|
|
21602
|
-
console.log(`[MWA-DEBUG] ${label} gesture: close clicked`);
|
|
21603
21583
|
handleCancel();
|
|
21604
21584
|
});
|
|
21605
21585
|
overlay.addEventListener('click', (e) => {
|
|
21606
21586
|
if (e.target === overlay) {
|
|
21607
|
-
console.log(`[MWA-DEBUG] ${label} gesture: overlay clicked (cancel)`);
|
|
21608
21587
|
handleCancel();
|
|
21609
21588
|
}
|
|
21610
21589
|
});
|
|
21611
21590
|
const onKeydown = (e) => {
|
|
21612
21591
|
if (e.key === 'Escape') {
|
|
21613
|
-
console.log(`[MWA-DEBUG] ${label} gesture: Escape pressed (cancel)`);
|
|
21614
21592
|
handleCancel();
|
|
21615
21593
|
}
|
|
21616
21594
|
};
|
|
@@ -21620,7 +21598,6 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
|
|
|
21620
21598
|
return;
|
|
21621
21599
|
attemptCount++;
|
|
21622
21600
|
const attempt = attemptCount;
|
|
21623
|
-
console.log(`[MWA-DEBUG] ${label} gesture: button click attempt=${attempt}`);
|
|
21624
21601
|
// Disable to prevent double-clicks while the wallet popup is up.
|
|
21625
21602
|
button.disabled = true;
|
|
21626
21603
|
setButtonDisabledStyle();
|
|
@@ -21632,29 +21609,17 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
|
|
|
21632
21609
|
// so Chrome's transient user activation propagates to the
|
|
21633
21610
|
// protocol's window.location.assign(associationUrl) inside
|
|
21634
21611
|
// launchAssociation(). Do not `await` before calling.
|
|
21635
|
-
const t0 = Date.now();
|
|
21636
|
-
console.log(`[MWA-DEBUG] ${label} gesture: signMessage start (attempt=${attempt})`);
|
|
21637
21612
|
signFn().then((results) => {
|
|
21638
|
-
const elapsed = Date.now() - t0;
|
|
21639
21613
|
if (!results || results.length === 0) {
|
|
21640
|
-
console.log(`[MWA-DEBUG] ${label} gesture: signMessage returned empty (attempt=${attempt}, ${elapsed}ms)`);
|
|
21641
21614
|
finishReject(new Error('MWA returned no signature'));
|
|
21642
21615
|
return;
|
|
21643
21616
|
}
|
|
21644
|
-
console.log(`[MWA-DEBUG] ${label} gesture: signMessage ok (attempt=${attempt}, ${elapsed}ms)`);
|
|
21645
21617
|
finishResolve(results[0]);
|
|
21646
21618
|
}).catch((err) => {
|
|
21647
|
-
const elapsed = Date.now() - t0;
|
|
21648
|
-
const info = findMwaError(err);
|
|
21649
|
-
console.log(`[MWA-DEBUG] ${label} gesture: signMessage err (attempt=${attempt}, ${elapsed}ms)`, {
|
|
21650
|
-
outer: { name: err === null || err === void 0 ? void 0 : err.name, message: err === null || err === void 0 ? void 0 : err.message },
|
|
21651
|
-
mwa: info,
|
|
21652
|
-
});
|
|
21653
21619
|
const retryable = isMwaAssociationRetryable(err);
|
|
21654
21620
|
if (retryable && attempt < MAX_ATTEMPTS) {
|
|
21655
21621
|
// Re-enable the button so the user's next tap provides a
|
|
21656
21622
|
// fresh user activation. Show inline error text.
|
|
21657
|
-
console.log(`[MWA-DEBUG] ${label} gesture: retryable (${retryable.code}); awaiting user tap to retry (attempt ${attempt}/${MAX_ATTEMPTS})`);
|
|
21658
21623
|
button.disabled = false;
|
|
21659
21624
|
setButtonEnabledStyle();
|
|
21660
21625
|
button.textContent = originalText;
|
|
@@ -21664,7 +21629,6 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
|
|
|
21664
21629
|
}
|
|
21665
21630
|
if (retryable) {
|
|
21666
21631
|
// Hit the attempt cap with a still-retryable failure.
|
|
21667
|
-
console.log(`[MWA-DEBUG] ${label} gesture: retryable but attempt cap reached (${attempt})`);
|
|
21668
21632
|
finishReject(new Error("Couldn't connect to your Seeker wallet. Please try again."));
|
|
21669
21633
|
return;
|
|
21670
21634
|
}
|
|
@@ -21673,7 +21637,6 @@ async function awaitSignInGestureAndSign(label, theme, signFn) {
|
|
|
21673
21637
|
finishReject(err);
|
|
21674
21638
|
});
|
|
21675
21639
|
});
|
|
21676
|
-
console.log(`[MWA-DEBUG] ${label} gesture: modal shown`);
|
|
21677
21640
|
});
|
|
21678
21641
|
}
|
|
21679
21642
|
/**
|
|
@@ -21817,7 +21780,7 @@ async function registerMobileWalletAdapter(config) {
|
|
|
21817
21780
|
if (typeof window === 'undefined')
|
|
21818
21781
|
return;
|
|
21819
21782
|
try {
|
|
21820
|
-
const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-
|
|
21783
|
+
const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-DD8pg_L2.js'); });
|
|
21821
21784
|
const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
|
|
21822
21785
|
if (!registerMwa) {
|
|
21823
21786
|
console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
|
|
@@ -21844,7 +21807,7 @@ async function registerMobileWalletAdapter(config) {
|
|
|
21844
21807
|
// SolanaMobileWalletProvider.ensureWallet() for why. Consumers that
|
|
21845
21808
|
// want their own UX can pass config.onWalletNotFound.
|
|
21846
21809
|
options.onWalletNotFound = (_b = config === null || config === void 0 ? void 0 : config.onWalletNotFound) !== null && _b !== void 0 ? _b : (async () => {
|
|
21847
|
-
|
|
21810
|
+
// intentional no-op
|
|
21848
21811
|
});
|
|
21849
21812
|
registerMwa(options);
|
|
21850
21813
|
}
|
|
@@ -21909,7 +21872,7 @@ class SolanaMobileWalletProvider {
|
|
|
21909
21872
|
async ensureWallet() {
|
|
21910
21873
|
if (this.wallet)
|
|
21911
21874
|
return this.wallet;
|
|
21912
|
-
const mod = await Promise.resolve().then(function () { return require('./index.browser-
|
|
21875
|
+
const mod = await Promise.resolve().then(function () { return require('./index.browser-DD8pg_L2.js'); });
|
|
21913
21876
|
const chain = mapChainToWalletStandard(this.cluster);
|
|
21914
21877
|
this.wallet = new mod.LocalSolanaMobileWalletAdapterWallet({
|
|
21915
21878
|
appIdentity: this.appIdentity,
|
|
@@ -21923,7 +21886,7 @@ class SolanaMobileWalletProvider {
|
|
|
21923
21886
|
// login()'s withMwaAssociationRetry handles this case; on second
|
|
21924
21887
|
// failure it surfaces a clean error message to the host app.
|
|
21925
21888
|
onWalletNotFound: async () => {
|
|
21926
|
-
|
|
21889
|
+
// intentional no-op
|
|
21927
21890
|
},
|
|
21928
21891
|
});
|
|
21929
21892
|
return this.wallet;
|
|
@@ -21997,7 +21960,7 @@ class SolanaMobileWalletProvider {
|
|
|
21997
21960
|
// consent on the second pass and completes quickly. See
|
|
21998
21961
|
// withMwaAssociationRetry for details.
|
|
21999
21962
|
const connectFeat = getConnectFeature(wallet);
|
|
22000
|
-
const { accounts } = await withMwaAssociationRetry(
|
|
21963
|
+
const { accounts } = await withMwaAssociationRetry(() => connectFeat.connect());
|
|
22001
21964
|
if (!accounts || accounts.length === 0) {
|
|
22002
21965
|
throw new Error('MWA returned no accounts');
|
|
22003
21966
|
}
|
|
@@ -22030,7 +21993,7 @@ class SolanaMobileWalletProvider {
|
|
|
22030
21993
|
const messageText = await genSolanaMessage(base58Addr, nonce);
|
|
22031
21994
|
const messageBytes = getPlatform().textEncode(messageText);
|
|
22032
21995
|
const signMessageFeat = getSignMessageFeature(wallet);
|
|
22033
|
-
const signResult = await awaitSignInGestureAndSign(
|
|
21996
|
+
const signResult = await awaitSignInGestureAndSign(this.config.theme, () => signMessageFeat.signMessage({ account, message: messageBytes }));
|
|
22034
21997
|
if (!signResult) {
|
|
22035
21998
|
throw new Error('MWA returned no signature');
|
|
22036
21999
|
}
|
|
@@ -22844,4 +22807,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
|
|
|
22844
22807
|
exports.signTransaction = signTransaction;
|
|
22845
22808
|
exports.subscribe = subscribe;
|
|
22846
22809
|
exports.useAuth = useAuth;
|
|
22847
|
-
//# sourceMappingURL=index-
|
|
22810
|
+
//# sourceMappingURL=index-hEc5_KoM.js.map
|