@bounded-sh/core 0.0.71 → 0.0.73

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.
@@ -4131,7 +4131,7 @@ class ServerSessionManager {
4131
4131
  const sessionConfig = (_a = this.sessionConfig) !== null && _a !== void 0 ? _a : undefined;
4132
4132
  /* fetch nonce from auth API (bound to the snapshotted app+issuer) */
4133
4133
  const nonce = await genAuthNonce(sessionConfig);
4134
- const { genSolanaMessage } = await import('./solana-message-x8ElgC9P.mjs');
4134
+ const { genSolanaMessage } = await import('./solana-message-DHKm-c_x.mjs');
4135
4135
  const message = await genSolanaMessage(address, nonce, sessionConfig === null || sessionConfig === void 0 ? void 0 : sessionConfig.appId);
4136
4136
  /* sign the message */
4137
4137
  const sigBytes = nacl.sign.detached(new TextEncoder().encode(message), kp.secretKey);
@@ -6899,7 +6899,7 @@ async function doReconnectWithNewAuth() {
6899
6899
  console.warn('[WS v2] Failed to clear HTTP read cache on auth change:', error);
6900
6900
  }
6901
6901
  try {
6902
- const { reconnectRealtimeStoreWithNewAuth } = await import('./realtime-store-Bcnv3f0g.mjs');
6902
+ const { reconnectRealtimeStoreWithNewAuth } = await import('./realtime-store-6rndRLaa.mjs');
6903
6903
  await reconnectRealtimeStoreWithNewAuth();
6904
6904
  }
6905
6905
  catch (error) {
@@ -8325,7 +8325,11 @@ async function setMany(many, options) {
8325
8325
  if (hasSerializedSolanaTarget && hasBuiltSolanaTarget) {
8326
8326
  throw new Error('Ambiguous on-chain write response mixes Solana transaction target formats');
8327
8327
  }
8328
- const expectedWritePaths = documents.map(d => d.destinationPath);
8328
+ // All requested paths (writes AND deletes), in request order. Used for the
8329
+ // post-confirm mirror read-back, which correlates every requested path.
8330
+ // The pre-sign validation derives its own full expected intent from
8331
+ // `documents` (see below) and needs nothing from this list.
8332
+ const requestedPaths = documents.map(d => d.destinationPath);
8329
8333
  const requestedDocuments = buildRequestedDocuments(documents);
8330
8334
  const appId = config.appId;
8331
8335
  // The lane comes verbatim from the worker, and is read BEFORE anything is
@@ -8342,8 +8346,13 @@ async function setMany(many, options) {
8342
8346
  'Nothing was signed or submitted.');
8343
8347
  }
8344
8348
  const solanaChain = workerChain;
8345
- const { handlePreBuiltTransaction } = await import('./solana-operations-DEWIxJS8.mjs');
8346
- const solanaOutcome = await handlePreBuiltTransaction(curTx, authProvider, options, expectedWritePaths);
8349
+ const { handlePreBuiltTransaction, buildExpectedWriteIntent } = await import('./solana-operations-DiM6_8z7.mjs');
8350
+ // OA-0001: derive the expected intent from OUR OWN request (the one
8351
+ // ground truth a tampered builder response cannot change) so the
8352
+ // validator can reject any transaction whose operation semantics
8353
+ // diverge from it BEFORE the wallet is asked to sign.
8354
+ const expectedIntent = buildExpectedWriteIntent(documents);
8355
+ const solanaOutcome = await handlePreBuiltTransaction(curTx, authProvider, options, expectedIntent);
8347
8356
  // `shouldSubmitTx: false` signed WITHOUT sending — no signature exists,
8348
8357
  // and there is nothing to mirror, so no synchronization is attempted.
8349
8358
  if (solanaOutcome.outcome === 'signed') {
@@ -8365,7 +8374,7 @@ async function setMany(many, options) {
8365
8374
  }
8366
8375
  // Confirmed: the receipt is already complete, so the mirror read is a
8367
8376
  // best-effort enrichment reported in `mirrorSync`, never a rejection.
8368
- const mirrorSync = await attemptMirrorSync(expectedWritePaths, options);
8377
+ const mirrorSync = await attemptMirrorSync(requestedPaths, options);
8369
8378
  return {
8370
8379
  status: 'confirmed', appId, requestedDocuments, chain: solanaChain,
8371
8380
  transactionId: solanaOutcome.transactionSignature,
@@ -9783,7 +9792,7 @@ function toMillis(seconds) {
9783
9792
 
9784
9793
  /** SIWS message creation is async already, so its onchain module can be lazy. */
9785
9794
  async function genSolanaMessage(address, nonce) {
9786
- const implementation = await import('./solana-message-x8ElgC9P.mjs');
9795
+ const implementation = await import('./solana-message-DHKm-c_x.mjs');
9787
9796
  return implementation.genSolanaMessage(address, nonce);
9788
9797
  }
9789
9798
 
@@ -10259,4 +10268,4 @@ function defineLiveModule(mod) {
10259
10268
  }
10260
10269
 
10261
10270
  export { getSessionGeneration as $, closeAllSubscriptions as A, clearCache as B, getCachedData as C, reconnectWithNewAuth as D, createClient as E, subscribeQuery as F, closeAllQuerySubscriptions as G, canonicalizeArgs as H, InsufficientBalanceError as I, canonicalizeResult as J, DEFAULT_QUERY_POLL_INTERVAL_MS as K, BoundedDeclineError as L, MIN_QUERY_POLL_INTERVAL_MS as M, deriveDecline as N, dispatchDeclineEvent as O, DECLINE_EVENT_NAME as P, dispatchRateLimitEvent as Q, RATE_LIMIT_EVENT_NAME as R, ScopedClientReadOnlyError as S, hasActiveConnection as T, increment as U, serverTimestamp as V, now as W, toSeconds as X, toMillis as Y, getIdToken as Z, deriveUserIdentityFromIdToken as _, getWebhookKeysUrl as a, WebSessionManager as a0, ReactNativeSessionManager as a1, getActiveSessionManager as a2, onSessionCleared as a3, SessionEnvironmentError as a4, UNSUPPORTED_ENVIRONMENT_CODE as a5, AUTH_CHANGED_CODE as a6, AUTH_EXPIRED_CODE as a7, isAuthExpiredError as a8, getFreshAuthToken as a9, ServerSessionManager as aa, createSessionWithSignature as ab, refreshSession as ac, revokeSession as ad, signSessionCreateMessage as ae, genAuthNonce as af, genSolanaMessage as ag, genSiweMessage as ah, normalizeEvmAddress as ai, toLowerEvmAddress as aj, functions as ak, invoke as al, FunctionInvokeError as am, live as an, intent as ao, status as ap, subscribeView as aq, LiveIntentError as ar, withEffects as as, isEffectResult as at, defineLiveModule as au, EFFECT_INTENT_ADDRESS as av, bufferExports as b, getConfiguredAppId as c, get as d, getMany as e, docId as f, getConfig as g, setMany as h, init as i, setFile as j, getFiles as k, search as l, runQueryMany as m, runExpression as n, runExpressionMany as o, signMessage as p, queryAggregate as q, runQuery as r, set as s, signTransaction as t, signAndSubmitTransaction as u, count as v, aggregate as w, reconcileSetResult as x, waitForSetResult as y, subscribe as z };
10262
- //# sourceMappingURL=index-P4eUuhOB.mjs.map
10271
+ //# sourceMappingURL=index-DXV0ETfH.mjs.map