@bounded-sh/client 0.0.22 → 0.0.24
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/README.md +24 -17
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{index.native-C9PMGtxX.mjs → index.native-D1YQ-LU7.mjs} +14 -6
- package/dist/index.native-D1YQ-LU7.mjs.map +1 -0
- package/dist/{index.native-C4a8IUpM.js → index.native-DcetyeOb.js} +14 -6
- package/dist/index.native-DcetyeOb.js.map +1 -0
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{phantom-wallet-provider-DhpV9xKE.mjs → phantom-wallet-provider-3_IulJlh.mjs} +2 -2
- package/dist/{phantom-wallet-provider-DhpV9xKE.mjs.map → phantom-wallet-provider-3_IulJlh.mjs.map} +1 -1
- package/dist/{phantom-wallet-provider-BPRRcIaN.js → phantom-wallet-provider-DgBk6o3j.js} +2 -2
- package/dist/{phantom-wallet-provider-BPRRcIaN.js.map → phantom-wallet-provider-DgBk6o3j.js.map} +1 -1
- package/dist/{privy-wallet-provider-D4W91sqG.js → privy-wallet-provider-DNvtYCsQ.js} +3 -3
- package/dist/{privy-wallet-provider-D4W91sqG.js.map → privy-wallet-provider-DNvtYCsQ.js.map} +1 -1
- package/dist/{privy-wallet-provider-B6QyPXqq.mjs → privy-wallet-provider-DQtXFGFF.mjs} +3 -3
- package/dist/{privy-wallet-provider-B6QyPXqq.mjs.map → privy-wallet-provider-DQtXFGFF.mjs.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-B0O0BctB.js → solana-mobile-wallet-provider-CcnkDdgZ.js} +2 -2
- package/dist/{solana-mobile-wallet-provider-B0O0BctB.js.map → solana-mobile-wallet-provider-CcnkDdgZ.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-OGKifgCZ.mjs → solana-mobile-wallet-provider-DE_zCpKE.mjs} +2 -2
- package/dist/{solana-mobile-wallet-provider-OGKifgCZ.mjs.map → solana-mobile-wallet-provider-DE_zCpKE.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/index.native-C4a8IUpM.js.map +0 -1
- package/dist/index.native-C9PMGtxX.mjs.map +0 -1
|
@@ -4222,6 +4222,14 @@ function tokenField(data, snake, camel) {
|
|
|
4222
4222
|
const value = (_a = data === null || data === void 0 ? void 0 : data[snake]) !== null && _a !== void 0 ? _a : data === null || data === void 0 ? void 0 : data[camel];
|
|
4223
4223
|
return typeof value === 'string' ? value : '';
|
|
4224
4224
|
}
|
|
4225
|
+
function boundedRefreshTokenField(data) {
|
|
4226
|
+
for (const key of ['bounded_refresh_token', 'boundedRefreshToken', 'refreshToken']) {
|
|
4227
|
+
const value = data === null || data === void 0 ? void 0 : data[key];
|
|
4228
|
+
if (typeof value === 'string' && value.length > 0)
|
|
4229
|
+
return value;
|
|
4230
|
+
}
|
|
4231
|
+
return '';
|
|
4232
|
+
}
|
|
4225
4233
|
async function issuerBase() {
|
|
4226
4234
|
const cfg = await getConfig();
|
|
4227
4235
|
return (cfg.humanAuthApiUrl || 'https://auth.bounded.sh').replace(/\/$/, '');
|
|
@@ -4326,7 +4334,7 @@ async function finishGuestLinkIfPending(socialIdToken) {
|
|
|
4326
4334
|
return null; // link failed -> keep the plain social session
|
|
4327
4335
|
const upgraded = userFromIdToken(idToken);
|
|
4328
4336
|
const accessToken = tokenField(data, 'access_token', 'accessToken') || idToken;
|
|
4329
|
-
const refreshToken =
|
|
4337
|
+
const refreshToken = boundedRefreshTokenField(data);
|
|
4330
4338
|
await sessionManager().storeSession(String(upgraded.address || ''), accessToken, idToken, refreshToken, base);
|
|
4331
4339
|
setCurrentUser(upgraded);
|
|
4332
4340
|
return upgraded;
|
|
@@ -4467,7 +4475,7 @@ async function exchangeCode(code, verifier, redirectUri) {
|
|
|
4467
4475
|
if (!idToken)
|
|
4468
4476
|
throw new Error('No id_token returned from the token endpoint');
|
|
4469
4477
|
const accessToken = tokenField(data, 'access_token', 'accessToken') || idToken;
|
|
4470
|
-
const refreshToken =
|
|
4478
|
+
const refreshToken = boundedRefreshTokenField(data);
|
|
4471
4479
|
const user = userFromIdToken(idToken);
|
|
4472
4480
|
await sessionManager().storeSession(String(user.address || ''), accessToken, idToken, refreshToken, base);
|
|
4473
4481
|
try {
|
|
@@ -4581,17 +4589,17 @@ function clearIncompatibleSession() {
|
|
|
4581
4589
|
// Lazy loaders for web-only providers.
|
|
4582
4590
|
// Using dynamic import() ensures Metro (RN) never resolves these modules.
|
|
4583
4591
|
async function loadPhantomWalletProvider() {
|
|
4584
|
-
const mod = await import('./phantom-wallet-provider-
|
|
4592
|
+
const mod = await import('./phantom-wallet-provider-3_IulJlh.mjs');
|
|
4585
4593
|
return { PhantomWalletProvider: mod.PhantomWalletProvider };
|
|
4586
4594
|
}
|
|
4587
4595
|
// Web Privy provider (depends on react-dom + @privy-io/react-auth). Lazy so Metro
|
|
4588
4596
|
// never bundles it into the RN build — RN uses the @privy-io/expo provider instead.
|
|
4589
4597
|
async function loadPrivyWalletProvider() {
|
|
4590
|
-
const mod = await import('./privy-wallet-provider-
|
|
4598
|
+
const mod = await import('./privy-wallet-provider-DQtXFGFF.mjs');
|
|
4591
4599
|
return mod.PrivyWalletProvider;
|
|
4592
4600
|
}
|
|
4593
4601
|
async function loadSolanaMobileWalletProvider() {
|
|
4594
|
-
const mod = await import('./solana-mobile-wallet-provider-
|
|
4602
|
+
const mod = await import('./solana-mobile-wallet-provider-DE_zCpKE.mjs');
|
|
4595
4603
|
return mod.SolanaMobileWalletProvider;
|
|
4596
4604
|
}
|
|
4597
4605
|
function requireWebPrivyConfig(config) {
|
|
@@ -5633,4 +5641,4 @@ class PrivyExpoProvider {
|
|
|
5633
5641
|
}
|
|
5634
5642
|
|
|
5635
5643
|
export { loginWithRedirect as A, linkWithRedirect as B, completeLoginFromRedirect as C, loginWithPopup as D, completeLoginInPopup as E, useAuth as F, deserializeTransaction as G, getIdToken as H, setPlatform as I, index as J, OffchainAuthProvider as O, PrivyExpoProvider as P, SURFNET_RPC_URL as S, detectAndroid as a, bufferExports as b, confirmAndCheckTransaction as c, detectMobile as d, setAuthLoading as e, resolveSolanaWalletStandardChain as f, getPlatform as g, bs58 as h, init as i, getCurrentUser as j, onAuthLoadingChanged as k, getAuthLoading as l, login as m, normalizeSolanaRpcUrl as n, onAuthStateChanged as o, logout as p, getAuthProvider as q, resolveSolanaRpcUrl as r, setCurrentUser as s, signInAnonymously as t, sendEmailOtp as u, sendTextOtp as v, verifyEmailOtp as w, verifyTextOtp as x, linkEmail as y, loginWithPrivy as z };
|
|
5636
|
-
//# sourceMappingURL=index.native-
|
|
5644
|
+
//# sourceMappingURL=index.native-D1YQ-LU7.mjs.map
|