@bounded-sh/client 0.0.118 → 0.0.120-expo.0

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 (60) hide show
  1. package/dist/auth/oidc-auth.d.ts +2 -1
  2. package/dist/auth/providers/email-auth-provider.d.ts +2 -1
  3. package/dist/auth/providers/offchain-auth-provider.d.ts +2 -1
  4. package/dist/auth/turnkey-signer-bridge.d.ts +16 -0
  5. package/dist/auth/turnkey-wallet-widget.d.ts +4 -0
  6. package/dist/{email-auth-provider-C-qQ46kD.js → email-auth-provider-Bb_0mHJ_.js} +7 -2
  7. package/dist/email-auth-provider-Bb_0mHJ_.js.map +1 -0
  8. package/dist/{email-auth-provider-BYiK3ZCv.js → email-auth-provider-IsiArtx0.js} +7 -2
  9. package/dist/email-auth-provider-IsiArtx0.js.map +1 -0
  10. package/dist/{email-auth-provider-B9cZ-puM.mjs → email-auth-provider-TA2AbU5Y.mjs} +7 -2
  11. package/dist/email-auth-provider-TA2AbU5Y.mjs.map +1 -0
  12. package/dist/{email-auth-provider-DFHalX9c.mjs → email-auth-provider-ao5ce_SN.mjs} +7 -2
  13. package/dist/email-auth-provider-ao5ce_SN.mjs.map +1 -0
  14. package/dist/{guest-auth-provider-g5-T58yA.js → guest-auth-provider-CJUbifdu.js} +2 -2
  15. package/dist/{guest-auth-provider-g5-T58yA.js.map → guest-auth-provider-CJUbifdu.js.map} +1 -1
  16. package/dist/{guest-auth-provider-D1q3C5uC.js → guest-auth-provider-DTEwf7qP.js} +2 -2
  17. package/dist/{guest-auth-provider-D1q3C5uC.js.map → guest-auth-provider-DTEwf7qP.js.map} +1 -1
  18. package/dist/{guest-auth-provider-i8-RL0js.mjs → guest-auth-provider-Dw-bF10B.mjs} +2 -2
  19. package/dist/{guest-auth-provider-BRq3JB0_.mjs.map → guest-auth-provider-Dw-bF10B.mjs.map} +1 -1
  20. package/dist/{guest-auth-provider-BRq3JB0_.mjs → guest-auth-provider-DxQG3JvU.mjs} +2 -2
  21. package/dist/{guest-auth-provider-i8-RL0js.mjs.map → guest-auth-provider-DxQG3JvU.mjs.map} +1 -1
  22. package/dist/{index-xNGb1ROp.mjs → index-BdzGX8fS.mjs} +113 -23
  23. package/dist/index-BdzGX8fS.mjs.map +1 -0
  24. package/dist/{index-eMCWYiRe.js → index-KUBcQdTX.js} +113 -22
  25. package/dist/index-KUBcQdTX.js.map +1 -0
  26. package/dist/index.d.ts +2 -1
  27. package/dist/index.js +5 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +2 -2
  30. package/dist/{index.native-ByI3rRu4.js → index.native-CZSRvIAb.js} +130 -23
  31. package/dist/index.native-CZSRvIAb.js.map +1 -0
  32. package/dist/{index.native-YmmnwqEw.mjs → index.native-N5zxPEYK.mjs} +130 -24
  33. package/dist/index.native-N5zxPEYK.mjs.map +1 -0
  34. package/dist/index.native.js +1 -1
  35. package/dist/index.native.mjs +1 -1
  36. package/dist/{injected-evm-wallet-provider-BIYAL_NZ.js → injected-evm-wallet-provider--XJFh-7d.js} +2 -2
  37. package/dist/{injected-evm-wallet-provider-BIYAL_NZ.js.map → injected-evm-wallet-provider--XJFh-7d.js.map} +1 -1
  38. package/dist/{injected-evm-wallet-provider-BMjQaUiB.js → injected-evm-wallet-provider-4T_-2UQI.js} +2 -2
  39. package/dist/{injected-evm-wallet-provider-BMjQaUiB.js.map → injected-evm-wallet-provider-4T_-2UQI.js.map} +1 -1
  40. package/dist/{injected-evm-wallet-provider--x3yWNps.mjs → injected-evm-wallet-provider-BlSFIzEA.mjs} +2 -2
  41. package/dist/{injected-evm-wallet-provider--x3yWNps.mjs.map → injected-evm-wallet-provider-BlSFIzEA.mjs.map} +1 -1
  42. package/dist/{injected-evm-wallet-provider-BoLGCVqD.mjs → injected-evm-wallet-provider-CtPPhtMh.mjs} +2 -2
  43. package/dist/{injected-evm-wallet-provider-BoLGCVqD.mjs.map → injected-evm-wallet-provider-CtPPhtMh.mjs.map} +1 -1
  44. package/dist/{injected-wallet-provider-DuWTw-fM.mjs → injected-wallet-provider-Bnsfazum.mjs} +2 -2
  45. package/dist/{injected-wallet-provider-DuWTw-fM.mjs.map → injected-wallet-provider-Bnsfazum.mjs.map} +1 -1
  46. package/dist/{injected-wallet-provider-D3fVFadN.js → injected-wallet-provider-CJ0v5Sgn.js} +2 -2
  47. package/dist/{injected-wallet-provider-D3fVFadN.js.map → injected-wallet-provider-CJ0v5Sgn.js.map} +1 -1
  48. package/dist/{injected-wallet-provider-zXw__lyf.js → injected-wallet-provider-Ckljhcbu.js} +2 -2
  49. package/dist/{injected-wallet-provider-zXw__lyf.js.map → injected-wallet-provider-Ckljhcbu.js.map} +1 -1
  50. package/dist/{injected-wallet-provider-DSOjJP3u.mjs → injected-wallet-provider-yyJfuVgv.mjs} +2 -2
  51. package/dist/{injected-wallet-provider-DSOjJP3u.mjs.map → injected-wallet-provider-yyJfuVgv.mjs.map} +1 -1
  52. package/package.json +2 -2
  53. package/dist/email-auth-provider-B9cZ-puM.mjs.map +0 -1
  54. package/dist/email-auth-provider-BYiK3ZCv.js.map +0 -1
  55. package/dist/email-auth-provider-C-qQ46kD.js.map +0 -1
  56. package/dist/email-auth-provider-DFHalX9c.mjs.map +0 -1
  57. package/dist/index-eMCWYiRe.js.map +0 -1
  58. package/dist/index-xNGb1ROp.mjs.map +0 -1
  59. package/dist/index.native-ByI3rRu4.js.map +0 -1
  60. package/dist/index.native-YmmnwqEw.mjs.map +0 -1
@@ -35,7 +35,18 @@ function walletOperationGuard() {
35
35
  throw new Error('wallet_session_changed');
36
36
  };
37
37
  }
38
- function setWalletSessionState(key, state) { }
38
+ // This realm owns one active SDK session and one retained signer frame.
39
+ let activeWalletState;
40
+ function setWalletSessionState(key, state) { activeWalletState = { key, state }; }
41
+ function walletSessionState(key) {
42
+ if ((activeWalletState === null || activeWalletState === void 0 ? void 0 : activeWalletState.key) !== key)
43
+ return { status: 'verification-required' };
44
+ const state = activeWalletState.state;
45
+ if (state.status === 'ready' && (!Number.isFinite(state.expiresAt) || state.expiresAt <= Date.now())) {
46
+ return { status: 'verification-required', reason: 'wallet_session_expired' };
47
+ }
48
+ return state;
49
+ }
39
50
 
40
51
  /**
41
52
  * Platform abstraction layer for React Native compatibility.
@@ -119,8 +130,17 @@ function createWebPlatform() {
119
130
  // bundlers do not externalize or preload a Node-only module in the
120
131
  // email/guest graph; this branch is unreachable when WebCrypto is
121
132
  // available (all supported browsers and current Node releases).
133
+ // The try makes it an optional dependency for Metro, whose production
134
+ // constant folding turns the specifier back into a literal: a React Native
135
+ // app with no node:crypto mapping still bundles (it passes setPlatform({ sha256 })).
122
136
  const nodeCryptoSpecifier = 'node:crypto';
123
- const { createHash } = await import(/* @vite-ignore */ nodeCryptoSpecifier);
137
+ let createHash;
138
+ try {
139
+ ({ createHash } = await import(/* @vite-ignore */ nodeCryptoSpecifier));
140
+ }
141
+ catch (_b) {
142
+ throw new Error('SHA-256 needs WebCrypto here: pass setPlatform({ sha256 }) (e.g. expo-crypto digest).');
143
+ }
124
144
  const hash = createHash('sha256').update(data).digest();
125
145
  return hash.buffer.slice(hash.byteOffset, hash.byteOffset + hash.byteLength);
126
146
  },
@@ -226,6 +246,10 @@ class OffchainAuthProvider {
226
246
  async signTransaction(tx) {
227
247
  return this.wrappedProvider.signTransaction(tx);
228
248
  }
249
+ async prepareToSign() {
250
+ var _a, _b, _c;
251
+ return (_c = (await ((_b = (_a = this.wrappedProvider).prepareToSign) === null || _b === void 0 ? void 0 : _b.call(_a)))) !== null && _c !== void 0 ? _c : 'ready';
252
+ }
229
253
  /**
230
254
  * Sign and submit transaction - not supported in poofnet environment.
231
255
  * See the real providers (PhantomWalletProvider, SolanaKeypairProvider)
@@ -4143,6 +4167,11 @@ function detachWarmSignerIframe(origin) {
4143
4167
  detachIframe(modal);
4144
4168
  return true;
4145
4169
  }
4170
+ /** A removed frame cannot still supply its in-memory signing session. */
4171
+ function hasWarmSignerFrame(context) {
4172
+ var _a;
4173
+ return Boolean(((_a = modal === null || modal === void 0 ? void 0 : modal.iframe) === null || _a === void 0 ? void 0 : _a.isConnected) && modal.iframeContext === context);
4174
+ }
4146
4175
  function detachIframe(m) {
4147
4176
  if (m.iframe) {
4148
4177
  try {
@@ -4184,7 +4213,7 @@ async function runWidget(url, signerOrigin, ex, popupFallback) {
4184
4213
  const requestId = String(ex.request.requestId);
4185
4214
  // Serialize: the approve card is modal, and one warm frame handles one request at a time.
4186
4215
  const run = m.chain.then(() => new Promise((resolve, reject) => {
4187
- var _a;
4216
+ var _a, _b;
4188
4217
  let settled = false;
4189
4218
  let usedFallback = false;
4190
4219
  (_a = ex.assertCurrent) === null || _a === void 0 ? void 0 : _a.call(ex);
@@ -4227,16 +4256,20 @@ async function runWidget(url, signerOrigin, ex, popupFallback) {
4227
4256
  /* frame gone */
4228
4257
  }
4229
4258
  };
4259
+ const dismiss = () => {
4260
+ if (!ex.silent)
4261
+ hideModal(m);
4262
+ };
4230
4263
  const goFallback = () => {
4231
4264
  if (usedFallback || settled)
4232
4265
  return;
4233
4266
  usedFallback = true;
4234
- hideModal(m);
4267
+ dismiss();
4235
4268
  finish(() => popupFallback().then(resolve, reject));
4236
4269
  };
4237
4270
  m.onBackdrop = () => {
4238
4271
  cancelInFrame();
4239
- hideModal(m);
4272
+ dismiss();
4240
4273
  finish(() => reject(new Error("cancelled")));
4241
4274
  };
4242
4275
  m.onIframeMessage = (d) => {
@@ -4251,17 +4284,18 @@ async function runWidget(url, signerOrigin, ex, popupFallback) {
4251
4284
  if (d.type === "bounded:turnkey:result" && d.requestId === requestId) {
4252
4285
  const outcome = ex.onResult(d);
4253
4286
  if ("error" in outcome) {
4254
- hideModal(m);
4287
+ dismiss();
4255
4288
  finish(() => reject(new Error(outcome.error)));
4256
4289
  return;
4257
4290
  }
4258
4291
  if (outcome.done) {
4259
- hideModal(m);
4292
+ dismiss();
4260
4293
  finish(() => resolve(outcome.value));
4261
4294
  }
4262
4295
  }
4263
4296
  };
4264
- showModal(m);
4297
+ if (!ex.silent)
4298
+ showModal(m);
4265
4299
  if (m.iframeReady)
4266
4300
  send();
4267
4301
  // If the frame never loads, degrade to the popup (best-effort - a post-load
@@ -4274,10 +4308,10 @@ async function runWidget(url, signerOrigin, ex, popupFallback) {
4274
4308
  ceilingTimer = window.setTimeout(() => {
4275
4309
  if (!settled) {
4276
4310
  cancelInFrame();
4277
- hideModal(m);
4311
+ dismiss();
4278
4312
  finish(() => reject(new Error("Wallet approval timed out.")));
4279
4313
  }
4280
- }, 5 * 60 * 1000);
4314
+ }, (_b = ex.ceilingMs) !== null && _b !== void 0 ? _b : 5 * 60 * 1000);
4281
4315
  }));
4282
4316
  m.chain = run.then(() => undefined, () => undefined);
4283
4317
  return run;
@@ -4779,6 +4813,59 @@ async function clearTurnkeySigningSession(idToken) {
4779
4813
  function hasTurnkeyWallet() {
4780
4814
  return activeTurnkeyAddress() !== null;
4781
4815
  }
4816
+ /** The signer frame could not take the exchange: it never loaded, or a page from before the request existed stays silent. */
4817
+ class SignerFrameUnavailable extends Error {
4818
+ constructor() { super('The Bounded signer frame did not answer.'); }
4819
+ }
4820
+ /** How long a silent session probe may wait for the frame before the write goes on without it. */
4821
+ const SESSION_PROBE_MS = 8000;
4822
+ /**
4823
+ * Make the wallet's 24-hour signing session live BEFORE a transaction exists. Without one the
4824
+ * approve card must first collect an emailed code, which takes longer than a transaction's
4825
+ * blockhash lifetime (about 33 seconds on mainnet in late 2026), so a transaction built before
4826
+ * the code is dead by the time it is signed. A live session is found with nothing shown: the
4827
+ * warm frame answers a silent probe, and it holds the session even where the browser blocks its
4828
+ * storage. Only a lapsed session opens the card, which runs the code ceremony and closes without
4829
+ * signing anything. Resolves `'established'` when that ceremony ran, else `'ready'`.
4830
+ *
4831
+ * Both exchanges run in the warm frame only, since it is the frame that signs next and a popup
4832
+ * keeps its session to itself. Where the frame cannot answer (an embedder that blocks it, or a
4833
+ * signer page from before this request existed), the write goes on the way it always did: the
4834
+ * approve card collects the code itself, and an expired build is built again.
4835
+ */
4836
+ async function ensureTurnkeySigningSession() {
4837
+ if (!hasDOM$2())
4838
+ throw new Error('Turnkey embedded-wallet signing is only available in the browser (trusted wallet UI).');
4839
+ const context = await turnkeySignerPage();
4840
+ context.assertCurrent();
4841
+ if (hasWarmSignerFrame(context.key) && walletSessionState(context.key).status === 'ready')
4842
+ return 'ready';
4843
+ const { url, origin } = context;
4844
+ const authorization = await fetchActionAuthorization('createWallet', context);
4845
+ const frameOnly = () => Promise.reject(new SignerFrameUnavailable());
4846
+ const exchange = (probeOnly) => ({
4847
+ context: context.key, assertCurrent: context.assertCurrent,
4848
+ request: Object.assign({ type: 'bounded:turnkey:session', requestId: `tksession_${Date.now()}_${++requestSeq}`, authorization }, (probeOnly ? { probeOnly: true } : {})),
4849
+ onResult: (d) => d.ok ? { done: true, value: d } : { error: String(d.error || 'The signing session could not be established') },
4850
+ });
4851
+ const probed = await runWidget(url, origin, Object.assign(Object.assign({}, exchange(true)), { silent: true, ceilingMs: SESSION_PROBE_MS }), frameOnly)
4852
+ .catch(() => null);
4853
+ if (!probed)
4854
+ return 'ready';
4855
+ let result = probed;
4856
+ if (result.ready !== true) {
4857
+ try {
4858
+ result = await runWidget(url, origin, exchange(false), frameOnly);
4859
+ }
4860
+ catch (error) {
4861
+ if (error instanceof SignerFrameUnavailable)
4862
+ return 'ready';
4863
+ throw error;
4864
+ }
4865
+ }
4866
+ setWalletSessionState(context.key, { status: 'ready', expiresAt: Number(result.signingSessionExpiresAt) });
4867
+ return result.established === true ? 'established' : 'ready';
4868
+ }
4782
4869
  /**
4783
4870
  * Open the Bounded Turnkey approval card and sign `message` (raw bytes) with the
4784
4871
  * user's Turnkey wallet, resolving with the ed25519 signature and wallet address.
@@ -4815,7 +4902,7 @@ async function signSolanaMessageViaTurnkey(message) {
4815
4902
  // A top-level popup keeps its signing session in the signer origin's own storage, which the
4816
4903
  // warm in-app frame (a partitioned context) cannot see, so it says nothing about that frame.
4817
4904
  if (transport !== 'popup')
4818
- setWalletSessionState(context.key, { expiresAt: Number(d.signingSessionExpiresAt) });
4905
+ setWalletSessionState(context.key, { status: 'ready', expiresAt: Number(d.signingSessionExpiresAt) });
4819
4906
  return { done: true, value: { signature: fromHex(d.signatureHex), address: d.address, subOrgId: String(d.subOrgId || '') } };
4820
4907
  }
4821
4908
  // The hosted signer refuses a cross-app signature inside a frame. Never retry it from here:
@@ -4931,6 +5018,7 @@ async function signAndSubmitTransactionWithTurnkey(transaction, feePayer) {
4931
5018
  var turnkeySignerBridge = /*#__PURE__*/Object.freeze({
4932
5019
  __proto__: null,
4933
5020
  clearTurnkeySigningSession: clearTurnkeySigningSession,
5021
+ ensureTurnkeySigningSession: ensureTurnkeySigningSession,
4934
5022
  hasTurnkeyWallet: hasTurnkeyWallet,
4935
5023
  signAndSubmitTransactionWithTurnkey: signAndSubmitTransactionWithTurnkey,
4936
5024
  signMessageWithTurnkey: signMessageWithTurnkey,
@@ -5010,6 +5098,11 @@ const oidcProviderSingleton = {
5010
5098
  throw new Error(OIDC_NO_WALLET);
5011
5099
  return signTransactionV1WithTurnkey(transaction);
5012
5100
  },
5101
+ async prepareToSign() {
5102
+ if (!hasTurnkeyWallet())
5103
+ throw new Error(OIDC_NO_WALLET);
5104
+ return ensureTurnkeySigningSession();
5105
+ },
5013
5106
  supportedTransactionVersions() {
5014
5107
  return hasTurnkeyWallet() ? ['legacy', 0, 1] : ['legacy', 0];
5015
5108
  },
@@ -5084,6 +5177,14 @@ function cleanCallbackUrl(url) {
5084
5177
  clean.searchParams.delete(key);
5085
5178
  return clean;
5086
5179
  }
5180
+ // The address a code returned to, without the fragment. The issuer never sets one
5181
+ // (redirectUri may not carry one), but a browser can keep one across the redirect
5182
+ // chain: iOS lands a Google sign-in on `<redirectUri>?code=...#`.
5183
+ function returnAddress(url) {
5184
+ const clean = cleanCallbackUrl(url);
5185
+ clean.hash = '';
5186
+ return clean.href;
5187
+ }
5087
5188
  async function validateAttempt(pkce, callback) {
5088
5189
  const cfg = await getConfig();
5089
5190
  if (!pkce || typeof pkce.verifier !== 'string' || !pkce.verifier ||
@@ -5093,7 +5194,7 @@ async function validateAttempt(pkce, callback) {
5093
5194
  if (!Number.isFinite(pkce.createdAt) || Date.now() - pkce.createdAt > LOGIN_TIMEOUT_MS || pkce.createdAt > Date.now()) {
5094
5195
  throw new Error('Login expired. Start sign-in again.');
5095
5196
  }
5096
- if (callback && (cleanCallbackUrl(callback).href !== cleanCallbackUrl(new URL(pkce.redirectUri)).href ||
5197
+ if (callback && (returnAddress(callback) !== returnAddress(new URL(pkce.redirectUri)) ||
5097
5198
  (callback.searchParams.has('iss') && callback.searchParams.get('iss') !== pkce.issuer))) {
5098
5199
  throw new Error('Login returned to a different address or from a different auth server. Start sign-in again.');
5099
5200
  }
@@ -5346,7 +5447,7 @@ function parseCallbackParams(callbackUrl) {
5346
5447
  // universal-link callback, verify state, and run the SAME PKCE code→token exchange
5347
5448
  // as web. Returns the signed-in User inline; web redirects complete on the next init().
5348
5449
  async function runNativeLogin(opts) {
5349
- var _a, _b;
5450
+ var _a, _b, _c, _d;
5350
5451
  const { url, pkce } = await buildAuthorize(opts);
5351
5452
  const WebBrowser = await loadExpoWebBrowser();
5352
5453
  const openAuthSession = WebBrowser.openAuthSessionAsync || ((_a = WebBrowser.default) === null || _a === void 0 ? void 0 : _a.openAuthSessionAsync);
@@ -5358,12 +5459,16 @@ async function runNativeLogin(opts) {
5358
5459
  // openAuthSessionAsync keeps JS alive while the system browser is shown, then
5359
5460
  // resolves with the callback URL once the universal link fires — so `pkce`
5360
5461
  // stays in scope and never needs to be persisted.
5361
- const result = await openAuthSession(url, opts.redirectUri);
5462
+ // iOS (17.4+) only returns an https callback to the app when asked to; without it the
5463
+ // sheet treats "https" as a custom scheme and never completes. A custom scheme callback
5464
+ // (an Expo Go preview's exps://) is caught by its scheme either way.
5465
+ const preferUniversalLinks = (_c = (_b = opts.redirectUri) === null || _b === void 0 ? void 0 : _b.startsWith('https:')) !== null && _c !== void 0 ? _c : false;
5466
+ const result = await openAuthSession(url, opts.redirectUri, { preferUniversalLinks });
5362
5467
  if (!result || result.type === 'cancel' || result.type === 'dismiss') {
5363
5468
  throw new Error('Login cancelled');
5364
5469
  }
5365
5470
  if (result.type !== 'success' || typeof result.url !== 'string') {
5366
- throw new Error(`Hosted login did not complete (result: ${(_b = result === null || result === void 0 ? void 0 : result.type) !== null && _b !== void 0 ? _b : 'unknown'})`);
5471
+ throw new Error(`Hosted login did not complete (result: ${(_d = result === null || result === void 0 ? void 0 : result.type) !== null && _d !== void 0 ? _d : 'unknown'})`);
5367
5472
  }
5368
5473
  const { code, state: returnedState } = parseCallbackParams(result.url);
5369
5474
  if (!code)
@@ -5386,7 +5491,8 @@ async function runNativeLogin(opts) {
5386
5491
  * callback, runs the PKCE exchange INLINE, and resolves with the signed-in User. No
5387
5492
  * completeLoginFromRedirect() call is needed on native. Requires `redirectUri` to be an
5388
5493
  * https UNIVERSAL LINK whose origin the app owner registered in the app's allowedOrigins
5389
- * (custom `myapp://` schemes are rejected by the issuer). Needs the optional peer deps
5494
+ * (custom `myapp://` schemes are rejected by the issuer; an app preview opened in Expo Go
5495
+ * uses `exps://<preview host>/--/<path>`). Needs the optional peer deps
5390
5496
  * expo-web-browser + (expo-crypto or react-native-get-random-values). */
5391
5497
  async function loginWithRedirect(opts) {
5392
5498
  if (isNative())
@@ -6065,7 +6171,7 @@ async function getAuthProvider(config, fromStorage = false) {
6065
6171
  // manager as legacy email sessions. Human login should be started
6066
6172
  // with loginWithRedirect(); this provider is kept as the restore and
6067
6173
  // logout surface for those sessions.
6068
- currentAuthProvider = new (await import('./email-auth-provider-DFHalX9c.mjs')).EmailAuthProvider();
6174
+ currentAuthProvider = new (await import('./email-auth-provider-ao5ce_SN.mjs')).EmailAuthProvider();
6069
6175
  break;
6070
6176
  case "phantom": {
6071
6177
  // First-class Solana WALLET LOGIN (the poof/TaroBase-style "connect
@@ -6107,7 +6213,7 @@ async function getAuthProvider(config, fromStorage = false) {
6107
6213
  // (bounded-login-widget.ts), so registration never counts as
6108
6214
  // evidence the user has a wallet.
6109
6215
  await ensureSolanaMobileWalletRegistered(config, configuredNetwork);
6110
- const { InjectedWalletProvider } = await import('./injected-wallet-provider-DSOjJP3u.mjs');
6216
+ const { InjectedWalletProvider } = await import('./injected-wallet-provider-yyJfuVgv.mjs');
6111
6217
  currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
6112
6218
  break;
6113
6219
  }
@@ -6120,7 +6226,7 @@ async function getAuthProvider(config, fromStorage = false) {
6120
6226
  // Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
6121
6227
  // to point at a specific wallet or set chainId/domain.
6122
6228
  const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
6123
- const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-BoLGCVqD.mjs');
6229
+ const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-CtPPhtMh.mjs');
6124
6230
  currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
6125
6231
  break;
6126
6232
  }
@@ -6145,7 +6251,7 @@ async function getAuthProvider(config, fromStorage = false) {
6145
6251
  break;
6146
6252
  case "guest":
6147
6253
  // Anonymous auth: a device-local ed25519 keypair signs the challenge.
6148
- currentAuthProvider = new (await import('./guest-auth-provider-BRq3JB0_.mjs')).GuestAuthProvider();
6254
+ currentAuthProvider = new (await import('./guest-auth-provider-DxQG3JvU.mjs')).GuestAuthProvider();
6149
6255
  break;
6150
6256
  }
6151
6257
  if (!currentAuthProvider) {
@@ -6207,7 +6313,7 @@ async function signInAnonymously() {
6207
6313
  // Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
6208
6314
  // the main bundle for data-only apps. Specifier is a static string literal
6209
6315
  // so bundle-splitting can see it.
6210
- const provider = new (await import('./guest-auth-provider-BRq3JB0_.mjs')).GuestAuthProvider();
6316
+ const provider = new (await import('./guest-auth-provider-DxQG3JvU.mjs')).GuestAuthProvider();
6211
6317
  setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
6212
6318
  // adoptSessionProvider awaits only getConfig() (already resolved here) and then
6213
6319
  // runs every write - provider/method/config/marker/user - in one synchronous
@@ -6378,7 +6484,7 @@ function ensureSharedWalletLoginReady() {
6378
6484
  if (!sharedWalletReady) {
6379
6485
  sharedWalletReady = (async () => {
6380
6486
  await getConfig();
6381
- await import('./injected-wallet-provider-DSOjJP3u.mjs');
6487
+ await import('./injected-wallet-provider-yyJfuVgv.mjs');
6382
6488
  })().catch((error) => {
6383
6489
  sharedWalletReady = null;
6384
6490
  throw error;
@@ -8884,5 +8990,5 @@ class PrivyExpoProvider {
8884
8990
  }
8885
8991
  }
8886
8992
 
8887
- export { PARK_REASONS as $, waitForAuthReady as A, login as B, logout as C, getAuthProvider as D, signInAnonymously as E, loginWithPrivy as F, loginWithRedirect as G, completeLoginFromRedirect as H, getLoginReturnError as I, loginWithPopup as J, useAuth as K, useQuery as L, useBuildRun as M, apps as N, getIdToken as O, onramp as P, onrampQuote as Q, onrampStatus as R, setPlatform as S, OffchainAuthProvider as T, PrivyExpoProvider as U, builds as V, BuildsApiError as W, mediaAgentTools as X, NON_TERMINAL_STATES as Y, TERMINAL_STATES as Z, RUN_STATES as _, signMessageWithTurnkey as a, FAILURE_REASONS as a0, BUILD_REVIEW_CAPABILITY_SCHEMA as a1, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as a2, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as a3, signTransactionWithTurnkey as b, signTransactionV1WithTurnkey as c, signAndSubmitTransactionWithTurnkey as d, bs58 as e, getWallets as f, getPlatform as g, hasTurnkeyWallet as h, solanaMobileWalletLeavesPage as i, solanaMobileWalletAnswersSignInFromCache as j, isSolanaMobileWallet as k, setAuthLoading as l, bufferExports as m, normalizeSolanaRpcUrl as n, setStoredAuthMethod as o, confirmAndCheckTransaction as p, resolveSolanaRpcUrl as q, resolveSolanaWalletStandardChain as r, setCurrentUser as s, transactionHasSignature as t, init as u, getCurrentUser as v, walletStandardFeatureName as w, onAuthStateChanged as x, onAuthLoadingChanged as y, getAuthLoading as z };
8888
- //# sourceMappingURL=index.native-YmmnwqEw.mjs.map
8993
+ export { RUN_STATES as $, getAuthLoading as A, waitForAuthReady as B, login as C, logout as D, getAuthProvider as E, signInAnonymously as F, loginWithPrivy as G, loginWithRedirect as H, completeLoginFromRedirect as I, getLoginReturnError as J, loginWithPopup as K, useAuth as L, useQuery as M, useBuildRun as N, apps as O, getIdToken as P, onramp as Q, onrampQuote as R, onrampStatus as S, setPlatform as T, OffchainAuthProvider as U, PrivyExpoProvider as V, builds as W, BuildsApiError as X, mediaAgentTools as Y, NON_TERMINAL_STATES as Z, TERMINAL_STATES as _, signMessageWithTurnkey as a, PARK_REASONS as a0, FAILURE_REASONS as a1, BUILD_REVIEW_CAPABILITY_SCHEMA as a2, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as a3, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as a4, signTransactionWithTurnkey as b, signTransactionV1WithTurnkey as c, signAndSubmitTransactionWithTurnkey as d, ensureTurnkeySigningSession as e, bs58 as f, getPlatform as g, hasTurnkeyWallet as h, getWallets as i, solanaMobileWalletLeavesPage as j, solanaMobileWalletAnswersSignInFromCache as k, isSolanaMobileWallet as l, setAuthLoading as m, normalizeSolanaRpcUrl as n, bufferExports as o, setStoredAuthMethod as p, confirmAndCheckTransaction as q, resolveSolanaWalletStandardChain as r, setCurrentUser as s, transactionHasSignature as t, resolveSolanaRpcUrl as u, init as v, walletStandardFeatureName as w, getCurrentUser as x, onAuthStateChanged as y, onAuthLoadingChanged as z };
8994
+ //# sourceMappingURL=index.native-N5zxPEYK.mjs.map