@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.
- package/dist/auth/oidc-auth.d.ts +2 -1
- package/dist/auth/providers/email-auth-provider.d.ts +2 -1
- package/dist/auth/providers/offchain-auth-provider.d.ts +2 -1
- package/dist/auth/turnkey-signer-bridge.d.ts +16 -0
- package/dist/auth/turnkey-wallet-widget.d.ts +4 -0
- package/dist/{email-auth-provider-C-qQ46kD.js → email-auth-provider-Bb_0mHJ_.js} +7 -2
- package/dist/email-auth-provider-Bb_0mHJ_.js.map +1 -0
- package/dist/{email-auth-provider-BYiK3ZCv.js → email-auth-provider-IsiArtx0.js} +7 -2
- package/dist/email-auth-provider-IsiArtx0.js.map +1 -0
- package/dist/{email-auth-provider-B9cZ-puM.mjs → email-auth-provider-TA2AbU5Y.mjs} +7 -2
- package/dist/email-auth-provider-TA2AbU5Y.mjs.map +1 -0
- package/dist/{email-auth-provider-DFHalX9c.mjs → email-auth-provider-ao5ce_SN.mjs} +7 -2
- package/dist/email-auth-provider-ao5ce_SN.mjs.map +1 -0
- package/dist/{guest-auth-provider-g5-T58yA.js → guest-auth-provider-CJUbifdu.js} +2 -2
- package/dist/{guest-auth-provider-g5-T58yA.js.map → guest-auth-provider-CJUbifdu.js.map} +1 -1
- package/dist/{guest-auth-provider-D1q3C5uC.js → guest-auth-provider-DTEwf7qP.js} +2 -2
- package/dist/{guest-auth-provider-D1q3C5uC.js.map → guest-auth-provider-DTEwf7qP.js.map} +1 -1
- package/dist/{guest-auth-provider-i8-RL0js.mjs → guest-auth-provider-Dw-bF10B.mjs} +2 -2
- package/dist/{guest-auth-provider-BRq3JB0_.mjs.map → guest-auth-provider-Dw-bF10B.mjs.map} +1 -1
- package/dist/{guest-auth-provider-BRq3JB0_.mjs → guest-auth-provider-DxQG3JvU.mjs} +2 -2
- package/dist/{guest-auth-provider-i8-RL0js.mjs.map → guest-auth-provider-DxQG3JvU.mjs.map} +1 -1
- package/dist/{index-xNGb1ROp.mjs → index-BdzGX8fS.mjs} +113 -23
- package/dist/index-BdzGX8fS.mjs.map +1 -0
- package/dist/{index-eMCWYiRe.js → index-KUBcQdTX.js} +113 -22
- package/dist/index-KUBcQdTX.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{index.native-ByI3rRu4.js → index.native-CZSRvIAb.js} +130 -23
- package/dist/index.native-CZSRvIAb.js.map +1 -0
- package/dist/{index.native-YmmnwqEw.mjs → index.native-N5zxPEYK.mjs} +130 -24
- package/dist/index.native-N5zxPEYK.mjs.map +1 -0
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{injected-evm-wallet-provider-BIYAL_NZ.js → injected-evm-wallet-provider--XJFh-7d.js} +2 -2
- package/dist/{injected-evm-wallet-provider-BIYAL_NZ.js.map → injected-evm-wallet-provider--XJFh-7d.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-BMjQaUiB.js → injected-evm-wallet-provider-4T_-2UQI.js} +2 -2
- package/dist/{injected-evm-wallet-provider-BMjQaUiB.js.map → injected-evm-wallet-provider-4T_-2UQI.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider--x3yWNps.mjs → injected-evm-wallet-provider-BlSFIzEA.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider--x3yWNps.mjs.map → injected-evm-wallet-provider-BlSFIzEA.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-BoLGCVqD.mjs → injected-evm-wallet-provider-CtPPhtMh.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-BoLGCVqD.mjs.map → injected-evm-wallet-provider-CtPPhtMh.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-DuWTw-fM.mjs → injected-wallet-provider-Bnsfazum.mjs} +2 -2
- package/dist/{injected-wallet-provider-DuWTw-fM.mjs.map → injected-wallet-provider-Bnsfazum.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-D3fVFadN.js → injected-wallet-provider-CJ0v5Sgn.js} +2 -2
- package/dist/{injected-wallet-provider-D3fVFadN.js.map → injected-wallet-provider-CJ0v5Sgn.js.map} +1 -1
- package/dist/{injected-wallet-provider-zXw__lyf.js → injected-wallet-provider-Ckljhcbu.js} +2 -2
- package/dist/{injected-wallet-provider-zXw__lyf.js.map → injected-wallet-provider-Ckljhcbu.js.map} +1 -1
- package/dist/{injected-wallet-provider-DSOjJP3u.mjs → injected-wallet-provider-yyJfuVgv.mjs} +2 -2
- package/dist/{injected-wallet-provider-DSOjJP3u.mjs.map → injected-wallet-provider-yyJfuVgv.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/email-auth-provider-B9cZ-puM.mjs.map +0 -1
- package/dist/email-auth-provider-BYiK3ZCv.js.map +0 -1
- package/dist/email-auth-provider-C-qQ46kD.js.map +0 -1
- package/dist/email-auth-provider-DFHalX9c.mjs.map +0 -1
- package/dist/index-eMCWYiRe.js.map +0 -1
- package/dist/index-xNGb1ROp.mjs.map +0 -1
- package/dist/index.native-ByI3rRu4.js.map +0 -1
- package/dist/index.native-YmmnwqEw.mjs.map +0 -1
|
@@ -158,8 +158,17 @@ function createWebPlatform() {
|
|
|
158
158
|
// bundlers do not externalize or preload a Node-only module in the
|
|
159
159
|
// email/guest graph; this branch is unreachable when WebCrypto is
|
|
160
160
|
// available (all supported browsers and current Node releases).
|
|
161
|
+
// The try makes it an optional dependency for Metro, whose production
|
|
162
|
+
// constant folding turns the specifier back into a literal: a React Native
|
|
163
|
+
// app with no node:crypto mapping still bundles (it passes setPlatform({ sha256 })).
|
|
161
164
|
const nodeCryptoSpecifier = 'node:crypto';
|
|
162
|
-
|
|
165
|
+
let createHash;
|
|
166
|
+
try {
|
|
167
|
+
({ createHash } = await import(/* @vite-ignore */ nodeCryptoSpecifier));
|
|
168
|
+
}
|
|
169
|
+
catch (_b) {
|
|
170
|
+
throw new Error('SHA-256 needs WebCrypto here: pass setPlatform({ sha256 }) (e.g. expo-crypto digest).');
|
|
171
|
+
}
|
|
163
172
|
const hash = createHash('sha256').update(data).digest();
|
|
164
173
|
return hash.buffer.slice(hash.byteOffset, hash.byteOffset + hash.byteLength);
|
|
165
174
|
},
|
|
@@ -295,6 +304,10 @@ class OffchainAuthProvider {
|
|
|
295
304
|
async signTransaction(tx) {
|
|
296
305
|
return this.wrappedProvider.signTransaction(tx);
|
|
297
306
|
}
|
|
307
|
+
async prepareToSign() {
|
|
308
|
+
var _a, _b, _c;
|
|
309
|
+
return (_c = (await ((_b = (_a = this.wrappedProvider).prepareToSign) === null || _b === void 0 ? void 0 : _b.call(_a)))) !== null && _c !== void 0 ? _c : 'ready';
|
|
310
|
+
}
|
|
298
311
|
/**
|
|
299
312
|
* Sign and submit transaction - not supported in poofnet environment.
|
|
300
313
|
* See the real providers (PhantomWalletProvider, SolanaKeypairProvider)
|
|
@@ -4390,7 +4403,7 @@ async function runWidget(url, signerOrigin, ex, popupFallback) {
|
|
|
4390
4403
|
const requestId = String(ex.request.requestId);
|
|
4391
4404
|
// Serialize: the approve card is modal, and one warm frame handles one request at a time.
|
|
4392
4405
|
const run = m.chain.then(() => new Promise((resolve, reject) => {
|
|
4393
|
-
var _a;
|
|
4406
|
+
var _a, _b;
|
|
4394
4407
|
let settled = false;
|
|
4395
4408
|
let usedFallback = false;
|
|
4396
4409
|
(_a = ex.assertCurrent) === null || _a === void 0 ? void 0 : _a.call(ex);
|
|
@@ -4433,16 +4446,20 @@ async function runWidget(url, signerOrigin, ex, popupFallback) {
|
|
|
4433
4446
|
/* frame gone */
|
|
4434
4447
|
}
|
|
4435
4448
|
};
|
|
4449
|
+
const dismiss = () => {
|
|
4450
|
+
if (!ex.silent)
|
|
4451
|
+
hideModal(m);
|
|
4452
|
+
};
|
|
4436
4453
|
const goFallback = () => {
|
|
4437
4454
|
if (usedFallback || settled)
|
|
4438
4455
|
return;
|
|
4439
4456
|
usedFallback = true;
|
|
4440
|
-
|
|
4457
|
+
dismiss();
|
|
4441
4458
|
finish(() => popupFallback().then(resolve, reject));
|
|
4442
4459
|
};
|
|
4443
4460
|
m.onBackdrop = () => {
|
|
4444
4461
|
cancelInFrame();
|
|
4445
|
-
|
|
4462
|
+
dismiss();
|
|
4446
4463
|
finish(() => reject(new Error("cancelled")));
|
|
4447
4464
|
};
|
|
4448
4465
|
m.onIframeMessage = (d) => {
|
|
@@ -4457,17 +4474,18 @@ async function runWidget(url, signerOrigin, ex, popupFallback) {
|
|
|
4457
4474
|
if (d.type === "bounded:turnkey:result" && d.requestId === requestId) {
|
|
4458
4475
|
const outcome = ex.onResult(d);
|
|
4459
4476
|
if ("error" in outcome) {
|
|
4460
|
-
|
|
4477
|
+
dismiss();
|
|
4461
4478
|
finish(() => reject(new Error(outcome.error)));
|
|
4462
4479
|
return;
|
|
4463
4480
|
}
|
|
4464
4481
|
if (outcome.done) {
|
|
4465
|
-
|
|
4482
|
+
dismiss();
|
|
4466
4483
|
finish(() => resolve(outcome.value));
|
|
4467
4484
|
}
|
|
4468
4485
|
}
|
|
4469
4486
|
};
|
|
4470
|
-
|
|
4487
|
+
if (!ex.silent)
|
|
4488
|
+
showModal(m);
|
|
4471
4489
|
if (m.iframeReady)
|
|
4472
4490
|
send();
|
|
4473
4491
|
// If the frame never loads, degrade to the popup (best-effort - a post-load
|
|
@@ -4480,10 +4498,10 @@ async function runWidget(url, signerOrigin, ex, popupFallback) {
|
|
|
4480
4498
|
ceilingTimer = window.setTimeout(() => {
|
|
4481
4499
|
if (!settled) {
|
|
4482
4500
|
cancelInFrame();
|
|
4483
|
-
|
|
4501
|
+
dismiss();
|
|
4484
4502
|
finish(() => reject(new Error("Wallet approval timed out.")));
|
|
4485
4503
|
}
|
|
4486
|
-
}, 5 * 60 * 1000);
|
|
4504
|
+
}, (_b = ex.ceilingMs) !== null && _b !== void 0 ? _b : 5 * 60 * 1000);
|
|
4487
4505
|
}));
|
|
4488
4506
|
m.chain = run.then(() => undefined, () => undefined);
|
|
4489
4507
|
return run;
|
|
@@ -5065,6 +5083,59 @@ async function clearTurnkeySigningSession(idToken) {
|
|
|
5065
5083
|
function hasTurnkeyWallet() {
|
|
5066
5084
|
return activeTurnkeyAddress() !== null;
|
|
5067
5085
|
}
|
|
5086
|
+
/** The signer frame could not take the exchange: it never loaded, or a page from before the request existed stays silent. */
|
|
5087
|
+
class SignerFrameUnavailable extends Error {
|
|
5088
|
+
constructor() { super('The Bounded signer frame did not answer.'); }
|
|
5089
|
+
}
|
|
5090
|
+
/** How long a silent session probe may wait for the frame before the write goes on without it. */
|
|
5091
|
+
const SESSION_PROBE_MS = 8000;
|
|
5092
|
+
/**
|
|
5093
|
+
* Make the wallet's 24-hour signing session live BEFORE a transaction exists. Without one the
|
|
5094
|
+
* approve card must first collect an emailed code, which takes longer than a transaction's
|
|
5095
|
+
* blockhash lifetime (about 33 seconds on mainnet in late 2026), so a transaction built before
|
|
5096
|
+
* the code is dead by the time it is signed. A live session is found with nothing shown: the
|
|
5097
|
+
* warm frame answers a silent probe, and it holds the session even where the browser blocks its
|
|
5098
|
+
* storage. Only a lapsed session opens the card, which runs the code ceremony and closes without
|
|
5099
|
+
* signing anything. Resolves `'established'` when that ceremony ran, else `'ready'`.
|
|
5100
|
+
*
|
|
5101
|
+
* Both exchanges run in the warm frame only, since it is the frame that signs next and a popup
|
|
5102
|
+
* keeps its session to itself. Where the frame cannot answer (an embedder that blocks it, or a
|
|
5103
|
+
* signer page from before this request existed), the write goes on the way it always did: the
|
|
5104
|
+
* approve card collects the code itself, and an expired build is built again.
|
|
5105
|
+
*/
|
|
5106
|
+
async function ensureTurnkeySigningSession() {
|
|
5107
|
+
if (!hasDOM$3())
|
|
5108
|
+
throw new Error('Turnkey embedded-wallet signing is only available in the browser (trusted wallet UI).');
|
|
5109
|
+
const context = await turnkeySignerPage();
|
|
5110
|
+
context.assertCurrent();
|
|
5111
|
+
if (hasWarmSignerFrame(context.key) && walletSessionState(context.key).status === 'ready')
|
|
5112
|
+
return 'ready';
|
|
5113
|
+
const { url, origin } = context;
|
|
5114
|
+
const authorization = await fetchActionAuthorization('createWallet', context);
|
|
5115
|
+
const frameOnly = () => Promise.reject(new SignerFrameUnavailable());
|
|
5116
|
+
const exchange = (probeOnly) => ({
|
|
5117
|
+
context: context.key, assertCurrent: context.assertCurrent,
|
|
5118
|
+
request: Object.assign({ type: 'bounded:turnkey:session', requestId: `tksession_${Date.now()}_${++requestSeq}`, authorization }, (probeOnly ? { probeOnly: true } : {})),
|
|
5119
|
+
onResult: (d) => d.ok ? { done: true, value: d } : { error: String(d.error || 'The signing session could not be established') },
|
|
5120
|
+
});
|
|
5121
|
+
const probed = await runWidget(url, origin, Object.assign(Object.assign({}, exchange(true)), { silent: true, ceilingMs: SESSION_PROBE_MS }), frameOnly)
|
|
5122
|
+
.catch(() => null);
|
|
5123
|
+
if (!probed)
|
|
5124
|
+
return 'ready';
|
|
5125
|
+
let result = probed;
|
|
5126
|
+
if (result.ready !== true) {
|
|
5127
|
+
try {
|
|
5128
|
+
result = await runWidget(url, origin, exchange(false), frameOnly);
|
|
5129
|
+
}
|
|
5130
|
+
catch (error) {
|
|
5131
|
+
if (error instanceof SignerFrameUnavailable)
|
|
5132
|
+
return 'ready';
|
|
5133
|
+
throw error;
|
|
5134
|
+
}
|
|
5135
|
+
}
|
|
5136
|
+
setWalletSessionState(context.key, { status: 'ready', expiresAt: Number(result.signingSessionExpiresAt) });
|
|
5137
|
+
return result.established === true ? 'established' : 'ready';
|
|
5138
|
+
}
|
|
5068
5139
|
/**
|
|
5069
5140
|
* Get-or-create the user's non-custodial Turnkey wallet, resolving with its stable
|
|
5070
5141
|
* Solana address. Creation never prompts: on first use the signer silently provisions
|
|
@@ -5297,6 +5368,7 @@ async function getTurnkeyWalletRecoveryUrl() {
|
|
|
5297
5368
|
var turnkeySignerBridge = /*#__PURE__*/Object.freeze({
|
|
5298
5369
|
__proto__: null,
|
|
5299
5370
|
clearTurnkeySigningSession: clearTurnkeySigningSession,
|
|
5371
|
+
ensureTurnkeySigningSession: ensureTurnkeySigningSession,
|
|
5300
5372
|
getOrCreateTurnkeyWallet: getOrCreateTurnkeyWallet,
|
|
5301
5373
|
getTurnkeyWalletRecoveryUrl: getTurnkeyWalletRecoveryUrl,
|
|
5302
5374
|
getTurnkeyWalletSessionState: getTurnkeyWalletSessionState,
|
|
@@ -5380,6 +5452,11 @@ const oidcProviderSingleton = {
|
|
|
5380
5452
|
throw new Error(OIDC_NO_WALLET);
|
|
5381
5453
|
return signTransactionV1WithTurnkey(transaction);
|
|
5382
5454
|
},
|
|
5455
|
+
async prepareToSign() {
|
|
5456
|
+
if (!hasTurnkeyWallet())
|
|
5457
|
+
throw new Error(OIDC_NO_WALLET);
|
|
5458
|
+
return ensureTurnkeySigningSession();
|
|
5459
|
+
},
|
|
5383
5460
|
supportedTransactionVersions() {
|
|
5384
5461
|
return hasTurnkeyWallet() ? ['legacy', 0, 1] : ['legacy', 0];
|
|
5385
5462
|
},
|
|
@@ -5454,6 +5531,14 @@ function cleanCallbackUrl(url) {
|
|
|
5454
5531
|
clean.searchParams.delete(key);
|
|
5455
5532
|
return clean;
|
|
5456
5533
|
}
|
|
5534
|
+
// The address a code returned to, without the fragment. The issuer never sets one
|
|
5535
|
+
// (redirectUri may not carry one), but a browser can keep one across the redirect
|
|
5536
|
+
// chain: iOS lands a Google sign-in on `<redirectUri>?code=...#`.
|
|
5537
|
+
function returnAddress(url) {
|
|
5538
|
+
const clean = cleanCallbackUrl(url);
|
|
5539
|
+
clean.hash = '';
|
|
5540
|
+
return clean.href;
|
|
5541
|
+
}
|
|
5457
5542
|
async function validateAttempt(pkce, callback) {
|
|
5458
5543
|
const cfg = await core.getConfig();
|
|
5459
5544
|
if (!pkce || typeof pkce.verifier !== 'string' || !pkce.verifier ||
|
|
@@ -5463,7 +5548,7 @@ async function validateAttempt(pkce, callback) {
|
|
|
5463
5548
|
if (!Number.isFinite(pkce.createdAt) || Date.now() - pkce.createdAt > LOGIN_TIMEOUT_MS || pkce.createdAt > Date.now()) {
|
|
5464
5549
|
throw new Error('Login expired. Start sign-in again.');
|
|
5465
5550
|
}
|
|
5466
|
-
if (callback && (
|
|
5551
|
+
if (callback && (returnAddress(callback) !== returnAddress(new URL(pkce.redirectUri)) ||
|
|
5467
5552
|
(callback.searchParams.has('iss') && callback.searchParams.get('iss') !== pkce.issuer))) {
|
|
5468
5553
|
throw new Error('Login returned to a different address or from a different auth server. Start sign-in again.');
|
|
5469
5554
|
}
|
|
@@ -5716,7 +5801,7 @@ function parseCallbackParams(callbackUrl) {
|
|
|
5716
5801
|
// universal-link callback, verify state, and run the SAME PKCE code→token exchange
|
|
5717
5802
|
// as web. Returns the signed-in User inline; web redirects complete on the next init().
|
|
5718
5803
|
async function runNativeLogin(opts) {
|
|
5719
|
-
var _a, _b;
|
|
5804
|
+
var _a, _b, _c, _d;
|
|
5720
5805
|
const { url, pkce } = await buildAuthorize(opts);
|
|
5721
5806
|
const WebBrowser = await loadExpoWebBrowser();
|
|
5722
5807
|
const openAuthSession = WebBrowser.openAuthSessionAsync || ((_a = WebBrowser.default) === null || _a === void 0 ? void 0 : _a.openAuthSessionAsync);
|
|
@@ -5728,12 +5813,16 @@ async function runNativeLogin(opts) {
|
|
|
5728
5813
|
// openAuthSessionAsync keeps JS alive while the system browser is shown, then
|
|
5729
5814
|
// resolves with the callback URL once the universal link fires — so `pkce`
|
|
5730
5815
|
// stays in scope and never needs to be persisted.
|
|
5731
|
-
|
|
5816
|
+
// iOS (17.4+) only returns an https callback to the app when asked to; without it the
|
|
5817
|
+
// sheet treats "https" as a custom scheme and never completes. A custom scheme callback
|
|
5818
|
+
// (an Expo Go preview's exps://) is caught by its scheme either way.
|
|
5819
|
+
const preferUniversalLinks = (_c = (_b = opts.redirectUri) === null || _b === void 0 ? void 0 : _b.startsWith('https:')) !== null && _c !== void 0 ? _c : false;
|
|
5820
|
+
const result = await openAuthSession(url, opts.redirectUri, { preferUniversalLinks });
|
|
5732
5821
|
if (!result || result.type === 'cancel' || result.type === 'dismiss') {
|
|
5733
5822
|
throw new Error('Login cancelled');
|
|
5734
5823
|
}
|
|
5735
5824
|
if (result.type !== 'success' || typeof result.url !== 'string') {
|
|
5736
|
-
throw new Error(`Hosted login did not complete (result: ${(
|
|
5825
|
+
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'})`);
|
|
5737
5826
|
}
|
|
5738
5827
|
const { code, state: returnedState } = parseCallbackParams(result.url);
|
|
5739
5828
|
if (!code)
|
|
@@ -5756,7 +5845,8 @@ async function runNativeLogin(opts) {
|
|
|
5756
5845
|
* callback, runs the PKCE exchange INLINE, and resolves with the signed-in User. No
|
|
5757
5846
|
* completeLoginFromRedirect() call is needed on native. Requires `redirectUri` to be an
|
|
5758
5847
|
* https UNIVERSAL LINK whose origin the app owner registered in the app's allowedOrigins
|
|
5759
|
-
* (custom `myapp://` schemes are rejected by the issuer
|
|
5848
|
+
* (custom `myapp://` schemes are rejected by the issuer; an app preview opened in Expo Go
|
|
5849
|
+
* uses `exps://<preview host>/--/<path>`). Needs the optional peer deps
|
|
5760
5850
|
* expo-web-browser + (expo-crypto or react-native-get-random-values). */
|
|
5761
5851
|
async function loginWithRedirect(opts) {
|
|
5762
5852
|
if (isNative())
|
|
@@ -6493,7 +6583,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
6493
6583
|
// manager as legacy email sessions. Human login should be started
|
|
6494
6584
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
6495
6585
|
// logout surface for those sessions.
|
|
6496
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-
|
|
6586
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-IsiArtx0.js'); })).EmailAuthProvider();
|
|
6497
6587
|
break;
|
|
6498
6588
|
case "phantom": {
|
|
6499
6589
|
// First-class Solana WALLET LOGIN (the poof/TaroBase-style "connect
|
|
@@ -6535,7 +6625,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
6535
6625
|
// (bounded-login-widget.ts), so registration never counts as
|
|
6536
6626
|
// evidence the user has a wallet.
|
|
6537
6627
|
await ensureSolanaMobileWalletRegistered(config, configuredNetwork);
|
|
6538
|
-
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-
|
|
6628
|
+
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-CJ0v5Sgn.js'); });
|
|
6539
6629
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
6540
6630
|
break;
|
|
6541
6631
|
}
|
|
@@ -6548,7 +6638,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
6548
6638
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
6549
6639
|
// to point at a specific wallet or set chainId/domain.
|
|
6550
6640
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
6551
|
-
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider-
|
|
6641
|
+
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider--XJFh-7d.js'); });
|
|
6552
6642
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
6553
6643
|
break;
|
|
6554
6644
|
}
|
|
@@ -6573,7 +6663,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
6573
6663
|
break;
|
|
6574
6664
|
case "guest":
|
|
6575
6665
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
6576
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
6666
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-DTEwf7qP.js'); })).GuestAuthProvider();
|
|
6577
6667
|
break;
|
|
6578
6668
|
}
|
|
6579
6669
|
if (!currentAuthProvider) {
|
|
@@ -6635,7 +6725,7 @@ async function signInAnonymously() {
|
|
|
6635
6725
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
6636
6726
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
6637
6727
|
// so bundle-splitting can see it.
|
|
6638
|
-
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
6728
|
+
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-DTEwf7qP.js'); })).GuestAuthProvider();
|
|
6639
6729
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
6640
6730
|
// adoptSessionProvider awaits only getConfig() (already resolved here) and then
|
|
6641
6731
|
// runs every write - provider/method/config/marker/user - in one synchronous
|
|
@@ -6806,7 +6896,7 @@ function ensureSharedWalletLoginReady() {
|
|
|
6806
6896
|
if (!sharedWalletReady) {
|
|
6807
6897
|
sharedWalletReady = (async () => {
|
|
6808
6898
|
await core.getConfig();
|
|
6809
|
-
await Promise.resolve().then(function () { return require('./injected-wallet-provider-
|
|
6899
|
+
await Promise.resolve().then(function () { return require('./injected-wallet-provider-CJ0v5Sgn.js'); });
|
|
6810
6900
|
})().catch((error) => {
|
|
6811
6901
|
sharedWalletReady = null;
|
|
6812
6902
|
throw error;
|
|
@@ -6911,7 +7001,7 @@ async function loginWithWallet(options) {
|
|
|
6911
7001
|
await ensureSharedWalletLoginReady();
|
|
6912
7002
|
else
|
|
6913
7003
|
await ensureWalletLoginReady();
|
|
6914
|
-
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-
|
|
7004
|
+
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-CJ0v5Sgn.js'); });
|
|
6915
7005
|
// Keep the RAW wallet provider: the offchain wrapper forwards only a fixed
|
|
6916
7006
|
// set of methods, so cleanup below must speak to the provider that actually
|
|
6917
7007
|
// holds the config rather than to whatever is wrapping it.
|
|
@@ -12320,6 +12410,7 @@ exports.disconnect = disconnect;
|
|
|
12320
12410
|
exports.disputeVenueEscrow = disputeVenueEscrow;
|
|
12321
12411
|
exports.ensureSharedWalletLoginReady = ensureSharedWalletLoginReady;
|
|
12322
12412
|
exports.ensureSignedIn = ensureSignedIn;
|
|
12413
|
+
exports.ensureTurnkeySigningSession = ensureTurnkeySigningSession;
|
|
12323
12414
|
exports.ensureWalletLoginReady = ensureWalletLoginReady;
|
|
12324
12415
|
exports.firstStandardWalletProvider = firstStandardWalletProvider;
|
|
12325
12416
|
exports.fundVenueEscrow = fundVenueEscrow;
|
|
@@ -12371,4 +12462,4 @@ exports.useAuth = useAuth;
|
|
|
12371
12462
|
exports.useBuildRun = useBuildRun;
|
|
12372
12463
|
exports.useQuery = useQuery;
|
|
12373
12464
|
exports.waitForAuthReady = waitForAuthReady;
|
|
12374
|
-
//# sourceMappingURL=index-
|
|
12465
|
+
//# sourceMappingURL=index-KUBcQdTX.js.map
|