@bounded-sh/client 0.0.1 → 0.0.2

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 (56) hide show
  1. package/dist/auth/providers/phantom-wallet-provider.d.ts +1 -1
  2. package/dist/auth/providers/privy-expo-provider.d.ts +1 -1
  3. package/dist/auth/providers/solana-mobile-wallet-provider.d.ts +3 -3
  4. package/dist/{index-BHTfW8CV.esm.js → index-B2ytfYTB.esm.js} +2 -2
  5. package/dist/{index-BHTfW8CV.esm.js.map → index-B2ytfYTB.esm.js.map} +1 -1
  6. package/dist/{index-CT2j1oic.esm.js → index-BFOmV3Pb.esm.js} +2 -2
  7. package/dist/{index-CT2j1oic.esm.js.map → index-BFOmV3Pb.esm.js.map} +1 -1
  8. package/dist/{index-VGx-869x.js → index-BL-0ZKBl.js} +76 -76
  9. package/dist/index-BL-0ZKBl.js.map +1 -0
  10. package/dist/{index-sKqrgk0t.js → index-BgAygrhE.js} +2 -2
  11. package/dist/{index-sKqrgk0t.js.map → index-BgAygrhE.js.map} +1 -1
  12. package/dist/{index-C1VOdmRN.js → index-CqoP9udN.js} +2 -2
  13. package/dist/{index-C1VOdmRN.js.map → index-CqoP9udN.js.map} +1 -1
  14. package/dist/{index-o5Hv9pfS.esm.js → index-D986s6w7.esm.js} +76 -76
  15. package/dist/index-D986s6w7.esm.js.map +1 -0
  16. package/dist/{index.browser-DaNhOhkQ.esm.js → index.browser-Bd0GwRur.esm.js} +2 -2
  17. package/dist/{index.browser-DaNhOhkQ.esm.js.map → index.browser-Bd0GwRur.esm.js.map} +1 -1
  18. package/dist/{index.browser-utVKQsEC.js → index.browser-BeM1bzpe.js} +2 -2
  19. package/dist/{index.browser-utVKQsEC.js.map → index.browser-BeM1bzpe.js.map} +1 -1
  20. package/dist/{index.browser-DhAcjdpV.esm.js → index.browser-D2xm-q6N.esm.js} +2 -2
  21. package/dist/{index.browser-DhAcjdpV.esm.js.map → index.browser-D2xm-q6N.esm.js.map} +1 -1
  22. package/dist/{index.browser-BJZ7fYwv.js → index.browser-D8u31irV.js} +2 -2
  23. package/dist/{index.browser-BJZ7fYwv.js.map → index.browser-D8u31irV.js.map} +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.esm.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/{index.native-JPUkdHJj.esm.js → index.native-B-cLm_BI.esm.js} +50 -50
  28. package/dist/index.native-B-cLm_BI.esm.js.map +1 -0
  29. package/dist/{index.native-B5IBOdv_.js → index.native-NgHStPq0.js} +50 -50
  30. package/dist/index.native-NgHStPq0.js.map +1 -0
  31. package/dist/index.native.d.ts +1 -1
  32. package/dist/index.native.esm.js +1 -1
  33. package/dist/index.native.js +1 -1
  34. package/dist/{phantom-wallet-provider-DMlaSrAl.esm.js → phantom-wallet-provider-Cy5T9EVd.esm.js} +10 -10
  35. package/dist/phantom-wallet-provider-Cy5T9EVd.esm.js.map +1 -0
  36. package/dist/{phantom-wallet-provider-CDLyxrih.js → phantom-wallet-provider-Dy48LSdU.js} +10 -10
  37. package/dist/phantom-wallet-provider-Dy48LSdU.js.map +1 -0
  38. package/dist/{privy-wallet-provider-nR52lXzI.esm.js → privy-wallet-provider-BDsrUpk4.esm.js} +5 -5
  39. package/dist/privy-wallet-provider-BDsrUpk4.esm.js.map +1 -0
  40. package/dist/{privy-wallet-provider-DiHHTDbZ.js → privy-wallet-provider-CiKtBJ5M.js} +5 -5
  41. package/dist/privy-wallet-provider-CiKtBJ5M.js.map +1 -0
  42. package/dist/{solana-mobile-wallet-provider-B4CeMMQd.esm.js → solana-mobile-wallet-provider-CSk_FIww.esm.js} +20 -20
  43. package/dist/solana-mobile-wallet-provider-CSk_FIww.esm.js.map +1 -0
  44. package/dist/{solana-mobile-wallet-provider-BYMfFjZb.js → solana-mobile-wallet-provider-k_YdrTJZ.js} +20 -20
  45. package/dist/solana-mobile-wallet-provider-k_YdrTJZ.js.map +1 -0
  46. package/package.json +2 -2
  47. package/dist/index-VGx-869x.js.map +0 -1
  48. package/dist/index-o5Hv9pfS.esm.js.map +0 -1
  49. package/dist/index.native-B5IBOdv_.js.map +0 -1
  50. package/dist/index.native-JPUkdHJj.esm.js.map +0 -1
  51. package/dist/phantom-wallet-provider-CDLyxrih.js.map +0 -1
  52. package/dist/phantom-wallet-provider-DMlaSrAl.esm.js.map +0 -1
  53. package/dist/privy-wallet-provider-DiHHTDbZ.js.map +0 -1
  54. package/dist/privy-wallet-provider-nR52lXzI.esm.js.map +0 -1
  55. package/dist/solana-mobile-wallet-provider-B4CeMMQd.esm.js.map +0 -1
  56. package/dist/solana-mobile-wallet-provider-BYMfFjZb.js.map +0 -1
@@ -6450,7 +6450,7 @@ function getWebhookKeysUrl() {
6450
6450
  /**
6451
6451
  * True when init() configured a Bounded network (the Cloudflare-native stack).
6452
6452
  * Synchronous + non-blocking. Used to route reads/writes that behave differently
6453
- * on Bounded vs the legacy Tarobase backend (e.g. `count`/`aggregate`, which on
6453
+ * on Bounded vs the legacy backend (e.g. `count`/`aggregate`, which on
6454
6454
  * Bounded must use the deterministic server aggregation, not the legacy AI query).
6455
6455
  */
6456
6456
  function isBoundedNetwork() {
@@ -9305,7 +9305,7 @@ class WebSessionManager {
9305
9305
  // the RIGHT /session/refresh. Email overrides with humanAuthApiUrl; all
9306
9306
  // wallet/guest/signature flows default to authApiUrl (the bounded-auth issuer).
9307
9307
  const sessionIssuer = (issuer || config.authApiUrl || "").replace(/\/$/, "");
9308
- localStorage.setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify(Object.assign({ address,
9308
+ localStorage.setItem(this.BOUNDED_SESSION_STORAGE_KEY, JSON.stringify(Object.assign({ address,
9309
9309
  accessToken,
9310
9310
  idToken,
9311
9311
  refreshToken, appId: currentAppId }, (sessionIssuer ? { issuer: sessionIssuer } : {}))));
@@ -9316,7 +9316,7 @@ class WebSessionManager {
9316
9316
  static async getSession() {
9317
9317
  if (typeof window === "undefined")
9318
9318
  return null;
9319
- const session = localStorage.getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9319
+ const session = localStorage.getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9320
9320
  if (!session)
9321
9321
  return null;
9322
9322
  const sessionObj = JSON.parse(session);
@@ -9340,7 +9340,7 @@ class WebSessionManager {
9340
9340
  // Persist the ROTATED refresh token — the old one is now
9341
9341
  // single-use spent; reusing it would revoke the family.
9342
9342
  refreshed.refreshToken);
9343
- const newSession = localStorage.getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9343
+ const newSession = localStorage.getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9344
9344
  if (!newSession)
9345
9345
  return null;
9346
9346
  const newObj = JSON.parse(newSession);
@@ -9364,14 +9364,14 @@ class WebSessionManager {
9364
9364
  static clearSession() {
9365
9365
  if (typeof window === "undefined")
9366
9366
  return;
9367
- localStorage.removeItem(this.TAROBASE_SESSION_STORAGE_KEY);
9367
+ localStorage.removeItem(this.BOUNDED_SESSION_STORAGE_KEY);
9368
9368
  }
9369
9369
  /* ------------------------------------------------------------------ */
9370
9370
  /* IS-AUTH */
9371
9371
  /* ------------------------------------------------------------------ */
9372
9372
  static isAuthenticated() {
9373
9373
  // NOTE: this remains synchronous to stay backward compatible
9374
- return !!localStorage.getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9374
+ return !!localStorage.getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9375
9375
  }
9376
9376
  /* ------------------------------------------------------------------ */
9377
9377
  /* TOKEN HELPERS */
@@ -9379,13 +9379,13 @@ class WebSessionManager {
9379
9379
  static getIdToken() {
9380
9380
  if (typeof window === "undefined")
9381
9381
  return null;
9382
- const session = localStorage.getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9382
+ const session = localStorage.getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9383
9383
  return session ? JSON.parse(session).idToken : null;
9384
9384
  }
9385
9385
  static getRefreshToken() {
9386
9386
  if (typeof window === "undefined")
9387
9387
  return null;
9388
- const session = localStorage.getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9388
+ const session = localStorage.getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9389
9389
  return session ? JSON.parse(session).refreshToken : null;
9390
9390
  }
9391
9391
  /** The issuer base that minted this session (for routing silent refresh). */
@@ -9393,7 +9393,7 @@ class WebSessionManager {
9393
9393
  var _a;
9394
9394
  if (typeof window === "undefined")
9395
9395
  return null;
9396
- const session = localStorage.getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9396
+ const session = localStorage.getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9397
9397
  return session ? ((_a = JSON.parse(session).issuer) !== null && _a !== void 0 ? _a : null) : null;
9398
9398
  }
9399
9399
  /* ------------------------------------------------------------------ */
@@ -9403,7 +9403,7 @@ class WebSessionManager {
9403
9403
  var _a;
9404
9404
  if (typeof window === "undefined")
9405
9405
  return;
9406
- const session = localStorage.getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9406
+ const session = localStorage.getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9407
9407
  if (!session)
9408
9408
  return;
9409
9409
  const sessionObj = JSON.parse(session);
@@ -9420,10 +9420,10 @@ class WebSessionManager {
9420
9420
  sessionObj.refreshToken = refreshToken;
9421
9421
  }
9422
9422
  (_a = sessionObj.appId) !== null && _a !== void 0 ? _a : (sessionObj.appId = config.appId);
9423
- localStorage.setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify(sessionObj));
9423
+ localStorage.setItem(this.BOUNDED_SESSION_STORAGE_KEY, JSON.stringify(sessionObj));
9424
9424
  }
9425
9425
  }
9426
- WebSessionManager.TAROBASE_SESSION_STORAGE_KEY = "tarobase_session_storage";
9426
+ WebSessionManager.BOUNDED_SESSION_STORAGE_KEY = "bounded_session_storage";
9427
9427
 
9428
9428
  let _config = null;
9429
9429
  class ReactNativeSessionManager {
@@ -9516,7 +9516,7 @@ class ReactNativeSessionManager {
9516
9516
  // Issuer base for silent refresh (email overrides w/ humanAuthApiUrl; wallet/
9517
9517
  // guest default to authApiUrl). See WebSessionManager for the rationale.
9518
9518
  const sessionIssuer = (issuer || config.authApiUrl || "").replace(/\/$/, "");
9519
- this.getStorage().setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify(Object.assign({ address,
9519
+ this.getStorage().setItem(this.BOUNDED_SESSION_STORAGE_KEY, JSON.stringify(Object.assign({ address,
9520
9520
  accessToken,
9521
9521
  idToken,
9522
9522
  refreshToken, appId: currentAppId }, (sessionIssuer ? { issuer: sessionIssuer } : {}))));
@@ -9525,7 +9525,7 @@ class ReactNativeSessionManager {
9525
9525
  /* GET */
9526
9526
  /* ------------------------------------------------------------------ */
9527
9527
  static async getSession() {
9528
- const session = this.getStorage().getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9528
+ const session = this.getStorage().getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9529
9529
  if (!session)
9530
9530
  return null;
9531
9531
  const sessionObj = JSON.parse(session);
@@ -9546,7 +9546,7 @@ class ReactNativeSessionManager {
9546
9546
  const refreshed = await refreshSession(refreshToken, sessionObj.issuer);
9547
9547
  if ((refreshed === null || refreshed === void 0 ? void 0 : refreshed.idToken) && (refreshed === null || refreshed === void 0 ? void 0 : refreshed.accessToken)) {
9548
9548
  await this.updateIdTokenAndAccessToken(refreshed.idToken, refreshed.accessToken, refreshed.refreshToken);
9549
- const newSession = this.getStorage().getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9549
+ const newSession = this.getStorage().getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9550
9550
  if (!newSession)
9551
9551
  return null;
9552
9552
  const newObj = JSON.parse(newSession);
@@ -9568,20 +9568,20 @@ class ReactNativeSessionManager {
9568
9568
  /* CLEAR */
9569
9569
  /* ------------------------------------------------------------------ */
9570
9570
  static clearSession() {
9571
- this.getStorage().removeItem(this.TAROBASE_SESSION_STORAGE_KEY);
9571
+ this.getStorage().removeItem(this.BOUNDED_SESSION_STORAGE_KEY);
9572
9572
  }
9573
9573
  /* ------------------------------------------------------------------ */
9574
9574
  /* IS-AUTH */
9575
9575
  /* ------------------------------------------------------------------ */
9576
9576
  static isAuthenticated() {
9577
- return !!this.getStorage().getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9577
+ return !!this.getStorage().getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9578
9578
  }
9579
9579
  /* ------------------------------------------------------------------ */
9580
9580
  /* TOKEN HELPERS */
9581
9581
  /* ------------------------------------------------------------------ */
9582
9582
  static getIdToken() {
9583
9583
  try {
9584
- const session = this.getStorage().getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9584
+ const session = this.getStorage().getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9585
9585
  return session ? JSON.parse(session).idToken : null;
9586
9586
  }
9587
9587
  catch (_a) {
@@ -9592,7 +9592,7 @@ class ReactNativeSessionManager {
9592
9592
  static getIssuer() {
9593
9593
  var _a;
9594
9594
  try {
9595
- const session = this.getStorage().getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9595
+ const session = this.getStorage().getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9596
9596
  return session ? ((_a = JSON.parse(session).issuer) !== null && _a !== void 0 ? _a : null) : null;
9597
9597
  }
9598
9598
  catch (_b) {
@@ -9601,7 +9601,7 @@ class ReactNativeSessionManager {
9601
9601
  }
9602
9602
  static getRefreshToken() {
9603
9603
  try {
9604
- const session = this.getStorage().getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9604
+ const session = this.getStorage().getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9605
9605
  return session ? JSON.parse(session).refreshToken : null;
9606
9606
  }
9607
9607
  catch (_a) {
@@ -9613,7 +9613,7 @@ class ReactNativeSessionManager {
9613
9613
  /* ------------------------------------------------------------------ */
9614
9614
  static async updateIdTokenAndAccessToken(idToken, accessToken, refreshToken) {
9615
9615
  var _a;
9616
- const session = this.getStorage().getItem(this.TAROBASE_SESSION_STORAGE_KEY);
9616
+ const session = this.getStorage().getItem(this.BOUNDED_SESSION_STORAGE_KEY);
9617
9617
  if (!session)
9618
9618
  return;
9619
9619
  const sessionObj = JSON.parse(session);
@@ -9629,10 +9629,10 @@ class ReactNativeSessionManager {
9629
9629
  sessionObj.refreshToken = refreshToken;
9630
9630
  }
9631
9631
  (_a = sessionObj.appId) !== null && _a !== void 0 ? _a : (sessionObj.appId = config.appId);
9632
- this.getStorage().setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify(sessionObj));
9632
+ this.getStorage().setItem(this.BOUNDED_SESSION_STORAGE_KEY, JSON.stringify(sessionObj));
9633
9633
  }
9634
9634
  }
9635
- ReactNativeSessionManager.TAROBASE_SESSION_STORAGE_KEY = "tarobase_session_storage";
9635
+ ReactNativeSessionManager.BOUNDED_SESSION_STORAGE_KEY = "bounded_session_storage";
9636
9636
 
9637
9637
  /**
9638
9638
  * Return the active CLIENT session manager for the current runtime.
@@ -10153,9 +10153,9 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
10153
10153
  /* ENV helpers */
10154
10154
  /* ------------------------------------------------------------------ */
10155
10155
  // Canonical `BOUNDED_PRIVATE_KEY` (matches the CLI); legacy
10156
- // `TAROBASE_SOLANA_KEYPAIR` still honored. Only consulted when no explicit
10156
+ // `BOUNDED_SOLANA_KEYPAIR` still honored. Only consulted when no explicit
10157
10157
  // keypair was provided (createWalletClient passes one).
10158
- const ENV_KEYPAIRS = ["BOUNDED_PRIVATE_KEY", "TAROBASE_SOLANA_KEYPAIR"];
10158
+ const ENV_KEYPAIRS = ["BOUNDED_PRIVATE_KEY", "BOUNDED_SOLANA_KEYPAIR"];
10159
10159
  function loadKeypairFromEnv() {
10160
10160
  let secret;
10161
10161
  let found;
@@ -10278,7 +10278,7 @@ var serverSessionManager = /*#__PURE__*/Object.freeze({
10278
10278
  });
10279
10279
 
10280
10280
  /**
10281
- * Safe base64 helpers for tarobase-core.
10281
+ * Safe base64 helpers for bounded-core.
10282
10282
  *
10283
10283
  * Uses the global atob/btoa when available (browser, RN with polyfill),
10284
10284
  * falls back to the 'buffer' package (Node.js / SSR / RN without polyfill).
@@ -10458,7 +10458,7 @@ axiosRetry(apiClient, {
10458
10458
  shouldResetTimeout: true,
10459
10459
  onRetry: (retryCount, error, requestConfig) => {
10460
10460
  var _a;
10461
- console.warn(`[tarobase-sdk] retry ${retryCount} for ${(_a = requestConfig.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()} ${requestConfig.url} — ${error.code || error.message}`);
10461
+ console.warn(`[bounded-sdk] retry ${retryCount} for ${(_a = requestConfig.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()} ${requestConfig.url} — ${error.code || error.message}`);
10462
10462
  },
10463
10463
  });
10464
10464
  const refreshInFlight = new Map();
@@ -10517,8 +10517,8 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
10517
10517
  : await createAuthHeader(config.isServer);
10518
10518
  const headers = Object.assign({ "Content-Type": "application/json", "X-Public-App-Id": config.appId, "X-App-Id": config.appId }, authHeader);
10519
10519
  if (typeof window !== "undefined" &&
10520
- window.CUSTOM_TAROBASE_APP_ID_HEADER) {
10521
- const customAppId = window.CUSTOM_TAROBASE_APP_ID_HEADER;
10520
+ window.CUSTOM_BOUNDED_APP_ID_HEADER) {
10521
+ const customAppId = window.CUSTOM_BOUNDED_APP_ID_HEADER;
10522
10522
  if (customAppId) {
10523
10523
  headers["X-App-Id"] = customAppId;
10524
10524
  }
@@ -10777,7 +10777,7 @@ function parseAggregateValue(result) {
10777
10777
  * Count items in a collection path. Returns a numeric result.
10778
10778
  *
10779
10779
  * This uses the AI query engine with a count-specific prompt prefix,
10780
- * so TaroBase will generate a $count aggregation pipeline and return
10780
+ * so Bounded will generate a $count aggregation pipeline and return
10781
10781
  * just the count rather than full documents.
10782
10782
  *
10783
10783
  * IMPORTANT: This only works for collections where the read policy is "true".
@@ -11302,10 +11302,10 @@ async function setMany(many, options) {
11302
11302
  let documents = [];
11303
11303
  const pathsToInvalidate = new Set();
11304
11304
  for (const { path, document: documentWithReservedFields } of many) {
11305
- // for setting, we should remove any pieces of the document that start with 'tarobase_' as they are internal and shouldn't be updated. The API would block it if it is one of the reserved ones
11305
+ // for setting, we should remove any pieces of the document that start with '_' as they are internal and shouldn't be updated. The API would block it if it is one of the reserved ones
11306
11306
  let document = documentWithReservedFields;
11307
11307
  if (documentWithReservedFields) {
11308
- document = Object.fromEntries(Object.entries(documentWithReservedFields).filter(([key]) => !key.startsWith('tarobase_')));
11308
+ document = Object.fromEntries(Object.entries(documentWithReservedFields).filter(([key]) => !key.startsWith('_')));
11309
11309
  }
11310
11310
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
11311
11311
  pathsToInvalidate.add(normalizedPath);
@@ -11429,7 +11429,7 @@ async function setMany(many, options) {
11429
11429
  var _a, _b, _c, _d, _e;
11430
11430
  // NOTE (backwards-compat revert): a program-allowlist on server-supplied
11431
11431
  // `preInstructions` was tried here for the audit-8 SOL-drain concern, but it
11432
- // broke legitimate onchain DeFi flows — tarobase routes Phoenix, Jupiter/swap,
11432
+ // broke legitimate onchain DeFi flows — bounded routes Phoenix, Jupiter/swap,
11433
11433
  // SPL-Token and ATA-creation instructions through standard-path preInstructions
11434
11434
  // (see sol-helper remaining-accounts-extractor). A correct audit-8 fix must be
11435
11435
  // DeFi-aware (e.g. block ONLY a raw System Transfer/TransferWithSeed, never a
@@ -11513,10 +11513,10 @@ async function setMany(many, options) {
11513
11513
  const transaction = VersionedTransaction.deserialize(txBytes);
11514
11514
  // Validate the transaction before signing: ensure only allowed programs
11515
11515
  // and no unauthorized System program instructions (e.g., SOL transfers)
11516
- const TAROBASE_PROGRAM = 'poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZp';
11516
+ const BOUNDED_PROGRAM = 'poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZp';
11517
11517
  const COMPUTE_BUDGET = 'ComputeBudget111111111111111111111111111111';
11518
11518
  const SYSTEM_PROGRAM = '11111111111111111111111111111111';
11519
- const ALLOWED_PROGRAMS = new Set([TAROBASE_PROGRAM, COMPUTE_BUDGET, SYSTEM_PROGRAM]);
11519
+ const ALLOWED_PROGRAMS = new Set([BOUNDED_PROGRAM, COMPUTE_BUDGET, SYSTEM_PROGRAM]);
11520
11520
  // System program instruction discriminators (first 4 bytes, little-endian u32)
11521
11521
  const SYSTEM_TRANSFER = 2; // Transfer instruction index
11522
11522
  const SYSTEM_TRANSFER_WITH_SEED = 11;
@@ -12110,8 +12110,8 @@ async function getOrCreateConnection(appId, isServer, routePath, authTokenProvid
12110
12110
  if (appId && appId !== config.appId) {
12111
12111
  wsUrl.searchParams.append('appId', appId);
12112
12112
  }
12113
- else if (typeof window !== 'undefined' && window.CUSTOM_TAROBASE_APP_ID_HEADER) {
12114
- wsUrl.searchParams.append('appId', window.CUSTOM_TAROBASE_APP_ID_HEADER);
12113
+ else if (typeof window !== 'undefined' && window.CUSTOM_BOUNDED_APP_ID_HEADER) {
12114
+ wsUrl.searchParams.append('appId', window.CUSTOM_BOUNDED_APP_ID_HEADER);
12115
12115
  }
12116
12116
  else {
12117
12117
  wsUrl.searchParams.append('appId', config.appId);
@@ -12971,7 +12971,7 @@ function serverTimestamp() {
12971
12971
  // ---------------------------------------------------------------------------
12972
12972
  // IDB helpers (lazy-loaded, non-blocking)
12973
12973
  // ---------------------------------------------------------------------------
12974
- const IDB_NAME$1 = 'tarobase-realtime';
12974
+ const IDB_NAME$1 = 'bounded-realtime';
12975
12975
  const IDB_STORE$1 = 'subscriptions';
12976
12976
  const IDB_VERSION = 1;
12977
12977
  let idbPromise = null;
@@ -13409,10 +13409,10 @@ class RealtimeStore {
13409
13409
  const normalizedPath = path.startsWith('/') ? path.slice(1) : path;
13410
13410
  const collectionPath = this.getCollectionPath(normalizedPath);
13411
13411
  const optimisticDoc = Object.assign(Object.assign({ _id: normalizedPath, pathId: normalizedPath }, resolvedDoc), {
13412
- // System timestamp field name differs by stack: the Bounded worker stamps
13413
- // the neutral `_updatedAt`; legacy Tarobase stamps `tarobase_updated_at`.
13412
+ // System timestamp field name: the Bounded worker stamps the neutral
13413
+ // `_updatedAt`; the underscore-prefixed `_updated_at` metadata mirror.
13414
13414
  // Match it so the optimistic doc lines up with the server's confirmation.
13415
- [isBoundedNetwork() ? '_updatedAt' : 'tarobase_updated_at']: Date.now() });
13415
+ [isBoundedNetwork() ? '_updatedAt' : '_updated_at']: Date.now() });
13416
13416
  const sub = this.findSubscriptionByPath(collectionPath);
13417
13417
  let prevDoc = null;
13418
13418
  if (sub) {
@@ -18526,7 +18526,7 @@ let currentAuthProvider = null;
18526
18526
  let currentAuthMethod = null;
18527
18527
  let initConfig = null;
18528
18528
  // --- localStorage helpers: track which auth method the user last logged in with ---
18529
- const STORED_AUTH_METHOD_KEY$1 = 'tarobase_last_auth_method';
18529
+ const STORED_AUTH_METHOD_KEY$1 = 'bounded_last_auth_method';
18530
18530
  function getStoredAuthMethod() {
18531
18531
  try {
18532
18532
  return getPlatform().storage.getItem(STORED_AUTH_METHOD_KEY$1);
@@ -19279,7 +19279,7 @@ async function loadDependencies() {
19279
19279
  const [reactModule, reactDomModule, phantomModule] = await Promise.all([
19280
19280
  import('react'),
19281
19281
  import('react-dom/client'),
19282
- import('./index-BHTfW8CV.esm.js')
19282
+ import('./index-B2ytfYTB.esm.js')
19283
19283
  ]);
19284
19284
  // Extract default export from ESM module namespace
19285
19285
  // Dynamic import() returns { default: Module, ...exports }, not the module directly
@@ -19469,7 +19469,7 @@ class PhantomWalletProvider {
19469
19469
  };
19470
19470
  }
19471
19471
  }, [phantom, phantom === null || phantom === void 0 ? void 0 : phantom.isConnected, phantom === null || phantom === void 0 ? void 0 : phantom.addresses, phantom === null || phantom === void 0 ? void 0 : phantom.isLoading, connect, disconnect, isDisconnecting, modal, modal.isOpened, solana, solana === null || solana === void 0 ? void 0 : solana.connected, solanaHook.isAvailable, connectError]);
19472
- // Auto-login: If connected but no Tarobase session, try to create one.
19472
+ // Auto-login: If connected but no Bounded session, try to create one.
19473
19473
  // This handles social login callbacks where user returns from OAuth already connected.
19474
19474
  React.useEffect(() => {
19475
19475
  const autoCreateSession = async () => {
@@ -19483,7 +19483,7 @@ class PhantomWalletProvider {
19483
19483
  // and clears it on logout, so this guard is correct in both
19484
19484
  // steady-state and post-logout cases.
19485
19485
  try {
19486
- if (getPlatform().storage.getItem('tarobase_last_auth_method') === 'mobile-wallet-adapter') {
19486
+ if (getPlatform().storage.getItem('bounded_last_auth_method') === 'mobile-wallet-adapter') {
19487
19487
  return;
19488
19488
  }
19489
19489
  }
@@ -19521,7 +19521,7 @@ class PhantomWalletProvider {
19521
19521
  // in flight. If MWA owns the auth method now, abort before we
19522
19522
  // overwrite its session (or its in-flight session).
19523
19523
  try {
19524
- if (getPlatform().storage.getItem('tarobase_last_auth_method') === 'mobile-wallet-adapter') {
19524
+ if (getPlatform().storage.getItem('bounded_last_auth_method') === 'mobile-wallet-adapter') {
19525
19525
  return;
19526
19526
  }
19527
19527
  }
@@ -19529,7 +19529,7 @@ class PhantomWalletProvider {
19529
19529
  await WebSessionManager.storeSession(publicKey, createSessionResult.accessToken, createSessionResult.idToken, createSessionResult.refreshToken);
19530
19530
  // Mark auth method so clearIncompatibleSession() doesn't wipe this session
19531
19531
  try {
19532
- getPlatform().storage.setItem('tarobase_last_auth_method', 'phantom');
19532
+ getPlatform().storage.setItem('bounded_last_auth_method', 'phantom');
19533
19533
  }
19534
19534
  catch (_d) { }
19535
19535
  setCurrentUser({ provider: that, address: publicKey });
@@ -19627,7 +19627,7 @@ class PhantomWalletProvider {
19627
19627
  await WebSessionManager.storeSession(publicKey, createSessionResult.accessToken, createSessionResult.idToken, createSessionResult.refreshToken);
19628
19628
  // Mark auth method so clearIncompatibleSession() doesn't wipe this session
19629
19629
  try {
19630
- getPlatform().storage.setItem('tarobase_last_auth_method', 'phantom');
19630
+ getPlatform().storage.setItem('bounded_last_auth_method', 'phantom');
19631
19631
  }
19632
19632
  catch (_b) { }
19633
19633
  const user = { provider: that, address: publicKey };
@@ -20242,8 +20242,8 @@ class PhantomWalletProvider {
20242
20242
  try {
20243
20243
  const remainingAccounts = convertRemainingAccounts(solTransactionData.txArgs[0].remainingAccounts);
20244
20244
  let app_id = solTransactionData.appId;
20245
- if (typeof window !== 'undefined' && window.CUSTOM_TAROBASE_APP_ID_HEADER) {
20246
- app_id = window.CUSTOM_TAROBASE_APP_ID_HEADER;
20245
+ if (typeof window !== 'undefined' && window.CUSTOM_BOUNDED_APP_ID_HEADER) {
20246
+ app_id = window.CUSTOM_BOUNDED_APP_ID_HEADER;
20247
20247
  }
20248
20248
  if (!app_id) {
20249
20249
  throw new Error("App ID is required");
@@ -20660,7 +20660,7 @@ var phantomWalletProvider = /*#__PURE__*/Object.freeze({
20660
20660
  * doesn't force the user back into Phantom's approval flow when the
20661
20661
  * underlying wallet authorization is still valid.
20662
20662
  */
20663
- const MWA_AUTH_TOKEN_STORAGE_KEY = 'tarobase_mwa_auth_token';
20663
+ const MWA_AUTH_TOKEN_STORAGE_KEY = 'bounded_mwa_auth_token';
20664
20664
  /**
20665
20665
  * Detects whether the current environment is a mobile browser capable of
20666
20666
  * Mobile Wallet Adapter (MWA) communication.
@@ -20674,7 +20674,7 @@ function isMobileWalletAvailable() {
20674
20674
  return detectAndroid();
20675
20675
  }
20676
20676
  const ED25519_SIGNATURE_LENGTH = 64;
20677
- const STORED_AUTH_METHOD_KEY = 'tarobase_last_auth_method';
20677
+ const STORED_AUTH_METHOD_KEY = 'bounded_last_auth_method';
20678
20678
  const MWA_AUTH_METHOD = 'mobile-wallet-adapter';
20679
20679
  function findMwaError(e, maxDepth = 5) {
20680
20680
  var _a;
@@ -20777,7 +20777,7 @@ async function withMwaAssociationRetry(fn) {
20777
20777
  * no `blur` event fires, the protocol's `getDetectionPromise` (3000ms
20778
20778
  * timeout, line 433) rejects, and we get `ERROR_WALLET_NOT_FOUND`.
20779
20779
  *
20780
- * Fix: show a Tarobase-controlled modal between the two transacts. When the
20780
+ * Fix: show a Bounded-controlled modal between the two transacts. When the
20781
20781
  * user taps the modal's "Sign in" button, that tap IS a fresh user
20782
20782
  * activation. We invoke the sign function directly inside the click handler
20783
20783
  * — no `await` between the tap and the call — so the activation propagates
@@ -20815,7 +20815,7 @@ async function awaitSignInGestureAndSign(theme, signFn, noResultError = 'MWA ret
20815
20815
  const closeColor = isDark ? '#71717a' : '#a1a1aa';
20816
20816
  const fontStack = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
20817
20817
  const overlay = document.createElement('div');
20818
- overlay.setAttribute('data-tarobase-mwa-gesture', 'true');
20818
+ overlay.setAttribute('data-bounded-mwa-gesture', 'true');
20819
20819
  overlay.style.cssText = [
20820
20820
  'position: fixed',
20821
20821
  'inset: 0',
@@ -21180,7 +21180,7 @@ async function registerMobileWalletAdapter(config) {
21180
21180
  if (typeof window === 'undefined')
21181
21181
  return;
21182
21182
  try {
21183
- const walletStandardMobile = await import('./index.browser-DhAcjdpV.esm.js');
21183
+ const walletStandardMobile = await import('./index.browser-D2xm-q6N.esm.js');
21184
21184
  const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
21185
21185
  if (!registerMwa) {
21186
21186
  console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
@@ -21238,7 +21238,7 @@ async function registerMobileWalletAdapter(config) {
21238
21238
  * does.
21239
21239
  *
21240
21240
  * Notes on UX: login uses two wallet popups in succession — `standard:connect`
21241
- * (authorize) and `solana:signMessage` (sign the Tarobase nonce). The
21241
+ * (authorize) and `solana:signMessage` (sign the Bounded nonce). The
21242
21242
  * previous implementation combined both inside a single `transact` callback;
21243
21243
  * splitting them is the cost of going through wallet-standard, and is
21244
21244
  * acceptable given the alternative was broken on Seeker.
@@ -21281,9 +21281,9 @@ class SolanaMobileWalletProvider {
21281
21281
  // entirely via `config.appIdentity.uri`.
21282
21282
  const fallbackUri = hasDOM
21283
21283
  ? getPlatform().getLocationOrigin()
21284
- : 'tarobase://app';
21284
+ : 'bounded://app';
21285
21285
  this.appIdentity = config.appIdentity || {
21286
- name: 'TaroBase App',
21286
+ name: 'Bounded App',
21287
21287
  uri: fallbackUri,
21288
21288
  };
21289
21289
  this.cluster = config.cluster || 'mainnet-beta';
@@ -21319,7 +21319,7 @@ class SolanaMobileWalletProvider {
21319
21319
  async ensureWallet() {
21320
21320
  if (this.wallet)
21321
21321
  return this.wallet;
21322
- const mod = await import('./index.browser-DhAcjdpV.esm.js');
21322
+ const mod = await import('./index.browser-D2xm-q6N.esm.js');
21323
21323
  const chain = mapChainToWalletStandard(this.cluster);
21324
21324
  this.wallet = new mod.LocalSolanaMobileWalletAdapterWallet({
21325
21325
  appIdentity: this.appIdentity,
@@ -21339,7 +21339,7 @@ class SolanaMobileWalletProvider {
21339
21339
  return this.wallet;
21340
21340
  }
21341
21341
  /**
21342
- * Ensure the wallet has an active authorization. After a Tarobase session
21342
+ * Ensure the wallet has an active authorization. After a Bounded session
21343
21343
  * is restored from storage on cold-start, `wallet.accounts` is empty until
21344
21344
  * we silently reconnect from the AuthorizationCache. If the cache is also
21345
21345
  * empty, fall back to interactive `login()` (which surfaces the three-stage
@@ -21450,7 +21450,7 @@ class SolanaMobileWalletProvider {
21450
21450
  }
21451
21451
  const account = auth.accounts[0];
21452
21452
  // account.address is base64-encoded per MWA spec; convert to
21453
- // the base58 form Tarobase + the rest of the SDK use.
21453
+ // the base58 form Bounded + the rest of the SDK use.
21454
21454
  const base58Addr = new PublicKey(bufferExports.Buffer.from(account.address, 'base64')).toBase58();
21455
21455
  // Reuse session if already valid for this address — skip the
21456
21456
  // signMessages roundtrip entirely.
@@ -21487,7 +21487,7 @@ class SolanaMobileWalletProvider {
21487
21487
  setCurrentUser(user);
21488
21488
  return user;
21489
21489
  }
21490
- // Create Tarobase session on the server.
21490
+ // Create Bounded session on the server.
21491
21491
  if (!result.signatureBase64 || !result.messageText) {
21492
21492
  throw new Error('MWA login completed without signature');
21493
21493
  }
@@ -21516,7 +21516,7 @@ class SolanaMobileWalletProvider {
21516
21516
  }
21517
21517
  const wallet = await this.ensureWallet();
21518
21518
  // Quick-check: wallet may already have authorization (e.g. from a
21519
- // previous in-page login) and a matching Tarobase session — skip
21519
+ // previous in-page login) and a matching Bounded session — skip
21520
21520
  // popups in that case.
21521
21521
  if (wallet.accounts.length > 0) {
21522
21522
  const accountPubkey = new PublicKey(wallet.accounts[0].publicKey);
@@ -21547,14 +21547,14 @@ class SolanaMobileWalletProvider {
21547
21547
  const account = accounts[0];
21548
21548
  const accountPubkey = new PublicKey(account.publicKey);
21549
21549
  const base58Addr = accountPubkey.toBase58();
21550
- // If we happen to already have a matching Tarobase session, reuse it.
21550
+ // If we happen to already have a matching Bounded session, reuse it.
21551
21551
  const existingSession = await getActiveSessionManager().getSession();
21552
21552
  if (existingSession && existingSession.address === base58Addr) {
21553
21553
  const user = { provider: this, address: base58Addr };
21554
21554
  setCurrentUser(user);
21555
21555
  return user;
21556
21556
  }
21557
- // Wallet popup #2: sign the Tarobase nonce message.
21557
+ // Wallet popup #2: sign the Bounded nonce message.
21558
21558
  //
21559
21559
  // We cannot call signMessageFeat.signMessage() directly here:
21560
21560
  // it would run as a JS continuation from the connect() resolve,
@@ -21567,7 +21567,7 @@ class SolanaMobileWalletProvider {
21567
21567
  // protocol's 3-second getDetectionPromise rejects with
21568
21568
  // ERROR_WALLET_NOT_FOUND.
21569
21569
  //
21570
- // Insert a Tarobase modal: the user's tap on "Sign in" provides a
21570
+ // Insert a Bounded modal: the user's tap on "Sign in" provides a
21571
21571
  // fresh activation, and signMessage is invoked synchronously
21572
21572
  // inside the click handler so the activation propagates.
21573
21573
  // C1: fetch the nonce HERE (after connect), not before — a pre-connect
@@ -21584,7 +21584,7 @@ class SolanaMobileWalletProvider {
21584
21584
  }
21585
21585
  const { signature: sigBytes } = signResult;
21586
21586
  const signatureBase64 = bufferExports.Buffer.from(sigBytes).toString('base64');
21587
- // Create Tarobase session on the server.
21587
+ // Create Bounded session on the server.
21588
21588
  const createSessionResult = await createSessionWithSignature(base58Addr, messageText, signatureBase64);
21589
21589
  await getActiveSessionManager().storeSession(base58Addr, createSessionResult.accessToken, createSessionResult.idToken, createSessionResult.refreshToken);
21590
21590
  // Auth-method marker is already 'mobile-wallet-adapter' from above.
@@ -21973,8 +21973,8 @@ class SolanaMobileWalletProvider {
21973
21973
  try {
21974
21974
  const remainingAccounts = convertRemainingAccounts(solTransactionData.txArgs[0].remainingAccounts);
21975
21975
  let app_id = solTransactionData.appId;
21976
- if (typeof window !== 'undefined' && window.CUSTOM_TAROBASE_APP_ID_HEADER) {
21977
- app_id = window.CUSTOM_TAROBASE_APP_ID_HEADER;
21976
+ if (typeof window !== 'undefined' && window.CUSTOM_BOUNDED_APP_ID_HEADER) {
21977
+ app_id = window.CUSTOM_BOUNDED_APP_ID_HEADER;
21978
21978
  }
21979
21979
  if (!app_id) {
21980
21980
  throw new Error('App ID is required');
@@ -22581,8 +22581,8 @@ class PrivyWalletProvider {
22581
22581
  const connection = new Connection(rpcUrl, "confirmed");
22582
22582
  const remainingAccounts = convertRemainingAccounts(solTransactionData.txArgs[0].remainingAccounts);
22583
22583
  let app_id = solTransactionData.appId;
22584
- if (typeof window !== 'undefined' && window.CUSTOM_TAROBASE_APP_ID_HEADER) {
22585
- const customAppId = window.CUSTOM_TAROBASE_APP_ID_HEADER;
22584
+ if (typeof window !== 'undefined' && window.CUSTOM_BOUNDED_APP_ID_HEADER) {
22585
+ const customAppId = window.CUSTOM_BOUNDED_APP_ID_HEADER;
22586
22586
  if (customAppId) {
22587
22587
  app_id = customAppId;
22588
22588
  }
@@ -23193,7 +23193,7 @@ class PrivyExpoProvider {
23193
23193
  if (!wallet) {
23194
23194
  throw new Error('No embedded Solana wallet found after login. Ensure embeddedWallets.solana.createOnLogin is configured.');
23195
23195
  }
23196
- // Mint a Tarobase session by having the Privy Solana wallet sign the
23196
+ // Mint a Bounded session by having the Privy Solana wallet sign the
23197
23197
  // standard SIWS challenge — identical to Phantom/MWA, so the backend mints
23198
23198
  // the session via the proven wallet-signature path (no Privy-specific
23199
23199
  // token verification needed).
@@ -23213,8 +23213,8 @@ class PrivyExpoProvider {
23213
23213
  const connection = new Connection(rpcUrl, 'confirmed');
23214
23214
  const remainingAccounts = convertRemainingAccounts(solTransactionData.txArgs[0].remainingAccounts);
23215
23215
  let app_id = solTransactionData.appId;
23216
- if (typeof globalThis !== 'undefined' && globalThis.CUSTOM_TAROBASE_APP_ID_HEADER) {
23217
- app_id = globalThis.CUSTOM_TAROBASE_APP_ID_HEADER;
23216
+ if (typeof globalThis !== 'undefined' && globalThis.CUSTOM_BOUNDED_APP_ID_HEADER) {
23217
+ app_id = globalThis.CUSTOM_BOUNDED_APP_ID_HEADER;
23218
23218
  }
23219
23219
  if (!app_id) {
23220
23220
  throw new Error('App ID is required');
@@ -23368,7 +23368,7 @@ class PrivyExpoProvider {
23368
23368
  // Private helpers
23369
23369
  // -------------------------------------------------------------------
23370
23370
  /**
23371
- * Mint a Tarobase session from a Privy Solana wallet by signing the canonical
23371
+ * Mint a Bounded session from a Privy Solana wallet by signing the canonical
23372
23372
  * SIWS challenge (nonce -> genSolanaMessage -> wallet.signMessage). This reuses
23373
23373
  * createSessionWithSignature — the exact path Phantom, the mobile wallet
23374
23374
  * adapter, and the guest device-key use — so the bounded /session issuer mints
@@ -23453,4 +23453,4 @@ class PrivyExpoProvider {
23453
23453
  }
23454
23454
 
23455
23455
  export { EFFECT_INTENT_ADDRESS as $, getFiles as A, search as B, queryAggregate as C, runQuery as D, runQueryMany as E, runExpression as F, runExpressionMany as G, signMessage as H, signTransaction as I, signAndSubmitTransaction as J, count as K, aggregate as L, subscribe as M, useAuth as N, deserializeTransaction as O, getIdToken as P, setPlatform as Q, getPlatform as R, PhantomWalletProvider as S, MockAuthProvider as T, DEFAULT_TEST_ADDRESS as U, OffchainAuthProvider as V, SolanaMobileWalletProvider as W, isMobileWalletAvailable as X, registerMobileWalletAdapter as Y, PrivyWalletProvider as Z, PrivyExpoProvider as _, base58 as a, FunctionInvokeError as a0, InsufficientBalanceError as a1, LiveIntentError as a2, ReactNativeSessionManager as a3, RealtimeStore as a4, ServerSessionManager as a5, WebSessionManager as a6, buildSetDocumentsTransaction as a7, clearCache as a8, closeAllSubscriptions as a9, wsDelete as aA, wsGet as aB, wsGetMany as aC, wsQuery as aD, wsSet as aE, convertRemainingAccounts as aa, createSessionWithSignature as ab, defineLiveModule as ac, deriveUserIdentityFromIdToken as ad, functions as ae, genAuthNonce as af, genSolanaMessage as ag, getActiveSessionManager as ah, getCachedData as ai, getMany as aj, getRealtimeStore as ak, getWebhookKeysUrl as al, hasActiveConnection as am, increment as an, invoke as ao, isEffectResult as ap, live as aq, intent as ar, reconnectWithNewAuth as as, refreshSession as at, resetRealtimeStore as au, revokeSession as av, serverTimestamp as aw, signSessionCreateMessage as ax, subscribeView as ay, withEffects as az, bufferExports as b, getCurrentUser as c, onAuthLoadingChanged as d, getAuthLoading as e, logout as f, getDefaultExportFromCjs$1 as g, getConfig as h, init as i, getAuthProvider as j, sendEmailOtp as k, login as l, linkEmail as m, loginWithPrivy as n, onAuthStateChanged as o, loginWithRedirect as p, linkWithRedirect as q, completeLoginFromRedirect as r, signInAnonymously as s, loginWithPopup as t, completeLoginInPopup as u, verifyEmailOtp as v, get as w, set as x, setMany as y, setFile as z };
23456
- //# sourceMappingURL=index-o5Hv9pfS.esm.js.map
23456
+ //# sourceMappingURL=index-D986s6w7.esm.js.map