@pooflabs/web 0.0.92 → 0.0.93
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 +7 -0
- package/dist/auth/providers/offchain-auth-provider.d.ts +1 -0
- package/dist/auth/providers/privy-wallet-provider.d.ts +7 -0
- package/dist/{index-dEUHmDSl.esm.js → index-BJhw8pOb.esm.js} +2 -2
- package/dist/{index-dEUHmDSl.esm.js.map → index-BJhw8pOb.esm.js.map} +1 -1
- package/dist/index-BQN3A4SI.esm.js +6 -0
- package/dist/index-BQN3A4SI.esm.js.map +1 -0
- package/dist/{index-GeHpO_Ud.js → index-BRKarMUo.js} +54 -5
- package/dist/index-BRKarMUo.js.map +1 -0
- package/dist/{index-m53xb2JA.js → index-Baq-MUI8.js} +3 -3
- package/dist/{index-m53xb2JA.js.map → index-Baq-MUI8.js.map} +1 -1
- package/dist/{index-vi52dsn6.js → index-CDoDnDyA.js} +2 -2
- package/dist/{index-vi52dsn6.js.map → index-CDoDnDyA.js.map} +1 -1
- package/dist/{index-6iINLG88.esm.js → index-DbX66ch3.esm.js} +53 -6
- package/dist/index-DbX66ch3.esm.js.map +1 -0
- package/dist/{index-eFFOC8cE.js → index-Dw03bD6R.js} +2 -2
- package/dist/index-Dw03bD6R.js.map +1 -0
- package/dist/{index-Dg3y_pRI.esm.js → index-beZzBYpc.esm.js} +3 -3
- package/dist/{index-Dg3y_pRI.esm.js.map → index-beZzBYpc.esm.js.map} +1 -1
- package/dist/{index.browser-wZkBhwtI.esm.js → index.browser-BSQvgdMT.esm.js} +2 -2
- package/dist/{index.browser-wZkBhwtI.esm.js.map → index.browser-BSQvgdMT.esm.js.map} +1 -1
- package/dist/{index.browser-B1Zbn8LC.js → index.browser-Bmi3o9v0.js} +2 -2
- package/dist/{index.browser-B1Zbn8LC.js.map → index.browser-Bmi3o9v0.js.map} +1 -1
- package/dist/{index.browser-D6XPhu6r.js → index.browser-CI4TkG8U.js} +2 -2
- package/dist/{index.browser-D6XPhu6r.js.map → index.browser-CI4TkG8U.js.map} +1 -1
- package/dist/{index.browser-RwalL3F4.esm.js → index.browser-D15wyxan.esm.js} +2 -2
- package/dist/{index.browser-RwalL3F4.esm.js.map → index.browser-D15wyxan.esm.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/{index.native-Dd783Qva.esm.js → index.native-0P9dPMFG.esm.js} +18 -5
- package/dist/index.native-0P9dPMFG.esm.js.map +1 -0
- package/dist/{index.native-Bjx72Wnj.js → index.native-DIXtlrL_.js} +18 -5
- package/dist/index.native-DIXtlrL_.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-Dloixy8s.esm.js → phantom-wallet-provider-44BDf-tk.esm.js} +4 -4
- package/dist/{phantom-wallet-provider-Dloixy8s.esm.js.map → phantom-wallet-provider-44BDf-tk.esm.js.map} +1 -1
- package/dist/{phantom-wallet-provider-DUVViY9g.js → phantom-wallet-provider-DV12qfW6.js} +4 -4
- package/dist/{phantom-wallet-provider-DUVViY9g.js.map → phantom-wallet-provider-DV12qfW6.js.map} +1 -1
- package/dist/{privy-wallet-provider-CEdQMBT2.js → privy-wallet-provider-CQnyjLEI.js} +22 -3
- package/dist/{privy-wallet-provider-CEdQMBT2.js.map → privy-wallet-provider-CQnyjLEI.js.map} +1 -1
- package/dist/{privy-wallet-provider-BQbIRyXF.esm.js → privy-wallet-provider-CzoLQPiq.esm.js} +22 -3
- package/dist/{privy-wallet-provider-BQbIRyXF.esm.js.map → privy-wallet-provider-CzoLQPiq.esm.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-ARvDWjP7.esm.js → solana-mobile-wallet-provider-BbvaCCuE.esm.js} +4 -4
- package/dist/{solana-mobile-wallet-provider-ARvDWjP7.esm.js.map → solana-mobile-wallet-provider-BbvaCCuE.esm.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-CgQWQ7Sk.js → solana-mobile-wallet-provider-BmXTQow5.js} +4 -4
- package/dist/{solana-mobile-wallet-provider-CgQWQ7Sk.js.map → solana-mobile-wallet-provider-BmXTQow5.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-6iINLG88.esm.js.map +0 -1
- package/dist/index-CWD6VMLX.esm.js +0 -6
- package/dist/index-CWD6VMLX.esm.js.map +0 -1
- package/dist/index-GeHpO_Ud.js.map +0 -1
- package/dist/index-eFFOC8cE.js.map +0 -1
- package/dist/index.native-Bjx72Wnj.js.map +0 -1
- package/dist/index.native-Dd783Qva.esm.js.map +0 -1
|
@@ -13142,6 +13142,15 @@ class OffchainAuthProvider {
|
|
|
13142
13142
|
async getNativeMethods() {
|
|
13143
13143
|
return this.wrappedProvider.getNativeMethods();
|
|
13144
13144
|
}
|
|
13145
|
+
// Forward wallet export to the wrapped provider (only Privy embedded wallets
|
|
13146
|
+
// implement it). Duck-typed so wrappers around non-embedded providers throw
|
|
13147
|
+
// a clear error rather than a "not a function" crash.
|
|
13148
|
+
async exportWallet(address) {
|
|
13149
|
+
if (typeof this.wrappedProvider.exportWallet !== 'function') {
|
|
13150
|
+
throw new Error('Wallet export is not available for this wallet.');
|
|
13151
|
+
}
|
|
13152
|
+
await this.wrappedProvider.exportWallet(address);
|
|
13153
|
+
}
|
|
13145
13154
|
// ============ signMessage delegates to wrapped provider ============
|
|
13146
13155
|
async signMessage(message) {
|
|
13147
13156
|
// Delegate to wrapped provider for real wallet signing
|
|
@@ -14112,7 +14121,11 @@ async function login$1(options) {
|
|
|
14112
14121
|
return null;
|
|
14113
14122
|
}
|
|
14114
14123
|
function getCurrentAuthMethod() {
|
|
14115
|
-
|
|
14124
|
+
// Fall back to the persisted login method so consumers (e.g. a "show export
|
|
14125
|
+
// wallet" gate) get the correct value synchronously on reload, before init()
|
|
14126
|
+
// has rebuilt the in-memory provider. The stored value is cleared on logout,
|
|
14127
|
+
// so a logged-out user still yields null.
|
|
14128
|
+
return currentAuthMethod !== null && currentAuthMethod !== void 0 ? currentAuthMethod : getStoredAuthMethod();
|
|
14116
14129
|
}
|
|
14117
14130
|
async function logout$1() {
|
|
14118
14131
|
if (!currentAuthProvider) {
|
|
@@ -14123,6 +14136,21 @@ async function logout$1() {
|
|
|
14123
14136
|
currentAuthProvider = null;
|
|
14124
14137
|
currentAuthMethod = null;
|
|
14125
14138
|
}
|
|
14139
|
+
/**
|
|
14140
|
+
* Opens the active provider's wallet-export flow (Privy's hosted modal). Only
|
|
14141
|
+
* embedded (email) wallets implement `exportWallet`; external wallets (Phantom)
|
|
14142
|
+
* throw. The private key is revealed only to the user on Privy's origin — it is
|
|
14143
|
+
* never exposed to this SDK or the host app.
|
|
14144
|
+
*/
|
|
14145
|
+
async function exportWallet(address) {
|
|
14146
|
+
if (!currentAuthProvider) {
|
|
14147
|
+
throw new Error("Auth provider not initialized. Please call init() first.");
|
|
14148
|
+
}
|
|
14149
|
+
if (typeof currentAuthProvider.exportWallet !== 'function') {
|
|
14150
|
+
throw new Error("Wallet export is only available for embedded (email) wallets.");
|
|
14151
|
+
}
|
|
14152
|
+
await currentAuthProvider.exportWallet(address);
|
|
14153
|
+
}
|
|
14126
14154
|
|
|
14127
14155
|
let authProviderInstance = null;
|
|
14128
14156
|
let currentUser = null;
|
|
@@ -16799,7 +16827,7 @@ async function loadDependencies() {
|
|
|
16799
16827
|
const [reactModule, reactDomModule, phantomModule] = await Promise.all([
|
|
16800
16828
|
import('react'),
|
|
16801
16829
|
import('react-dom/client'),
|
|
16802
|
-
import('./index-
|
|
16830
|
+
import('./index-BJhw8pOb.esm.js')
|
|
16803
16831
|
]);
|
|
16804
16832
|
// Extract default export from ESM module namespace
|
|
16805
16833
|
// Dynamic import() returns { default: Module, ...exports }, not the module directly
|
|
@@ -21956,6 +21984,25 @@ class PrivyWalletProvider {
|
|
|
21956
21984
|
await this.ensureReady();
|
|
21957
21985
|
return (_a = this.privyMethods) === null || _a === void 0 ? void 0 : _a.usePrivy;
|
|
21958
21986
|
}
|
|
21987
|
+
/**
|
|
21988
|
+
* Opens Privy's hosted export modal so the user can reveal/copy the private key
|
|
21989
|
+
* for their embedded Solana wallet. The key is assembled on Privy's origin —
|
|
21990
|
+
* neither this SDK nor the host app ever receives it. Only available for Privy
|
|
21991
|
+
* embedded wallets (email login); throws otherwise.
|
|
21992
|
+
*/
|
|
21993
|
+
async exportWallet(address) {
|
|
21994
|
+
var _a, _b;
|
|
21995
|
+
await this.ensureReady({ waitForWallets: true });
|
|
21996
|
+
const exportFn = (_b = (_a = this.privyMethods) === null || _a === void 0 ? void 0 : _a.useSolanaWallets) === null || _b === void 0 ? void 0 : _b.exportWallet;
|
|
21997
|
+
if (typeof exportFn !== 'function') {
|
|
21998
|
+
throw new Error('Wallet export is not available for this wallet.');
|
|
21999
|
+
}
|
|
22000
|
+
// Default to the session's embedded wallet address so the correct wallet is
|
|
22001
|
+
// exported in any HD/multi-wallet case; omit to let Privy export index 0.
|
|
22002
|
+
const session = await WebSessionManager.getSession();
|
|
22003
|
+
const target = address !== null && address !== void 0 ? address : session === null || session === void 0 ? void 0 : session.address;
|
|
22004
|
+
await exportFn(target ? { address: target } : undefined);
|
|
22005
|
+
}
|
|
21959
22006
|
async logout() {
|
|
21960
22007
|
await this.ensureReady();
|
|
21961
22008
|
await this.privyMethods.logout();
|
|
@@ -23031,7 +23078,7 @@ async function registerMobileWalletAdapter(config) {
|
|
|
23031
23078
|
if (typeof window === 'undefined')
|
|
23032
23079
|
return;
|
|
23033
23080
|
try {
|
|
23034
|
-
const walletStandardMobile = await import('./index.browser-
|
|
23081
|
+
const walletStandardMobile = await import('./index.browser-D15wyxan.esm.js');
|
|
23035
23082
|
const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
|
|
23036
23083
|
if (!registerMwa) {
|
|
23037
23084
|
console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
|
|
@@ -23170,7 +23217,7 @@ class SolanaMobileWalletProvider {
|
|
|
23170
23217
|
async ensureWallet() {
|
|
23171
23218
|
if (this.wallet)
|
|
23172
23219
|
return this.wallet;
|
|
23173
|
-
const mod = await import('./index.browser-
|
|
23220
|
+
const mod = await import('./index.browser-D15wyxan.esm.js');
|
|
23174
23221
|
const chain = mapChainToWalletStandard(this.cluster);
|
|
23175
23222
|
this.wallet = new mod.LocalSolanaMobileWalletAdapterWallet({
|
|
23176
23223
|
appIdentity: this.appIdentity,
|
|
@@ -24362,5 +24409,5 @@ class PrivyExpoProvider {
|
|
|
24362
24409
|
}
|
|
24363
24410
|
}
|
|
24364
24411
|
|
|
24365
|
-
export {
|
|
24366
|
-
//# sourceMappingURL=index-
|
|
24412
|
+
export { createSessionWithSignature as $, count as A, aggregate as B, subscribe as C, useAuth as D, deserializeTransaction as E, getIdToken as F, setPlatform as G, getPlatform as H, PrivyWalletProvider as I, DEFAULT_TEST_ADDRESS as J, isMobileWalletAvailable as K, registerMobileWalletAdapter as L, MockAuthProvider as M, PrivyExpoProvider as N, OffchainAuthProvider as O, PhantomWalletProvider as P, InsufficientBalanceError as Q, ReactNativeSessionManager as R, SolanaMobileWalletProvider as S, RealtimeStore as T, ServerSessionManager as U, buildSetDocumentsTransaction as V, WebSessionManager as W, clearCache as X, closeAllSubscriptions as Y, convertRemainingAccounts as Z, createSessionWithPrivy as _, base58 as a, genAuthNonce as a0, genSolanaMessage as a1, getCachedData as a2, getMany as a3, getRealtimeStore as a4, hasActiveConnection as a5, reconnectWithNewAuth as a6, refreshSession as a7, resetRealtimeStore as a8, signSessionCreateMessage as a9, wsDelete as aa, wsGet as ab, wsGetMany as ac, wsQuery as ad, wsSet as ae, bufferExports as b, getCurrentUser as c, onAuthLoadingChanged as d, getAuthLoading as e, logout as f, getDefaultExportFromCjs$1 as g, getConfig as h, init as i, getAuthProvider as j, getCurrentAuthMethod as k, login as l, exportWallet as m, get as n, onAuthStateChanged as o, setMany as p, setFile as q, getFiles as r, set as s, runQuery as t, runQueryMany as u, runExpression as v, runExpressionMany as w, signMessage as x, signTransaction as y, signAndSubmitTransaction as z };
|
|
24413
|
+
//# sourceMappingURL=index-DbX66ch3.esm.js.map
|