@bounded-sh/client 0.0.53-next.1 → 0.0.55
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 +10 -4
- package/dist/builds/apps.d.ts +33 -4
- package/dist/builds/client.d.ts +5 -1
- package/dist/builds/types.d.ts +9 -0
- package/dist/{email-auth-provider-CR7B2pob.mjs → email-auth-provider-BKl9GgHV.mjs} +2 -2
- package/dist/{email-auth-provider-CRFJd5Rp.mjs.map → email-auth-provider-BKl9GgHV.mjs.map} +1 -1
- package/dist/{email-auth-provider-BQ-DTX3z.js → email-auth-provider-BaZceaov.js} +2 -2
- package/dist/{email-auth-provider-BQ-DTX3z.js.map → email-auth-provider-BaZceaov.js.map} +1 -1
- package/dist/{email-auth-provider-CyEhOnGQ.js → email-auth-provider-lVwM8vRR.js} +2 -2
- package/dist/{email-auth-provider-CyEhOnGQ.js.map → email-auth-provider-lVwM8vRR.js.map} +1 -1
- package/dist/{email-auth-provider-CRFJd5Rp.mjs → email-auth-provider-yBbGzH2e.mjs} +2 -2
- package/dist/{email-auth-provider-CR7B2pob.mjs.map → email-auth-provider-yBbGzH2e.mjs.map} +1 -1
- package/dist/{guest-auth-provider-BLzLLs7u.mjs → guest-auth-provider-BnugW3TI.mjs} +2 -2
- package/dist/{guest-auth-provider-BLzLLs7u.mjs.map → guest-auth-provider-BnugW3TI.mjs.map} +1 -1
- package/dist/{guest-auth-provider-3cWfAi5V.js → guest-auth-provider-DTKczntw.js} +2 -2
- package/dist/{guest-auth-provider-3cWfAi5V.js.map → guest-auth-provider-DTKczntw.js.map} +1 -1
- package/dist/{guest-auth-provider-1GGM1eWA.mjs → guest-auth-provider-Dgs8zcnC.mjs} +2 -2
- package/dist/{guest-auth-provider-1GGM1eWA.mjs.map → guest-auth-provider-Dgs8zcnC.mjs.map} +1 -1
- package/dist/{guest-auth-provider-DkUngKob.js → guest-auth-provider-DhN9PoAi.js} +2 -2
- package/dist/{guest-auth-provider-DkUngKob.js.map → guest-auth-provider-DhN9PoAi.js.map} +1 -1
- package/dist/{index-C6p_-77w.js → index-CXVwyR6_.js} +34 -13
- package/dist/{index-C6p_-77w.js.map → index-CXVwyR6_.js.map} +1 -1
- package/dist/{index-Co7IqxVo.mjs → index-DkdIADby.mjs} +34 -13
- package/dist/{index-Co7IqxVo.mjs.map → index-DkdIADby.mjs.map} +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{index.native-BTPOnWux.js → index.native-CouprxZp.js} +34 -13
- package/dist/{index.native-BTPOnWux.js.map → index.native-CouprxZp.js.map} +1 -1
- package/dist/{index.native-BoKkzObx.mjs → index.native-aSo8M0A8.mjs} +34 -13
- package/dist/{index.native-BoKkzObx.mjs.map → index.native-aSo8M0A8.mjs.map} +1 -1
- package/dist/index.native.d.ts +2 -0
- package/dist/index.native.js +9 -1
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +2 -2
- package/dist/{injected-evm-wallet-provider-CA9ENSN4.mjs → injected-evm-wallet-provider-BgiFW_kf.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-CA9ENSN4.mjs.map → injected-evm-wallet-provider-BgiFW_kf.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-Cjs3K7fU.js → injected-evm-wallet-provider-CiCeS1n2.js} +2 -2
- package/dist/{injected-evm-wallet-provider-Cjs3K7fU.js.map → injected-evm-wallet-provider-CiCeS1n2.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-DCqeV702.js → injected-evm-wallet-provider-CtrS-gLC.js} +2 -2
- package/dist/{injected-evm-wallet-provider-DCqeV702.js.map → injected-evm-wallet-provider-CtrS-gLC.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-Bsh00akg.mjs → injected-evm-wallet-provider-D7fd42En.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-Bsh00akg.mjs.map → injected-evm-wallet-provider-D7fd42En.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-uF4yZt8l.mjs → injected-wallet-provider-BhpwmpgW.mjs} +2 -2
- package/dist/{injected-wallet-provider-uF4yZt8l.mjs.map → injected-wallet-provider-BhpwmpgW.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-CfzCTdM5.js → injected-wallet-provider-Bic6GpDr.js} +2 -2
- package/dist/{injected-wallet-provider-CfzCTdM5.js.map → injected-wallet-provider-Bic6GpDr.js.map} +1 -1
- package/dist/{injected-wallet-provider-BwHOxPAR.mjs → injected-wallet-provider-CRG9TaA9.mjs} +2 -2
- package/dist/{injected-wallet-provider-BwHOxPAR.mjs.map → injected-wallet-provider-CRG9TaA9.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-CmhZtf9E.js → injected-wallet-provider-CST-B9EE.js} +2 -2
- package/dist/{injected-wallet-provider-CmhZtf9E.js.map → injected-wallet-provider-CST-B9EE.js.map} +1 -1
- package/package.json +2 -2
|
@@ -4443,7 +4443,7 @@ async function getAuthProvider(config) {
|
|
|
4443
4443
|
// manager as legacy email sessions. Human login should be started
|
|
4444
4444
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
4445
4445
|
// logout surface for those sessions.
|
|
4446
|
-
currentAuthProvider = new (await import('./email-auth-provider-
|
|
4446
|
+
currentAuthProvider = new (await import('./email-auth-provider-yBbGzH2e.mjs')).EmailAuthProvider();
|
|
4447
4447
|
break;
|
|
4448
4448
|
case "wallet":
|
|
4449
4449
|
case "phantom": {
|
|
@@ -4462,7 +4462,7 @@ async function getAuthProvider(config) {
|
|
|
4462
4462
|
if (!isWalletLoginEnabled(config)) {
|
|
4463
4463
|
throw walletLoginNotEnabledError(authMethod);
|
|
4464
4464
|
}
|
|
4465
|
-
const { InjectedWalletProvider } = await import('./injected-wallet-provider-
|
|
4465
|
+
const { InjectedWalletProvider } = await import('./injected-wallet-provider-BhpwmpgW.mjs');
|
|
4466
4466
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
4467
4467
|
break;
|
|
4468
4468
|
}
|
|
@@ -4475,7 +4475,7 @@ async function getAuthProvider(config) {
|
|
|
4475
4475
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
4476
4476
|
// to point at a specific wallet or set chainId/domain.
|
|
4477
4477
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
4478
|
-
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-
|
|
4478
|
+
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-D7fd42En.mjs');
|
|
4479
4479
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
4480
4480
|
break;
|
|
4481
4481
|
}
|
|
@@ -4503,7 +4503,7 @@ async function getAuthProvider(config) {
|
|
|
4503
4503
|
break;
|
|
4504
4504
|
case "guest":
|
|
4505
4505
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
4506
|
-
currentAuthProvider = new (await import('./guest-auth-provider-
|
|
4506
|
+
currentAuthProvider = new (await import('./guest-auth-provider-BnugW3TI.mjs')).GuestAuthProvider();
|
|
4507
4507
|
break;
|
|
4508
4508
|
}
|
|
4509
4509
|
if (!currentAuthProvider) {
|
|
@@ -4559,7 +4559,7 @@ async function signInAnonymously() {
|
|
|
4559
4559
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
4560
4560
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
4561
4561
|
// so bundle-splitting can see it.
|
|
4562
|
-
const provider = new (await import('./guest-auth-provider-
|
|
4562
|
+
const provider = new (await import('./guest-auth-provider-BnugW3TI.mjs')).GuestAuthProvider();
|
|
4563
4563
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
4564
4564
|
const commit = (user) => {
|
|
4565
4565
|
// No await/interleaving inside this block: provider/method/config/marker
|
|
@@ -5674,14 +5674,32 @@ const builds = {
|
|
|
5674
5674
|
};
|
|
5675
5675
|
|
|
5676
5676
|
async function create(options = {}) {
|
|
5677
|
-
const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (options.name !== undefined ? { name: options.name } : {})), (options.prompt !== undefined ? { prompt: options.prompt } : {})), (options.
|
|
5677
|
+
const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (options.name !== undefined ? { name: options.name } : {})), (options.prompt !== undefined ? { prompt: options.prompt } : {})), (options.idempotencyKey !== undefined ? { idempotencyKey: options.idempotencyKey } : {})), (options.intent !== undefined ? { intent: options.intent } : {})), (options.oapp === true ? { oapp: true } : {}));
|
|
5678
5678
|
const app = await requestDevApi('/apps/new', {
|
|
5679
5679
|
method: 'POST',
|
|
5680
5680
|
body,
|
|
5681
5681
|
});
|
|
5682
|
-
return Object.assign(Object.assign({ appId: app.appId }, (typeof app.slug === 'string' && app.slug ? { slug: app.slug } : {})), { url: app.url,
|
|
5683
|
-
|
|
5684
|
-
|
|
5682
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({ appId: app.appId }, (typeof app.slug === 'string' && app.slug ? { slug: app.slug } : {})), { url: app.url }), (typeof app.prompt === 'string' && app.prompt ? { prompt: app.prompt } : {})), (typeof app.handoff === 'string' && app.handoff ? { handoff: app.handoff } : {}));
|
|
5683
|
+
}
|
|
5684
|
+
/**
|
|
5685
|
+
* F-1200: build the create-flow redirect the owner is sent to after `create()`, with the
|
|
5686
|
+
* prompt and handoff carried in the URL FRAGMENT (never the query - fragments never reach
|
|
5687
|
+
* servers, logs, or Referer). Encoding is byte-exact so the widget's `URLSearchParams`
|
|
5688
|
+
* parse + `.trim()` reproduces the SAME prompt string dev-api hashed into the handoff;
|
|
5689
|
+
* getting this wrong would make the widget reject a genuine token and degrade to prefill.
|
|
5690
|
+
* Callers (bounded.sh, oapps.fun) should use this instead of hand-building the URL.
|
|
5691
|
+
*
|
|
5692
|
+
* Returns `${url}#bounded_prompt=<prompt>` with no `&bounded_handoff=` when the server
|
|
5693
|
+
* minted no handoff (HANDOFF_SECRET unset) - the widget then prefills without auto-running.
|
|
5694
|
+
*/
|
|
5695
|
+
function buildCreateRedirectUrl(app) {
|
|
5696
|
+
const base = app.url;
|
|
5697
|
+
const prompt = typeof app.prompt === 'string' ? app.prompt.trim() : '';
|
|
5698
|
+
if (!prompt)
|
|
5699
|
+
return base;
|
|
5700
|
+
const params = `bounded_prompt=${encodeURIComponent(prompt)}`
|
|
5701
|
+
+ (app.handoff ? `&bounded_handoff=${encodeURIComponent(app.handoff)}` : '');
|
|
5702
|
+
return `${base}#${params}`;
|
|
5685
5703
|
}
|
|
5686
5704
|
async function list() {
|
|
5687
5705
|
// This legacy-compatible action shape is also used by oapps.fun listMyApps.
|
|
@@ -5702,8 +5720,11 @@ async function list() {
|
|
|
5702
5720
|
const name = String((_d = row.name) !== null && _d !== void 0 ? _d : '').trim() || '(unnamed app)';
|
|
5703
5721
|
const slug = typeof row.slug === 'string' && row.slug ? row.slug : undefined;
|
|
5704
5722
|
const url = typeof row.url === 'string' && row.url.trim() ? row.url.trim() : undefined;
|
|
5705
|
-
|
|
5706
|
-
|
|
5723
|
+
const buildStatus = row.buildStatus === 'building' || row.buildStatus === 'build_failed'
|
|
5724
|
+
? row.buildStatus
|
|
5725
|
+
: undefined;
|
|
5726
|
+
return Object.assign(Object.assign(Object.assign({ appId,
|
|
5727
|
+
name }, (slug ? { slug } : {})), (url ? { url } : {})), (buildStatus ? { buildStatus } : {}));
|
|
5707
5728
|
})
|
|
5708
5729
|
.filter((app) => app !== null);
|
|
5709
5730
|
}
|
|
@@ -5711,7 +5732,7 @@ async function list() {
|
|
|
5711
5732
|
* Platform first-party surfaces only (bounded.sh, oapps.fun, localhost) —
|
|
5712
5733
|
* dev-api CORS blocks calls from generated-app origins. Server-side callers unaffected.
|
|
5713
5734
|
*/
|
|
5714
|
-
const apps = { create, list };
|
|
5735
|
+
const apps = { create, list, buildCreateRedirectUrl };
|
|
5715
5736
|
|
|
5716
5737
|
async function deserializeTransaction(tx) {
|
|
5717
5738
|
// Literal specifier so bundlers can code-split the lazy chunk.
|
|
@@ -6194,4 +6215,4 @@ function defaultInjectedEvmProvider() {
|
|
|
6194
6215
|
}
|
|
6195
6216
|
|
|
6196
6217
|
export { loginWithPopup as A, completeLoginInPopup as B, useAuth as C, useQuery as D, EMBEDDED_WALLET_UNSUPPORTED as E, useBuildRun as F, apps as G, deserializeTransaction as H, getIdToken as I, setPlatform as J, requestEip6963Providers as K, builds as L, BuildsApiError as M, NON_TERMINAL_STATES as N, OffchainAuthProvider as O, PrivyExpoProvider as P, PARK_REASONS as Q, RUN_STATES as R, FAILURE_REASONS as S, TERMINAL_STATES as T, BUILD_REVIEW_CAPABILITY_SCHEMA as U, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as V, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as W, hasEmbeddedEvmWallet as a, embeddedSignAndSubmit as b, setAuthLoading as c, defaultInjectedProvider as d, embeddedRunEvmTransaction as e, bufferExports as f, getPlatform as g, hasEmbeddedWallet as h, bs58 as i, confirmAndCheckTransaction as j, defaultInjectedEvmProvider as k, init as l, getCurrentUser as m, normalizeSolanaRpcUrl as n, onAuthStateChanged as o, onAuthLoadingChanged as p, getAuthLoading as q, resolveSolanaRpcUrl as r, setCurrentUser as s, login as t, logout as u, getAuthProvider as v, signInAnonymously as w, loginWithPrivy as x, loginWithRedirect as y, completeLoginFromRedirect as z };
|
|
6197
|
-
//# sourceMappingURL=index-
|
|
6218
|
+
//# sourceMappingURL=index-DkdIADby.mjs.map
|