@bounded-sh/client 0.0.95 → 0.0.96

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 (47) hide show
  1. package/dist/builds/client.d.ts +31 -0
  2. package/dist/builds/index.d.ts +3 -2
  3. package/dist/{email-auth-provider-mNpHuk1i.js → email-auth-provider-B1wYw68c.js} +2 -2
  4. package/dist/{email-auth-provider-mNpHuk1i.js.map → email-auth-provider-B1wYw68c.js.map} +1 -1
  5. package/dist/{email-auth-provider-H6Dw5Z9x.mjs → email-auth-provider-BgxLdrbB.mjs} +2 -2
  6. package/dist/{email-auth-provider-H6Dw5Z9x.mjs.map → email-auth-provider-BgxLdrbB.mjs.map} +1 -1
  7. package/dist/{email-auth-provider-DqXtds8G.js → email-auth-provider-CiMNpEWJ.js} +2 -2
  8. package/dist/{email-auth-provider-DqXtds8G.js.map → email-auth-provider-CiMNpEWJ.js.map} +1 -1
  9. package/dist/{email-auth-provider-D7wnHbb3.mjs → email-auth-provider-Dhu15el8.mjs} +2 -2
  10. package/dist/{email-auth-provider-D7wnHbb3.mjs.map → email-auth-provider-Dhu15el8.mjs.map} +1 -1
  11. package/dist/{guest-auth-provider-DwgEfPWe.js → guest-auth-provider-BGBcSwsM.js} +2 -2
  12. package/dist/{guest-auth-provider-DwgEfPWe.js.map → guest-auth-provider-BGBcSwsM.js.map} +1 -1
  13. package/dist/{guest-auth-provider-CenCVVnc.mjs → guest-auth-provider-BXJ2xm3C.mjs} +2 -2
  14. package/dist/{guest-auth-provider-CenCVVnc.mjs.map → guest-auth-provider-BXJ2xm3C.mjs.map} +1 -1
  15. package/dist/{guest-auth-provider-CKMU9n1w.js → guest-auth-provider-BrMhyIse.js} +2 -2
  16. package/dist/{guest-auth-provider-CKMU9n1w.js.map → guest-auth-provider-BrMhyIse.js.map} +1 -1
  17. package/dist/{guest-auth-provider-CJjhV1b0.mjs → guest-auth-provider-U-zsTm0z.mjs} +2 -2
  18. package/dist/{guest-auth-provider-CJjhV1b0.mjs.map → guest-auth-provider-U-zsTm0z.mjs.map} +1 -1
  19. package/dist/{index-D3mp2wpM.mjs → index-B5Luqobz.mjs} +27 -8
  20. package/dist/{index-D3mp2wpM.mjs.map → index-B5Luqobz.mjs.map} +1 -1
  21. package/dist/{index-BiytVNMk.js → index-DWUx-v0z.js} +27 -8
  22. package/dist/{index-BiytVNMk.js.map → index-DWUx-v0z.js.map} +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/index.mjs +1 -1
  25. package/dist/{index.native-DHFDc9Vy.mjs → index.native-CAkdhYaP.mjs} +26 -7
  26. package/dist/{index.native-DHFDc9Vy.mjs.map → index.native-CAkdhYaP.mjs.map} +1 -1
  27. package/dist/{index.native-vfNe1Pga.js → index.native-DVMCCbwq.js} +26 -7
  28. package/dist/{index.native-vfNe1Pga.js.map → index.native-DVMCCbwq.js.map} +1 -1
  29. package/dist/index.native.js +1 -1
  30. package/dist/index.native.mjs +1 -1
  31. package/dist/{injected-evm-wallet-provider-B8_1qfbX.mjs → injected-evm-wallet-provider-BmWa3lHu.mjs} +2 -2
  32. package/dist/{injected-evm-wallet-provider-B8_1qfbX.mjs.map → injected-evm-wallet-provider-BmWa3lHu.mjs.map} +1 -1
  33. package/dist/{injected-evm-wallet-provider-BLg6H50t.js → injected-evm-wallet-provider-CgUCo_6H.js} +2 -2
  34. package/dist/{injected-evm-wallet-provider-BLg6H50t.js.map → injected-evm-wallet-provider-CgUCo_6H.js.map} +1 -1
  35. package/dist/{injected-evm-wallet-provider-BsxKY7bi.mjs → injected-evm-wallet-provider-Da6kghfZ.mjs} +2 -2
  36. package/dist/{injected-evm-wallet-provider-BsxKY7bi.mjs.map → injected-evm-wallet-provider-Da6kghfZ.mjs.map} +1 -1
  37. package/dist/{injected-evm-wallet-provider-B7lMl8NN.js → injected-evm-wallet-provider-DvoG_pvE.js} +2 -2
  38. package/dist/{injected-evm-wallet-provider-B7lMl8NN.js.map → injected-evm-wallet-provider-DvoG_pvE.js.map} +1 -1
  39. package/dist/{injected-wallet-provider-zLWZ_vKC.js → injected-wallet-provider-B7xVks8k.js} +2 -2
  40. package/dist/{injected-wallet-provider-zLWZ_vKC.js.map → injected-wallet-provider-B7xVks8k.js.map} +1 -1
  41. package/dist/{injected-wallet-provider-D8Y_sP0c.mjs → injected-wallet-provider-CJFZ9O7q.mjs} +2 -2
  42. package/dist/{injected-wallet-provider-D8Y_sP0c.mjs.map → injected-wallet-provider-CJFZ9O7q.mjs.map} +1 -1
  43. package/dist/{injected-wallet-provider-DNU7LBlK.js → injected-wallet-provider-DBWcA9tW.js} +2 -2
  44. package/dist/{injected-wallet-provider-DNU7LBlK.js.map → injected-wallet-provider-DBWcA9tW.js.map} +1 -1
  45. package/dist/{injected-wallet-provider-DE_Kce-V.mjs → injected-wallet-provider-TvPTmUdy.mjs} +2 -2
  46. package/dist/{injected-wallet-provider-DE_Kce-V.mjs.map → injected-wallet-provider-TvPTmUdy.mjs.map} +1 -1
  47. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BiytVNMk.js');
3
+ var index = require('./index-DWUx-v0z.js');
4
4
  var core = require('@bounded-sh/core');
5
5
  require('react');
6
6
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { ab as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, aa as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, a9 as BUILD_REVIEW_CAPABILITY_SCHEMA, a3 as BuildsApiError, a8 as FAILURE_REASONS, a4 as NON_TERMINAL_STATES, $ as OffchainAuthProvider, a7 as PARK_REASONS, a0 as PrivyExpoProvider, a6 as RUN_STATES, a5 as TERMINAL_STATES, W as WalletConfigError, Q as apps, a2 as builds, I as completeLoginFromRedirect, K as completeLoginInPopup, o as defaultInjectedEvmProvider, f as defaultInjectedProvider, F as ensureSharedWalletLoginReady, M as ensureSignedIn, E as ensureWalletLoginReady, w as getAuthLoading, A as getAuthProvider, q as getCurrentUser, V as getIdToken, S as getOrCreateTurnkeyWallet, g as getPlatform, p as init, y as login, J as loginWithPopup, C as loginWithPrivy, H as loginWithRedirect, D as loginWithWallet, z as logout, v as onAuthLoadingChanged, u as onAuthStateChanged, X as onramp, Y as onrampQuote, Z as onrampStatus, L as openBoundedWidget, T as openTurnkeyKeyExport, G as preloadWalletLogin, a1 as requestEip6963Providers, _ as setPlatform, B as signInAnonymously, R as signSolanaMessageViaTurnkey, U as startTurnkeyEmailLogin, N as useAuth, P as useBuildRun, O as useQuery, x as waitForAuthReady } from './index-D3mp2wpM.mjs';
1
+ export { ab as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, aa as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, a9 as BUILD_REVIEW_CAPABILITY_SCHEMA, a3 as BuildsApiError, a8 as FAILURE_REASONS, a4 as NON_TERMINAL_STATES, $ as OffchainAuthProvider, a7 as PARK_REASONS, a0 as PrivyExpoProvider, a6 as RUN_STATES, a5 as TERMINAL_STATES, W as WalletConfigError, Q as apps, a2 as builds, I as completeLoginFromRedirect, K as completeLoginInPopup, o as defaultInjectedEvmProvider, f as defaultInjectedProvider, F as ensureSharedWalletLoginReady, M as ensureSignedIn, E as ensureWalletLoginReady, w as getAuthLoading, A as getAuthProvider, q as getCurrentUser, V as getIdToken, S as getOrCreateTurnkeyWallet, g as getPlatform, p as init, y as login, J as loginWithPopup, C as loginWithPrivy, H as loginWithRedirect, D as loginWithWallet, z as logout, v as onAuthLoadingChanged, u as onAuthStateChanged, X as onramp, Y as onrampQuote, Z as onrampStatus, L as openBoundedWidget, T as openTurnkeyKeyExport, G as preloadWalletLogin, a1 as requestEip6963Providers, _ as setPlatform, B as signInAnonymously, R as signSolanaMessageViaTurnkey, U as startTurnkeyEmailLogin, N as useAuth, P as useBuildRun, O as useQuery, x as waitForAuthReady } from './index-B5Luqobz.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, reconcileSetResult, runExpression, runExpressionMany, runQuery, runQueryMany, search, set, setFile, setMany, signAndSubmitTransaction, signMessage, signTransaction, subscribe, waitForSetResult } from '@bounded-sh/core';
4
4
  import 'react';
@@ -6000,7 +6000,7 @@ async function getAuthProvider(config) {
6000
6000
  // manager as legacy email sessions. Human login should be started
6001
6001
  // with loginWithRedirect(); this provider is kept as the restore and
6002
6002
  // logout surface for those sessions.
6003
- currentAuthProvider = new (await import('./email-auth-provider-H6Dw5Z9x.mjs')).EmailAuthProvider();
6003
+ currentAuthProvider = new (await import('./email-auth-provider-BgxLdrbB.mjs')).EmailAuthProvider();
6004
6004
  break;
6005
6005
  case "phantom": {
6006
6006
  // First-class Solana WALLET LOGIN (the poof/TaroBase-style "connect
@@ -6042,7 +6042,7 @@ async function getAuthProvider(config) {
6042
6042
  // (bounded-login-widget.ts), so registration never counts as
6043
6043
  // evidence the user has a wallet.
6044
6044
  await ensureSolanaMobileWalletRegistered(config, configuredNetwork);
6045
- const { InjectedWalletProvider } = await import('./injected-wallet-provider-DE_Kce-V.mjs');
6045
+ const { InjectedWalletProvider } = await import('./injected-wallet-provider-TvPTmUdy.mjs');
6046
6046
  currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
6047
6047
  break;
6048
6048
  }
@@ -6055,7 +6055,7 @@ async function getAuthProvider(config) {
6055
6055
  // Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
6056
6056
  // to point at a specific wallet or set chainId/domain.
6057
6057
  const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
6058
- const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-B8_1qfbX.mjs');
6058
+ const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-BmWa3lHu.mjs');
6059
6059
  currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
6060
6060
  break;
6061
6061
  }
@@ -6080,7 +6080,7 @@ async function getAuthProvider(config) {
6080
6080
  break;
6081
6081
  case "guest":
6082
6082
  // Anonymous auth: a device-local ed25519 keypair signs the challenge.
6083
- currentAuthProvider = new (await import('./guest-auth-provider-CenCVVnc.mjs')).GuestAuthProvider();
6083
+ currentAuthProvider = new (await import('./guest-auth-provider-BXJ2xm3C.mjs')).GuestAuthProvider();
6084
6084
  break;
6085
6085
  }
6086
6086
  if (!currentAuthProvider) {
@@ -6142,7 +6142,7 @@ async function signInAnonymously() {
6142
6142
  // Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
6143
6143
  // the main bundle for data-only apps. Specifier is a static string literal
6144
6144
  // so bundle-splitting can see it.
6145
- const provider = new (await import('./guest-auth-provider-CenCVVnc.mjs')).GuestAuthProvider();
6145
+ const provider = new (await import('./guest-auth-provider-BXJ2xm3C.mjs')).GuestAuthProvider();
6146
6146
  setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
6147
6147
  // adoptSessionProvider awaits only getConfig() (already resolved here) and then
6148
6148
  // runs every write - provider/method/config/marker/user - in one synchronous
@@ -6313,7 +6313,7 @@ function ensureSharedWalletLoginReady() {
6313
6313
  if (!sharedWalletReady) {
6314
6314
  sharedWalletReady = (async () => {
6315
6315
  await getConfig();
6316
- await import('./injected-wallet-provider-DE_Kce-V.mjs');
6316
+ await import('./injected-wallet-provider-TvPTmUdy.mjs');
6317
6317
  })().catch((error) => {
6318
6318
  sharedWalletReady = null;
6319
6319
  throw error;
@@ -6934,6 +6934,24 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
6934
6934
  }
6935
6935
  return t;
6936
6936
  };
6937
+ /** Source is a safe tar.gz tree; attachments remain model input, never executable files. */
6938
+ async function uploadInput(appId, options) {
6939
+ const data = options.data instanceof Uint8Array ? new Uint8Array(options.data).buffer : await options.data.arrayBuffer();
6940
+ const sha256 = Array.from(new Uint8Array(await getPlatform().sha256(new Uint8Array(data))), (byte) => byte.toString(16).padStart(2, '0')).join('');
6941
+ const path = `/app/${encodeURIComponent(appId)}/build-inputs`;
6942
+ const ticket = await requestDevApi(path, {
6943
+ method: 'POST', body: { kind: options.kind, name: options.name, contentType: options.contentType, bytes: data.byteLength, sha256 },
6944
+ });
6945
+ const destination = new URL(ticket.uploadUrl);
6946
+ if (destination.protocol !== 'https:' && !(destination.protocol === 'http:' && ['localhost', '127.0.0.1', '[::1]'].includes(destination.hostname)))
6947
+ throw new Error('Build input upload requires a secure endpoint.');
6948
+ const response = await fetch(destination.href, {
6949
+ method: 'PUT', redirect: 'error', headers: { Authorization: `Bearer ${ticket.uploadToken}`, 'Content-Type': options.contentType }, body: data,
6950
+ });
6951
+ if (!response.ok)
6952
+ throw apiError(response, await responseBody(response));
6953
+ return requestDevApi(`${path}/${encodeURIComponent(ticket.artifactId)}/finalize`, { method: 'POST' });
6954
+ }
6937
6955
  /** A structured non-2xx response from the developer API. */
6938
6956
  class BuildsApiError extends Error {
6939
6957
  constructor(init) {
@@ -7539,6 +7557,7 @@ const builds = {
7539
7557
  decideGate,
7540
7558
  refreshReviewCapability,
7541
7559
  topup,
7560
+ uploadInput,
7542
7561
  list: list$1,
7543
7562
  watch,
7544
7563
  };
@@ -8261,4 +8280,4 @@ class PrivyExpoProvider {
8261
8280
  }
8262
8281
 
8263
8282
  export { BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as $, logout as A, getAuthProvider as B, signInAnonymously as C, loginWithPrivy as D, loginWithRedirect as E, completeLoginFromRedirect as F, loginWithPopup as G, completeLoginInPopup as H, useAuth as I, useQuery as J, useBuildRun as K, apps as L, getIdToken as M, onramp as N, onrampQuote as O, onrampStatus as P, setPlatform as Q, OffchainAuthProvider as R, PrivyExpoProvider as S, builds as T, BuildsApiError as U, NON_TERMINAL_STATES as V, TERMINAL_STATES as W, RUN_STATES as X, PARK_REASONS as Y, FAILURE_REASONS as Z, BUILD_REVIEW_CAPABILITY_SCHEMA as _, signMessageWithTurnkey as a, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as a0, signTransactionWithTurnkey as b, signTransactionV1WithTurnkey as c, signAndSubmitTransactionWithTurnkey as d, bs58 as e, getWallets as f, getPlatform as g, hasTurnkeyWallet as h, isSolanaMobileWallet as i, solanaMobileWalletLeavesPage as j, setAuthLoading as k, bufferExports as l, setStoredAuthMethod as m, normalizeSolanaRpcUrl as n, confirmAndCheckTransaction as o, resolveSolanaRpcUrl as p, init as q, resolveSolanaWalletStandardChain 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 };
8264
- //# sourceMappingURL=index.native-DHFDc9Vy.mjs.map
8283
+ //# sourceMappingURL=index.native-CAkdhYaP.mjs.map