@bounded-sh/client 0.0.117 → 0.0.118-openapps.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 (27) hide show
  1. package/dist/auth/bounded-login-widget.d.ts +5 -0
  2. package/dist/connections.d.ts +5 -1
  3. package/dist/{email-auth-provider-CMfwB-Uj.mjs → email-auth-provider-C-SGTRZe.mjs} +2 -2
  4. package/dist/{email-auth-provider-CMfwB-Uj.mjs.map → email-auth-provider-C-SGTRZe.mjs.map} +1 -1
  5. package/dist/{email-auth-provider-BCWTczE2.js → email-auth-provider-CjbJ8wK1.js} +2 -2
  6. package/dist/{email-auth-provider-BCWTczE2.js.map → email-auth-provider-CjbJ8wK1.js.map} +1 -1
  7. package/dist/{guest-auth-provider-DH4iA0oS.mjs → guest-auth-provider-BwEXKnNK.mjs} +2 -2
  8. package/dist/{guest-auth-provider-DH4iA0oS.mjs.map → guest-auth-provider-BwEXKnNK.mjs.map} +1 -1
  9. package/dist/{guest-auth-provider-DkX8cQqr.js → guest-auth-provider-ClCOa69H.js} +2 -2
  10. package/dist/{guest-auth-provider-DkX8cQqr.js.map → guest-auth-provider-ClCOa69H.js.map} +1 -1
  11. package/dist/{index-DrVV40Si.js → index-B2HWEA13.js} +43 -23
  12. package/dist/index-B2HWEA13.js.map +1 -0
  13. package/dist/{index-Sx-Caknc.mjs → index-q9BHoxbM.mjs} +43 -23
  14. package/dist/index-q9BHoxbM.mjs.map +1 -0
  15. package/dist/index.js +1 -1
  16. package/dist/index.mjs +1 -1
  17. package/dist/{injected-evm-wallet-provider-BCZQuyPF.mjs → injected-evm-wallet-provider-AXc7Lmzk.mjs} +2 -2
  18. package/dist/{injected-evm-wallet-provider-BCZQuyPF.mjs.map → injected-evm-wallet-provider-AXc7Lmzk.mjs.map} +1 -1
  19. package/dist/{injected-evm-wallet-provider-CVMhv4xf.js → injected-evm-wallet-provider-qB_GQ9ih.js} +2 -2
  20. package/dist/{injected-evm-wallet-provider-CVMhv4xf.js.map → injected-evm-wallet-provider-qB_GQ9ih.js.map} +1 -1
  21. package/dist/{injected-wallet-provider-BroBvwi6.js → injected-wallet-provider-BEaDBzcd.js} +2 -2
  22. package/dist/{injected-wallet-provider-BroBvwi6.js.map → injected-wallet-provider-BEaDBzcd.js.map} +1 -1
  23. package/dist/{injected-wallet-provider-ezYLhye8.mjs → injected-wallet-provider-gmGZ254w.mjs} +2 -2
  24. package/dist/{injected-wallet-provider-ezYLhye8.mjs.map → injected-wallet-provider-gmGZ254w.mjs.map} +1 -1
  25. package/package.json +2 -2
  26. package/dist/index-DrVV40Si.js.map +0 -1
  27. package/dist/index-Sx-Caknc.mjs.map +0 -1
@@ -6475,7 +6475,7 @@ async function getAuthProvider(config, fromStorage = false) {
6475
6475
  // manager as legacy email sessions. Human login should be started
6476
6476
  // with loginWithRedirect(); this provider is kept as the restore and
6477
6477
  // logout surface for those sessions.
6478
- currentAuthProvider = new (await import('./email-auth-provider-CMfwB-Uj.mjs')).EmailAuthProvider();
6478
+ currentAuthProvider = new (await import('./email-auth-provider-C-SGTRZe.mjs')).EmailAuthProvider();
6479
6479
  break;
6480
6480
  case "phantom": {
6481
6481
  // First-class Solana WALLET LOGIN (the poof/TaroBase-style "connect
@@ -6517,7 +6517,7 @@ async function getAuthProvider(config, fromStorage = false) {
6517
6517
  // (bounded-login-widget.ts), so registration never counts as
6518
6518
  // evidence the user has a wallet.
6519
6519
  await ensureSolanaMobileWalletRegistered(config, configuredNetwork);
6520
- const { InjectedWalletProvider } = await import('./injected-wallet-provider-ezYLhye8.mjs');
6520
+ const { InjectedWalletProvider } = await import('./injected-wallet-provider-gmGZ254w.mjs');
6521
6521
  currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
6522
6522
  break;
6523
6523
  }
@@ -6530,7 +6530,7 @@ async function getAuthProvider(config, fromStorage = false) {
6530
6530
  // Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
6531
6531
  // to point at a specific wallet or set chainId/domain.
6532
6532
  const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
6533
- const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-BCZQuyPF.mjs');
6533
+ const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-AXc7Lmzk.mjs');
6534
6534
  currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
6535
6535
  break;
6536
6536
  }
@@ -6555,7 +6555,7 @@ async function getAuthProvider(config, fromStorage = false) {
6555
6555
  break;
6556
6556
  case "guest":
6557
6557
  // Anonymous auth: a device-local ed25519 keypair signs the challenge.
6558
- currentAuthProvider = new (await import('./guest-auth-provider-DH4iA0oS.mjs')).GuestAuthProvider();
6558
+ currentAuthProvider = new (await import('./guest-auth-provider-BwEXKnNK.mjs')).GuestAuthProvider();
6559
6559
  break;
6560
6560
  }
6561
6561
  if (!currentAuthProvider) {
@@ -6617,7 +6617,7 @@ async function signInAnonymously() {
6617
6617
  // Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
6618
6618
  // the main bundle for data-only apps. Specifier is a static string literal
6619
6619
  // so bundle-splitting can see it.
6620
- const provider = new (await import('./guest-auth-provider-DH4iA0oS.mjs')).GuestAuthProvider();
6620
+ const provider = new (await import('./guest-auth-provider-BwEXKnNK.mjs')).GuestAuthProvider();
6621
6621
  setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
6622
6622
  // adoptSessionProvider awaits only getConfig() (already resolved here) and then
6623
6623
  // runs every write - provider/method/config/marker/user - in one synchronous
@@ -6788,7 +6788,7 @@ function ensureSharedWalletLoginReady() {
6788
6788
  if (!sharedWalletReady) {
6789
6789
  sharedWalletReady = (async () => {
6790
6790
  await getConfig();
6791
- await import('./injected-wallet-provider-ezYLhye8.mjs');
6791
+ await import('./injected-wallet-provider-gmGZ254w.mjs');
6792
6792
  })().catch((error) => {
6793
6793
  sharedWalletReady = null;
6794
6794
  throw error;
@@ -6893,7 +6893,7 @@ async function loginWithWallet(options) {
6893
6893
  await ensureSharedWalletLoginReady();
6894
6894
  else
6895
6895
  await ensureWalletLoginReady();
6896
- const { InjectedWalletProvider } = await import('./injected-wallet-provider-ezYLhye8.mjs');
6896
+ const { InjectedWalletProvider } = await import('./injected-wallet-provider-gmGZ254w.mjs');
6897
6897
  // Keep the RAW wallet provider: the offchain wrapper forwards only a fixed
6898
6898
  // set of methods, so cleanup below must speak to the provider that actually
6899
6899
  // holds the config rather than to whatever is wrapping it.
@@ -8431,6 +8431,18 @@ function walletGlyph() {
8431
8431
  svg.append(rect, dot);
8432
8432
  return svg;
8433
8433
  }
8434
+ /** Whether the card shows "Powered by Bounded": the caller decides, else it is off on OpenApps pages. */
8435
+ function showsAttribution(opts) {
8436
+ if (typeof opts.attribution === "boolean")
8437
+ return opts.attribution;
8438
+ try {
8439
+ const host = location.hostname.toLowerCase();
8440
+ return !(host === "openapps.xyz" || host.endsWith(".openapps.xyz"));
8441
+ }
8442
+ catch (_a) {
8443
+ return true;
8444
+ }
8445
+ }
8434
8446
  function isInjectedProvider(v) {
8435
8447
  return supportsWalletSignIn(v);
8436
8448
  }
@@ -9070,13 +9082,15 @@ async function prepareAndOpen(opts, pending) {
9070
9082
  : "Add a method, or make sure wallet login is enabled and the mobile adapter is installed."));
9071
9083
  }
9072
9084
  card.appendChild(status);
9073
- const foot = el("div", "foot");
9074
- const poweredBy = el("a", undefined, "Powered by Bounded");
9075
- poweredBy.href = "https://bounded.sh";
9076
- poweredBy.target = "_blank";
9077
- poweredBy.rel = "noopener";
9078
- foot.appendChild(poweredBy);
9079
- card.appendChild(foot);
9085
+ if (showsAttribution(opts)) {
9086
+ const foot = el("div", "foot");
9087
+ const poweredBy = el("a", undefined, "Powered by Bounded");
9088
+ poweredBy.href = "https://bounded.sh";
9089
+ poweredBy.target = "_blank";
9090
+ poweredBy.rel = "noopener";
9091
+ foot.appendChild(poweredBy);
9092
+ card.appendChild(foot);
9093
+ }
9080
9094
  return card;
9081
9095
  };
9082
9096
  // Solana Mobile leaves the page to sign in: the nonce fetch that precedes
@@ -9229,13 +9243,15 @@ async function prepareAndOpen(opts, pending) {
9229
9243
  frame.style.cssText = "width:100%;height:210px;border:0;background:transparent;color-scheme:dark";
9230
9244
  card.appendChild(frame);
9231
9245
  card.appendChild(status);
9232
- const foot = el("div", "foot");
9233
- const poweredBy = el("a", undefined, "Powered by Bounded");
9234
- poweredBy.href = "https://bounded.sh";
9235
- poweredBy.target = "_blank";
9236
- poweredBy.rel = "noopener";
9237
- foot.appendChild(poweredBy);
9238
- card.appendChild(foot);
9246
+ if (showsAttribution(opts)) {
9247
+ const foot = el("div", "foot");
9248
+ const poweredBy = el("a", undefined, "Powered by Bounded");
9249
+ poweredBy.href = "https://bounded.sh";
9250
+ poweredBy.target = "_blank";
9251
+ poweredBy.rel = "noopener";
9252
+ foot.appendChild(poweredBy);
9253
+ card.appendChild(foot);
9254
+ }
9239
9255
  // Running the frame MINTS a session, so it takes the lock like every other lane. Abandoning
9240
9256
  // via Back settles it so the next lane the user picks is not refused by a claim nobody owns.
9241
9257
  const attempt = beginAttempt();
@@ -10787,7 +10803,11 @@ async function onramp(options = {}) {
10787
10803
  // Only identity is kept: the provider token is discarded after one profile read.
10788
10804
  // The return page must be on an origin that serves this app (its bounded.page or
10789
10805
  // custom domain, or an origin the owner registered, such as localhost).
10790
- /** `code` is the platform's error code, e.g. `cancelled`, `x_link_expired`, `connection_return_origin_not_allowed`. */
10806
+ /**
10807
+ * `code` is the platform's error code, e.g. `cancelled`, `x_link_expired`, `connection_return_origin_not_allowed`,
10808
+ * or `x_account_linked_elsewhere` when the app's policy sets `auth.connections.x.unique` and another user
10809
+ * of the app already linked that X account.
10810
+ */
10791
10811
  class ConnectionError extends Error {
10792
10812
  constructor(code) {
10793
10813
  super(`Connection failed: ${code}`);
@@ -12252,4 +12272,4 @@ function init(config = {}) {
12252
12272
  }
12253
12273
 
12254
12274
  export { onramp as $, logout as A, getAuthProvider as B, signInAnonymously as C, loginWithPrivy as D, loginWithWallet as E, ensureWalletLoginReady as F, ensureSharedWalletLoginReady as G, preloadWalletLogin as H, loginWithRedirect as I, completeLoginFromRedirect as J, getLoginReturnError as K, loginWithPopup as L, openBoundedWidget as M, ensureSignedIn as N, useAuth as O, useQuery as P, useBuildRun as Q, apps as R, SELECTED_WALLET_UNAVAILABLE_ERR as S, signSolanaMessageViaTurnkey as T, getOrCreateTurnkeyWallet as U, openTurnkeyKeyExport as V, WalletConfigError as W, getTurnkeyWalletSessionState as X, getTurnkeyWalletRecoveryUrl as Y, startTurnkeyEmailLogin as Z, getIdToken as _, signMessageWithTurnkey as a, onrampQuote as a0, onrampStatus as a1, connect as a2, completeConnection as a3, getConnections as a4, disconnect as a5, ConnectionError as a6, fundVenueEscrow as a7, disputeVenueEscrow as a8, getVenueEscrow as a9, VenueEscrowError as aa, setPlatform as ab, OffchainAuthProvider as ac, PrivyExpoProvider as ad, requestEip6963Providers as ae, connectBroadcast as af, connectServiceSession as ag, builds as ah, BuildsApiError as ai, mediaAgentTools as aj, NON_TERMINAL_STATES as ak, TERMINAL_STATES as al, RUN_STATES as am, PARK_REASONS as an, FAILURE_REASONS as ao, BUILD_REVIEW_CAPABILITY_SCHEMA as ap, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as aq, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as ar, signTransactionWithTurnkey as b, signTransactionV1WithTurnkey as c, signAndSubmitTransactionWithTurnkey as d, bs58 as e, defaultInjectedProvider as f, getPlatform as g, hasTurnkeyWallet as h, firstStandardWalletProvider as i, setAuthLoading as j, supportsWalletSignIn as k, bufferExports as l, setStoredAuthMethod as m, normalizeSolanaRpcUrl as n, confirmAndCheckTransaction as o, defaultInjectedEvmProvider as p, init as q, resolveSolanaRpcUrl as r, setCurrentUser as s, transactionHasSignature as t, getCurrentUser as u, onAuthStateChanged as v, onAuthLoadingChanged as w, getAuthLoading as x, waitForAuthReady as y, login as z };
12255
- //# sourceMappingURL=index-Sx-Caknc.mjs.map
12275
+ //# sourceMappingURL=index-q9BHoxbM.mjs.map