@bounded-sh/core 0.0.97 → 0.0.99

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/client/config.d.ts +1 -0
  2. package/dist/{index-D-dJjY-Q.js → index-B8PpRj6x.js} +159 -108
  3. package/dist/index-B8PpRj6x.js.map +1 -0
  4. package/dist/{index-BDW82Uxu.mjs → index-DW5yMQwV.mjs} +159 -108
  5. package/dist/index-DW5yMQwV.mjs.map +1 -0
  6. package/dist/index.js +1 -1
  7. package/dist/index.mjs +1 -1
  8. package/dist/{realtime-store-DTS5OLm2.mjs → realtime-store-CeDT7vJF.mjs} +2 -2
  9. package/dist/{realtime-store-DTS5OLm2.mjs.map → realtime-store-CeDT7vJF.mjs.map} +1 -1
  10. package/dist/{realtime-store-Dytq73zO.js → realtime-store-D7mJ7rTj.js} +2 -2
  11. package/dist/{realtime-store-Dytq73zO.js.map → realtime-store-D7mJ7rTj.js.map} +1 -1
  12. package/dist/{solana-message-j1s9osZD.mjs → solana-message-BGkYFU3C.mjs} +2 -2
  13. package/dist/{solana-message-j1s9osZD.mjs.map → solana-message-BGkYFU3C.mjs.map} +1 -1
  14. package/dist/{solana-message-Cww3s9HW.js → solana-message-w2FxOkFA.js} +2 -2
  15. package/dist/{solana-message-Cww3s9HW.js.map → solana-message-w2FxOkFA.js.map} +1 -1
  16. package/dist/{solana-operations-da26Ject.mjs → solana-operations-CHgW7Pue.mjs} +4 -4
  17. package/dist/{solana-operations-da26Ject.mjs.map → solana-operations-CHgW7Pue.mjs.map} +1 -1
  18. package/dist/{solana-operations-SR1En23U.js → solana-operations-DJQDYdrk.js} +3 -3
  19. package/dist/{solana-operations-SR1En23U.js.map → solana-operations-DJQDYdrk.js.map} +1 -1
  20. package/dist/{solana-v1-operations-DRm8TzzJ.js → solana-v1-operations-BF2rjG23.js} +3 -3
  21. package/dist/{solana-v1-operations-DRm8TzzJ.js.map → solana-v1-operations-BF2rjG23.js.map} +1 -1
  22. package/dist/{solana-v1-operations-BQQfm-ni.mjs → solana-v1-operations-BPn-poee.mjs} +3 -3
  23. package/dist/{solana-v1-operations-BQQfm-ni.mjs.map → solana-v1-operations-BPn-poee.mjs.map} +1 -1
  24. package/dist/utils/web-session-manager.d.ts +7 -2
  25. package/package.json +8 -2
  26. package/dist/index-BDW82Uxu.mjs.map +0 -1
  27. package/dist/index-D-dJjY-Q.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"solana-operations-da26Ject.mjs","sources":["../.rollup-tmp/client/solana-operations.js"],"sourcesContent":["import { Buffer } from 'buffer';\nimport { getTransactionJson } from './solana-transaction-read';\nexport { getTransactionJson, SOLANA_MAX_SUPPORTED_TRANSACTION_VERSION } from './solana-transaction-read';\nimport { getConfig } from './config';\nconst BASE58_ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';\n/**\n * Minimal base58 encoder, used ONLY to derive a Solana transaction signature\n * from already-signed bytes. Core deliberately does not take a `bs58`\n * dependency for eighteen lines of arithmetic.\n */\nexport function encodeBase58(bytes) {\n if (bytes.length === 0)\n return '';\n const digits = [0];\n for (const byte of bytes) {\n let carry = byte;\n for (let i = 0; i < digits.length; i++) {\n carry += digits[i] << 8;\n digits[i] = carry % 58;\n carry = (carry / 58) | 0;\n }\n while (carry > 0) {\n digits.push(carry % 58);\n carry = (carry / 58) | 0;\n }\n }\n let out = '';\n for (let i = 0; i < bytes.length && bytes[i] === 0; i++)\n out += BASE58_ALPHABET[0];\n for (let i = digits.length - 1; i >= 0; i--)\n out += BASE58_ALPHABET[digits[i]];\n return out;\n}\n/**\n * Derive the transaction signature from the SIGNED bytes, before broadcasting.\n *\n * Without this the signature is only learned when `sendRawTransaction` resolves,\n * so an RPC that accepted the bytes but whose response was lost throws with\n * nothing recorded — and a retry builds a DIFFERENT transaction that can land\n * beside the first.\n */\n/** true when the base64 wire is a SIMD-0385 v1 transaction (first byte 0x81). */\nexport function isTransactionV1Base64(serializedTransaction) {\n try {\n const head = Buffer.from(serializedTransaction.slice(0, 4), 'base64');\n return head.length > 0 && head[0] === 0x81;\n }\n catch (_a) {\n return false;\n }\n}\nexport function deriveTransactionSignature(signedTransaction) {\n var _a;\n const signature = (_a = signedTransaction.signatures) === null || _a === void 0 ? void 0 : _a[0];\n if (!signature || signature.length === 0) {\n throw new Error('Signed Solana transaction carries no signature to broadcast');\n }\n if (signature.every(byte => byte === 0)) {\n throw new Error('Signed Solana transaction carries an empty fee-payer signature');\n }\n return encodeBase58(Uint8Array.from(signature));\n}\n/**\n * Whether a send failure PROVES the transaction was never accepted. A preflight\n * rejection, a signature-verification failure, or an oversized/invalid\n * transaction is definitive and keeps throwing. A transport failure (timeout,\n * socket reset, aborted fetch) is ambiguous — the node may hold the bytes — and\n * must resolve as `submitted` carrying the pre-derived signature.\n *\n * \"already processed\" is deliberately NOT definitive: it means the signature\n * landed, which is the opposite of a failure.\n */\nconst DEFINITIVE_SEND_FAILURE_MARKERS = [\n 'simulation failed',\n 'preflight',\n 'blockhash not found',\n 'signature verification failure',\n 'transaction too large',\n 'invalid transaction',\n 'insufficient funds for rent',\n 'attempt to debit an account but found no record of a prior credit',\n];\nexport function isDefinitiveSolanaSendFailure(error) {\n var _a, _b, _c;\n const err = error;\n if (err && Array.isArray(err.logs))\n return true;\n if (err && String((_a = err.name) !== null && _a !== void 0 ? _a : '') === 'SendTransactionError')\n return true;\n const message = String((_c = (_b = err === null || err === void 0 ? void 0 : err.message) !== null && _b !== void 0 ? _b : err) !== null && _c !== void 0 ? _c : '').toLowerCase();\n if (!message)\n return false;\n if (message.includes('already been processed') || message.includes('already processed'))\n return false;\n return DEFINITIVE_SEND_FAILURE_MARKERS.some(marker => message.includes(marker));\n}\n// The Bounded program's own rule/invariant rejection, recognized from its\n// on-chain logs. On a rule-false the program logs \"<Create|Update|Delete> rule\n// failed for path ...\" then returns Unauthorized<Create|Update|Delete>; a cap /\n// declared-invariant breach returns OnchainInvariantViolation. Anchor prints the\n// error name + message into the logs even though the client IDL omits these\n// codes, so the log text is the reliable signal.\nconst BOUNDED_RULE_REJECTION_MARKERS = [\n /(?:Create|Update|Delete) rule failed for path/i,\n /Unauthorized(?:Create|Update|Delete)\\b/,\n /OnchainInvariantViolation/,\n /invariant postcondition failed/i,\n];\nfunction boundedRejectionHaystack(error, extraLogs) {\n const err = error;\n const parts = [];\n for (const source of [err === null || err === void 0 ? void 0 : err.logs, err === null || err === void 0 ? void 0 : err.transactionLogs, extraLogs]) {\n if (Array.isArray(source))\n parts.push(...source.map((line) => String(line)));\n else if (typeof source === 'string')\n parts.push(source);\n }\n if (err === null || err === void 0 ? void 0 : err.message)\n parts.push(String(err.message));\n return parts.join('\\n');\n}\n/**\n * Whether a definitive Solana send/confirm failure is the BOUNDED PROGRAM\n * rejecting the write in simulation - a policy rule or a cap/invariant check -\n * as opposed to an infra failure (blockhash, fees, account not found). Only the\n * former is a stale-mirror race and safe to advertise as retryable.\n */\nexport function isBoundedOnchainRuleRejection(error, extraLogs) {\n const hay = boundedRejectionHaystack(error, extraLogs);\n return !!hay && BOUNDED_RULE_REJECTION_MARKERS.some((re) => re.test(hay));\n}\n/**\n * A Bounded on-chain rule/invariant rejection surfaced with a message the caller\n * can act on. This write already PASSED the off-chain preflight (otherwise it\n * would have been declined before a transaction was ever built), so the program\n * disagreeing here means the authoritative on-chain state is ahead of a\n * not-yet-converged read mirror - re-read and retry. If it keeps failing, the\n * rule is genuinely unsatisfied (the cap is truly exceeded, or the write is not\n * authorized). Carries the original error as `cause` and the raw program logs.\n */\nexport class BoundedOnchainRuleRejection extends Error {\n constructor(cause, extraLogs) {\n super('The Bounded program rejected this write on-chain (a policy rule or cap/invariant check). ' +\n 'The off-chain preflight had already passed, so the authoritative on-chain state is ahead of a ' +\n 'not-yet-converged read mirror: re-read and retry. If it persists, the rule is genuinely failing ' +\n '(the cap is truly exceeded, or the write is not authorized).');\n this.boundedRuleRejection = true;\n this.retryable = true;\n this.name = 'BoundedOnchainRuleRejection';\n this.cause = cause;\n const err = cause;\n const logs = [];\n for (const source of [err === null || err === void 0 ? void 0 : err.logs, err === null || err === void 0 ? void 0 : err.transactionLogs, extraLogs]) {\n if (Array.isArray(source))\n logs.push(...source.map((line) => String(line)));\n }\n this.logs = logs;\n }\n}\nexport function errorText(error) {\n const message = error === null || error === void 0 ? void 0 : error.message;\n return typeof message === 'string' && message.length > 0 ? message : String(error);\n}\nconst BOUNDED_PROGRAM_MAINNET = ['open', 'Tv7fbpYSseNHYmCZFZ1CZgj4r8D9fKNgEz1qo6F'].join('');\nconst BOUNDED_PROGRAM_DEVNET = ['open', 'Tv7fbpYSseNHYmCZFZ1CZgj4r8D9fKNgEz1qo6F'].join('');\nconst COMPUTE_BUDGET_PROGRAM = 'ComputeBudget111111111111111111111111111111';\nconst SYSTEM_PROGRAM_ID = '11111111111111111111111111111111';\n// SPL Associated Token program and the two SPL Token programs it may create an\n// account under. The server builder compiles idempotent ATA-create setup\n// instructions ahead of the Bounded write for every ATA-creating plugin.\nconst ASSOCIATED_TOKEN_PROGRAM_ID = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';\nconst TOKEN_PROGRAM_ID = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';\nconst TOKEN_2022_PROGRAM_ID = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';\nconst SPL_TOKEN_PROGRAM_IDS = new Set([TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID]);\n// Idempotent ATA create carries a single instruction byte 0x01 (CreateIdempotent)\n// and exactly six accounts: funding, ATA, owner, mint, system program, token\n// program.\nconst ATA_CREATE_IDEMPOTENT_DISCRIMINATOR = 1;\nconst ATA_CREATE_ACCOUNT_COUNT = 6;\n// System Program `transfer` is instruction index 2 (u32 LE) followed by a u64\n// lamports amount: a 12-byte data payload over exactly two accounts.\nconst SYSTEM_TRANSFER_INSTRUCTION_INDEX = 2;\nconst SYSTEM_TRANSFER_DATA_LENGTH = 12;\nconst SYSTEM_TRANSFER_ACCOUNT_COUNT = 2;\n// Gas-sponsorship top-up cap. Mirrors the server builder's ATA-inclusive\n// absolute maximum (0.05 SOL); the fee payer (the gas sponsor) can only move its\n// OWN lamports up to this bound, and only to a co-signing account.\nconst SPONSOR_TOPUP_MAX_LAMPORTS = BigInt(50000000);\n// The four setup/write programs a server-built transaction may reference. System\n// and Associated-Token are typed-validated per instruction below; a bare\n// presence in this set is NOT sufficient authorization.\nconst ALLOWED_SERVER_TX_PROGRAMS = new Set([\n BOUNDED_PROGRAM_MAINNET,\n BOUNDED_PROGRAM_DEVNET,\n COMPUTE_BUDGET_PROGRAM,\n SYSTEM_PROGRAM_ID,\n ASSOCIATED_TOKEN_PROGRAM_ID,\n]);\n// Canonical set_documents discriminator (single wire format: ra_indices Vec<u8>).\nconst SET_DOCUMENTS_DISCRIMINATOR = '79,46,72,73,24,79,66,245';\nconst ALLOWED_BOUNDED_SET_DISCRIMINATORS = new Set([\n SET_DOCUMENTS_DISCRIMINATOR,\n]);\nclass BorshCursor {\n constructor(data, offset, label) {\n this.data = data;\n this.offset = offset;\n this.label = label;\n }\n requireBytes(length, field) {\n if (this.offset + length > this.data.length) {\n throw new Error(`${this.label} has malformed Bounded instruction data while reading ${field}`);\n }\n }\n readU8(field) { this.requireBytes(1, field); return this.data[this.offset++]; }\n readU32(field) {\n this.requireBytes(4, field);\n const value = this.data[this.offset] | (this.data[this.offset + 1] << 8) |\n (this.data[this.offset + 2] << 16) | (this.data[this.offset + 3] << 24);\n this.offset += 4;\n return value >>> 0;\n }\n skip(length, field) { this.requireBytes(length, field); this.offset += length; }\n readBytes(length, field) {\n this.requireBytes(length, field);\n const raw = this.data.slice(this.offset, this.offset + length);\n this.offset += length;\n return raw;\n }\n readString(field) {\n const length = this.readU32(`${field} length`);\n return Buffer.from(this.readBytes(length, field)).toString('utf8');\n }\n readLengthPrefixedBytes(field) {\n return this.readBytes(this.readU32(`${field} length`), field);\n }\n isAtEnd() { return this.offset === this.data.length; }\n}\nfunction readBoundedFieldValue(cursor) {\n const option = cursor.readU8('operation value option');\n if (option === 0)\n return null;\n if (option !== 1)\n throw new Error('Server transaction has malformed Bounded field value option');\n const variant = cursor.readU8('operation value variant');\n if (variant === 0)\n return { variant: 'u64', value: readU64LE(cursor.readBytes(8, 'operation numeric value'), 0) };\n if (variant === 1)\n return { variant: 'i64', value: readI64LE(cursor.readBytes(8, 'operation numeric value'), 0) };\n if (variant === 2)\n return { variant: 'bool', value: cursor.readU8('operation bool value') !== 0 };\n if (variant === 3)\n return { variant: 'string', value: cursor.readString('operation string value') };\n if (variant === 4)\n return { variant: 'address', value: cursor.readBytes(32, 'operation address value') };\n throw new Error(`Server transaction has unsupported Bounded field value variant: ${variant}`);\n}\nfunction normalizeOnchainPath(path) {\n let normalized = path.startsWith('/') ? path.slice(1) : path;\n if (normalized.endsWith('*') && normalized.length > 1)\n normalized = normalized.slice(0, -1);\n if (normalized.endsWith('/'))\n normalized = normalized.slice(0, -1);\n return normalized;\n}\nfunction parseBoundedSetDocumentsInstruction(data, label) {\n if (data.length < 8)\n throw new Error(`${label} has malformed Bounded instruction data`);\n const discriminator = Array.from(data.slice(0, 8)).join(',');\n if (!ALLOWED_BOUNDED_SET_DISCRIMINATORS.has(discriminator)) {\n throw new Error(`${label} contains unsupported Bounded instruction`);\n }\n const cursor = new BorshCursor(data, 8, label);\n const appId = cursor.readString('appId');\n const documents = [];\n const documentCount = cursor.readU32('documents length');\n for (let i = 0; i < documentCount; i++) {\n const path = normalizeOnchainPath(cursor.readString('document path'));\n const operations = [];\n const operationCount = cursor.readU32('operations length');\n for (let j = 0; j < operationCount; j++) {\n const key = cursor.readString('operation key');\n const value = readBoundedFieldValue(cursor);\n const kind = cursor.readU8('operation kind');\n operations.push({ key, value, kind });\n }\n documents.push({ path, operations });\n }\n const deletePaths = [];\n const deleteCount = cursor.readU32('delete paths length');\n for (let i = 0; i < deleteCount; i++)\n deletePaths.push(normalizeOnchainPath(cursor.readString('delete path')));\n const txData = [];\n const txDataCount = cursor.readU32('txData length');\n for (let i = 0; i < txDataCount; i++) {\n txData.push({\n pluginFunctionKey: cursor.readString('txData plugin function key'),\n payload: cursor.readLengthPrefixedBytes('txData bytes'),\n raIndices: cursor.readLengthPrefixedBytes('txData raIndices'),\n });\n }\n const simulateByte = cursor.readU8('simulate');\n if (simulateByte !== 0 && simulateByte !== 1)\n throw new Error(`${label} has malformed Bounded simulate flag`);\n if (!cursor.isAtEnd())\n throw new Error(`${label} has trailing Bounded instruction data`);\n return { appId, documents, deletePaths, txData, simulate: simulateByte === 1 };\n}\n// ---------------------------------------------------------------------------\n// OA-0001: signing-intent binding\n//\n// The wallet must sign ONLY the state transition the caller actually requested.\n// The expected intent below is derived from the CLIENT'S OWN write request - the\n// one ground truth a tampered builder response cannot change - and the parsed\n// instruction must match it field for field before any signer is invoked.\n// ---------------------------------------------------------------------------\n/** The program's field-operation kinds (programs/bounded; mirrored by the worker's solana-tx-builder). */\nconst FIELD_OPERATION_WRITE = 0;\nconst FIELD_OPERATION_DELETE = 1;\nconst FIELD_OPERATION_TIMESTAMP = 2;\nconst FIELD_OPERATION_INCREMENT = 3;\n// Keys the worker drops from a client write by NAME before encoding\n// (realtime-worker types.ts: SYSTEM_FIELDS without the `_`-prefixed entries the\n// client already strips, plus the prototype-pollution DANGEROUS_KEYS). The\n// expected model must skip exactly the keys the honest builder skips, or a\n// legitimate write would be rejected.\nconst SERVER_DROPPED_FIELD_KEYS = new Set([\n 'pathId',\n 'relativePath',\n 'absolutePath',\n '__proto__',\n 'constructor',\n 'prototype',\n]);\n// The worker resolves {operation:'time',value:'now'} into this sentinel and the\n// onchain encoder maps the sentinel to a TIMESTAMP op - including when a caller\n// writes the literal string, so the expected model must mirror that quirk.\nconst TIME_NOW_SENTINEL = '__TIME_NOW__';\n/**\n * Build the expected write intent from the exact request the client POSTed\n * (`[{ destinationPath, document }]`, a `null` document being a delete).\n *\n * Each document is JSON-round-tripped first: the server parsed the SERIALIZED\n * body, so the intent must be derived from the same bytes - this drops\n * `undefined` values, turns `NaN`/`Infinity` into `null`, and normalizes key\n * order exactly as the server's JSON.parse did.\n *\n * Operation order mirrors the worker's transform (normalizeWriteBody ->\n * resolveOperationFields -> documentToOperations): plain fields in request key\n * order, then increment fields appended in the order they appeared. The\n * comparison is therefore ORDERED, not a multiset - the honest builder is\n * deterministic given the request, and ordering additionally catches\n * duplicate-path and reordering tampering that the retired set comparison hid.\n */\nexport function buildExpectedWriteIntent(documents) {\n const intentDocuments = [];\n const deletePaths = [];\n for (const entry of documents) {\n if (entry.document == null) {\n deletePaths.push(entry.destinationPath);\n continue;\n }\n if (typeof entry.document !== 'object') {\n // The worker 400s a scalar document, so no honest 202 can exist for this\n // request. Throw here rather than let a dishonest 202 be compared against\n // an intent this entry never had.\n throw new Error(`Cannot derive the expected write intent for ${entry.destinationPath}: the request document is not an object`);\n }\n const wireDocument = JSON.parse(JSON.stringify(entry.document));\n const operations = [];\n const increments = [];\n for (const [key, value] of Object.entries(wireDocument)) {\n if (key.startsWith('_') || SERVER_DROPPED_FIELD_KEYS.has(key))\n continue;\n if (value === null) {\n operations.push({ key, kind: 'delete' });\n continue;\n }\n if (typeof value === 'object' && !Array.isArray(value) &&\n typeof value.operation === 'string' && value.operation.length > 0) {\n const operation = value.operation;\n if (operation === 'increment' && typeof value.value === 'number') {\n increments.push({ key, delta: value.value });\n continue;\n }\n if (operation === 'time' && value.value === 'now') {\n operations.push({ key, kind: 'timestamp' });\n continue;\n }\n // Any other {operation,...} shape is rejected by the worker with a 400,\n // so it has no honest onchain encoding. Falling through to a plain write\n // of the raw object keeps the comparison fail-closed: a 202 can only\n // arrive from a dishonest builder, and no instruction can match this.\n }\n if (value === TIME_NOW_SENTINEL) {\n operations.push({ key, kind: 'timestamp' });\n continue;\n }\n operations.push({ key, kind: 'write', value });\n }\n for (const { key, delta } of increments) {\n operations.push({ key, kind: 'increment', delta });\n }\n intentDocuments.push({ path: entry.destinationPath, operations });\n }\n return { documents: intentDocuments, deletePaths };\n}\n/**\n * Minimal base58 decoder, used ONLY to recognize a declared-Address field: a\n * request string that decodes to exactly the 32 bytes the instruction carries\n * is a faithful AddressVal encoding of that string. Returns null on any\n * non-base58 character.\n */\nexport function decodeBase58(text) {\n if (text.length === 0)\n return null;\n let value = BigInt(0);\n for (const ch of text) {\n const digit = BASE58_ALPHABET.indexOf(ch);\n if (digit < 0)\n return null;\n value = value * BigInt(58) + BigInt(digit);\n }\n // Leading '1' characters are leading zero bytes, not part of the number.\n let leadingZeros = 0;\n while (leadingZeros < text.length && text[leadingZeros] === BASE58_ALPHABET[0])\n leadingZeros++;\n const body = [];\n if (value > BigInt(0)) {\n let hex = value.toString(16);\n if (hex.length % 2 === 1)\n hex = `0${hex}`;\n for (let i = 0; i < hex.length; i += 2)\n body.push(parseInt(hex.slice(i, i + 2), 16));\n }\n const out = new Uint8Array(leadingZeros + body.length);\n out.set(body, leadingZeros);\n return out;\n}\n/**\n * Whether `parsed` is an encoding the HONEST builder could have produced for\n * the request field value. The onchain FieldValue variant is chosen by the\n * collection's DECLARED schema (worker-side `jsValueToFieldValue`), which the\n * client does not hold, so every variant any declared type could yield for this\n * JSON value is accepted - and nothing else:\n * - boolean: BoolVal only.\n * - integer number/bigint: U64Val (inference/UInt; UInt takes abs for\n * negatives) or I64Val (Int), of the exact integer.\n * - fractional number: StringVal of its decimal text (inference/Float), or a\n * truncated U64/I64 (declared UInt/Int truncates toward zero).\n * - string: StringVal verbatim, AddressVal when it is the base58 of the exact\n * 32 bytes (declared Address), or U64/I64 of its integer text (declared\n * UInt/Int accept numeric strings, truncating any fraction).\n * - array/object: StringVal of its JSON serialization (identical on both sides\n * of the wire for the round-tripped value).\n */\nfunction isFaithfulFieldValueEncoding(requestValue, parsed) {\n if (parsed === null)\n return false;\n if (typeof requestValue === 'boolean') {\n return parsed.variant === 'bool' && parsed.value === requestValue;\n }\n if (typeof requestValue === 'number') {\n if (!Number.isFinite(requestValue))\n return false;\n if (Number.isInteger(requestValue)) {\n const exact = BigInt(requestValue);\n if (parsed.variant === 'i64' && parsed.value === exact)\n return true;\n // The declared-UInt encoder stores abs(value), so a negative request\n // integer can honestly arrive as its positive magnitude.\n return parsed.variant === 'u64' && parsed.value === (exact < BigInt(0) ? -exact : exact);\n }\n if (parsed.variant === 'string' && parsed.value === String(requestValue))\n return true;\n const truncated = BigInt(Math.trunc(requestValue));\n if (parsed.variant === 'i64' && parsed.value === truncated)\n return true;\n return parsed.variant === 'u64' && parsed.value === (truncated < BigInt(0) ? -truncated : truncated);\n }\n if (typeof requestValue === 'string') {\n if (parsed.variant === 'string' && parsed.value === requestValue)\n return true;\n if (parsed.variant === 'address') {\n const decoded = decodeBase58(requestValue);\n const expectedBytes = parsed.value;\n if (decoded !== null && decoded.length === 32 && decoded.every((byte, i) => byte === expectedBytes[i]))\n return true;\n }\n if (parsed.variant === 'u64' || parsed.variant === 'i64') {\n const trimmed = requestValue.trim();\n const intPart = trimmed.includes('.') ? trimmed.split('.')[0] : trimmed;\n if (/^-?\\d+$/.test(intPart)) {\n const numeric = BigInt(intPart);\n if (parsed.variant === 'i64' && parsed.value === numeric)\n return true;\n if (parsed.variant === 'u64' && parsed.value === (numeric < BigInt(0) ? -numeric : numeric))\n return true;\n }\n }\n return false;\n }\n if (requestValue !== null && typeof requestValue === 'object') {\n return parsed.variant === 'string' && parsed.value === JSON.stringify(requestValue);\n }\n return false;\n}\nconst EXPECTED_KIND_TO_WIRE = {\n write: FIELD_OPERATION_WRITE,\n delete: FIELD_OPERATION_DELETE,\n timestamp: FIELD_OPERATION_TIMESTAMP,\n increment: FIELD_OPERATION_INCREMENT,\n};\nfunction describeParsedValue(value) {\n if (value === null)\n return 'no value';\n if (value.variant === 'address')\n return `address 0x${Buffer.from(value.value).toString('hex')}`;\n if (value.variant === 'u64' || value.variant === 'i64')\n return `${value.variant} ${value.value.toString()}`;\n return `${value.variant} ${JSON.stringify(value.value)}`;\n}\n/**\n * OA-0001: the one Bounded set-documents instruction in a server-built\n * transaction must encode EXACTLY the requested write - app id, ordered\n * documents, per-field operation key/kind/value, ordered deletes, and a clear\n * simulate flag - or the transaction is rejected BEFORE the wallet sees it.\n *\n * The comparison is ordered because the honest builder (realtime-worker's\n * solana-tx-builder) preserves the request's document/delete/operation order\n * deterministically; nothing legitimate reorders, and an ordered check catches\n * duplicate-path and reorder tampering the retired path-SET comparison hid.\n *\n * Deliberately NOT bound here: the plugin `txData` entries and the remaining\n * accounts their ra_indices reference. Those are derived by server-side policy\n * hooks (a Jupiter quote, an ATA layout), not by the caller's request, so the\n * client holds no request-derived expectation to compare against; that surface\n * stays bound by the onchain policy, the typed setup-instruction guards, and\n * the attestation co-signer the program demands for any non-empty txData.\n */\nfunction assertMatchesExpectedIntent(label, expectedAppId, expected, parsed) {\n var _a;\n if (parsed.appId !== expectedAppId)\n throw new Error(`${label} Bounded instruction appId does not match configured appId`);\n if (parsed.simulate) {\n throw new Error(`${label} Bounded instruction has the simulate flag set; a client-signed write must be a real execution`);\n }\n if (parsed.deletePaths.length !== expected.deletePaths.length ||\n parsed.deletePaths.some((path, i) => path !== normalizeOnchainPath(expected.deletePaths[i]))) {\n throw new Error(`${label} Bounded instruction delete paths do not match the requested deletes`);\n }\n if (parsed.documents.length !== expected.documents.length) {\n throw new Error(`${label} Bounded instruction document count does not match the requested write ` +\n `(expected ${expected.documents.length}, got ${parsed.documents.length})`);\n }\n for (let i = 0; i < expected.documents.length; i++) {\n const expectedDoc = expected.documents[i];\n const actualDoc = parsed.documents[i];\n const expectedPath = normalizeOnchainPath(expectedDoc.path);\n if (actualDoc.path !== expectedPath) {\n throw new Error(`${label} Bounded instruction document path \"${actualDoc.path}\" does not match requested path \"${expectedPath}\"`);\n }\n if (actualDoc.operations.length !== expectedDoc.operations.length) {\n throw new Error(`${label} Bounded instruction operations for path \"${expectedPath}\" do not match the requested write ` +\n `(expected ${expectedDoc.operations.length} operations, got ${actualDoc.operations.length})`);\n }\n for (let j = 0; j < expectedDoc.operations.length; j++) {\n const expectedOp = expectedDoc.operations[j];\n const actualOp = actualDoc.operations[j];\n if (actualOp.key !== expectedOp.key || actualOp.kind !== EXPECTED_KIND_TO_WIRE[expectedOp.kind]) {\n throw new Error(`${label} Bounded instruction operation ${j} on path \"${expectedPath}\" does not match the requested write ` +\n `(expected key \"${expectedOp.key}\" kind ${expectedOp.kind}, got key \"${actualOp.key}\" kind ${actualOp.kind})`);\n }\n if (expectedOp.kind === 'delete' || expectedOp.kind === 'timestamp') {\n if (actualOp.value !== null) {\n throw new Error(`${label} Bounded instruction operation \"${expectedOp.key}\" on path \"${expectedPath}\" carries an unexpected value`);\n }\n continue;\n }\n if (expectedOp.kind === 'increment') {\n const expectedDelta = BigInt(Math.trunc(expectedOp.delta));\n if (((_a = actualOp.value) === null || _a === void 0 ? void 0 : _a.variant) !== 'i64' || actualOp.value.value !== expectedDelta) {\n throw new Error(`${label} Bounded instruction increment \"${expectedOp.key}\" on path \"${expectedPath}\" does not match the requested delta`);\n }\n continue;\n }\n if (!isFaithfulFieldValueEncoding(expectedOp.value, actualOp.value)) {\n throw new Error(`${label} Bounded instruction operation \"${expectedOp.key}\" on path \"${expectedPath}\" encodes a value that does not match the requested field ` +\n `(got ${describeParsedValue(actualOp.value)})`);\n }\n }\n }\n}\n/** Read a little-endian u64 as a BigInt (lamport amounts can exceed 2^53). */\nfunction readU64LE(bytes, offset) {\n let value = BigInt(0);\n for (let i = 0; i < 8; i++)\n value |= BigInt(bytes[offset + i]) << BigInt(8 * i);\n return value;\n}\n/** Read a little-endian i64 as a BigInt (two's complement). */\nfunction readI64LE(bytes, offset) {\n const unsigned = readU64LE(bytes, offset);\n return unsigned >= (BigInt(1) << BigInt(63)) ? unsigned - (BigInt(1) << BigInt(64)) : unsigned;\n}\n/**\n * Resolve an instruction's referenced account keys against the transaction's\n * STATIC key list. A setup instruction that reaches into an address-lookup\n * table for any account it needs cannot be validated offline, so it fails\n * closed: every index must resolve to a static key.\n */\nfunction resolveInstructionAccounts(ix, accountKeys, label) {\n return ix.accountKeyIndexes.map(index => {\n if (index >= accountKeys.length) {\n throw new Error(`${label} setup instruction references an address-lookup-table account (not allowed)`);\n }\n return accountKeys[index];\n });\n}\n/**\n * A server-built idempotent ATA create is authorized ONLY when it is exactly the\n * canonical shape: instruction byte 0x01, six accounts, funded by the\n * transaction fee payer, over the System and an SPL Token program, and where the\n * account being created recomputes to the associated-token-account PDA of its\n * stated owner and mint. Nothing else - no arbitrary account create - passes.\n */\nfunction validateIdempotentAtaCreate(ix, data, accountKeys, feePayer, PublicKeyCtor, label) {\n if (data.length !== 1 || data[0] !== ATA_CREATE_IDEMPOTENT_DISCRIMINATOR) {\n throw new Error(`${label} contains a non-idempotent or malformed associated-token-account instruction`);\n }\n if (ix.accountKeyIndexes.length !== ATA_CREATE_ACCOUNT_COUNT) {\n throw new Error(`${label} associated-token-account create has an unexpected account layout`);\n }\n const [funding, ata, owner, mint, systemProgram, tokenProgram] = resolveInstructionAccounts(ix, accountKeys, label);\n if (!funding.equals(feePayer)) {\n throw new Error(`${label} associated-token-account create is not funded by the transaction fee payer`);\n }\n if (systemProgram.toBase58() !== SYSTEM_PROGRAM_ID) {\n throw new Error(`${label} associated-token-account create references an unexpected system program`);\n }\n if (!SPL_TOKEN_PROGRAM_IDS.has(tokenProgram.toBase58())) {\n throw new Error(`${label} associated-token-account create references an unexpected token program`);\n }\n const [expectedAta] = PublicKeyCtor.findProgramAddressSync([owner.toBuffer(), tokenProgram.toBuffer(), mint.toBuffer()], new PublicKeyCtor(ASSOCIATED_TOKEN_PROGRAM_ID));\n if (!ata.equals(expectedAta)) {\n throw new Error(`${label} associated-token-account create does not derive the canonical account for its owner and mint`);\n }\n}\n/**\n * A server-built System Program instruction is authorized ONLY as the gas\n * sponsor's top-up: a `transfer` FROM the transaction fee payer (the sponsor),\n * capped at the sponsorship maximum, TO a co-signing account (the sponsored\n * user). The fee payer can therefore only move its OWN lamports, bounded, and\n * only to an account that itself signed the transaction - never a drain to an\n * arbitrary address. Every other System instruction (createAccount, an\n * uncapped or misdirected transfer, ...) is rejected.\n */\nfunction validateSponsorTransfer(ix, data, accountKeys, feePayer, isAccountSigner, label) {\n const isTransfer = data.length === SYSTEM_TRANSFER_DATA_LENGTH &&\n (data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24)) === SYSTEM_TRANSFER_INSTRUCTION_INDEX;\n if (!isTransfer) {\n throw new Error(`${label} contains an unauthorized System Program instruction`);\n }\n if (ix.accountKeyIndexes.length !== SYSTEM_TRANSFER_ACCOUNT_COUNT) {\n throw new Error(`${label} contains an unauthorized System Program instruction`);\n }\n const [from, to] = resolveInstructionAccounts(ix, accountKeys, label);\n if (!from.equals(feePayer)) {\n throw new Error(`${label} System Program transfer must originate from the transaction fee payer (gas sponsor)`);\n }\n const lamports = readU64LE(data, 4);\n if (lamports > SPONSOR_TOPUP_MAX_LAMPORTS) {\n throw new Error(`${label} System Program transfer exceeds the gas-sponsorship cap`);\n }\n const recipientIndex = ix.accountKeyIndexes[1];\n if (!isAccountSigner(recipientIndex) || to.equals(feePayer)) {\n throw new Error(`${label} System Program transfer recipient must be a co-signing sponsored account`);\n }\n}\n/**\n * The format-blind half of pre-sign validation: every instruction must be a\n * program the server builder is allowed to emit, the two setup shapes must\n * recompute to this write's values, and exactly one Bounded set-documents\n * instruction must bind the caller's own intent (OA-0001). The v0 path feeds it\n * web3.js's compiled message; the SIMD-0385 v1 lane feeds it kit's decoded\n * instruction headers and payloads.\n */\nexport function validateServerTransactionSemantics(input) {\n const { label, expectedAppId, expectedIntent, accountKeys, isAccountSigner, instructions, PublicKeyCtor } = input;\n if (accountKeys.length === 0)\n throw new Error(`${label} has no static account keys`);\n const feePayer = accountKeys[0];\n let boundedInstructionCount = 0;\n let parsedBoundedInstruction = null;\n for (const ix of instructions) {\n if (!ALLOWED_SERVER_TX_PROGRAMS.has(ix.programId))\n throw new Error(`${label} contains unauthorized program: ${ix.programId}`);\n // Typed setup checks replace the old blanket System-Program ban: each of the\n // two setup shapes the server builder emits (idempotent ATA create, gas\n // sponsor top-up) is bound to recompute to the values this write needs, and\n // anything else fails closed.\n if (ix.programId === SYSTEM_PROGRAM_ID) {\n validateSponsorTransfer(ix, ix.data, accountKeys, feePayer, isAccountSigner, label);\n }\n else if (ix.programId === ASSOCIATED_TOKEN_PROGRAM_ID) {\n validateIdempotentAtaCreate(ix, ix.data, accountKeys, feePayer, PublicKeyCtor, label);\n }\n else if (ix.programId === BOUNDED_PROGRAM_MAINNET || ix.programId === BOUNDED_PROGRAM_DEVNET) {\n boundedInstructionCount++;\n parsedBoundedInstruction = parseBoundedSetDocumentsInstruction(ix.data, label);\n }\n }\n if (boundedInstructionCount !== 1)\n throw new Error(`${label} must contain exactly one Bounded set-documents instruction`);\n // OA-0001: bind the FULL operation semantics of the one Bounded instruction to\n // the caller's own request before any signer runs - not just the app/path\n // envelope, which a tampered builder response can keep while changing amounts.\n assertMatchesExpectedIntent(label, expectedAppId, expectedIntent, parsedBoundedInstruction);\n}\nfunction deserializeAndValidateServerTransaction(serializedTransaction, web3, options) {\n const { VersionedTransaction: VersionedTransactionClass, PublicKey: PublicKeyCtor } = web3;\n const transaction = VersionedTransactionClass.deserialize(Buffer.from(serializedTransaction, 'base64'));\n const { label, expectedAppId, expectedIntent } = options;\n const accountKeys = transaction.message.staticAccountKeys;\n const instructions = transaction.message.compiledInstructions.map((ix) => {\n var _a;\n if (ix.programIdIndex >= accountKeys.length)\n throw new Error(`${label} has program ID in lookup table (not allowed)`);\n return {\n programId: accountKeys[ix.programIdIndex].toBase58(),\n accountKeyIndexes: [...ix.accountKeyIndexes],\n data: ix.data instanceof Uint8Array ? ix.data : Buffer.from((_a = ix.data) !== null && _a !== void 0 ? _a : []),\n };\n });\n validateServerTransactionSemantics({\n label,\n expectedAppId,\n expectedIntent,\n accountKeys,\n isAccountSigner: (index) => transaction.message.isAccountSigner(index),\n instructions,\n PublicKeyCtor,\n });\n return transaction;\n}\n/**\n * DS3-0414: does this server-built transaction already carry a REAL signature?\n *\n * The worker partially signs before it answers: the sponsor keypair fills the\n * fee-payer slot for a sponsored write, and the attestation keypair co-signs any\n * plugin write (realtime-worker solana-tx-builder.ts). A Solana signature covers\n * the compiled message, recentBlockhash INCLUDED, so refreshing the blockhash\n * after either has signed silently voids their signature and the transaction can\n * never land. Versioned signature slots stay all-zero until a signer fills them,\n * and the pre-built lane is always versioned.\n *\n * EVERY slot, not just the fee payer's. The two co-signatures are independent:\n * the sponsor only signs when sponsorship is on, and sponsorship defaults to\n * \"none\", so the ordinary attested plugin write leaves slot 0 empty for the\n * wallet and carries the worker's signature further down. A fee-payer-only check\n * would wave exactly that shape through into a refresh that voids the\n * attestation signature and makes the write unlandable.\n *\n * Read from the BYTES rather than from the 202's `sponsorSigned` flag, for the\n * same reason: an attested plugin write is co-signed with `sponsorSigned: false`,\n * so the flag is not the question this asks.\n */\nfunction serverTransactionIsPartiallySigned(transaction) {\n return transaction.signatures.some(signature => signature.some(byte => byte !== 0));\n}\n/**\n * LF-003: hand the wallet a blockhash that is still alive, and report the\n * lifetime the transaction was ACTUALLY signed against.\n *\n * A Solana blockhash dies 150 blocks (~60s) after it is minted, and the worker\n * mints this one at the START of its build. The remaining builder RPC round\n * trips, the response hop, and - dominating everything - the unbounded human\n * pause in front of the wallet's approval dialog all come out of that one\n * window. So the pre-built lane routinely asks a wallet to sign a transaction\n * that is already expired or expires before it can be broadcast: the send fails\n * `blockhash not found` (a DEFINITIVE failure), and a wallet that substitutes\n * the dead blockhash instead of signing it is refused by the SDK's own\n * message-equality check. Refreshing here, immediately before the signature,\n * gives the whole window to the approval.\n *\n * Returns the fence the caller must confirm and reconcile against - refreshing\n * the transaction without moving BOTH fence fields with it would declare expiry\n * against a blockhash the transaction no longer carries.\n */\nasync function refreshTransactionLifetime(transaction, rpc, serverFence) {\n var _a;\n const fence = { blockhash: serverFence.blockhash, lastValidBlockHeight: serverFence.lastValidBlockHeight };\n // DS3-0414: someone else already signed these exact bytes. Their signature is\n // the constraint; the caller keeps the worker's window - but only once that\n // window is shown to describe the message that was signed. A fence naming a\n // blockhash the transaction does not carry expires on its own schedule, and\n // `expired_not_landed` is the ONE status callers treat as safe to retry, so a\n // disagreement here would turn an in-flight write into a duplicate one.\n if (serverTransactionIsPartiallySigned(transaction)) {\n if (transaction.message.recentBlockhash !== fence.blockhash) {\n throw new Error(`The pre-built Solana transaction was co-signed against blockhash ` +\n `${transaction.message.recentBlockhash} but its expiry fence names ${fence.blockhash}, so the ` +\n 'write could not be reconciled honestly. Nothing was signed.');\n }\n return fence;\n }\n // Signing without submitting is allowed to run with no RPC configured at all\n // (the caller broadcasts elsewhere), so there is nothing to refresh from.\n if (!rpc)\n return fence;\n if (typeof rpc.getLatestBlockhash !== 'function') {\n // Fail BEFORE the wallet is opened. Silently signing against the worker's\n // ageing blockhash is the defect this exists to remove, so a Solana RPC that\n // cannot answer is a configuration error, not a fallback.\n throw new Error('Pre-built Solana transaction signing needs a current blockhash, but the configured Solana RPC ' +\n 'cannot report one (no getLatestBlockhash). Nothing was signed.');\n }\n const latest = await rpc.getLatestBlockhash('confirmed');\n // Check the SHAPE before writing it onto the message. A value that is not 32\n // base58 bytes cannot be compiled, and web3.js only discovers that inside the\n // layout encoder - by which point the wallet has already been asked for a\n // gesture. It would also become the fence, and a fence nobody can interpret is\n // worse than a stale one.\n const decoded = decodeBase58(String((_a = latest === null || latest === void 0 ? void 0 : latest.blockhash) !== null && _a !== void 0 ? _a : ''));\n if (decoded === null || decoded.length !== 32) {\n throw new Error(`The configured Solana RPC returned \"${latest === null || latest === void 0 ? void 0 : latest.blockhash}\" as the current blockhash, which is ` +\n 'not a 32-byte base58 value. Nothing was signed.');\n }\n transaction.message.recentBlockhash = latest.blockhash;\n return { blockhash: latest.blockhash, lastValidBlockHeight: latest.lastValidBlockHeight };\n}\nexport async function handlePreBuiltTransaction(tx, authProvider, options, expectedIntent) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n // SIMD-0385 v1 wires start with 0x81 (message first, signatures trailing);\n // web3.js's legacy/v0 classes cannot represent them, so they take their own lane.\n if (isTransactionV1Base64(tx.serializedTransaction)) {\n const { handlePreBuiltV1Transaction } = await import('./solana-v1-operations');\n return handlePreBuiltV1Transaction(tx, authProvider, options, expectedIntent);\n }\n const { Connection, VersionedTransaction, PublicKey } = await import(\"@solana/web3.js\");\n // Honor a wallet client's immutable config snapshot for the expected app-id\n // binding and RPC endpoint (CTA-05); otherwise read the global init() config.\n const config = (_b = (_a = options === null || options === void 0 ? void 0 : options._overrides) === null || _a === void 0 ? void 0 : _a._config) !== null && _b !== void 0 ? _b : await getConfig();\n const transaction = deserializeAndValidateServerTransaction(tx.serializedTransaction, { VersionedTransaction, PublicKey }, {\n label: 'Pre-built transaction', expectedAppId: config.appId, expectedIntent,\n });\n const shouldSubmit = (options === null || options === void 0 ? void 0 : options.shouldSubmitTx) !== false;\n const rpcUrl = (_c = config.rpcUrl) === null || _c === void 0 ? void 0 : _c.trim();\n const injectedRpc = (_d = options === null || options === void 0 ? void 0 : options._overrides) === null || _d === void 0 ? void 0 : _d._solanaRpc;\n if (shouldSubmit && !rpcUrl && !injectedRpc) {\n // Checked BEFORE the wallet signs, so a misconfigured app fails its first\n // launch attempt without spending the user's signature. Deliberately no\n // bundled default endpoint (2026-06-28 hardening): the app must supply the\n // RPC it submits through.\n throw new Error(`Pre-built Solana transaction submission requires init({ rpcUrl }) for ${tx.network}. ` +\n `Pass a TOP-LEVEL rpcUrl (with chain) to init(), e.g. ` +\n `init({ appId, chain: '${tx.network}', rpcUrl: '<your ${tx.network} RPC endpoint>' }); ` +\n `a nested walletLogin.rpcUrl only configures wallet login and does not enable submission.`);\n }\n // One RPC handle for the whole lane: the pre-sign lifetime refresh, the\n // broadcast, and the confirmation must all speak to the same endpoint, or the\n // fence would be minted against a chain view the send never sees. Null only on\n // the sign-without-submitting path, which the guard above lets run RPC-less.\n const connection = injectedRpc !== null && injectedRpc !== void 0 ? injectedRpc : (rpcUrl ? new Connection(rpcUrl, 'confirmed') : null);\n // LF-003: the transaction must be signed against a blockhash that is still\n // alive, and the fence must describe the transaction that was actually signed.\n const fence = await refreshTransactionLifetime(transaction, connection, tx);\n const signedTx = await authProvider.signTransaction(transaction);\n const rawTx = signedTx.serialize();\n const signedTransaction = Buffer.from(rawTx).toString('base64');\n if (!shouldSubmit) {\n // Signed and NOT sent. There is no signature and nothing to mirror.\n return { outcome: 'signed', lane: 'solana', transactionSignature: null, signedTransaction, fence };\n }\n // Derive the signature from the signed bytes BEFORE broadcasting, so a send\n // whose response is lost still yields a reconcilable identifier.\n const signature = deriveTransactionSignature(signedTx);\n // Non-null here: the guard above refuses a submitting write with no RPC.\n const submitRpc = connection;\n try {\n await submitRpc.sendRawTransaction(rawTx, { skipPreflight: false, maxRetries: 3 });\n }\n catch (error) {\n // A definitive rejection never entered the network — keep throwing. If it is\n // the Bounded program rejecting the write (rule / cap / invariant), surface\n // the actionable stale-mirror-race message instead of a raw \"simulation\n // failed\"; otherwise re-throw the infra error unchanged.\n if (isDefinitiveSolanaSendFailure(error)) {\n if (isBoundedOnchainRuleRejection(error))\n throw new BoundedOnchainRuleRejection(error);\n throw error;\n }\n // Ambiguous transport outcome: the node may hold these exact bytes. Report\n // the pre-derived signature so the caller reconciles it instead of building\n // a second transaction that could land beside the first.\n return {\n outcome: 'submitted',\n lane: 'solana',\n transactionSignature: signature,\n signedTransaction,\n fence,\n reason: `Broadcast response was lost or inconclusive: ${errorText(error)}`,\n };\n }\n let confirmation;\n try {\n confirmation = await submitRpc.confirmTransaction({\n signature, blockhash: fence.blockhash, lastValidBlockHeight: fence.lastValidBlockHeight,\n }, 'confirmed');\n }\n catch (error) {\n // The bytes were accepted; only the confirmation outcome is unknown.\n return {\n outcome: 'submitted',\n lane: 'solana',\n transactionSignature: signature,\n signedTransaction,\n fence,\n reason: `Confirmation outcome unknown: ${errorText(error)}`,\n };\n }\n // #310: \"confirmed\" only means the network recorded the transaction, not that it\n // succeeded - a landed-but-failed transaction carries an err. Report it as a failure\n // (with on-chain logs) instead of a fake success, mirroring the server keypair provider.\n if ((_e = confirmation.value) === null || _e === void 0 ? void 0 : _e.err) {\n let logMessages;\n try {\n const txInfo = await getTransactionJson(submitRpc, signature, 'confirmed');\n logMessages = (_f = txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta) === null || _f === void 0 ? void 0 : _f.logMessages;\n }\n catch (_j) {\n // Log retrieval is diagnostic only; the on-chain error is the verdict.\n }\n if (isBoundedOnchainRuleRejection(confirmation.value.err, logMessages)) {\n throw new BoundedOnchainRuleRejection(confirmation.value.err, logMessages);\n }\n const errorMessage = logMessages ? JSON.stringify(logMessages) : JSON.stringify(confirmation.value.err);\n throw new Error(`Transaction failed: ${errorMessage}`);\n }\n return {\n outcome: 'confirmed',\n lane: 'solana',\n transactionSignature: signature,\n signedTransaction,\n fence,\n confirmationContextSlot: (_h = (_g = confirmation.context) === null || _g === void 0 ? void 0 : _g.slot) !== null && _h !== void 0 ? _h : 0,\n };\n}\n"],"names":["Buffer"],"mappings":";;;;;;AAIA,MAAM,eAAe,GAAG,4DAA4D;AACpF;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,KAAK,EAAE;AACpC,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;AAC1B,QAAQ,OAAO,EAAE;AACjB,IAAI,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC;AACtB,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AAC9B,QAAQ,IAAI,KAAK,GAAG,IAAI;AACxB,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAChD,YAAY,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AACnC,YAAY,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;AAClC,YAAY,KAAK,GAAG,C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,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,WAAW;AAChJ,QAAQ;AACR,QAAQ,OAAO,EAAE,EAAE;AACnB;AACA,QAAQ;AACR,QAAQ,IAAI,6BAA6B,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,EAAE;AAChF,YAAY,MAAM,IAAI,2BAA2B,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC;AACtF,QAAQ;AACR,QAAQ,MAAM,YAAY,GAAG,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC;AAC/G,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC,CAAC;AAC9D,IAAI;AACJ,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE,WAAW;AAC5B,QAAQ,IAAI,EAAE,QAAQ;AACtB,QAAQ,oBAAoB,EAAE,SAAS;AACvC,QAAQ,iBAAiB;AACzB,QAAQ,KAAK;AACb,QAAQ,uBAAuB,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,YAAY,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,CAAC;AACnJ,KAAK;AACL;;;;"}
1
+ {"version":3,"file":"solana-operations-CHgW7Pue.mjs","sources":["../.rollup-tmp/client/solana-operations.js"],"sourcesContent":["import { Buffer } from 'buffer';\nimport { getTransactionJson } from './solana-transaction-read';\nexport { getTransactionJson, SOLANA_MAX_SUPPORTED_TRANSACTION_VERSION } from './solana-transaction-read';\nimport { getConfig } from './config';\nconst BASE58_ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';\n/**\n * Minimal base58 encoder, used ONLY to derive a Solana transaction signature\n * from already-signed bytes. Core deliberately does not take a `bs58`\n * dependency for eighteen lines of arithmetic.\n */\nexport function encodeBase58(bytes) {\n if (bytes.length === 0)\n return '';\n const digits = [0];\n for (const byte of bytes) {\n let carry = byte;\n for (let i = 0; i < digits.length; i++) {\n carry += digits[i] << 8;\n digits[i] = carry % 58;\n carry = (carry / 58) | 0;\n }\n while (carry > 0) {\n digits.push(carry % 58);\n carry = (carry / 58) | 0;\n }\n }\n let out = '';\n for (let i = 0; i < bytes.length && bytes[i] === 0; i++)\n out += BASE58_ALPHABET[0];\n for (let i = digits.length - 1; i >= 0; i--)\n out += BASE58_ALPHABET[digits[i]];\n return out;\n}\n/**\n * Derive the transaction signature from the SIGNED bytes, before broadcasting.\n *\n * Without this the signature is only learned when `sendRawTransaction` resolves,\n * so an RPC that accepted the bytes but whose response was lost throws with\n * nothing recorded — and a retry builds a DIFFERENT transaction that can land\n * beside the first.\n */\n/** true when the base64 wire is a SIMD-0385 v1 transaction (first byte 0x81). */\nexport function isTransactionV1Base64(serializedTransaction) {\n try {\n const head = Buffer.from(serializedTransaction.slice(0, 4), 'base64');\n return head.length > 0 && head[0] === 0x81;\n }\n catch (_a) {\n return false;\n }\n}\nexport function deriveTransactionSignature(signedTransaction) {\n var _a;\n const signature = (_a = signedTransaction.signatures) === null || _a === void 0 ? void 0 : _a[0];\n if (!signature || signature.length === 0) {\n throw new Error('Signed Solana transaction carries no signature to broadcast');\n }\n if (signature.every(byte => byte === 0)) {\n throw new Error('Signed Solana transaction carries an empty fee-payer signature');\n }\n return encodeBase58(Uint8Array.from(signature));\n}\n/**\n * Whether a send failure PROVES the transaction was never accepted. A preflight\n * rejection, a signature-verification failure, or an oversized/invalid\n * transaction is definitive and keeps throwing. A transport failure (timeout,\n * socket reset, aborted fetch) is ambiguous — the node may hold the bytes — and\n * must resolve as `submitted` carrying the pre-derived signature.\n *\n * \"already processed\" is deliberately NOT definitive: it means the signature\n * landed, which is the opposite of a failure.\n */\nconst DEFINITIVE_SEND_FAILURE_MARKERS = [\n 'simulation failed',\n 'preflight',\n 'blockhash not found',\n 'signature verification failure',\n 'transaction too large',\n 'invalid transaction',\n 'insufficient funds for rent',\n 'attempt to debit an account but found no record of a prior credit',\n];\nexport function isDefinitiveSolanaSendFailure(error) {\n var _a, _b, _c;\n const err = error;\n if (err && Array.isArray(err.logs))\n return true;\n if (err && String((_a = err.name) !== null && _a !== void 0 ? _a : '') === 'SendTransactionError')\n return true;\n const message = String((_c = (_b = err === null || err === void 0 ? void 0 : err.message) !== null && _b !== void 0 ? _b : err) !== null && _c !== void 0 ? _c : '').toLowerCase();\n if (!message)\n return false;\n if (message.includes('already been processed') || message.includes('already processed'))\n return false;\n return DEFINITIVE_SEND_FAILURE_MARKERS.some(marker => message.includes(marker));\n}\n// The Bounded program's own rule/invariant rejection, recognized from its\n// on-chain logs. On a rule-false the program logs \"<Create|Update|Delete> rule\n// failed for path ...\" then returns Unauthorized<Create|Update|Delete>; a cap /\n// declared-invariant breach returns OnchainInvariantViolation. Anchor prints the\n// error name + message into the logs even though the client IDL omits these\n// codes, so the log text is the reliable signal.\nconst BOUNDED_RULE_REJECTION_MARKERS = [\n /(?:Create|Update|Delete) rule failed for path/i,\n /Unauthorized(?:Create|Update|Delete)\\b/,\n /OnchainInvariantViolation/,\n /invariant postcondition failed/i,\n];\nfunction boundedRejectionHaystack(error, extraLogs) {\n const err = error;\n const parts = [];\n for (const source of [err === null || err === void 0 ? void 0 : err.logs, err === null || err === void 0 ? void 0 : err.transactionLogs, extraLogs]) {\n if (Array.isArray(source))\n parts.push(...source.map((line) => String(line)));\n else if (typeof source === 'string')\n parts.push(source);\n }\n if (err === null || err === void 0 ? void 0 : err.message)\n parts.push(String(err.message));\n return parts.join('\\n');\n}\n/**\n * Whether a definitive Solana send/confirm failure is the BOUNDED PROGRAM\n * rejecting the write in simulation - a policy rule or a cap/invariant check -\n * as opposed to an infra failure (blockhash, fees, account not found). Only the\n * former is a stale-mirror race and safe to advertise as retryable.\n */\nexport function isBoundedOnchainRuleRejection(error, extraLogs) {\n const hay = boundedRejectionHaystack(error, extraLogs);\n return !!hay && BOUNDED_RULE_REJECTION_MARKERS.some((re) => re.test(hay));\n}\n/**\n * A Bounded on-chain rule/invariant rejection surfaced with a message the caller\n * can act on. This write already PASSED the off-chain preflight (otherwise it\n * would have been declined before a transaction was ever built), so the program\n * disagreeing here means the authoritative on-chain state is ahead of a\n * not-yet-converged read mirror - re-read and retry. If it keeps failing, the\n * rule is genuinely unsatisfied (the cap is truly exceeded, or the write is not\n * authorized). Carries the original error as `cause` and the raw program logs.\n */\nexport class BoundedOnchainRuleRejection extends Error {\n constructor(cause, extraLogs) {\n super('The Bounded program rejected this write on-chain (a policy rule or cap/invariant check). ' +\n 'The off-chain preflight had already passed, so the authoritative on-chain state is ahead of a ' +\n 'not-yet-converged read mirror: re-read and retry. If it persists, the rule is genuinely failing ' +\n '(the cap is truly exceeded, or the write is not authorized).');\n this.boundedRuleRejection = true;\n this.retryable = true;\n this.name = 'BoundedOnchainRuleRejection';\n this.cause = cause;\n const err = cause;\n const logs = [];\n for (const source of [err === null || err === void 0 ? void 0 : err.logs, err === null || err === void 0 ? void 0 : err.transactionLogs, extraLogs]) {\n if (Array.isArray(source))\n logs.push(...source.map((line) => String(line)));\n }\n this.logs = logs;\n }\n}\nexport function errorText(error) {\n const message = error === null || error === void 0 ? void 0 : error.message;\n return typeof message === 'string' && message.length > 0 ? message : String(error);\n}\nconst BOUNDED_PROGRAM_MAINNET = ['open', 'Tv7fbpYSseNHYmCZFZ1CZgj4r8D9fKNgEz1qo6F'].join('');\nconst BOUNDED_PROGRAM_DEVNET = ['open', 'Tv7fbpYSseNHYmCZFZ1CZgj4r8D9fKNgEz1qo6F'].join('');\nconst COMPUTE_BUDGET_PROGRAM = 'ComputeBudget111111111111111111111111111111';\nconst SYSTEM_PROGRAM_ID = '11111111111111111111111111111111';\n// SPL Associated Token program and the two SPL Token programs it may create an\n// account under. The server builder compiles idempotent ATA-create setup\n// instructions ahead of the Bounded write for every ATA-creating plugin.\nconst ASSOCIATED_TOKEN_PROGRAM_ID = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';\nconst TOKEN_PROGRAM_ID = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';\nconst TOKEN_2022_PROGRAM_ID = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';\nconst SPL_TOKEN_PROGRAM_IDS = new Set([TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID]);\n// Idempotent ATA create carries a single instruction byte 0x01 (CreateIdempotent)\n// and exactly six accounts: funding, ATA, owner, mint, system program, token\n// program.\nconst ATA_CREATE_IDEMPOTENT_DISCRIMINATOR = 1;\nconst ATA_CREATE_ACCOUNT_COUNT = 6;\n// System Program `transfer` is instruction index 2 (u32 LE) followed by a u64\n// lamports amount: a 12-byte data payload over exactly two accounts.\nconst SYSTEM_TRANSFER_INSTRUCTION_INDEX = 2;\nconst SYSTEM_TRANSFER_DATA_LENGTH = 12;\nconst SYSTEM_TRANSFER_ACCOUNT_COUNT = 2;\n// Gas-sponsorship top-up cap. Mirrors the server builder's ATA-inclusive\n// absolute maximum (0.05 SOL); the fee payer (the gas sponsor) can only move its\n// OWN lamports up to this bound, and only to a co-signing account.\nconst SPONSOR_TOPUP_MAX_LAMPORTS = BigInt(50000000);\n// The four setup/write programs a server-built transaction may reference. System\n// and Associated-Token are typed-validated per instruction below; a bare\n// presence in this set is NOT sufficient authorization.\nconst ALLOWED_SERVER_TX_PROGRAMS = new Set([\n BOUNDED_PROGRAM_MAINNET,\n BOUNDED_PROGRAM_DEVNET,\n COMPUTE_BUDGET_PROGRAM,\n SYSTEM_PROGRAM_ID,\n ASSOCIATED_TOKEN_PROGRAM_ID,\n]);\n// Canonical set_documents discriminator (single wire format: ra_indices Vec<u8>).\nconst SET_DOCUMENTS_DISCRIMINATOR = '79,46,72,73,24,79,66,245';\nconst ALLOWED_BOUNDED_SET_DISCRIMINATORS = new Set([\n SET_DOCUMENTS_DISCRIMINATOR,\n]);\nclass BorshCursor {\n constructor(data, offset, label) {\n this.data = data;\n this.offset = offset;\n this.label = label;\n }\n requireBytes(length, field) {\n if (this.offset + length > this.data.length) {\n throw new Error(`${this.label} has malformed Bounded instruction data while reading ${field}`);\n }\n }\n readU8(field) { this.requireBytes(1, field); return this.data[this.offset++]; }\n readU32(field) {\n this.requireBytes(4, field);\n const value = this.data[this.offset] | (this.data[this.offset + 1] << 8) |\n (this.data[this.offset + 2] << 16) | (this.data[this.offset + 3] << 24);\n this.offset += 4;\n return value >>> 0;\n }\n skip(length, field) { this.requireBytes(length, field); this.offset += length; }\n readBytes(length, field) {\n this.requireBytes(length, field);\n const raw = this.data.slice(this.offset, this.offset + length);\n this.offset += length;\n return raw;\n }\n readString(field) {\n const length = this.readU32(`${field} length`);\n return Buffer.from(this.readBytes(length, field)).toString('utf8');\n }\n readLengthPrefixedBytes(field) {\n return this.readBytes(this.readU32(`${field} length`), field);\n }\n isAtEnd() { return this.offset === this.data.length; }\n}\nfunction readBoundedFieldValue(cursor) {\n const option = cursor.readU8('operation value option');\n if (option === 0)\n return null;\n if (option !== 1)\n throw new Error('Server transaction has malformed Bounded field value option');\n const variant = cursor.readU8('operation value variant');\n if (variant === 0)\n return { variant: 'u64', value: readU64LE(cursor.readBytes(8, 'operation numeric value'), 0) };\n if (variant === 1)\n return { variant: 'i64', value: readI64LE(cursor.readBytes(8, 'operation numeric value'), 0) };\n if (variant === 2)\n return { variant: 'bool', value: cursor.readU8('operation bool value') !== 0 };\n if (variant === 3)\n return { variant: 'string', value: cursor.readString('operation string value') };\n if (variant === 4)\n return { variant: 'address', value: cursor.readBytes(32, 'operation address value') };\n throw new Error(`Server transaction has unsupported Bounded field value variant: ${variant}`);\n}\nfunction normalizeOnchainPath(path) {\n let normalized = path.startsWith('/') ? path.slice(1) : path;\n if (normalized.endsWith('*') && normalized.length > 1)\n normalized = normalized.slice(0, -1);\n if (normalized.endsWith('/'))\n normalized = normalized.slice(0, -1);\n return normalized;\n}\nfunction parseBoundedSetDocumentsInstruction(data, label) {\n if (data.length < 8)\n throw new Error(`${label} has malformed Bounded instruction data`);\n const discriminator = Array.from(data.slice(0, 8)).join(',');\n if (!ALLOWED_BOUNDED_SET_DISCRIMINATORS.has(discriminator)) {\n throw new Error(`${label} contains unsupported Bounded instruction`);\n }\n const cursor = new BorshCursor(data, 8, label);\n const appId = cursor.readString('appId');\n const documents = [];\n const documentCount = cursor.readU32('documents length');\n for (let i = 0; i < documentCount; i++) {\n const path = normalizeOnchainPath(cursor.readString('document path'));\n const operations = [];\n const operationCount = cursor.readU32('operations length');\n for (let j = 0; j < operationCount; j++) {\n const key = cursor.readString('operation key');\n const value = readBoundedFieldValue(cursor);\n const kind = cursor.readU8('operation kind');\n operations.push({ key, value, kind });\n }\n documents.push({ path, operations });\n }\n const deletePaths = [];\n const deleteCount = cursor.readU32('delete paths length');\n for (let i = 0; i < deleteCount; i++)\n deletePaths.push(normalizeOnchainPath(cursor.readString('delete path')));\n const txData = [];\n const txDataCount = cursor.readU32('txData length');\n for (let i = 0; i < txDataCount; i++) {\n txData.push({\n pluginFunctionKey: cursor.readString('txData plugin function key'),\n payload: cursor.readLengthPrefixedBytes('txData bytes'),\n raIndices: cursor.readLengthPrefixedBytes('txData raIndices'),\n });\n }\n const simulateByte = cursor.readU8('simulate');\n if (simulateByte !== 0 && simulateByte !== 1)\n throw new Error(`${label} has malformed Bounded simulate flag`);\n if (!cursor.isAtEnd())\n throw new Error(`${label} has trailing Bounded instruction data`);\n return { appId, documents, deletePaths, txData, simulate: simulateByte === 1 };\n}\n// ---------------------------------------------------------------------------\n// OA-0001: signing-intent binding\n//\n// The wallet must sign ONLY the state transition the caller actually requested.\n// The expected intent below is derived from the CLIENT'S OWN write request - the\n// one ground truth a tampered builder response cannot change - and the parsed\n// instruction must match it field for field before any signer is invoked.\n// ---------------------------------------------------------------------------\n/** The program's field-operation kinds (programs/bounded; mirrored by the worker's solana-tx-builder). */\nconst FIELD_OPERATION_WRITE = 0;\nconst FIELD_OPERATION_DELETE = 1;\nconst FIELD_OPERATION_TIMESTAMP = 2;\nconst FIELD_OPERATION_INCREMENT = 3;\n// Keys the worker drops from a client write by NAME before encoding\n// (realtime-worker types.ts: SYSTEM_FIELDS without the `_`-prefixed entries the\n// client already strips, plus the prototype-pollution DANGEROUS_KEYS). The\n// expected model must skip exactly the keys the honest builder skips, or a\n// legitimate write would be rejected.\nconst SERVER_DROPPED_FIELD_KEYS = new Set([\n 'pathId',\n 'relativePath',\n 'absolutePath',\n '__proto__',\n 'constructor',\n 'prototype',\n]);\n// The worker resolves {operation:'time',value:'now'} into this sentinel and the\n// onchain encoder maps the sentinel to a TIMESTAMP op - including when a caller\n// writes the literal string, so the expected model must mirror that quirk.\nconst TIME_NOW_SENTINEL = '__TIME_NOW__';\n/**\n * Build the expected write intent from the exact request the client POSTed\n * (`[{ destinationPath, document }]`, a `null` document being a delete).\n *\n * Each document is JSON-round-tripped first: the server parsed the SERIALIZED\n * body, so the intent must be derived from the same bytes - this drops\n * `undefined` values, turns `NaN`/`Infinity` into `null`, and normalizes key\n * order exactly as the server's JSON.parse did.\n *\n * Operation order mirrors the worker's transform (normalizeWriteBody ->\n * resolveOperationFields -> documentToOperations): plain fields in request key\n * order, then increment fields appended in the order they appeared. The\n * comparison is therefore ORDERED, not a multiset - the honest builder is\n * deterministic given the request, and ordering additionally catches\n * duplicate-path and reordering tampering that the retired set comparison hid.\n */\nexport function buildExpectedWriteIntent(documents) {\n const intentDocuments = [];\n const deletePaths = [];\n for (const entry of documents) {\n if (entry.document == null) {\n deletePaths.push(entry.destinationPath);\n continue;\n }\n if (typeof entry.document !== 'object') {\n // The worker 400s a scalar document, so no honest 202 can exist for this\n // request. Throw here rather than let a dishonest 202 be compared against\n // an intent this entry never had.\n throw new Error(`Cannot derive the expected write intent for ${entry.destinationPath}: the request document is not an object`);\n }\n const wireDocument = JSON.parse(JSON.stringify(entry.document));\n const operations = [];\n const increments = [];\n for (const [key, value] of Object.entries(wireDocument)) {\n if (key.startsWith('_') || SERVER_DROPPED_FIELD_KEYS.has(key))\n continue;\n if (value === null) {\n operations.push({ key, kind: 'delete' });\n continue;\n }\n if (typeof value === 'object' && !Array.isArray(value) &&\n typeof value.operation === 'string' && value.operation.length > 0) {\n const operation = value.operation;\n if (operation === 'increment' && typeof value.value === 'number') {\n increments.push({ key, delta: value.value });\n continue;\n }\n if (operation === 'time' && value.value === 'now') {\n operations.push({ key, kind: 'timestamp' });\n continue;\n }\n // Any other {operation,...} shape is rejected by the worker with a 400,\n // so it has no honest onchain encoding. Falling through to a plain write\n // of the raw object keeps the comparison fail-closed: a 202 can only\n // arrive from a dishonest builder, and no instruction can match this.\n }\n if (value === TIME_NOW_SENTINEL) {\n operations.push({ key, kind: 'timestamp' });\n continue;\n }\n operations.push({ key, kind: 'write', value });\n }\n for (const { key, delta } of increments) {\n operations.push({ key, kind: 'increment', delta });\n }\n intentDocuments.push({ path: entry.destinationPath, operations });\n }\n return { documents: intentDocuments, deletePaths };\n}\n/**\n * Minimal base58 decoder, used ONLY to recognize a declared-Address field: a\n * request string that decodes to exactly the 32 bytes the instruction carries\n * is a faithful AddressVal encoding of that string. Returns null on any\n * non-base58 character.\n */\nexport function decodeBase58(text) {\n if (text.length === 0)\n return null;\n let value = BigInt(0);\n for (const ch of text) {\n const digit = BASE58_ALPHABET.indexOf(ch);\n if (digit < 0)\n return null;\n value = value * BigInt(58) + BigInt(digit);\n }\n // Leading '1' characters are leading zero bytes, not part of the number.\n let leadingZeros = 0;\n while (leadingZeros < text.length && text[leadingZeros] === BASE58_ALPHABET[0])\n leadingZeros++;\n const body = [];\n if (value > BigInt(0)) {\n let hex = value.toString(16);\n if (hex.length % 2 === 1)\n hex = `0${hex}`;\n for (let i = 0; i < hex.length; i += 2)\n body.push(parseInt(hex.slice(i, i + 2), 16));\n }\n const out = new Uint8Array(leadingZeros + body.length);\n out.set(body, leadingZeros);\n return out;\n}\n/**\n * Whether `parsed` is an encoding the HONEST builder could have produced for\n * the request field value. The onchain FieldValue variant is chosen by the\n * collection's DECLARED schema (worker-side `jsValueToFieldValue`), which the\n * client does not hold, so every variant any declared type could yield for this\n * JSON value is accepted - and nothing else:\n * - boolean: BoolVal only.\n * - integer number/bigint: U64Val (inference/UInt; UInt takes abs for\n * negatives) or I64Val (Int), of the exact integer.\n * - fractional number: StringVal of its decimal text (inference/Float), or a\n * truncated U64/I64 (declared UInt/Int truncates toward zero).\n * - string: StringVal verbatim, AddressVal when it is the base58 of the exact\n * 32 bytes (declared Address), or U64/I64 of its integer text (declared\n * UInt/Int accept numeric strings, truncating any fraction).\n * - array/object: StringVal of its JSON serialization (identical on both sides\n * of the wire for the round-tripped value).\n */\nfunction isFaithfulFieldValueEncoding(requestValue, parsed) {\n if (parsed === null)\n return false;\n if (typeof requestValue === 'boolean') {\n return parsed.variant === 'bool' && parsed.value === requestValue;\n }\n if (typeof requestValue === 'number') {\n if (!Number.isFinite(requestValue))\n return false;\n if (Number.isInteger(requestValue)) {\n const exact = BigInt(requestValue);\n if (parsed.variant === 'i64' && parsed.value === exact)\n return true;\n // The declared-UInt encoder stores abs(value), so a negative request\n // integer can honestly arrive as its positive magnitude.\n return parsed.variant === 'u64' && parsed.value === (exact < BigInt(0) ? -exact : exact);\n }\n if (parsed.variant === 'string' && parsed.value === String(requestValue))\n return true;\n const truncated = BigInt(Math.trunc(requestValue));\n if (parsed.variant === 'i64' && parsed.value === truncated)\n return true;\n return parsed.variant === 'u64' && parsed.value === (truncated < BigInt(0) ? -truncated : truncated);\n }\n if (typeof requestValue === 'string') {\n if (parsed.variant === 'string' && parsed.value === requestValue)\n return true;\n if (parsed.variant === 'address') {\n const decoded = decodeBase58(requestValue);\n const expectedBytes = parsed.value;\n if (decoded !== null && decoded.length === 32 && decoded.every((byte, i) => byte === expectedBytes[i]))\n return true;\n }\n if (parsed.variant === 'u64' || parsed.variant === 'i64') {\n const trimmed = requestValue.trim();\n const intPart = trimmed.includes('.') ? trimmed.split('.')[0] : trimmed;\n if (/^-?\\d+$/.test(intPart)) {\n const numeric = BigInt(intPart);\n if (parsed.variant === 'i64' && parsed.value === numeric)\n return true;\n if (parsed.variant === 'u64' && parsed.value === (numeric < BigInt(0) ? -numeric : numeric))\n return true;\n }\n }\n return false;\n }\n if (requestValue !== null && typeof requestValue === 'object') {\n return parsed.variant === 'string' && parsed.value === JSON.stringify(requestValue);\n }\n return false;\n}\nconst EXPECTED_KIND_TO_WIRE = {\n write: FIELD_OPERATION_WRITE,\n delete: FIELD_OPERATION_DELETE,\n timestamp: FIELD_OPERATION_TIMESTAMP,\n increment: FIELD_OPERATION_INCREMENT,\n};\nfunction describeParsedValue(value) {\n if (value === null)\n return 'no value';\n if (value.variant === 'address')\n return `address 0x${Buffer.from(value.value).toString('hex')}`;\n if (value.variant === 'u64' || value.variant === 'i64')\n return `${value.variant} ${value.value.toString()}`;\n return `${value.variant} ${JSON.stringify(value.value)}`;\n}\n/**\n * OA-0001: the one Bounded set-documents instruction in a server-built\n * transaction must encode EXACTLY the requested write - app id, ordered\n * documents, per-field operation key/kind/value, ordered deletes, and a clear\n * simulate flag - or the transaction is rejected BEFORE the wallet sees it.\n *\n * The comparison is ordered because the honest builder (realtime-worker's\n * solana-tx-builder) preserves the request's document/delete/operation order\n * deterministically; nothing legitimate reorders, and an ordered check catches\n * duplicate-path and reorder tampering the retired path-SET comparison hid.\n *\n * Deliberately NOT bound here: the plugin `txData` entries and the remaining\n * accounts their ra_indices reference. Those are derived by server-side policy\n * hooks (a Jupiter quote, an ATA layout), not by the caller's request, so the\n * client holds no request-derived expectation to compare against; that surface\n * stays bound by the onchain policy, the typed setup-instruction guards, and\n * the attestation co-signer the program demands for any non-empty txData.\n */\nfunction assertMatchesExpectedIntent(label, expectedAppId, expected, parsed) {\n var _a;\n if (parsed.appId !== expectedAppId)\n throw new Error(`${label} Bounded instruction appId does not match configured appId`);\n if (parsed.simulate) {\n throw new Error(`${label} Bounded instruction has the simulate flag set; a client-signed write must be a real execution`);\n }\n if (parsed.deletePaths.length !== expected.deletePaths.length ||\n parsed.deletePaths.some((path, i) => path !== normalizeOnchainPath(expected.deletePaths[i]))) {\n throw new Error(`${label} Bounded instruction delete paths do not match the requested deletes`);\n }\n if (parsed.documents.length !== expected.documents.length) {\n throw new Error(`${label} Bounded instruction document count does not match the requested write ` +\n `(expected ${expected.documents.length}, got ${parsed.documents.length})`);\n }\n for (let i = 0; i < expected.documents.length; i++) {\n const expectedDoc = expected.documents[i];\n const actualDoc = parsed.documents[i];\n const expectedPath = normalizeOnchainPath(expectedDoc.path);\n if (actualDoc.path !== expectedPath) {\n throw new Error(`${label} Bounded instruction document path \"${actualDoc.path}\" does not match requested path \"${expectedPath}\"`);\n }\n if (actualDoc.operations.length !== expectedDoc.operations.length) {\n throw new Error(`${label} Bounded instruction operations for path \"${expectedPath}\" do not match the requested write ` +\n `(expected ${expectedDoc.operations.length} operations, got ${actualDoc.operations.length})`);\n }\n for (let j = 0; j < expectedDoc.operations.length; j++) {\n const expectedOp = expectedDoc.operations[j];\n const actualOp = actualDoc.operations[j];\n if (actualOp.key !== expectedOp.key || actualOp.kind !== EXPECTED_KIND_TO_WIRE[expectedOp.kind]) {\n throw new Error(`${label} Bounded instruction operation ${j} on path \"${expectedPath}\" does not match the requested write ` +\n `(expected key \"${expectedOp.key}\" kind ${expectedOp.kind}, got key \"${actualOp.key}\" kind ${actualOp.kind})`);\n }\n if (expectedOp.kind === 'delete' || expectedOp.kind === 'timestamp') {\n if (actualOp.value !== null) {\n throw new Error(`${label} Bounded instruction operation \"${expectedOp.key}\" on path \"${expectedPath}\" carries an unexpected value`);\n }\n continue;\n }\n if (expectedOp.kind === 'increment') {\n const expectedDelta = BigInt(Math.trunc(expectedOp.delta));\n if (((_a = actualOp.value) === null || _a === void 0 ? void 0 : _a.variant) !== 'i64' || actualOp.value.value !== expectedDelta) {\n throw new Error(`${label} Bounded instruction increment \"${expectedOp.key}\" on path \"${expectedPath}\" does not match the requested delta`);\n }\n continue;\n }\n if (!isFaithfulFieldValueEncoding(expectedOp.value, actualOp.value)) {\n throw new Error(`${label} Bounded instruction operation \"${expectedOp.key}\" on path \"${expectedPath}\" encodes a value that does not match the requested field ` +\n `(got ${describeParsedValue(actualOp.value)})`);\n }\n }\n }\n}\n/** Read a little-endian u64 as a BigInt (lamport amounts can exceed 2^53). */\nfunction readU64LE(bytes, offset) {\n let value = BigInt(0);\n for (let i = 0; i < 8; i++)\n value |= BigInt(bytes[offset + i]) << BigInt(8 * i);\n return value;\n}\n/** Read a little-endian i64 as a BigInt (two's complement). */\nfunction readI64LE(bytes, offset) {\n const unsigned = readU64LE(bytes, offset);\n return unsigned >= (BigInt(1) << BigInt(63)) ? unsigned - (BigInt(1) << BigInt(64)) : unsigned;\n}\n/**\n * Resolve an instruction's referenced account keys against the transaction's\n * STATIC key list. A setup instruction that reaches into an address-lookup\n * table for any account it needs cannot be validated offline, so it fails\n * closed: every index must resolve to a static key.\n */\nfunction resolveInstructionAccounts(ix, accountKeys, label) {\n return ix.accountKeyIndexes.map(index => {\n if (index >= accountKeys.length) {\n throw new Error(`${label} setup instruction references an address-lookup-table account (not allowed)`);\n }\n return accountKeys[index];\n });\n}\n/**\n * A server-built idempotent ATA create is authorized ONLY when it is exactly the\n * canonical shape: instruction byte 0x01, six accounts, funded by the\n * transaction fee payer, over the System and an SPL Token program, and where the\n * account being created recomputes to the associated-token-account PDA of its\n * stated owner and mint. Nothing else - no arbitrary account create - passes.\n */\nfunction validateIdempotentAtaCreate(ix, data, accountKeys, feePayer, PublicKeyCtor, label) {\n if (data.length !== 1 || data[0] !== ATA_CREATE_IDEMPOTENT_DISCRIMINATOR) {\n throw new Error(`${label} contains a non-idempotent or malformed associated-token-account instruction`);\n }\n if (ix.accountKeyIndexes.length !== ATA_CREATE_ACCOUNT_COUNT) {\n throw new Error(`${label} associated-token-account create has an unexpected account layout`);\n }\n const [funding, ata, owner, mint, systemProgram, tokenProgram] = resolveInstructionAccounts(ix, accountKeys, label);\n if (!funding.equals(feePayer)) {\n throw new Error(`${label} associated-token-account create is not funded by the transaction fee payer`);\n }\n if (systemProgram.toBase58() !== SYSTEM_PROGRAM_ID) {\n throw new Error(`${label} associated-token-account create references an unexpected system program`);\n }\n if (!SPL_TOKEN_PROGRAM_IDS.has(tokenProgram.toBase58())) {\n throw new Error(`${label} associated-token-account create references an unexpected token program`);\n }\n const [expectedAta] = PublicKeyCtor.findProgramAddressSync([owner.toBuffer(), tokenProgram.toBuffer(), mint.toBuffer()], new PublicKeyCtor(ASSOCIATED_TOKEN_PROGRAM_ID));\n if (!ata.equals(expectedAta)) {\n throw new Error(`${label} associated-token-account create does not derive the canonical account for its owner and mint`);\n }\n}\n/**\n * A server-built System Program instruction is authorized ONLY as the gas\n * sponsor's top-up: a `transfer` FROM the transaction fee payer (the sponsor),\n * capped at the sponsorship maximum, TO a co-signing account (the sponsored\n * user). The fee payer can therefore only move its OWN lamports, bounded, and\n * only to an account that itself signed the transaction - never a drain to an\n * arbitrary address. Every other System instruction (createAccount, an\n * uncapped or misdirected transfer, ...) is rejected.\n */\nfunction validateSponsorTransfer(ix, data, accountKeys, feePayer, isAccountSigner, label) {\n const isTransfer = data.length === SYSTEM_TRANSFER_DATA_LENGTH &&\n (data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24)) === SYSTEM_TRANSFER_INSTRUCTION_INDEX;\n if (!isTransfer) {\n throw new Error(`${label} contains an unauthorized System Program instruction`);\n }\n if (ix.accountKeyIndexes.length !== SYSTEM_TRANSFER_ACCOUNT_COUNT) {\n throw new Error(`${label} contains an unauthorized System Program instruction`);\n }\n const [from, to] = resolveInstructionAccounts(ix, accountKeys, label);\n if (!from.equals(feePayer)) {\n throw new Error(`${label} System Program transfer must originate from the transaction fee payer (gas sponsor)`);\n }\n const lamports = readU64LE(data, 4);\n if (lamports > SPONSOR_TOPUP_MAX_LAMPORTS) {\n throw new Error(`${label} System Program transfer exceeds the gas-sponsorship cap`);\n }\n const recipientIndex = ix.accountKeyIndexes[1];\n if (!isAccountSigner(recipientIndex) || to.equals(feePayer)) {\n throw new Error(`${label} System Program transfer recipient must be a co-signing sponsored account`);\n }\n}\n/**\n * The format-blind half of pre-sign validation: every instruction must be a\n * program the server builder is allowed to emit, the two setup shapes must\n * recompute to this write's values, and exactly one Bounded set-documents\n * instruction must bind the caller's own intent (OA-0001). The v0 path feeds it\n * web3.js's compiled message; the SIMD-0385 v1 lane feeds it kit's decoded\n * instruction headers and payloads.\n */\nexport function validateServerTransactionSemantics(input) {\n const { label, expectedAppId, expectedIntent, accountKeys, isAccountSigner, instructions, PublicKeyCtor } = input;\n if (accountKeys.length === 0)\n throw new Error(`${label} has no static account keys`);\n const feePayer = accountKeys[0];\n let boundedInstructionCount = 0;\n let parsedBoundedInstruction = null;\n for (const ix of instructions) {\n if (!ALLOWED_SERVER_TX_PROGRAMS.has(ix.programId))\n throw new Error(`${label} contains unauthorized program: ${ix.programId}`);\n // Typed setup checks replace the old blanket System-Program ban: each of the\n // two setup shapes the server builder emits (idempotent ATA create, gas\n // sponsor top-up) is bound to recompute to the values this write needs, and\n // anything else fails closed.\n if (ix.programId === SYSTEM_PROGRAM_ID) {\n validateSponsorTransfer(ix, ix.data, accountKeys, feePayer, isAccountSigner, label);\n }\n else if (ix.programId === ASSOCIATED_TOKEN_PROGRAM_ID) {\n validateIdempotentAtaCreate(ix, ix.data, accountKeys, feePayer, PublicKeyCtor, label);\n }\n else if (ix.programId === BOUNDED_PROGRAM_MAINNET || ix.programId === BOUNDED_PROGRAM_DEVNET) {\n boundedInstructionCount++;\n parsedBoundedInstruction = parseBoundedSetDocumentsInstruction(ix.data, label);\n }\n }\n if (boundedInstructionCount !== 1)\n throw new Error(`${label} must contain exactly one Bounded set-documents instruction`);\n // OA-0001: bind the FULL operation semantics of the one Bounded instruction to\n // the caller's own request before any signer runs - not just the app/path\n // envelope, which a tampered builder response can keep while changing amounts.\n assertMatchesExpectedIntent(label, expectedAppId, expectedIntent, parsedBoundedInstruction);\n}\nfunction deserializeAndValidateServerTransaction(serializedTransaction, web3, options) {\n const { VersionedTransaction: VersionedTransactionClass, PublicKey: PublicKeyCtor } = web3;\n const transaction = VersionedTransactionClass.deserialize(Buffer.from(serializedTransaction, 'base64'));\n const { label, expectedAppId, expectedIntent } = options;\n const accountKeys = transaction.message.staticAccountKeys;\n const instructions = transaction.message.compiledInstructions.map((ix) => {\n var _a;\n if (ix.programIdIndex >= accountKeys.length)\n throw new Error(`${label} has program ID in lookup table (not allowed)`);\n return {\n programId: accountKeys[ix.programIdIndex].toBase58(),\n accountKeyIndexes: [...ix.accountKeyIndexes],\n data: ix.data instanceof Uint8Array ? ix.data : Buffer.from((_a = ix.data) !== null && _a !== void 0 ? _a : []),\n };\n });\n validateServerTransactionSemantics({\n label,\n expectedAppId,\n expectedIntent,\n accountKeys,\n isAccountSigner: (index) => transaction.message.isAccountSigner(index),\n instructions,\n PublicKeyCtor,\n });\n return transaction;\n}\n/**\n * DS3-0414: does this server-built transaction already carry a REAL signature?\n *\n * The worker partially signs before it answers: the sponsor keypair fills the\n * fee-payer slot for a sponsored write, and the attestation keypair co-signs any\n * plugin write (realtime-worker solana-tx-builder.ts). A Solana signature covers\n * the compiled message, recentBlockhash INCLUDED, so refreshing the blockhash\n * after either has signed silently voids their signature and the transaction can\n * never land. Versioned signature slots stay all-zero until a signer fills them,\n * and the pre-built lane is always versioned.\n *\n * EVERY slot, not just the fee payer's. The two co-signatures are independent:\n * the sponsor only signs when sponsorship is on, and sponsorship defaults to\n * \"none\", so the ordinary attested plugin write leaves slot 0 empty for the\n * wallet and carries the worker's signature further down. A fee-payer-only check\n * would wave exactly that shape through into a refresh that voids the\n * attestation signature and makes the write unlandable.\n *\n * Read from the BYTES rather than from the 202's `sponsorSigned` flag, for the\n * same reason: an attested plugin write is co-signed with `sponsorSigned: false`,\n * so the flag is not the question this asks.\n */\nfunction serverTransactionIsPartiallySigned(transaction) {\n return transaction.signatures.some(signature => signature.some(byte => byte !== 0));\n}\n/**\n * LF-003: hand the wallet a blockhash that is still alive, and report the\n * lifetime the transaction was ACTUALLY signed against.\n *\n * A Solana blockhash dies 150 blocks (~60s) after it is minted, and the worker\n * mints this one at the START of its build. The remaining builder RPC round\n * trips, the response hop, and - dominating everything - the unbounded human\n * pause in front of the wallet's approval dialog all come out of that one\n * window. So the pre-built lane routinely asks a wallet to sign a transaction\n * that is already expired or expires before it can be broadcast: the send fails\n * `blockhash not found` (a DEFINITIVE failure), and a wallet that substitutes\n * the dead blockhash instead of signing it is refused by the SDK's own\n * message-equality check. Refreshing here, immediately before the signature,\n * gives the whole window to the approval.\n *\n * Returns the fence the caller must confirm and reconcile against - refreshing\n * the transaction without moving BOTH fence fields with it would declare expiry\n * against a blockhash the transaction no longer carries.\n */\nasync function refreshTransactionLifetime(transaction, rpc, serverFence) {\n var _a;\n const fence = { blockhash: serverFence.blockhash, lastValidBlockHeight: serverFence.lastValidBlockHeight };\n // DS3-0414: someone else already signed these exact bytes. Their signature is\n // the constraint; the caller keeps the worker's window - but only once that\n // window is shown to describe the message that was signed. A fence naming a\n // blockhash the transaction does not carry expires on its own schedule, and\n // `expired_not_landed` is the ONE status callers treat as safe to retry, so a\n // disagreement here would turn an in-flight write into a duplicate one.\n if (serverTransactionIsPartiallySigned(transaction)) {\n if (transaction.message.recentBlockhash !== fence.blockhash) {\n throw new Error(`The pre-built Solana transaction was co-signed against blockhash ` +\n `${transaction.message.recentBlockhash} but its expiry fence names ${fence.blockhash}, so the ` +\n 'write could not be reconciled honestly. Nothing was signed.');\n }\n return fence;\n }\n // Signing without submitting is allowed to run with no RPC configured at all\n // (the caller broadcasts elsewhere), so there is nothing to refresh from.\n if (!rpc)\n return fence;\n if (typeof rpc.getLatestBlockhash !== 'function') {\n // Fail BEFORE the wallet is opened. Silently signing against the worker's\n // ageing blockhash is the defect this exists to remove, so a Solana RPC that\n // cannot answer is a configuration error, not a fallback.\n throw new Error('Pre-built Solana transaction signing needs a current blockhash, but the configured Solana RPC ' +\n 'cannot report one (no getLatestBlockhash). Nothing was signed.');\n }\n const latest = await rpc.getLatestBlockhash('confirmed');\n // Check the SHAPE before writing it onto the message. A value that is not 32\n // base58 bytes cannot be compiled, and web3.js only discovers that inside the\n // layout encoder - by which point the wallet has already been asked for a\n // gesture. It would also become the fence, and a fence nobody can interpret is\n // worse than a stale one.\n const decoded = decodeBase58(String((_a = latest === null || latest === void 0 ? void 0 : latest.blockhash) !== null && _a !== void 0 ? _a : ''));\n if (decoded === null || decoded.length !== 32) {\n throw new Error(`The configured Solana RPC returned \"${latest === null || latest === void 0 ? void 0 : latest.blockhash}\" as the current blockhash, which is ` +\n 'not a 32-byte base58 value. Nothing was signed.');\n }\n transaction.message.recentBlockhash = latest.blockhash;\n return { blockhash: latest.blockhash, lastValidBlockHeight: latest.lastValidBlockHeight };\n}\nexport async function handlePreBuiltTransaction(tx, authProvider, options, expectedIntent) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n // SIMD-0385 v1 wires start with 0x81 (message first, signatures trailing);\n // web3.js's legacy/v0 classes cannot represent them, so they take their own lane.\n if (isTransactionV1Base64(tx.serializedTransaction)) {\n const { handlePreBuiltV1Transaction } = await import('./solana-v1-operations');\n return handlePreBuiltV1Transaction(tx, authProvider, options, expectedIntent);\n }\n const { Connection, VersionedTransaction, PublicKey } = await import(\"@solana/web3.js\");\n // Honor a wallet client's immutable config snapshot for the expected app-id\n // binding and RPC endpoint (CTA-05); otherwise read the global init() config.\n const config = (_b = (_a = options === null || options === void 0 ? void 0 : options._overrides) === null || _a === void 0 ? void 0 : _a._config) !== null && _b !== void 0 ? _b : await getConfig();\n const transaction = deserializeAndValidateServerTransaction(tx.serializedTransaction, { VersionedTransaction, PublicKey }, {\n label: 'Pre-built transaction', expectedAppId: config.appId, expectedIntent,\n });\n const shouldSubmit = (options === null || options === void 0 ? void 0 : options.shouldSubmitTx) !== false;\n const rpcUrl = (_c = config.rpcUrl) === null || _c === void 0 ? void 0 : _c.trim();\n const injectedRpc = (_d = options === null || options === void 0 ? void 0 : options._overrides) === null || _d === void 0 ? void 0 : _d._solanaRpc;\n if (shouldSubmit && !rpcUrl && !injectedRpc) {\n // Checked BEFORE the wallet signs, so a misconfigured app fails its first\n // launch attempt without spending the user's signature. Deliberately no\n // bundled default endpoint (2026-06-28 hardening): the app must supply the\n // RPC it submits through.\n throw new Error(`Pre-built Solana transaction submission requires init({ rpcUrl }) for ${tx.network}. ` +\n `Pass a TOP-LEVEL rpcUrl (with chain) to init(), e.g. ` +\n `init({ appId, chain: '${tx.network}', rpcUrl: '<your ${tx.network} RPC endpoint>' }); ` +\n `a nested walletLogin.rpcUrl only configures wallet login and does not enable submission.`);\n }\n // One RPC handle for the whole lane: the pre-sign lifetime refresh, the\n // broadcast, and the confirmation must all speak to the same endpoint, or the\n // fence would be minted against a chain view the send never sees. Null only on\n // the sign-without-submitting path, which the guard above lets run RPC-less.\n const connection = injectedRpc !== null && injectedRpc !== void 0 ? injectedRpc : (rpcUrl ? new Connection(rpcUrl, 'confirmed') : null);\n // LF-003: the transaction must be signed against a blockhash that is still\n // alive, and the fence must describe the transaction that was actually signed.\n const fence = await refreshTransactionLifetime(transaction, connection, tx);\n const signedTx = await authProvider.signTransaction(transaction);\n const rawTx = signedTx.serialize();\n const signedTransaction = Buffer.from(rawTx).toString('base64');\n if (!shouldSubmit) {\n // Signed and NOT sent. There is no signature and nothing to mirror.\n return { outcome: 'signed', lane: 'solana', transactionSignature: null, signedTransaction, fence };\n }\n // Derive the signature from the signed bytes BEFORE broadcasting, so a send\n // whose response is lost still yields a reconcilable identifier.\n const signature = deriveTransactionSignature(signedTx);\n // Non-null here: the guard above refuses a submitting write with no RPC.\n const submitRpc = connection;\n try {\n await submitRpc.sendRawTransaction(rawTx, { skipPreflight: false, maxRetries: 3 });\n }\n catch (error) {\n // A definitive rejection never entered the network — keep throwing. If it is\n // the Bounded program rejecting the write (rule / cap / invariant), surface\n // the actionable stale-mirror-race message instead of a raw \"simulation\n // failed\"; otherwise re-throw the infra error unchanged.\n if (isDefinitiveSolanaSendFailure(error)) {\n if (isBoundedOnchainRuleRejection(error))\n throw new BoundedOnchainRuleRejection(error);\n throw error;\n }\n // Ambiguous transport outcome: the node may hold these exact bytes. Report\n // the pre-derived signature so the caller reconciles it instead of building\n // a second transaction that could land beside the first.\n return {\n outcome: 'submitted',\n lane: 'solana',\n transactionSignature: signature,\n signedTransaction,\n fence,\n reason: `Broadcast response was lost or inconclusive: ${errorText(error)}`,\n };\n }\n let confirmation;\n try {\n confirmation = await submitRpc.confirmTransaction({\n signature, blockhash: fence.blockhash, lastValidBlockHeight: fence.lastValidBlockHeight,\n }, 'confirmed');\n }\n catch (error) {\n // The bytes were accepted; only the confirmation outcome is unknown.\n return {\n outcome: 'submitted',\n lane: 'solana',\n transactionSignature: signature,\n signedTransaction,\n fence,\n reason: `Confirmation outcome unknown: ${errorText(error)}`,\n };\n }\n // #310: \"confirmed\" only means the network recorded the transaction, not that it\n // succeeded - a landed-but-failed transaction carries an err. Report it as a failure\n // (with on-chain logs) instead of a fake success, mirroring the server keypair provider.\n if ((_e = confirmation.value) === null || _e === void 0 ? void 0 : _e.err) {\n let logMessages;\n try {\n const txInfo = await getTransactionJson(submitRpc, signature, 'confirmed');\n logMessages = (_f = txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta) === null || _f === void 0 ? void 0 : _f.logMessages;\n }\n catch (_j) {\n // Log retrieval is diagnostic only; the on-chain error is the verdict.\n }\n if (isBoundedOnchainRuleRejection(confirmation.value.err, logMessages)) {\n throw new BoundedOnchainRuleRejection(confirmation.value.err, logMessages);\n }\n const errorMessage = logMessages ? JSON.stringify(logMessages) : JSON.stringify(confirmation.value.err);\n throw new Error(`Transaction failed: ${errorMessage}`);\n }\n return {\n outcome: 'confirmed',\n lane: 'solana',\n transactionSignature: signature,\n signedTransaction,\n fence,\n confirmationContextSlot: (_h = (_g = confirmation.context) ===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,IAAI,EAAE,QAAQ;AACtB,QAAQ,oBAAoB,EAAE,SAAS;AACvC,QAAQ,iBAAiB;AACzB,QAAQ,KAAK;AACb,QAAQ,uBAAuB,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,YAAY,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,CAAC;AACnJ,KAAK;AACL;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D-dJjY-Q.js');
3
+ var index = require('./index-B8PpRj6x.js');
4
4
  require('axios');
5
5
  require('tweetnacl');
6
6
  require('reconnecting-websocket');
@@ -837,7 +837,7 @@ async function handlePreBuiltTransaction(tx, authProvider, options, expectedInte
837
837
  // SIMD-0385 v1 wires start with 0x81 (message first, signatures trailing);
838
838
  // web3.js's legacy/v0 classes cannot represent them, so they take their own lane.
839
839
  if (isTransactionV1Base64(tx.serializedTransaction)) {
840
- const { handlePreBuiltV1Transaction } = await Promise.resolve().then(function () { return require('./solana-v1-operations-DRm8TzzJ.js'); });
840
+ const { handlePreBuiltV1Transaction } = await Promise.resolve().then(function () { return require('./solana-v1-operations-BF2rjG23.js'); });
841
841
  return handlePreBuiltV1Transaction(tx, authProvider, options, expectedIntent);
842
842
  }
843
843
  const { Connection, VersionedTransaction, PublicKey } = await import('@solana/web3.js');
@@ -963,4 +963,4 @@ exports.isBoundedOnchainRuleRejection = isBoundedOnchainRuleRejection;
963
963
  exports.isDefinitiveSolanaSendFailure = isDefinitiveSolanaSendFailure;
964
964
  exports.isTransactionV1Base64 = isTransactionV1Base64;
965
965
  exports.validateServerTransactionSemantics = validateServerTransactionSemantics;
966
- //# sourceMappingURL=solana-operations-SR1En23U.js.map
966
+ //# sourceMappingURL=solana-operations-DJQDYdrk.js.map