@bounded-sh/client 0.0.14 → 0.0.15
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.js +12 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -35
- package/dist/index.mjs.map +1 -1
- package/dist/{index.native-B4qib0WI.mjs → index.native-CAygEkU7.mjs} +16 -39
- package/dist/index.native-CAygEkU7.mjs.map +1 -0
- package/dist/{index.native-fDOSSF3W.js → index.native-zD2ZzCLO.js} +16 -39
- package/dist/index.native-zD2ZzCLO.js.map +1 -0
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{phantom-wallet-provider-DGvW6ecv.mjs → phantom-wallet-provider-DU4WPFPM.mjs} +2 -2
- package/dist/{phantom-wallet-provider-DGvW6ecv.mjs.map → phantom-wallet-provider-DU4WPFPM.mjs.map} +1 -1
- package/dist/{phantom-wallet-provider-B4iCTaUq.js → phantom-wallet-provider-MW2H0SFY.js} +2 -2
- package/dist/{phantom-wallet-provider-B4iCTaUq.js.map → phantom-wallet-provider-MW2H0SFY.js.map} +1 -1
- package/dist/{privy-wallet-provider-CpA0SzjA.mjs → privy-wallet-provider-D5Kdp3Qp.mjs} +3 -3
- package/dist/{privy-wallet-provider-CpA0SzjA.mjs.map → privy-wallet-provider-D5Kdp3Qp.mjs.map} +1 -1
- package/dist/{privy-wallet-provider-B3FEM7RO.js → privy-wallet-provider-dFxuvDf4.js} +3 -3
- package/dist/{privy-wallet-provider-B3FEM7RO.js.map → privy-wallet-provider-dFxuvDf4.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-B-Ue0EG9.mjs → solana-mobile-wallet-provider-CLiflgPj.mjs} +2 -2
- package/dist/{solana-mobile-wallet-provider-B-Ue0EG9.mjs.map → solana-mobile-wallet-provider-CLiflgPj.mjs.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-CWidNUHT.js → solana-mobile-wallet-provider-DAR0BLTQ.js} +2 -2
- package/dist/{solana-mobile-wallet-provider-CWidNUHT.js.map → solana-mobile-wallet-provider-DAR0BLTQ.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index.native-B4qib0WI.mjs.map +0 -1
- package/dist/index.native-fDOSSF3W.js.map +0 -1
|
@@ -10153,24 +10153,19 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
|
|
|
10153
10153
|
/* ------------------------------------------------------------------ */
|
|
10154
10154
|
/* ENV helpers */
|
|
10155
10155
|
/* ------------------------------------------------------------------ */
|
|
10156
|
-
// Canonical `BOUNDED_PRIVATE_KEY` (matches the CLI)
|
|
10157
|
-
//
|
|
10158
|
-
|
|
10159
|
-
const
|
|
10156
|
+
// Canonical `BOUNDED_PRIVATE_KEY` (matches the CLI). Only consulted when no
|
|
10157
|
+
// explicit keypair was provided (createWalletClient passes one).
|
|
10158
|
+
const ENV_KEYPAIR = "BOUNDED_PRIVATE_KEY";
|
|
10159
|
+
const LEGACY_ENV_KEYPAIR = "BOUNDED_SOLANA_KEYPAIR";
|
|
10160
10160
|
function loadKeypairFromEnv() {
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
const v = process.env[name];
|
|
10165
|
-
if (v) {
|
|
10166
|
-
secret = v;
|
|
10167
|
-
found = name;
|
|
10168
|
-
break;
|
|
10169
|
-
}
|
|
10161
|
+
if (process.env[LEGACY_ENV_KEYPAIR]) {
|
|
10162
|
+
throw new Error(`${LEGACY_ENV_KEYPAIR} is no longer supported. Set ${ENV_KEYPAIR} instead, ` +
|
|
10163
|
+
`or pass an explicit keypair via createWalletClient({ keypair }).`);
|
|
10170
10164
|
}
|
|
10165
|
+
const secret = process.env[ENV_KEYPAIR];
|
|
10171
10166
|
if (!secret) {
|
|
10172
10167
|
throw new Error(`No server keypair for this top-level call. The top-level get/set/subscribe/etc. use an ` +
|
|
10173
|
-
`AMBIENT session — set ${
|
|
10168
|
+
`AMBIENT session — set ${ENV_KEYPAIR} to a base-58 secret key (or JSON array) to provide one. ` +
|
|
10174
10169
|
`If you already created a wallet with createWalletClient({ keypair }), call ITS methods instead ` +
|
|
10175
10170
|
`(client.subscribe / client.set / client.get): that client is self-contained and deliberately does ` +
|
|
10176
10171
|
`not set the ambient session, so the top-level functions can't see it.`);
|
|
@@ -10182,7 +10177,7 @@ function loadKeypairFromEnv() {
|
|
|
10182
10177
|
return Keypair.fromSecretKey(secretKey);
|
|
10183
10178
|
}
|
|
10184
10179
|
catch (err) {
|
|
10185
|
-
throw new Error(`Unable to parse ${
|
|
10180
|
+
throw new Error(`Unable to parse ${ENV_KEYPAIR}. Ensure it is valid base-58 or JSON.`);
|
|
10186
10181
|
}
|
|
10187
10182
|
}
|
|
10188
10183
|
/* ------------------------------------------------------------------ */
|
|
@@ -10249,7 +10244,7 @@ class ServerSessionManager {
|
|
|
10249
10244
|
this.session = session;
|
|
10250
10245
|
}
|
|
10251
10246
|
/* ---------------------------------------------- *
|
|
10252
|
-
* CLEAR (e.g. after logout
|
|
10247
|
+
* CLEAR (e.g. after explicit logout)
|
|
10253
10248
|
* ---------------------------------------------- */
|
|
10254
10249
|
clearSession() {
|
|
10255
10250
|
this.session = null;
|
|
@@ -10273,11 +10268,6 @@ class ServerSessionManager {
|
|
|
10273
10268
|
/* The default singleton instance (reads keypair from env) */
|
|
10274
10269
|
ServerSessionManager.instance = new ServerSessionManager();
|
|
10275
10270
|
|
|
10276
|
-
var serverSessionManager = /*#__PURE__*/Object.freeze({
|
|
10277
|
-
__proto__: null,
|
|
10278
|
-
ServerSessionManager: ServerSessionManager
|
|
10279
|
-
});
|
|
10280
|
-
|
|
10281
10271
|
/**
|
|
10282
10272
|
* Safe base64 helpers for bounded-core.
|
|
10283
10273
|
*
|
|
@@ -10502,13 +10492,6 @@ async function refreshAuthSessionOnce(appId, isServer) {
|
|
|
10502
10492
|
async function makeApiRequest(method, urlPath, data, _overrides) {
|
|
10503
10493
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
10504
10494
|
const config = await getConfig();
|
|
10505
|
-
let hasRetriedAfterServerSessionReset = false;
|
|
10506
|
-
const clearServerSession = async () => {
|
|
10507
|
-
if (!config.isServer)
|
|
10508
|
-
return;
|
|
10509
|
-
const { ServerSessionManager } = await Promise.resolve().then(function () { return serverSessionManager; });
|
|
10510
|
-
ServerSessionManager.instance.clearSession();
|
|
10511
|
-
};
|
|
10512
10495
|
async function executeRequest() {
|
|
10513
10496
|
var _a;
|
|
10514
10497
|
// When _getAuthHeaders is provided (wallet client), use it as the sole auth source.
|
|
@@ -10558,13 +10541,7 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
|
|
|
10558
10541
|
}
|
|
10559
10542
|
return await executeRequest();
|
|
10560
10543
|
}
|
|
10561
|
-
catch (
|
|
10562
|
-
// Server-side fallback: clear global session and retry once
|
|
10563
|
-
if (config.isServer && !hasRetriedAfterServerSessionReset) {
|
|
10564
|
-
hasRetriedAfterServerSessionReset = true;
|
|
10565
|
-
await clearServerSession();
|
|
10566
|
-
return await executeRequest();
|
|
10567
|
-
}
|
|
10544
|
+
catch (_j) {
|
|
10568
10545
|
throw error;
|
|
10569
10546
|
}
|
|
10570
10547
|
}
|
|
@@ -19019,17 +18996,17 @@ function clearIncompatibleSession() {
|
|
|
19019
18996
|
// Lazy loaders for web-only providers.
|
|
19020
18997
|
// Using dynamic import() ensures Metro (RN) never resolves these modules.
|
|
19021
18998
|
async function loadPhantomWalletProvider() {
|
|
19022
|
-
const mod = await import('./phantom-wallet-provider-
|
|
18999
|
+
const mod = await import('./phantom-wallet-provider-DU4WPFPM.mjs');
|
|
19023
19000
|
return { PhantomWalletProvider: mod.PhantomWalletProvider };
|
|
19024
19001
|
}
|
|
19025
19002
|
// Web Privy provider (depends on react-dom + @privy-io/react-auth). Lazy so Metro
|
|
19026
19003
|
// never bundles it into the RN build — RN uses the @privy-io/expo provider instead.
|
|
19027
19004
|
async function loadPrivyWalletProvider() {
|
|
19028
|
-
const mod = await import('./privy-wallet-provider-
|
|
19005
|
+
const mod = await import('./privy-wallet-provider-D5Kdp3Qp.mjs');
|
|
19029
19006
|
return mod.PrivyWalletProvider;
|
|
19030
19007
|
}
|
|
19031
19008
|
async function loadSolanaMobileWalletProvider() {
|
|
19032
|
-
const mod = await import('./solana-mobile-wallet-provider-
|
|
19009
|
+
const mod = await import('./solana-mobile-wallet-provider-CLiflgPj.mjs');
|
|
19033
19010
|
return mod.SolanaMobileWalletProvider;
|
|
19034
19011
|
}
|
|
19035
19012
|
async function hotSwapToMWAProvider(config) {
|
|
@@ -20032,4 +20009,4 @@ class PrivyExpoProvider {
|
|
|
20032
20009
|
}
|
|
20033
20010
|
|
|
20034
20011
|
export { signTransaction as $, sendEmailOtp as A, sendTextOtp as B, verifyEmailOtp as C, verifyTextOtp as D, linkEmail as E, loginWithPrivy as F, loginWithRedirect as G, linkWithRedirect as H, completeLoginFromRedirect as I, loginWithPopup as J, completeLoginInPopup as K, get as L, getMany as M, docId as N, set as O, setMany as P, setFile as Q, getFiles as R, SOLANA_DEVNET_RPC_URL as S, search as T, queryAggregate as U, runQuery as V, WebSessionManager as W, runQueryMany as X, runExpression as Y, runExpressionMany as Z, signMessage as _, buildSetDocumentsTransaction as a, signAndSubmitTransaction as a0, count as a1, aggregate as a2, subscribe as a3, useAuth as a4, deserializeTransaction as a5, getIdToken as a6, setPlatform as a7, MockAuthProvider as a8, DEFAULT_TEST_ADDRESS as a9, refreshSession as aA, resetRealtimeStore as aB, revokeSession as aC, serverTimestamp as aD, signSessionCreateMessage as aE, subscribeView as aF, toMillis as aG, toSeconds as aH, withEffects as aI, wsDelete as aJ, wsGet as aK, wsGetMany as aL, wsQuery as aM, wsSet as aN, index as aO, OffchainAuthProvider as aa, PrivyExpoProvider as ab, EFFECT_INTENT_ADDRESS as ac, FunctionInvokeError as ad, InsufficientBalanceError as ae, LiveIntentError as af, ReactNativeSessionManager as ag, RealtimeStore as ah, ServerSessionManager as ai, clearCache as aj, closeAllSubscriptions as ak, defineLiveModule as al, deriveUserIdentityFromIdToken as am, functions as an, getCachedData as ao, getRealtimeStore as ap, getWebhookKeysUrl as aq, hasActiveConnection as ar, increment as as, invoke as at, isEffectResult as au, live as av, intent as aw, status as ax, now as ay, reconnectWithNewAuth as az, bufferExports as b, convertRemainingAccounts as c, confirmAndCheckTransaction as d, SOLANA_MAINNET_RPC_URL as e, SURFNET_RPC_URL$1 as f, detectMobile as g, detectAndroid as h, getPlatform as i, setAuthLoading as j, genAuthNonce as k, genSolanaMessage as l, createSessionWithSignature as m, getActiveSessionManager as n, bs58 as o, init as p, getCurrentUser as q, onAuthStateChanged as r, setCurrentUser as s, onAuthLoadingChanged as t, getAuthLoading as u, login as v, logout as w, getConfig as x, getAuthProvider as y, signInAnonymously as z };
|
|
20035
|
-
//# sourceMappingURL=index.native-
|
|
20012
|
+
//# sourceMappingURL=index.native-CAygEkU7.mjs.map
|