@pooflabs/web 0.0.87 → 0.0.88
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-DofM-ue2.esm.js → index-BfsQaxom.esm.js} +2 -2
- package/dist/{index-DofM-ue2.esm.js.map → index-BfsQaxom.esm.js.map} +1 -1
- package/dist/{index-BTwX7FYW.esm.js → index-CJRFnq6O.esm.js} +63 -33
- package/dist/{index-BTwX7FYW.esm.js.map → index-CJRFnq6O.esm.js.map} +1 -1
- package/dist/{index-BKN0IwAx.js → index-CTtGbOzo.js} +2 -2
- package/dist/{index-BKN0IwAx.js.map → index-CTtGbOzo.js.map} +1 -1
- package/dist/{index-B-x9RTF7.js → index-CvNX4W0l.js} +2 -2
- package/dist/index-CvNX4W0l.js.map +1 -0
- package/dist/{index-DYBdUxnT.js → index-DBYgqO9f.js} +3 -3
- package/dist/{index-DYBdUxnT.js.map → index-DBYgqO9f.js.map} +1 -1
- package/dist/index-DpiO7Cpe.esm.js +6 -0
- package/dist/index-DpiO7Cpe.esm.js.map +1 -0
- package/dist/{index-Dj1tZr6X.js → index-Lm0k5Hwv.js} +63 -33
- package/dist/{index-Dj1tZr6X.js.map → index-Lm0k5Hwv.js.map} +1 -1
- package/dist/{index-x7a-wH2l.esm.js → index-MF_M5V0O.esm.js} +3 -3
- package/dist/{index-x7a-wH2l.esm.js.map → index-MF_M5V0O.esm.js.map} +1 -1
- package/dist/{index.browser-D7-FFk3q.js → index.browser-BCr9Sc8V.js} +2 -2
- package/dist/{index.browser-D7-FFk3q.js.map → index.browser-BCr9Sc8V.js.map} +1 -1
- package/dist/{index.browser-DlA-NKvf.js → index.browser-BxKN5pIs.js} +2 -2
- package/dist/{index.browser-DlA-NKvf.js.map → index.browser-BxKN5pIs.js.map} +1 -1
- package/dist/{index.browser-Cndx2raY.esm.js → index.browser-CGZvkfTO.esm.js} +2 -2
- package/dist/{index.browser-Cndx2raY.esm.js.map → index.browser-CGZvkfTO.esm.js.map} +1 -1
- package/dist/{index.browser-nVGFrIHK.esm.js → index.browser-CMijwVwX.esm.js} +2 -2
- package/dist/{index.browser-nVGFrIHK.esm.js.map → index.browser-CMijwVwX.esm.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-D8vj3Lbr.js → index.native-FMbSnE7i.js} +4 -4
- package/dist/{index.native-D8vj3Lbr.js.map → index.native-FMbSnE7i.js.map} +1 -1
- package/dist/{index.native-19VsREMJ.esm.js → index.native-GyqT8Dn5.esm.js} +4 -4
- package/dist/{index.native-19VsREMJ.esm.js.map → index.native-GyqT8Dn5.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-BlZZa_3s.js → phantom-wallet-provider-4_DBhDbx.js} +4 -4
- package/dist/{phantom-wallet-provider-BlZZa_3s.js.map → phantom-wallet-provider-4_DBhDbx.js.map} +1 -1
- package/dist/{phantom-wallet-provider-Bz3qEFzX.esm.js → phantom-wallet-provider-BFSfBW0w.esm.js} +4 -4
- package/dist/{phantom-wallet-provider-Bz3qEFzX.esm.js.map → phantom-wallet-provider-BFSfBW0w.esm.js.map} +1 -1
- package/dist/{privy-wallet-provider-CqCgq7uT.js → privy-wallet-provider-DRss_Hua.js} +3 -3
- package/dist/{privy-wallet-provider-CqCgq7uT.js.map → privy-wallet-provider-DRss_Hua.js.map} +1 -1
- package/dist/{privy-wallet-provider-DgNFzioA.esm.js → privy-wallet-provider-Dl0feuCb.esm.js} +3 -3
- package/dist/{privy-wallet-provider-DgNFzioA.esm.js.map → privy-wallet-provider-Dl0feuCb.esm.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-EeQsBTdr.esm.js → solana-mobile-wallet-provider-C5mN8Dxh.esm.js} +63 -33
- package/dist/solana-mobile-wallet-provider-C5mN8Dxh.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-VqIGfdMV.js → solana-mobile-wallet-provider-CAZs-TkL.js} +63 -33
- package/dist/solana-mobile-wallet-provider-CAZs-TkL.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-B-x9RTF7.js.map +0 -1
- package/dist/index-_k6pjuwx.esm.js +0 -6
- package/dist/index-_k6pjuwx.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-EeQsBTdr.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-VqIGfdMV.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DpiO7Cpe.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -15701,7 +15701,7 @@ async function loadDependencies() {
|
|
|
15701
15701
|
const [reactModule, reactDomModule, phantomModule] = await Promise.all([
|
|
15702
15702
|
import('react'),
|
|
15703
15703
|
import('react-dom/client'),
|
|
15704
|
-
Promise.resolve().then(function () { return require('./index-
|
|
15704
|
+
Promise.resolve().then(function () { return require('./index-CTtGbOzo.js'); })
|
|
15705
15705
|
]);
|
|
15706
15706
|
// Extract default export from ESM module namespace
|
|
15707
15707
|
// Dynamic import() returns { default: Module, ...exports }, not the module directly
|
|
@@ -21402,13 +21402,13 @@ async function withMwaAssociationRetry(fn) {
|
|
|
21402
21402
|
* next tap is a new activation (a real retry). A timer-based retry would
|
|
21403
21403
|
* just hit the same Chrome block. Cap at 3 attempts before giving up.
|
|
21404
21404
|
*/
|
|
21405
|
-
async function awaitSignInGestureAndSign(theme, signFn) {
|
|
21405
|
+
async function awaitSignInGestureAndSign(theme, signFn, noResultError = 'MWA returned no signature') {
|
|
21406
21406
|
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
|
21407
21407
|
// SSR / non-browser: skip the gesture, just call (the activation
|
|
21408
21408
|
// model doesn't apply outside the browser).
|
|
21409
21409
|
const results = await signFn();
|
|
21410
21410
|
if (!results || results.length === 0)
|
|
21411
|
-
throw new Error(
|
|
21411
|
+
throw new Error(noResultError);
|
|
21412
21412
|
return results[0];
|
|
21413
21413
|
}
|
|
21414
21414
|
return new Promise((resolve, reject) => {
|
|
@@ -21600,7 +21600,7 @@ async function awaitSignInGestureAndSign(theme, signFn) {
|
|
|
21600
21600
|
// launchAssociation(). Do not `await` before calling.
|
|
21601
21601
|
signFn().then((results) => {
|
|
21602
21602
|
if (!results || results.length === 0) {
|
|
21603
|
-
finishReject(new Error(
|
|
21603
|
+
finishReject(new Error(noResultError));
|
|
21604
21604
|
return;
|
|
21605
21605
|
}
|
|
21606
21606
|
finishResolve(results[0]);
|
|
@@ -21628,6 +21628,31 @@ async function awaitSignInGestureAndSign(theme, signFn) {
|
|
|
21628
21628
|
});
|
|
21629
21629
|
});
|
|
21630
21630
|
}
|
|
21631
|
+
/**
|
|
21632
|
+
* Sign through the gesture modal ONLY when transient user activation has
|
|
21633
|
+
* already decayed. Fast transactions still hold the activation from the
|
|
21634
|
+
* user's tap, so the `solana-wallet:` navigation succeeds directly with no
|
|
21635
|
+
* modal (preserves prior UX — no extra tap). Slow transactions — e.g. a swap
|
|
21636
|
+
* whose server-side build exceeds Chrome's ~5s activation window — have lost
|
|
21637
|
+
* it, so we fall back to awaitSignInGestureAndSign to mint a fresh activation
|
|
21638
|
+
* via a "Sign in" tap. Returns the first result (same shape as the bare
|
|
21639
|
+
* wallet-standard feature call and as awaitSignInGestureAndSign).
|
|
21640
|
+
*/
|
|
21641
|
+
async function signWithFreshActivation(theme, signFn, noResultError = 'MWA returned no signature') {
|
|
21642
|
+
var _a;
|
|
21643
|
+
const activationLive = typeof navigator !== 'undefined' &&
|
|
21644
|
+
((_a = navigator.userActivation) === null || _a === void 0 ? void 0 : _a.isActive) === true;
|
|
21645
|
+
if (activationLive) {
|
|
21646
|
+
// Live gesture: invoke synchronously (no await before signFn) so the
|
|
21647
|
+
// activation propagates to the protocol's location.assign navigation.
|
|
21648
|
+
const results = await signFn();
|
|
21649
|
+
if (!results || results.length === 0)
|
|
21650
|
+
throw new Error(noResultError);
|
|
21651
|
+
return results[0];
|
|
21652
|
+
}
|
|
21653
|
+
// Activation gone: surface the modal so the user's tap mints a fresh one.
|
|
21654
|
+
return awaitSignInGestureAndSign(theme, signFn, noResultError);
|
|
21655
|
+
}
|
|
21631
21656
|
/**
|
|
21632
21657
|
* Normalize a chain string to a wallet-standard Solana chain identifier.
|
|
21633
21658
|
*
|
|
@@ -21769,7 +21794,7 @@ async function registerMobileWalletAdapter(config) {
|
|
|
21769
21794
|
if (typeof window === 'undefined')
|
|
21770
21795
|
return;
|
|
21771
21796
|
try {
|
|
21772
|
-
const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-
|
|
21797
|
+
const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-BxKN5pIs.js'); });
|
|
21773
21798
|
const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
|
|
21774
21799
|
if (!registerMwa) {
|
|
21775
21800
|
console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
|
|
@@ -21908,7 +21933,7 @@ class SolanaMobileWalletProvider {
|
|
|
21908
21933
|
async ensureWallet() {
|
|
21909
21934
|
if (this.wallet)
|
|
21910
21935
|
return this.wallet;
|
|
21911
|
-
const mod = await Promise.resolve().then(function () { return require('./index.browser-
|
|
21936
|
+
const mod = await Promise.resolve().then(function () { return require('./index.browser-BxKN5pIs.js'); });
|
|
21912
21937
|
const chain = mapChainToWalletStandard(this.cluster);
|
|
21913
21938
|
this.wallet = new mod.LocalSolanaMobileWalletAdapterWallet({
|
|
21914
21939
|
appIdentity: this.appIdentity,
|
|
@@ -22386,11 +22411,10 @@ class SolanaMobileWalletProvider {
|
|
|
22386
22411
|
try {
|
|
22387
22412
|
const signTxFeat = getSignTransactionFeature(wallet);
|
|
22388
22413
|
const wireBytes = txToWireBytes(transaction);
|
|
22389
|
-
|
|
22390
|
-
if
|
|
22391
|
-
|
|
22392
|
-
}
|
|
22393
|
-
const { signedTransaction: signedBytes } = results[0];
|
|
22414
|
+
// signTransaction navigates to `solana-wallet:`; only show the
|
|
22415
|
+
// gesture modal if the tap activation has decayed (see runTransaction).
|
|
22416
|
+
const signResult = await signWithFreshActivation(this.config.theme, () => signTxFeat.signTransaction({ account, transaction: wireBytes, chain }), 'MWA returned no signed transaction');
|
|
22417
|
+
const { signedTransaction: signedBytes } = signResult;
|
|
22394
22418
|
return txFromWireBytes(new Uint8Array(signedBytes));
|
|
22395
22419
|
}
|
|
22396
22420
|
catch (error) {
|
|
@@ -22496,11 +22520,9 @@ class SolanaMobileWalletProvider {
|
|
|
22496
22520
|
// because the wallet would submit to its own RPC.
|
|
22497
22521
|
const signTxFeat = getSignTransactionFeature(wallet);
|
|
22498
22522
|
const wireBytes = txToWireBytes(transaction);
|
|
22499
|
-
|
|
22500
|
-
|
|
22501
|
-
|
|
22502
|
-
}
|
|
22503
|
-
const { signedTransaction: signedBytes } = results[0];
|
|
22523
|
+
// Gesture modal only if activation decayed (see runTransaction).
|
|
22524
|
+
const signResult = await signWithFreshActivation(this.config.theme, () => signTxFeat.signTransaction({ account, transaction: wireBytes, chain }), 'MWA returned no signed transaction');
|
|
22525
|
+
const { signedTransaction: signedBytes } = signResult;
|
|
22504
22526
|
const signedTx = txFromWireBytes(new Uint8Array(signedBytes));
|
|
22505
22527
|
const signature = await connection.sendRawTransaction(signedTx.serialize(), {
|
|
22506
22528
|
preflightCommitment: 'confirmed',
|
|
@@ -22516,18 +22538,16 @@ class SolanaMobileWalletProvider {
|
|
|
22516
22538
|
return signature;
|
|
22517
22539
|
}
|
|
22518
22540
|
// Non-Surfnet: wallet signs and submits to its own RPC.
|
|
22541
|
+
// Gesture modal only if activation decayed (see runTransaction).
|
|
22519
22542
|
const signSendFeat = getSignAndSendTransactionFeature(wallet);
|
|
22520
22543
|
const wireBytes = txToWireBytes(transaction);
|
|
22521
|
-
const
|
|
22544
|
+
const sendResult = await signWithFreshActivation(this.config.theme, () => signSendFeat.signAndSendTransaction({
|
|
22522
22545
|
account,
|
|
22523
22546
|
transaction: wireBytes,
|
|
22524
22547
|
chain,
|
|
22525
22548
|
options: { commitment: 'confirmed' },
|
|
22526
|
-
});
|
|
22527
|
-
|
|
22528
|
-
throw new Error('MWA returned no signature');
|
|
22529
|
-
}
|
|
22530
|
-
const { signature: sigBytes } = results[0];
|
|
22549
|
+
}));
|
|
22550
|
+
const { signature: sigBytes } = sendResult;
|
|
22531
22551
|
const signature = base58.encode(sigBytes);
|
|
22532
22552
|
await confirmAndCheckTransaction(connection, signature);
|
|
22533
22553
|
return signature;
|
|
@@ -22607,11 +22627,13 @@ class SolanaMobileWalletProvider {
|
|
|
22607
22627
|
if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {
|
|
22608
22628
|
const signTxFeat = getSignTransactionFeature(wallet);
|
|
22609
22629
|
const wireBytes = txToWireBytes(tx);
|
|
22610
|
-
|
|
22611
|
-
if
|
|
22630
|
+
// signTransaction also navigates to `solana-wallet:`; only
|
|
22631
|
+
// surface the gesture modal if the tap activation has decayed.
|
|
22632
|
+
const signOnlyResult = await signWithFreshActivation(this.config.theme, () => signTxFeat.signTransaction({ account, transaction: wireBytes, chain }), 'MWA returned no signed transaction');
|
|
22633
|
+
if (!signOnlyResult) {
|
|
22612
22634
|
throw new Error('MWA returned no signed transaction');
|
|
22613
22635
|
}
|
|
22614
|
-
const { signedTransaction: signedBytes } =
|
|
22636
|
+
const { signedTransaction: signedBytes } = signOnlyResult;
|
|
22615
22637
|
const signedTx = txFromWireBytes(new Uint8Array(signedBytes));
|
|
22616
22638
|
return {
|
|
22617
22639
|
signedTransaction: signedTx,
|
|
@@ -22624,11 +22646,13 @@ class SolanaMobileWalletProvider {
|
|
|
22624
22646
|
// Surfnet: sign locally via wallet-standard, submit manually.
|
|
22625
22647
|
const signTxFeat = getSignTransactionFeature(wallet);
|
|
22626
22648
|
const wireBytes = txToWireBytes(tx);
|
|
22627
|
-
|
|
22628
|
-
if
|
|
22649
|
+
// signTransaction also navigates to `solana-wallet:`; only
|
|
22650
|
+
// surface the gesture modal if the tap activation has decayed.
|
|
22651
|
+
const surfnetResult = await signWithFreshActivation(this.config.theme, () => signTxFeat.signTransaction({ account, transaction: wireBytes, chain }), 'MWA returned no signed transaction');
|
|
22652
|
+
if (!surfnetResult) {
|
|
22629
22653
|
throw new Error('MWA returned no signed transaction');
|
|
22630
22654
|
}
|
|
22631
|
-
const { signedTransaction: signedBytes } =
|
|
22655
|
+
const { signedTransaction: signedBytes } = surfnetResult;
|
|
22632
22656
|
const signedTx = txFromWireBytes(new Uint8Array(signedBytes));
|
|
22633
22657
|
const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');
|
|
22634
22658
|
const signature = await connection.sendRawTransaction(signedTx.serialize(), {
|
|
@@ -22654,18 +22678,24 @@ class SolanaMobileWalletProvider {
|
|
|
22654
22678
|
};
|
|
22655
22679
|
}
|
|
22656
22680
|
// Non-Surfnet: wallet signs and submits to its own RPC.
|
|
22681
|
+
// signAndSendTransaction dispatches a `solana-wallet:` navigation
|
|
22682
|
+
// that Chrome blocks without transient user activation. Fast txs
|
|
22683
|
+
// still hold the tap activation and navigate directly; slow ones
|
|
22684
|
+
// (e.g. a swap whose server build exceeds Chrome's ~5s window)
|
|
22685
|
+
// have lost it, so signWithFreshActivation shows the "Sign in"
|
|
22686
|
+
// modal to mint a fresh activation — no modal when not needed.
|
|
22657
22687
|
const signSendFeat = getSignAndSendTransactionFeature(wallet);
|
|
22658
22688
|
const wireBytes = txToWireBytes(tx);
|
|
22659
|
-
const
|
|
22689
|
+
const sendResult = await signWithFreshActivation(this.config.theme, () => signSendFeat.signAndSendTransaction({
|
|
22660
22690
|
account,
|
|
22661
22691
|
transaction: wireBytes,
|
|
22662
22692
|
chain,
|
|
22663
22693
|
options: { commitment: 'confirmed' },
|
|
22664
|
-
});
|
|
22665
|
-
if (!
|
|
22694
|
+
}));
|
|
22695
|
+
if (!sendResult) {
|
|
22666
22696
|
throw new Error('MWA returned no signature');
|
|
22667
22697
|
}
|
|
22668
|
-
const { signature: sigBytes } =
|
|
22698
|
+
const { signature: sigBytes } = sendResult;
|
|
22669
22699
|
const signature = base58.encode(sigBytes);
|
|
22670
22700
|
const txInfo = await confirmAndCheckTransaction(connection, signature);
|
|
22671
22701
|
return {
|
|
@@ -23152,4 +23182,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
|
|
|
23152
23182
|
exports.signTransaction = signTransaction;
|
|
23153
23183
|
exports.subscribe = subscribe;
|
|
23154
23184
|
exports.useAuth = useAuth;
|
|
23155
|
-
//# sourceMappingURL=index-
|
|
23185
|
+
//# sourceMappingURL=index-Lm0k5Hwv.js.map
|