@bounded-sh/client 0.0.56 → 0.0.58

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.
Files changed (68) hide show
  1. package/REACT_NATIVE.md +31 -8
  2. package/dist/auth/bounded-login-widget.d.ts +25 -0
  3. package/dist/auth/bounded-widget-modal.d.ts +33 -0
  4. package/dist/auth/index.d.ts +42 -0
  5. package/dist/auth/oidc-auth.d.ts +18 -0
  6. package/dist/auth/providers/wallet-login-finalize.d.ts +17 -0
  7. package/dist/auth/providers/wallet-standard-discovery.d.ts +23 -0
  8. package/dist/auth/providers/wallet-standard-tx.d.ts +7 -0
  9. package/dist/auth/turnkey-auth.d.ts +17 -0
  10. package/dist/auth/turnkey-signer-bridge.d.ts +32 -0
  11. package/dist/auth/turnkey-wallet-widget.d.ts +17 -0
  12. package/dist/{email-auth-provider-4Df8dFOh.js → email-auth-provider-BHtR1H_E.js} +2 -2
  13. package/dist/{email-auth-provider-4Df8dFOh.js.map → email-auth-provider-BHtR1H_E.js.map} +1 -1
  14. package/dist/{email-auth-provider-CZ-xYVln.js → email-auth-provider-BlJI-8w9.js} +2 -2
  15. package/dist/{email-auth-provider-CZ-xYVln.js.map → email-auth-provider-BlJI-8w9.js.map} +1 -1
  16. package/dist/{email-auth-provider-By6SL0YS.mjs → email-auth-provider-CX7foEhA.mjs} +2 -2
  17. package/dist/{email-auth-provider-By6SL0YS.mjs.map → email-auth-provider-CX7foEhA.mjs.map} +1 -1
  18. package/dist/{email-auth-provider-BqX-o_sJ.mjs → email-auth-provider-CfNSS8Du.mjs} +2 -2
  19. package/dist/{email-auth-provider-BqX-o_sJ.mjs.map → email-auth-provider-CfNSS8Du.mjs.map} +1 -1
  20. package/dist/{guest-auth-provider-DWcdRvLW.js → guest-auth-provider-BPXDJoEQ.js} +2 -2
  21. package/dist/{guest-auth-provider-DWcdRvLW.js.map → guest-auth-provider-BPXDJoEQ.js.map} +1 -1
  22. package/dist/{guest-auth-provider-D9A4SU4z.js → guest-auth-provider-BRjJV8Zq.js} +2 -2
  23. package/dist/{guest-auth-provider-D9A4SU4z.js.map → guest-auth-provider-BRjJV8Zq.js.map} +1 -1
  24. package/dist/{guest-auth-provider-Q2wbjdHM.mjs → guest-auth-provider-DJmuReVa.mjs} +2 -2
  25. package/dist/{guest-auth-provider-6bqnyX79.mjs.map → guest-auth-provider-DJmuReVa.mjs.map} +1 -1
  26. package/dist/{guest-auth-provider-6bqnyX79.mjs → guest-auth-provider-DxhZ5sWN.mjs} +2 -2
  27. package/dist/{guest-auth-provider-Q2wbjdHM.mjs.map → guest-auth-provider-DxhZ5sWN.mjs.map} +1 -1
  28. package/dist/{index--jrXqxte.mjs → index-DWodlTFG.mjs} +1575 -17
  29. package/dist/index-DWodlTFG.mjs.map +1 -0
  30. package/dist/{index-B_uRc6gn.js → index-MKE9tHpl.js} +1579 -16
  31. package/dist/index-MKE9tHpl.js.map +1 -0
  32. package/dist/index.d.ts +7 -1
  33. package/dist/index.js +6 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +1 -1
  36. package/dist/{index.native-CTVEq0VY.mjs → index.native-CQiw9baS.mjs} +83 -12
  37. package/dist/index.native-CQiw9baS.mjs.map +1 -0
  38. package/dist/{index.native-BqK-14S8.js → index.native-hu3o3zXU.js} +82 -10
  39. package/dist/index.native-hu3o3zXU.js.map +1 -0
  40. package/dist/index.native.d.ts +2 -0
  41. package/dist/index.native.js +2 -1
  42. package/dist/index.native.js.map +1 -1
  43. package/dist/index.native.mjs +1 -1
  44. package/dist/{injected-evm-wallet-provider-xZ01LIw2.js → injected-evm-wallet-provider-BOPzdm7E.js} +2 -2
  45. package/dist/{injected-evm-wallet-provider-xZ01LIw2.js.map → injected-evm-wallet-provider-BOPzdm7E.js.map} +1 -1
  46. package/dist/{injected-evm-wallet-provider-BCR37kRN.mjs → injected-evm-wallet-provider-CnJRLE8P.mjs} +2 -2
  47. package/dist/{injected-evm-wallet-provider-BCR37kRN.mjs.map → injected-evm-wallet-provider-CnJRLE8P.mjs.map} +1 -1
  48. package/dist/{injected-evm-wallet-provider-BZPmj8bC.mjs → injected-evm-wallet-provider-DCGnUedJ.mjs} +2 -2
  49. package/dist/{injected-evm-wallet-provider-BZPmj8bC.mjs.map → injected-evm-wallet-provider-DCGnUedJ.mjs.map} +1 -1
  50. package/dist/{injected-evm-wallet-provider-CXfQT5sm.js → injected-evm-wallet-provider-Xbt2CUPi.js} +2 -2
  51. package/dist/{injected-evm-wallet-provider-CXfQT5sm.js.map → injected-evm-wallet-provider-Xbt2CUPi.js.map} +1 -1
  52. package/dist/{injected-wallet-provider-eMZ8tjas.js → injected-wallet-provider-7ep-jcal.js} +2 -2
  53. package/dist/{injected-wallet-provider-eMZ8tjas.js.map → injected-wallet-provider-7ep-jcal.js.map} +1 -1
  54. package/dist/{injected-wallet-provider-ClI_h_fy.js → injected-wallet-provider-BUvN5Y6_.js} +2 -2
  55. package/dist/{injected-wallet-provider-ClI_h_fy.js.map → injected-wallet-provider-BUvN5Y6_.js.map} +1 -1
  56. package/dist/{injected-wallet-provider-1IRUHyB3.mjs → injected-wallet-provider-Bps6a9IP.mjs} +2 -2
  57. package/dist/{injected-wallet-provider-1IRUHyB3.mjs.map → injected-wallet-provider-Bps6a9IP.mjs.map} +1 -1
  58. package/dist/{injected-wallet-provider-DHQGI0Yl.mjs → injected-wallet-provider-Dg3MieTq.mjs} +2 -2
  59. package/dist/{injected-wallet-provider-DHQGI0Yl.mjs.map → injected-wallet-provider-Dg3MieTq.mjs.map} +1 -1
  60. package/dist/wallet-standard-tx-C1HJFLjC.js +30 -0
  61. package/dist/wallet-standard-tx-C1HJFLjC.js.map +1 -0
  62. package/dist/wallet-standard-tx-DBliTUWH.mjs +27 -0
  63. package/dist/wallet-standard-tx-DBliTUWH.mjs.map +1 -0
  64. package/package.json +9 -3
  65. package/dist/index--jrXqxte.mjs.map +0 -1
  66. package/dist/index-B_uRc6gn.js.map +0 -1
  67. package/dist/index.native-BqK-14S8.js.map +0 -1
  68. package/dist/index.native-CTVEq0VY.mjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  export { init, getCurrentUser, onAuthStateChanged, onAuthLoadingChanged, getAuthLoading, login, logout, } from "./global";
2
2
  export type { LoginOptions, LogoutOptions } from "./global";
3
3
  export { getConfig } from "@bounded-sh/core";
4
- export { getAuthProvider, signInAnonymously, loginWithPrivy } from "./auth";
4
+ export { getAuthProvider, signInAnonymously, loginWithPrivy, loginWithWallet } from "./auth";
5
5
  export { loginWithRedirect, completeLoginFromRedirect, loginWithPopup, completeLoginInPopup } from "./auth";
6
6
  export type { HostedAuthMethod, OidcLoginOptions, PopupLoginOptions } from "./auth";
7
+ export { openBoundedWidget } from "./auth/bounded-login-widget";
8
+ export type { BoundedWidgetOptions } from "./auth/bounded-login-widget";
7
9
  export { get, getMany, docId, set, setMany, setFile, getFiles, search, queryAggregate, runQuery, runQueryMany, runExpression, runExpressionMany, signMessage, signTransaction, signAndSubmitTransaction, count, aggregate, GetOptions, SearchOptions, SetOptions, CountOptions, AggregateOptions, AggregateOperation, AggregateResult, AggregateSpec, AggregateRow, QueryAggregateOptions, } from "@bounded-sh/core";
8
10
  export type { GetOptions as BoundedGetOptions } from "@bounded-sh/core";
9
11
  export { subscribe } from "@bounded-sh/core";
@@ -23,6 +25,10 @@ export * from "./builds";
23
25
  export { apps } from "./builds/apps";
24
26
  export type { AppListItem, CreatedApp, CreateAppOptions } from "./builds/apps";
25
27
  export { deserializeTransaction } from "./auth/providers/sol/sol-utils";
28
+ export { signSolanaMessageViaTurnkey, getOrCreateTurnkeyWallet } from "./auth/turnkey-signer-bridge";
29
+ export type { TurnkeySignResult, TurnkeyWallet } from "./auth/turnkey-signer-bridge";
30
+ export { startTurnkeyEmailLogin } from "./auth/turnkey-auth";
31
+ export type { TurnkeyEmailLoginHandle } from "./auth/turnkey-auth";
26
32
  export { getIdToken } from "./utils";
27
33
  export { setPlatform, getPlatform } from "./platform";
28
34
  export type { PlatformAdapter, StorageAdapter } from "./platform";
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B_uRc6gn.js');
3
+ var index = require('./index-MKE9tHpl.js');
4
4
  var core = require('@bounded-sh/core');
5
5
  require('react');
6
6
 
@@ -28,18 +28,23 @@ exports.getAuthLoading = index.getAuthLoading;
28
28
  exports.getAuthProvider = index.getAuthProvider;
29
29
  exports.getCurrentUser = index.getCurrentUser;
30
30
  exports.getIdToken = index.getIdToken;
31
+ exports.getOrCreateTurnkeyWallet = index.getOrCreateTurnkeyWallet;
31
32
  exports.getPlatform = index.getPlatform;
32
33
  exports.init = index.init;
33
34
  exports.login = index.login;
34
35
  exports.loginWithPopup = index.loginWithPopup;
35
36
  exports.loginWithPrivy = index.loginWithPrivy;
36
37
  exports.loginWithRedirect = index.loginWithRedirect;
38
+ exports.loginWithWallet = index.loginWithWallet;
37
39
  exports.logout = index.logout;
38
40
  exports.onAuthLoadingChanged = index.onAuthLoadingChanged;
39
41
  exports.onAuthStateChanged = index.onAuthStateChanged;
42
+ exports.openBoundedWidget = index.openBoundedWidget;
40
43
  exports.requestEip6963Providers = index.requestEip6963Providers;
41
44
  exports.setPlatform = index.setPlatform;
42
45
  exports.signInAnonymously = index.signInAnonymously;
46
+ exports.signSolanaMessageViaTurnkey = index.signSolanaMessageViaTurnkey;
47
+ exports.startTurnkeyEmailLogin = index.startTurnkeyEmailLogin;
43
48
  exports.useAuth = index.useAuth;
44
49
  exports.useBuildRun = index.useBuildRun;
45
50
  exports.useQuery = index.useQuery;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { W as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, V as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, U as BUILD_REVIEW_CAPABILITY_SCHEMA, M as BuildsApiError, S as FAILURE_REASONS, N as NON_TERMINAL_STATES, O as OffchainAuthProvider, Q as PARK_REASONS, P as PrivyExpoProvider, R as RUN_STATES, T as TERMINAL_STATES, G as apps, L as builds, z as completeLoginFromRedirect, B as completeLoginInPopup, k as defaultInjectedEvmProvider, d as defaultInjectedProvider, H as deserializeTransaction, q as getAuthLoading, v as getAuthProvider, m as getCurrentUser, I as getIdToken, g as getPlatform, l as init, t as login, A as loginWithPopup, x as loginWithPrivy, y as loginWithRedirect, u as logout, p as onAuthLoadingChanged, o as onAuthStateChanged, K as requestEip6963Providers, J as setPlatform, w as signInAnonymously, C as useAuth, F as useBuildRun, D as useQuery } from './index--jrXqxte.mjs';
1
+ export { $ as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, _ as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, Z as BUILD_REVIEW_CAPABILITY_SCHEMA, T as BuildsApiError, Y as FAILURE_REASONS, U as NON_TERMINAL_STATES, P as OffchainAuthProvider, X as PARK_REASONS, Q as PrivyExpoProvider, W as RUN_STATES, V as TERMINAL_STATES, I as apps, S as builds, A as completeLoginFromRedirect, C as completeLoginInPopup, k as defaultInjectedEvmProvider, d as defaultInjectedProvider, J as deserializeTransaction, q as getAuthLoading, v as getAuthProvider, m as getCurrentUser, N as getIdToken, L as getOrCreateTurnkeyWallet, g as getPlatform, l as init, t as login, B as loginWithPopup, x as loginWithPrivy, z as loginWithRedirect, y as loginWithWallet, u as logout, p as onAuthLoadingChanged, o as onAuthStateChanged, D as openBoundedWidget, R as requestEip6963Providers, O as setPlatform, w as signInAnonymously, K as signSolanaMessageViaTurnkey, M as startTurnkeyEmailLogin, F as useAuth, H as useBuildRun, G as useQuery } from './index-DWodlTFG.mjs';
2
2
  export * from '@bounded-sh/core';
3
3
  export { BoundedDeclineError, DECLINE_EVENT_NAME, RATE_LIMIT_EVENT_NAME, ScopedClientReadOnlyError, aggregate, count, createClient, deriveDecline, dispatchDeclineEvent, dispatchRateLimitEvent, docId, get, getConfig, getFiles, getMany, queryAggregate, runExpression, runExpressionMany, runQuery, runQueryMany, search, set, setFile, setMany, signAndSubmitTransaction, signMessage, signTransaction, subscribe } from '@bounded-sh/core';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
- import { assertCanonicalBoundedRuntimeWriteCalldata, getActiveSessionManager, getConfig, WebSessionManager, ReactNativeSessionManager, revokeSession, init as init$1, reconnectWithNewAuth, deriveUserIdentityFromIdToken, getIdToken as getIdToken$1, convertRemainingAccounts, buildSetDocumentsTransaction, genAuthNonce, genSolanaMessage, createSessionWithSignature } from '@bounded-sh/core';
1
+ import { assertCanonicalBoundedRuntimeWriteCalldata, getActiveSessionManager, getConfig, WebSessionManager, ReactNativeSessionManager, revokeSession, init as init$1, reconnectWithNewAuth, deriveUserIdentityFromIdToken, subscribe, getIdToken as getIdToken$1, convertRemainingAccounts, buildSetDocumentsTransaction, genAuthNonce, genSolanaMessage, createSessionWithSignature } from '@bounded-sh/core';
2
2
  import * as React from 'react';
3
3
 
4
4
  /**
@@ -3809,6 +3809,11 @@ function appendHostedLoginHints(params, opts) {
3809
3809
  const provider = normalizeMethod(opts.provider);
3810
3810
  if (provider)
3811
3811
  params.set('bounded_provider', provider);
3812
+ // login_hint: an identifier (usually an email) to prefill on the hosted page.
3813
+ // Kept short and free of control chars; the hosted page validates before use.
3814
+ const hint = String(opts.loginHint || '').trim();
3815
+ if (hint && hint.length <= 320 && !/[\s<>"']/.test(hint))
3816
+ params.set('login_hint', hint);
3812
3817
  // Standard OIDC prompt (e.g. 'login' to force a fresh sign-in / account choice).
3813
3818
  const prompt = normalizeMethod(opts.prompt);
3814
3819
  if (prompt)
@@ -4443,7 +4448,7 @@ async function getAuthProvider(config) {
4443
4448
  // manager as legacy email sessions. Human login should be started
4444
4449
  // with loginWithRedirect(); this provider is kept as the restore and
4445
4450
  // logout surface for those sessions.
4446
- currentAuthProvider = new (await import('./email-auth-provider-BqX-o_sJ.mjs')).EmailAuthProvider();
4451
+ currentAuthProvider = new (await import('./email-auth-provider-CfNSS8Du.mjs')).EmailAuthProvider();
4447
4452
  break;
4448
4453
  case "wallet":
4449
4454
  case "phantom": {
@@ -4462,7 +4467,7 @@ async function getAuthProvider(config) {
4462
4467
  if (!isWalletLoginEnabled(config)) {
4463
4468
  throw walletLoginNotEnabledError(authMethod);
4464
4469
  }
4465
- const { InjectedWalletProvider } = await import('./injected-wallet-provider-1IRUHyB3.mjs');
4470
+ const { InjectedWalletProvider } = await import('./injected-wallet-provider-Bps6a9IP.mjs');
4466
4471
  currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
4467
4472
  break;
4468
4473
  }
@@ -4475,7 +4480,7 @@ async function getAuthProvider(config) {
4475
4480
  // Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
4476
4481
  // to point at a specific wallet or set chainId/domain.
4477
4482
  const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
4478
- const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-BZPmj8bC.mjs');
4483
+ const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-DCGnUedJ.mjs');
4479
4484
  currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
4480
4485
  break;
4481
4486
  }
@@ -4503,7 +4508,7 @@ async function getAuthProvider(config) {
4503
4508
  break;
4504
4509
  case "guest":
4505
4510
  // Anonymous auth: a device-local ed25519 keypair signs the challenge.
4506
- currentAuthProvider = new (await import('./guest-auth-provider-6bqnyX79.mjs')).GuestAuthProvider();
4511
+ currentAuthProvider = new (await import('./guest-auth-provider-DxhZ5sWN.mjs')).GuestAuthProvider();
4507
4512
  break;
4508
4513
  }
4509
4514
  if (!currentAuthProvider) {
@@ -4559,7 +4564,7 @@ async function signInAnonymously() {
4559
4564
  // Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
4560
4565
  // the main bundle for data-only apps. Specifier is a static string literal
4561
4566
  // so bundle-splitting can see it.
4562
- const provider = new (await import('./guest-auth-provider-6bqnyX79.mjs')).GuestAuthProvider();
4567
+ const provider = new (await import('./guest-auth-provider-DxhZ5sWN.mjs')).GuestAuthProvider();
4563
4568
  setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
4564
4569
  const commit = (user) => {
4565
4570
  // No await/interleaving inside this block: provider/method/config/marker
@@ -5003,17 +5008,17 @@ function setAuthProviderInstance(provider) {
5003
5008
  authProviderInstance = provider;
5004
5009
  }
5005
5010
 
5006
- var _a$1;
5011
+ var _a$2;
5007
5012
  // Whether we're in a server-side rendering context (no hooks allowed).
5008
5013
  // React Native has no `window` but DOES support hooks.
5009
5014
  // We detect Node SSR specifically via process.versions.node to avoid
5010
5015
  // false positives from Node 21+ which defines `navigator` globally.
5011
- const isSSR$1 = typeof window === 'undefined'
5016
+ const isSSR$2 = typeof window === 'undefined'
5012
5017
  && typeof process !== 'undefined'
5013
- && !!((_a$1 = process.versions) === null || _a$1 === void 0 ? void 0 : _a$1.node);
5018
+ && !!((_a$2 = process.versions) === null || _a$2 === void 0 ? void 0 : _a$2.node);
5014
5019
  function useAuth() {
5015
5020
  // Provide a fallback so server render doesn't break
5016
- if (isSSR$1) {
5021
+ if (isSSR$2) {
5017
5022
  return {
5018
5023
  login: async (_options) => undefined,
5019
5024
  logout: async () => undefined,
@@ -5075,6 +5080,72 @@ function useAuth() {
5075
5080
  };
5076
5081
  }
5077
5082
 
5083
+ var _a$1;
5084
+ // SSR guard (mirrors useAuth): no hooks/subscriptions during Node server render.
5085
+ // React Native has no `window` but DOES support hooks, so detect Node SSR
5086
+ // specifically via process.versions.node.
5087
+ const isSSR$1 = typeof window === 'undefined'
5088
+ && typeof process !== 'undefined'
5089
+ && !!((_a$1 = process.versions) === null || _a$1 === void 0 ? void 0 : _a$1.node);
5090
+ function useQuery(path, options) {
5091
+ if (isSSR$1) {
5092
+ return { data: undefined, loading: true, error: null };
5093
+ }
5094
+ const [data, setData] = React.useState(undefined);
5095
+ const [loading, setLoading] = React.useState(true);
5096
+ const [error, setError] = React.useState(null);
5097
+ // Re-subscribe only when the query actually changes (not on every render).
5098
+ const optionsKey = options ? JSON.stringify(options) : '';
5099
+ React.useEffect(() => {
5100
+ if (!path) {
5101
+ setData(undefined);
5102
+ setLoading(false);
5103
+ setError(null);
5104
+ return;
5105
+ }
5106
+ let active = true;
5107
+ let unsubscribe;
5108
+ setLoading(true);
5109
+ setError(null);
5110
+ subscribe(path, Object.assign(Object.assign({}, options), { onData: (d) => {
5111
+ if (!active)
5112
+ return;
5113
+ // A reconnect can legitimately surface a transport error before the
5114
+ // socket re-authenticates and sends a new authorized snapshot. That
5115
+ // fresh snapshot is the recovery boundary: keep the error visible
5116
+ // until data arrives, then clear it so React does not remain stuck on
5117
+ // a failure page after realtime has recovered.
5118
+ setError(null);
5119
+ setData(d);
5120
+ setLoading(false);
5121
+ }, onError: (e) => {
5122
+ if (!active)
5123
+ return;
5124
+ setError(e instanceof Error ? e : new Error(String(e)));
5125
+ setLoading(false);
5126
+ } }))
5127
+ .then((unsub) => {
5128
+ if (active)
5129
+ unsubscribe = unsub;
5130
+ else
5131
+ void unsub(); // unmounted before subscribe resolved
5132
+ })
5133
+ .catch((e) => {
5134
+ if (!active)
5135
+ return;
5136
+ setError(e instanceof Error ? e : new Error(String(e)));
5137
+ setLoading(false);
5138
+ });
5139
+ return () => {
5140
+ active = false;
5141
+ void (unsubscribe === null || unsubscribe === void 0 ? void 0 : unsubscribe());
5142
+ };
5143
+ // optionsKey captures the option object's contents; path is the other input.
5144
+ // eslint-disable-next-line react-hooks/exhaustive-deps
5145
+ }, [path, optionsKey]);
5146
+ return { data, loading, error };
5147
+ }
5148
+
5078
5149
  // Wrapper for getIdToken - passes isServer=false for client-side usage
5079
5150
  async function getIdToken() {
5080
5151
  return getIdToken$1(false);
@@ -6078,5 +6149,5 @@ class PrivyExpoProvider {
6078
6149
  }
6079
6150
  }
6080
6151
 
6081
- export { useAuth as A, useBuildRun as B, apps as C, deserializeTransaction as D, EMBEDDED_WALLET_UNSUPPORTED as E, getIdToken as F, setPlatform as G, builds as H, BuildsApiError as I, PARK_REASONS as J, FAILURE_REASONS as K, BUILD_REVIEW_CAPABILITY_SCHEMA as L, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as M, NON_TERMINAL_STATES as N, OffchainAuthProvider as O, PrivyExpoProvider as P, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as Q, RUN_STATES as R, TERMINAL_STATES as T, hasEmbeddedEvmWallet as a, embeddedSignAndSubmit as b, setAuthLoading as c, bufferExports as d, embeddedRunEvmTransaction as e, bs58 as f, getPlatform as g, hasEmbeddedWallet as h, confirmAndCheckTransaction as i, init as j, getCurrentUser as k, onAuthLoadingChanged as l, getAuthLoading as m, normalizeSolanaRpcUrl as n, onAuthStateChanged as o, login as p, logout as q, resolveSolanaRpcUrl as r, setCurrentUser as s, getAuthProvider as t, signInAnonymously as u, loginWithPrivy as v, loginWithRedirect as w, completeLoginFromRedirect as x, loginWithPopup as y, completeLoginInPopup as z };
6082
- //# sourceMappingURL=index.native-CTVEq0VY.mjs.map
6152
+ export { useAuth as A, useQuery as B, useBuildRun as C, apps as D, EMBEDDED_WALLET_UNSUPPORTED as E, deserializeTransaction as F, getIdToken as G, setPlatform as H, builds as I, BuildsApiError as J, PARK_REASONS as K, FAILURE_REASONS as L, BUILD_REVIEW_CAPABILITY_SCHEMA as M, NON_TERMINAL_STATES as N, OffchainAuthProvider as O, PrivyExpoProvider as P, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as Q, RUN_STATES as R, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as S, TERMINAL_STATES as T, hasEmbeddedEvmWallet as a, embeddedSignAndSubmit as b, setAuthLoading as c, bufferExports as d, embeddedRunEvmTransaction as e, bs58 as f, getPlatform as g, hasEmbeddedWallet as h, confirmAndCheckTransaction as i, init as j, getCurrentUser as k, onAuthLoadingChanged as l, getAuthLoading as m, normalizeSolanaRpcUrl as n, onAuthStateChanged as o, login as p, logout as q, resolveSolanaRpcUrl as r, setCurrentUser as s, getAuthProvider as t, signInAnonymously as u, loginWithPrivy as v, loginWithRedirect as w, completeLoginFromRedirect as x, loginWithPopup as y, completeLoginInPopup as z };
6153
+ //# sourceMappingURL=index.native-CQiw9baS.mjs.map