@bounded-sh/client 0.0.56 → 0.0.57
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/REACT_NATIVE.md +31 -8
- package/dist/auth/bounded-login-widget.d.ts +25 -0
- package/dist/auth/bounded-widget-modal.d.ts +33 -0
- package/dist/auth/index.d.ts +42 -0
- package/dist/auth/oidc-auth.d.ts +18 -0
- package/dist/auth/providers/wallet-login-finalize.d.ts +17 -0
- package/dist/auth/providers/wallet-standard-discovery.d.ts +23 -0
- package/dist/auth/providers/wallet-standard-tx.d.ts +7 -0
- package/dist/auth/turnkey-auth.d.ts +17 -0
- package/dist/auth/turnkey-signer-bridge.d.ts +32 -0
- package/dist/auth/turnkey-wallet-widget.d.ts +17 -0
- package/dist/{email-auth-provider-4Df8dFOh.js → email-auth-provider-8k8iBIQL.js} +2 -2
- package/dist/{email-auth-provider-4Df8dFOh.js.map → email-auth-provider-8k8iBIQL.js.map} +1 -1
- package/dist/{email-auth-provider-CZ-xYVln.js → email-auth-provider-BlJI-8w9.js} +2 -2
- package/dist/{email-auth-provider-CZ-xYVln.js.map → email-auth-provider-BlJI-8w9.js.map} +1 -1
- package/dist/{email-auth-provider-By6SL0YS.mjs → email-auth-provider-Bmah1GWS.mjs} +2 -2
- package/dist/{email-auth-provider-By6SL0YS.mjs.map → email-auth-provider-Bmah1GWS.mjs.map} +1 -1
- package/dist/{email-auth-provider-BqX-o_sJ.mjs → email-auth-provider-CfNSS8Du.mjs} +2 -2
- package/dist/{email-auth-provider-BqX-o_sJ.mjs.map → email-auth-provider-CfNSS8Du.mjs.map} +1 -1
- package/dist/{guest-auth-provider-D9A4SU4z.js → guest-auth-provider-BRjJV8Zq.js} +2 -2
- package/dist/{guest-auth-provider-D9A4SU4z.js.map → guest-auth-provider-BRjJV8Zq.js.map} +1 -1
- package/dist/{guest-auth-provider-DWcdRvLW.js → guest-auth-provider-BjfjrpdW.js} +2 -2
- package/dist/{guest-auth-provider-DWcdRvLW.js.map → guest-auth-provider-BjfjrpdW.js.map} +1 -1
- package/dist/{guest-auth-provider-Q2wbjdHM.mjs → guest-auth-provider-D6h4eAtx.mjs} +2 -2
- package/dist/{guest-auth-provider-6bqnyX79.mjs.map → guest-auth-provider-D6h4eAtx.mjs.map} +1 -1
- package/dist/{guest-auth-provider-6bqnyX79.mjs → guest-auth-provider-DxhZ5sWN.mjs} +2 -2
- package/dist/{guest-auth-provider-Q2wbjdHM.mjs.map → guest-auth-provider-DxhZ5sWN.mjs.map} +1 -1
- package/dist/{index--jrXqxte.mjs → index-C7rOe6B2.mjs} +1572 -17
- package/dist/index-C7rOe6B2.mjs.map +1 -0
- package/dist/{index-B_uRc6gn.js → index-CnObYQhV.js} +1576 -16
- package/dist/index-CnObYQhV.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{index.native-CTVEq0VY.mjs → index.native-CQiw9baS.mjs} +83 -12
- package/dist/index.native-CQiw9baS.mjs.map +1 -0
- package/dist/{index.native-BqK-14S8.js → index.native-hu3o3zXU.js} +82 -10
- package/dist/index.native-hu3o3zXU.js.map +1 -0
- package/dist/index.native.d.ts +2 -0
- package/dist/index.native.js +2 -1
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{injected-evm-wallet-provider-xZ01LIw2.js → injected-evm-wallet-provider-CcwS6p3o.js} +2 -2
- package/dist/{injected-evm-wallet-provider-xZ01LIw2.js.map → injected-evm-wallet-provider-CcwS6p3o.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-BZPmj8bC.mjs → injected-evm-wallet-provider-DCGnUedJ.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-BZPmj8bC.mjs.map → injected-evm-wallet-provider-DCGnUedJ.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-BCR37kRN.mjs → injected-evm-wallet-provider-DIWeWiAN.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-BCR37kRN.mjs.map → injected-evm-wallet-provider-DIWeWiAN.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-CXfQT5sm.js → injected-evm-wallet-provider-Xbt2CUPi.js} +2 -2
- package/dist/{injected-evm-wallet-provider-CXfQT5sm.js.map → injected-evm-wallet-provider-Xbt2CUPi.js.map} +1 -1
- package/dist/{injected-wallet-provider-eMZ8tjas.js → injected-wallet-provider-7ep-jcal.js} +2 -2
- package/dist/{injected-wallet-provider-eMZ8tjas.js.map → injected-wallet-provider-7ep-jcal.js.map} +1 -1
- package/dist/{injected-wallet-provider-ClI_h_fy.js → injected-wallet-provider-B_jQFifE.js} +2 -2
- package/dist/{injected-wallet-provider-ClI_h_fy.js.map → injected-wallet-provider-B_jQFifE.js.map} +1 -1
- package/dist/{injected-wallet-provider-1IRUHyB3.mjs → injected-wallet-provider-Bps6a9IP.mjs} +2 -2
- package/dist/{injected-wallet-provider-1IRUHyB3.mjs.map → injected-wallet-provider-Bps6a9IP.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-DHQGI0Yl.mjs → injected-wallet-provider-CFnqSsHy.mjs} +2 -2
- package/dist/{injected-wallet-provider-DHQGI0Yl.mjs.map → injected-wallet-provider-CFnqSsHy.mjs.map} +1 -1
- package/dist/wallet-standard-tx-C1HJFLjC.js +30 -0
- package/dist/wallet-standard-tx-C1HJFLjC.js.map +1 -0
- package/dist/wallet-standard-tx-DBliTUWH.mjs +27 -0
- package/dist/wallet-standard-tx-DBliTUWH.mjs.map +1 -0
- package/package.json +9 -3
- package/dist/index--jrXqxte.mjs.map +0 -1
- package/dist/index-B_uRc6gn.js.map +0 -1
- package/dist/index.native-BqK-14S8.js.map +0 -1
- package/dist/index.native-CTVEq0VY.mjs.map +0 -1
|
@@ -3830,6 +3830,11 @@ function appendHostedLoginHints(params, opts) {
|
|
|
3830
3830
|
const provider = normalizeMethod(opts.provider);
|
|
3831
3831
|
if (provider)
|
|
3832
3832
|
params.set('bounded_provider', provider);
|
|
3833
|
+
// login_hint: an identifier (usually an email) to prefill on the hosted page.
|
|
3834
|
+
// Kept short and free of control chars; the hosted page validates before use.
|
|
3835
|
+
const hint = String(opts.loginHint || '').trim();
|
|
3836
|
+
if (hint && hint.length <= 320 && !/[\s<>"']/.test(hint))
|
|
3837
|
+
params.set('login_hint', hint);
|
|
3833
3838
|
// Standard OIDC prompt (e.g. 'login' to force a fresh sign-in / account choice).
|
|
3834
3839
|
const prompt = normalizeMethod(opts.prompt);
|
|
3835
3840
|
if (prompt)
|
|
@@ -4464,7 +4469,7 @@ async function getAuthProvider(config) {
|
|
|
4464
4469
|
// manager as legacy email sessions. Human login should be started
|
|
4465
4470
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
4466
4471
|
// logout surface for those sessions.
|
|
4467
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-
|
|
4472
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-BlJI-8w9.js'); })).EmailAuthProvider();
|
|
4468
4473
|
break;
|
|
4469
4474
|
case "wallet":
|
|
4470
4475
|
case "phantom": {
|
|
@@ -4483,7 +4488,7 @@ async function getAuthProvider(config) {
|
|
|
4483
4488
|
if (!isWalletLoginEnabled(config)) {
|
|
4484
4489
|
throw walletLoginNotEnabledError(authMethod);
|
|
4485
4490
|
}
|
|
4486
|
-
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-
|
|
4491
|
+
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-7ep-jcal.js'); });
|
|
4487
4492
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
4488
4493
|
break;
|
|
4489
4494
|
}
|
|
@@ -4496,7 +4501,7 @@ async function getAuthProvider(config) {
|
|
|
4496
4501
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
4497
4502
|
// to point at a specific wallet or set chainId/domain.
|
|
4498
4503
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
4499
|
-
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider-
|
|
4504
|
+
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider-Xbt2CUPi.js'); });
|
|
4500
4505
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
4501
4506
|
break;
|
|
4502
4507
|
}
|
|
@@ -4524,7 +4529,7 @@ async function getAuthProvider(config) {
|
|
|
4524
4529
|
break;
|
|
4525
4530
|
case "guest":
|
|
4526
4531
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
4527
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
4532
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-BRjJV8Zq.js'); })).GuestAuthProvider();
|
|
4528
4533
|
break;
|
|
4529
4534
|
}
|
|
4530
4535
|
if (!currentAuthProvider) {
|
|
@@ -4580,7 +4585,7 @@ async function signInAnonymously() {
|
|
|
4580
4585
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
4581
4586
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
4582
4587
|
// so bundle-splitting can see it.
|
|
4583
|
-
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
4588
|
+
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-BRjJV8Zq.js'); })).GuestAuthProvider();
|
|
4584
4589
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
4585
4590
|
const commit = (user) => {
|
|
4586
4591
|
// No await/interleaving inside this block: provider/method/config/marker
|
|
@@ -5024,17 +5029,17 @@ function setAuthProviderInstance(provider) {
|
|
|
5024
5029
|
authProviderInstance = provider;
|
|
5025
5030
|
}
|
|
5026
5031
|
|
|
5027
|
-
var _a$
|
|
5032
|
+
var _a$2;
|
|
5028
5033
|
// Whether we're in a server-side rendering context (no hooks allowed).
|
|
5029
5034
|
// React Native has no `window` but DOES support hooks.
|
|
5030
5035
|
// We detect Node SSR specifically via process.versions.node to avoid
|
|
5031
5036
|
// false positives from Node 21+ which defines `navigator` globally.
|
|
5032
|
-
const isSSR$
|
|
5037
|
+
const isSSR$2 = typeof window === 'undefined'
|
|
5033
5038
|
&& typeof process !== 'undefined'
|
|
5034
|
-
&& !!((_a$
|
|
5039
|
+
&& !!((_a$2 = process.versions) === null || _a$2 === void 0 ? void 0 : _a$2.node);
|
|
5035
5040
|
function useAuth() {
|
|
5036
5041
|
// Provide a fallback so server render doesn't break
|
|
5037
|
-
if (isSSR$
|
|
5042
|
+
if (isSSR$2) {
|
|
5038
5043
|
return {
|
|
5039
5044
|
login: async (_options) => undefined,
|
|
5040
5045
|
logout: async () => undefined,
|
|
@@ -5096,6 +5101,72 @@ function useAuth() {
|
|
|
5096
5101
|
};
|
|
5097
5102
|
}
|
|
5098
5103
|
|
|
5104
|
+
var _a$1;
|
|
5105
|
+
// SSR guard (mirrors useAuth): no hooks/subscriptions during Node server render.
|
|
5106
|
+
// React Native has no `window` but DOES support hooks, so detect Node SSR
|
|
5107
|
+
// specifically via process.versions.node.
|
|
5108
|
+
const isSSR$1 = typeof window === 'undefined'
|
|
5109
|
+
&& typeof process !== 'undefined'
|
|
5110
|
+
&& !!((_a$1 = process.versions) === null || _a$1 === void 0 ? void 0 : _a$1.node);
|
|
5111
|
+
function useQuery(path, options) {
|
|
5112
|
+
if (isSSR$1) {
|
|
5113
|
+
return { data: undefined, loading: true, error: null };
|
|
5114
|
+
}
|
|
5115
|
+
const [data, setData] = React__namespace.useState(undefined);
|
|
5116
|
+
const [loading, setLoading] = React__namespace.useState(true);
|
|
5117
|
+
const [error, setError] = React__namespace.useState(null);
|
|
5118
|
+
// Re-subscribe only when the query actually changes (not on every render).
|
|
5119
|
+
const optionsKey = options ? JSON.stringify(options) : '';
|
|
5120
|
+
React__namespace.useEffect(() => {
|
|
5121
|
+
if (!path) {
|
|
5122
|
+
setData(undefined);
|
|
5123
|
+
setLoading(false);
|
|
5124
|
+
setError(null);
|
|
5125
|
+
return;
|
|
5126
|
+
}
|
|
5127
|
+
let active = true;
|
|
5128
|
+
let unsubscribe;
|
|
5129
|
+
setLoading(true);
|
|
5130
|
+
setError(null);
|
|
5131
|
+
core.subscribe(path, Object.assign(Object.assign({}, options), { onData: (d) => {
|
|
5132
|
+
if (!active)
|
|
5133
|
+
return;
|
|
5134
|
+
// A reconnect can legitimately surface a transport error before the
|
|
5135
|
+
// socket re-authenticates and sends a new authorized snapshot. That
|
|
5136
|
+
// fresh snapshot is the recovery boundary: keep the error visible
|
|
5137
|
+
// until data arrives, then clear it so React does not remain stuck on
|
|
5138
|
+
// a failure page after realtime has recovered.
|
|
5139
|
+
setError(null);
|
|
5140
|
+
setData(d);
|
|
5141
|
+
setLoading(false);
|
|
5142
|
+
}, onError: (e) => {
|
|
5143
|
+
if (!active)
|
|
5144
|
+
return;
|
|
5145
|
+
setError(e instanceof Error ? e : new Error(String(e)));
|
|
5146
|
+
setLoading(false);
|
|
5147
|
+
} }))
|
|
5148
|
+
.then((unsub) => {
|
|
5149
|
+
if (active)
|
|
5150
|
+
unsubscribe = unsub;
|
|
5151
|
+
else
|
|
5152
|
+
void unsub(); // unmounted before subscribe resolved
|
|
5153
|
+
})
|
|
5154
|
+
.catch((e) => {
|
|
5155
|
+
if (!active)
|
|
5156
|
+
return;
|
|
5157
|
+
setError(e instanceof Error ? e : new Error(String(e)));
|
|
5158
|
+
setLoading(false);
|
|
5159
|
+
});
|
|
5160
|
+
return () => {
|
|
5161
|
+
active = false;
|
|
5162
|
+
void (unsubscribe === null || unsubscribe === void 0 ? void 0 : unsubscribe());
|
|
5163
|
+
};
|
|
5164
|
+
// optionsKey captures the option object's contents; path is the other input.
|
|
5165
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5166
|
+
}, [path, optionsKey]);
|
|
5167
|
+
return { data, loading, error };
|
|
5168
|
+
}
|
|
5169
|
+
|
|
5099
5170
|
// Wrapper for getIdToken - passes isServer=false for client-side usage
|
|
5100
5171
|
async function getIdToken() {
|
|
5101
5172
|
return core.getIdToken(false);
|
|
@@ -6144,4 +6215,5 @@ exports.setPlatform = setPlatform;
|
|
|
6144
6215
|
exports.signInAnonymously = signInAnonymously;
|
|
6145
6216
|
exports.useAuth = useAuth;
|
|
6146
6217
|
exports.useBuildRun = useBuildRun;
|
|
6147
|
-
|
|
6218
|
+
exports.useQuery = useQuery;
|
|
6219
|
+
//# sourceMappingURL=index.native-hu3o3zXU.js.map
|