@bounded-sh/client 0.0.21 → 0.0.23
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 +28 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -9
- package/dist/index.mjs.map +1 -1
- package/dist/{index.native-N3xLU862.mjs → index.native-D1YQ-LU7.mjs} +32 -13
- package/dist/index.native-D1YQ-LU7.mjs.map +1 -0
- package/dist/{index.native-DdKzAUjN.js → index.native-DcetyeOb.js} +32 -13
- 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-DcE4A2_e.mjs → phantom-wallet-provider-3_IulJlh.mjs} +2 -2
- package/dist/{phantom-wallet-provider-DcE4A2_e.mjs.map → phantom-wallet-provider-3_IulJlh.mjs.map} +1 -1
- package/dist/{phantom-wallet-provider-Dz9lQvNv.js → phantom-wallet-provider-DgBk6o3j.js} +2 -2
- package/dist/{phantom-wallet-provider-Dz9lQvNv.js.map → phantom-wallet-provider-DgBk6o3j.js.map} +1 -1
- package/dist/{privy-wallet-provider-DUvjxNXK.js → privy-wallet-provider-DNvtYCsQ.js} +3 -3
- package/dist/{privy-wallet-provider-DUvjxNXK.js.map → privy-wallet-provider-DNvtYCsQ.js.map} +1 -1
- package/dist/{privy-wallet-provider-oG3o5vko.mjs → privy-wallet-provider-DQtXFGFF.mjs} +3 -3
- package/dist/{privy-wallet-provider-oG3o5vko.mjs.map → privy-wallet-provider-DQtXFGFF.mjs.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-DdBoG6c2.js → solana-mobile-wallet-provider-CcnkDdgZ.js} +2 -2
- package/dist/{solana-mobile-wallet-provider-DdBoG6c2.js.map → solana-mobile-wallet-provider-CcnkDdgZ.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-aS60_GZR.mjs → solana-mobile-wallet-provider-DE_zCpKE.mjs} +2 -2
- package/dist/{solana-mobile-wallet-provider-aS60_GZR.mjs.map → solana-mobile-wallet-provider-DE_zCpKE.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/index.native-DdKzAUjN.js.map +0 -1
- package/dist/index.native-N3xLU862.mjs.map +0 -1
|
@@ -3971,13 +3971,24 @@ function createEmailModalTree() {
|
|
|
3971
3971
|
const mark = document.createElement('span');
|
|
3972
3972
|
mark.className = 'ba-mark';
|
|
3973
3973
|
mark.setAttribute('aria-hidden', 'true');
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3974
|
+
const svgNs = 'http://www.w3.org/2000/svg';
|
|
3975
|
+
const markSvg = document.createElementNS(svgNs, 'svg');
|
|
3976
|
+
markSvg.setAttribute('width', '24');
|
|
3977
|
+
markSvg.setAttribute('height', '24');
|
|
3978
|
+
markSvg.setAttribute('viewBox', '0 0 32 32');
|
|
3979
|
+
markSvg.setAttribute('fill', 'none');
|
|
3980
|
+
for (const [className, d] of [
|
|
3981
|
+
['ba-c ba-c1', 'M16 5 H5 V16'],
|
|
3982
|
+
['ba-c ba-c2', 'M16 5 H27 V16'],
|
|
3983
|
+
['ba-c ba-c3', 'M5 16 V27 H16'],
|
|
3984
|
+
['ba-c ba-c4', 'M27 16 V27 H16'],
|
|
3985
|
+
]) {
|
|
3986
|
+
const path = document.createElementNS(svgNs, 'path');
|
|
3987
|
+
path.setAttribute('class', className);
|
|
3988
|
+
path.setAttribute('d', d);
|
|
3989
|
+
markSvg.appendChild(path);
|
|
3990
|
+
}
|
|
3991
|
+
mark.appendChild(markSvg);
|
|
3981
3992
|
brand.appendChild(mark);
|
|
3982
3993
|
const word = document.createElement('span');
|
|
3983
3994
|
word.className = 'ba-word';
|
|
@@ -4211,6 +4222,14 @@ function tokenField(data, snake, camel) {
|
|
|
4211
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];
|
|
4212
4223
|
return typeof value === 'string' ? value : '';
|
|
4213
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
|
+
}
|
|
4214
4233
|
async function issuerBase() {
|
|
4215
4234
|
const cfg = await getConfig();
|
|
4216
4235
|
return (cfg.humanAuthApiUrl || 'https://auth.bounded.sh').replace(/\/$/, '');
|
|
@@ -4315,7 +4334,7 @@ async function finishGuestLinkIfPending(socialIdToken) {
|
|
|
4315
4334
|
return null; // link failed -> keep the plain social session
|
|
4316
4335
|
const upgraded = userFromIdToken(idToken);
|
|
4317
4336
|
const accessToken = tokenField(data, 'access_token', 'accessToken') || idToken;
|
|
4318
|
-
const refreshToken =
|
|
4337
|
+
const refreshToken = boundedRefreshTokenField(data);
|
|
4319
4338
|
await sessionManager().storeSession(String(upgraded.address || ''), accessToken, idToken, refreshToken, base);
|
|
4320
4339
|
setCurrentUser(upgraded);
|
|
4321
4340
|
return upgraded;
|
|
@@ -4456,7 +4475,7 @@ async function exchangeCode(code, verifier, redirectUri) {
|
|
|
4456
4475
|
if (!idToken)
|
|
4457
4476
|
throw new Error('No id_token returned from the token endpoint');
|
|
4458
4477
|
const accessToken = tokenField(data, 'access_token', 'accessToken') || idToken;
|
|
4459
|
-
const refreshToken =
|
|
4478
|
+
const refreshToken = boundedRefreshTokenField(data);
|
|
4460
4479
|
const user = userFromIdToken(idToken);
|
|
4461
4480
|
await sessionManager().storeSession(String(user.address || ''), accessToken, idToken, refreshToken, base);
|
|
4462
4481
|
try {
|
|
@@ -4570,17 +4589,17 @@ function clearIncompatibleSession() {
|
|
|
4570
4589
|
// Lazy loaders for web-only providers.
|
|
4571
4590
|
// Using dynamic import() ensures Metro (RN) never resolves these modules.
|
|
4572
4591
|
async function loadPhantomWalletProvider() {
|
|
4573
|
-
const mod = await import('./phantom-wallet-provider-
|
|
4592
|
+
const mod = await import('./phantom-wallet-provider-3_IulJlh.mjs');
|
|
4574
4593
|
return { PhantomWalletProvider: mod.PhantomWalletProvider };
|
|
4575
4594
|
}
|
|
4576
4595
|
// Web Privy provider (depends on react-dom + @privy-io/react-auth). Lazy so Metro
|
|
4577
4596
|
// never bundles it into the RN build — RN uses the @privy-io/expo provider instead.
|
|
4578
4597
|
async function loadPrivyWalletProvider() {
|
|
4579
|
-
const mod = await import('./privy-wallet-provider-
|
|
4598
|
+
const mod = await import('./privy-wallet-provider-DQtXFGFF.mjs');
|
|
4580
4599
|
return mod.PrivyWalletProvider;
|
|
4581
4600
|
}
|
|
4582
4601
|
async function loadSolanaMobileWalletProvider() {
|
|
4583
|
-
const mod = await import('./solana-mobile-wallet-provider-
|
|
4602
|
+
const mod = await import('./solana-mobile-wallet-provider-DE_zCpKE.mjs');
|
|
4584
4603
|
return mod.SolanaMobileWalletProvider;
|
|
4585
4604
|
}
|
|
4586
4605
|
function requireWebPrivyConfig(config) {
|
|
@@ -5622,4 +5641,4 @@ class PrivyExpoProvider {
|
|
|
5622
5641
|
}
|
|
5623
5642
|
|
|
5624
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 };
|
|
5625
|
-
//# sourceMappingURL=index.native-
|
|
5644
|
+
//# sourceMappingURL=index.native-D1YQ-LU7.mjs.map
|