@bounded-sh/core 0.0.88 → 0.0.90

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.
@@ -11,6 +11,28 @@ import type { SetOptions } from './operations';
11
11
  */
12
12
  export declare function deriveTransactionSignature(signedTransaction: VersionedTransaction): string;
13
13
  export declare function isDefinitiveSolanaSendFailure(error: unknown): boolean;
14
+ /**
15
+ * Whether a definitive Solana send/confirm failure is the BOUNDED PROGRAM
16
+ * rejecting the write in simulation - a policy rule or a cap/invariant check -
17
+ * as opposed to an infra failure (blockhash, fees, account not found). Only the
18
+ * former is a stale-mirror race and safe to advertise as retryable.
19
+ */
20
+ export declare function isBoundedOnchainRuleRejection(error: unknown, extraLogs?: unknown): boolean;
21
+ /**
22
+ * A Bounded on-chain rule/invariant rejection surfaced with a message the caller
23
+ * can act on. This write already PASSED the off-chain preflight (otherwise it
24
+ * would have been declined before a transaction was ever built), so the program
25
+ * disagreeing here means the authoritative on-chain state is ahead of a
26
+ * not-yet-converged read mirror - re-read and retry. If it keeps failing, the
27
+ * rule is genuinely unsatisfied (the cap is truly exceeded, or the write is not
28
+ * authorized). Carries the original error as `cause` and the raw program logs.
29
+ */
30
+ export declare class BoundedOnchainRuleRejection extends Error {
31
+ readonly boundedRuleRejection = true;
32
+ readonly retryable = true;
33
+ readonly logs: string[];
34
+ constructor(cause: unknown, extraLogs?: unknown);
35
+ }
14
36
  /**
15
37
  * One expected field operation, derived from the caller's request document.
16
38
  * `value`/`delta` are the JSON-round-tripped request values (what the server
@@ -4133,7 +4133,7 @@ class ServerSessionManager {
4133
4133
  const sessionConfig = (_a = this.sessionConfig) !== null && _a !== void 0 ? _a : undefined;
4134
4134
  /* fetch nonce from auth API (bound to the snapshotted app+issuer) */
4135
4135
  const nonce = await genAuthNonce(sessionConfig);
4136
- const { genSolanaMessage } = await Promise.resolve().then(function () { return require('./solana-message-CfwyiOZc.js'); });
4136
+ const { genSolanaMessage } = await Promise.resolve().then(function () { return require('./solana-message-BwjSWa1j.js'); });
4137
4137
  const message = await genSolanaMessage(address, nonce, sessionConfig === null || sessionConfig === void 0 ? void 0 : sessionConfig.appId);
4138
4138
  /* sign the message */
4139
4139
  const sigBytes = nacl.sign.detached(new TextEncoder().encode(message), kp.secretKey);
@@ -6901,7 +6901,7 @@ async function doReconnectWithNewAuth() {
6901
6901
  console.warn('[WS v2] Failed to clear HTTP read cache on auth change:', error);
6902
6902
  }
6903
6903
  try {
6904
- const { reconnectRealtimeStoreWithNewAuth } = await Promise.resolve().then(function () { return require('./realtime-store-BfnJefdw.js'); });
6904
+ const { reconnectRealtimeStoreWithNewAuth } = await Promise.resolve().then(function () { return require('./realtime-store-Dv_JzBx6.js'); });
6905
6905
  await reconnectRealtimeStoreWithNewAuth();
6906
6906
  }
6907
6907
  catch (error) {
@@ -8348,7 +8348,7 @@ async function setMany(many, options) {
8348
8348
  'Nothing was signed or submitted.');
8349
8349
  }
8350
8350
  const solanaChain = workerChain;
8351
- const { handlePreBuiltTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-BFH2w7qn.js'); });
8351
+ const { handlePreBuiltTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-DS9-hI7T.js'); });
8352
8352
  // OA-0001: derive the expected intent from OUR OWN request (the one
8353
8353
  // ground truth a tampered builder response cannot change) so the
8354
8354
  // validator can reject any transaction whose operation semantics
@@ -9794,7 +9794,7 @@ function toMillis(seconds) {
9794
9794
 
9795
9795
  /** SIWS message creation is async already, so its onchain module can be lazy. */
9796
9796
  async function genSolanaMessage(address, nonce) {
9797
- const implementation = await Promise.resolve().then(function () { return require('./solana-message-CfwyiOZc.js'); });
9797
+ const implementation = await Promise.resolve().then(function () { return require('./solana-message-BwjSWa1j.js'); });
9798
9798
  return implementation.genSolanaMessage(address, nonce);
9799
9799
  }
9800
9800
 
@@ -10355,4 +10355,4 @@ exports.toMillis = toMillis;
10355
10355
  exports.toSeconds = toSeconds;
10356
10356
  exports.waitForSetResult = waitForSetResult;
10357
10357
  exports.withEffects = withEffects;
10358
- //# sourceMappingURL=index-BxzaztPl.js.map
10358
+ //# sourceMappingURL=index-CXs7rqHt.js.map