@bounded-sh/core 0.0.74 → 0.0.76
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.
- package/dist/{index-C9ezg0Ef.js → index-D2lxAtzr.js} +6 -6
- package/dist/{index-C9ezg0Ef.js.map → index-D2lxAtzr.js.map} +1 -1
- package/dist/{index-DXV0ETfH.mjs → index-D34_bpP8.mjs} +6 -6
- package/dist/{index-DXV0ETfH.mjs.map → index-D34_bpP8.mjs.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{realtime-store-6rndRLaa.mjs → realtime-store-Bty_U9_e.mjs} +2 -2
- package/dist/{realtime-store-6rndRLaa.mjs.map → realtime-store-Bty_U9_e.mjs.map} +1 -1
- package/dist/{realtime-store-JPgBppmw.js → realtime-store-COGE3eMT.js} +2 -2
- package/dist/{realtime-store-JPgBppmw.js.map → realtime-store-COGE3eMT.js.map} +1 -1
- package/dist/{solana-message-Cam1-0wi.js → solana-message-B3Vht3DQ.js} +2 -2
- package/dist/{solana-message-Cam1-0wi.js.map → solana-message-B3Vht3DQ.js.map} +1 -1
- package/dist/{solana-message-DHKm-c_x.mjs → solana-message-IZvpYOKU.mjs} +2 -2
- package/dist/{solana-message-DHKm-c_x.mjs.map → solana-message-IZvpYOKU.mjs.map} +1 -1
- package/dist/{solana-operations-DiM6_8z7.mjs → solana-operations-CJ95IJHU.mjs} +2 -2
- package/dist/{solana-operations-DiM6_8z7.mjs.map → solana-operations-CJ95IJHU.mjs.map} +1 -1
- package/dist/{solana-operations-DycSSUls.js → solana-operations-pm2p7GqA.js} +2 -2
- package/dist/{solana-operations-DycSSUls.js.map → solana-operations-pm2p7GqA.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana-operations-DiM6_8z7.mjs","sources":["../.rollup-tmp/client/solana-operations.js"],"sourcesContent":["import { Buffer } from 'buffer';\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 */\nfunction 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 */\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}\nfunction 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/tarobase; 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 */\nfunction 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}\nfunction deserializeAndValidateServerTransaction(serializedTransaction, web3, options) {\n var _a;\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 if (accountKeys.length === 0)\n throw new Error(`${label} has no static account keys`);\n const feePayer = accountKeys[0];\n const isAccountSigner = (index) => transaction.message.isAccountSigner(index);\n let boundedInstructionCount = 0;\n let parsedBoundedInstruction = null;\n for (const ix of transaction.message.compiledInstructions) {\n if (ix.programIdIndex >= accountKeys.length)\n throw new Error(`${label} has program ID in lookup table (not allowed)`);\n const programId = accountKeys[ix.programIdIndex].toBase58();\n if (!ALLOWED_SERVER_TX_PROGRAMS.has(programId))\n throw new Error(`${label} contains unauthorized program: ${programId}`);\n const data = ix.data instanceof Uint8Array ? ix.data : Buffer.from((_a = ix.data) !== null && _a !== void 0 ? _a : []);\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 (programId === SYSTEM_PROGRAM_ID) {\n validateSponsorTransfer(ix, data, accountKeys, feePayer, isAccountSigner, label);\n }\n else if (programId === ASSOCIATED_TOKEN_PROGRAM_ID) {\n validateIdempotentAtaCreate(ix, data, accountKeys, feePayer, PublicKeyCtor, label);\n }\n else if (programId === BOUNDED_PROGRAM_MAINNET || programId === BOUNDED_PROGRAM_DEVNET) {\n boundedInstructionCount++;\n parsedBoundedInstruction = parseBoundedSetDocumentsInstruction(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 return transaction;\n}\nexport async function handlePreBuiltTransaction(tx, authProvider, options, expectedIntent) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\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 const signedTx = await authProvider.signTransaction(transaction);\n const rawTx = signedTx.serialize();\n const signedTransaction = Buffer.from(rawTx).toString('base64');\n // Keep the worker's expiry fence instead of discarding it: it is what makes\n // bounded same-signature reconciliation (and therefore the retry-safe\n // `expired_not_landed` exit) possible at all.\n const fence = { blockhash: tx.blockhash, lastValidBlockHeight: tx.lastValidBlockHeight };\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 const connection = injectedRpc !== null && injectedRpc !== void 0 ? injectedRpc : new Connection(rpcUrl, 'confirmed');\n try {\n await connection.sendRawTransaction(rawTx, { skipPreflight: false, maxRetries: 3 });\n }\n catch (error) {\n // A definitive rejection never entered the network — keep throwing.\n if (isDefinitiveSolanaSendFailure(error))\n throw error;\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 connection.confirmTransaction({\n signature, blockhash: tx.blockhash, lastValidBlockHeight: tx.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 connection.getTransaction(signature, {\n maxSupportedTransactionVersion: 0,\n commitment: 'confirmed',\n });\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 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":";;;;;AAEA,MAAM,eAAe,GAAG,4DAA4D;AACpF;AACA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AG,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-CJ95IJHU.mjs","sources":["../.rollup-tmp/client/solana-operations.js"],"sourcesContent":["import { Buffer } from 'buffer';\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 */\nfunction 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 */\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}\nfunction 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/tarobase; 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 */\nfunction 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}\nfunction deserializeAndValidateServerTransaction(serializedTransaction, web3, options) {\n var _a;\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 if (accountKeys.length === 0)\n throw new Error(`${label} has no static account keys`);\n const feePayer = accountKeys[0];\n const isAccountSigner = (index) => transaction.message.isAccountSigner(index);\n let boundedInstructionCount = 0;\n let parsedBoundedInstruction = null;\n for (const ix of transaction.message.compiledInstructions) {\n if (ix.programIdIndex >= accountKeys.length)\n throw new Error(`${label} has program ID in lookup table (not allowed)`);\n const programId = accountKeys[ix.programIdIndex].toBase58();\n if (!ALLOWED_SERVER_TX_PROGRAMS.has(programId))\n throw new Error(`${label} contains unauthorized program: ${programId}`);\n const data = ix.data instanceof Uint8Array ? ix.data : Buffer.from((_a = ix.data) !== null && _a !== void 0 ? _a : []);\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 (programId === SYSTEM_PROGRAM_ID) {\n validateSponsorTransfer(ix, data, accountKeys, feePayer, isAccountSigner, label);\n }\n else if (programId === ASSOCIATED_TOKEN_PROGRAM_ID) {\n validateIdempotentAtaCreate(ix, data, accountKeys, feePayer, PublicKeyCtor, label);\n }\n else if (programId === BOUNDED_PROGRAM_MAINNET || programId === BOUNDED_PROGRAM_DEVNET) {\n boundedInstructionCount++;\n parsedBoundedInstruction = parseBoundedSetDocumentsInstruction(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 return transaction;\n}\nexport async function handlePreBuiltTransaction(tx, authProvider, options, expectedIntent) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\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 const signedTx = await authProvider.signTransaction(transaction);\n const rawTx = signedTx.serialize();\n const signedTransaction = Buffer.from(rawTx).toString('base64');\n // Keep the worker's expiry fence instead of discarding it: it is what makes\n // bounded same-signature reconciliation (and therefore the retry-safe\n // `expired_not_landed` exit) possible at all.\n const fence = { blockhash: tx.blockhash, lastValidBlockHeight: tx.lastValidBlockHeight };\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 const connection = injectedRpc !== null && injectedRpc !== void 0 ? injectedRpc : new Connection(rpcUrl, 'confirmed');\n try {\n await connection.sendRawTransaction(rawTx, { skipPreflight: false, maxRetries: 3 });\n }\n catch (error) {\n // A definitive rejection never entered the network — keep throwing.\n if (isDefinitiveSolanaSendFailure(error))\n throw error;\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 connection.confirmTransaction({\n signature, blockhash: tx.blockhash, lastValidBlockHeight: tx.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 connection.getTransaction(signature, {\n maxSupportedTransactionVersion: 0,\n commitment: 'confirmed',\n });\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 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":";;;;;AAEA,MAAM,eAAe,GAAG,4DAA4D;AACpF;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,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,CAAC,KAAK,GAAG,EAAE,IAAI,CAAC;AACpC,QA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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-D2lxAtzr.js');
|
|
4
4
|
require('axios');
|
|
5
5
|
require('tweetnacl');
|
|
6
6
|
require('reconnecting-websocket');
|
|
@@ -754,4 +754,4 @@ exports.buildExpectedWriteIntent = buildExpectedWriteIntent;
|
|
|
754
754
|
exports.deriveTransactionSignature = deriveTransactionSignature;
|
|
755
755
|
exports.handlePreBuiltTransaction = handlePreBuiltTransaction;
|
|
756
756
|
exports.isDefinitiveSolanaSendFailure = isDefinitiveSolanaSendFailure;
|
|
757
|
-
//# sourceMappingURL=solana-operations-
|
|
757
|
+
//# sourceMappingURL=solana-operations-pm2p7GqA.js.map
|