@bounded-sh/server 0.0.18 → 0.0.20

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.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../.rollup-tmp/auth/providers/solana-keypair-provider.js","../.rollup-tmp/auth/providers/offchain-auth-provider.js","../.rollup-tmp/auth/index.js","../.rollup-tmp/global.js","../.rollup-tmp/utils.js","../.rollup-tmp/wallet-client.js","../.rollup-tmp/webhooks.js"],"sourcesContent":["import { Buffer } from 'buffer';\nimport { ComputeBudgetProgram, Connection, Keypair, SystemProgram, VersionedTransaction } from '@solana/web3.js';\nimport * as anchor from '@coral-xyz/anchor';\nimport nacl from 'tweetnacl';\nimport bs58 from 'bs58';\nimport { convertRemainingAccounts, buildSetDocumentsTransaction, } from '@bounded-sh/core';\n/* ------------------------------------------------------------- *\n * KEYPAIR ENV-VAR (only consulted when no explicit keypair is given)\n *\n * Most code should pass a keypair explicitly — `createWalletClient({ keypair })`\n * does. The env var is the fallback for the global `set/get` path. `BOUNDED_*`\n * is the canonical name (it matches the CLI's `BOUNDED_PRIVATE_KEY`).\n * ------------------------------------------------------------- */\nconst ENV_VARS = ['BOUNDED_PRIVATE_KEY']; // base-58 or JSON array\nconst PRESIGNED_BLOCKHASH_ERROR = 'Server signedTransaction blockhash is stale or expired';\nconst BOUNDED_PROGRAM_MAINNET = 'poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZp';\nconst BOUNDED_PROGRAM_DEVNET = 'taro6CvKqwrYrDc16ufYgzQ2NZcyyVKStffbtudrhRu';\nconst COMPUTE_BUDGET_PROGRAM = 'ComputeBudget111111111111111111111111111111';\nconst SYSTEM_PROGRAM_ID = '11111111111111111111111111111111';\nconst SUPPORTED_SOLANA_NETWORKS = ['solana_devnet', 'solana_mainnet', 'surfnet'];\nconst SUPPORTED_SOLANA_NETWORK_SET = new Set(SUPPORTED_SOLANA_NETWORKS);\nconst ALLOWED_SERVER_TX_PROGRAMS = new Set([\n BOUNDED_PROGRAM_MAINNET,\n BOUNDED_PROGRAM_DEVNET,\n COMPUTE_BUDGET_PROGRAM,\n SYSTEM_PROGRAM_ID,\n]);\nconst SET_DOCUMENTS_DISCRIMINATOR = '79,46,72,73,24,79,66,245';\nconst SET_DOCUMENTS_V2_DISCRIMINATOR = '22,236,242,185,145,61,26,39';\nconst ALLOWED_BOUNDED_SET_DISCRIMINATORS = new Set([\n SET_DOCUMENTS_DISCRIMINATOR,\n SET_DOCUMENTS_V2_DISCRIMINATOR,\n]);\nfunction loadKeypairFromEnv() {\n var _a;\n let secret;\n let found;\n for (const name of ENV_VARS) {\n const v = (_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a[name];\n if (v) {\n secret = v;\n found = name;\n break;\n }\n }\n if (!secret) {\n throw new Error(`No server keypair: set ${ENV_VARS[0]} to a base58 secret key (or JSON array), ` +\n `or pass one explicitly via createWalletClient({ keypair }).`);\n }\n try {\n const secretKey = secret.trim().startsWith('[')\n ? Uint8Array.from(JSON.parse(secret))\n : bs58.decode(secret.trim());\n return Keypair.fromSecretKey(secretKey);\n }\n catch (err) {\n throw new Error(`Unable to parse ${found}. Ensure it is valid base58 or a JSON array.`);\n }\n}\n/* ──────────────────────────────────────────────────────────\n * Helper – fetch getPriorityFeeEstimate\n * ──────────────────────────────────────────────────────── */\nasync function fetchPriorityFee(rpcEndpoint, rawUnsignedTxBuffer) {\n var _a, _b;\n try {\n const res = await fetch(rpcEndpoint, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: \"1\",\n method: \"getPriorityFeeEstimate\",\n params: [{\n transaction: bs58.encode(rawUnsignedTxBuffer), options: {\n recommended: true\n }\n }]\n })\n });\n const data = await res.json();\n const fee = (_b = (_a = data === null || data === void 0 ? void 0 : data.result) === null || _a === void 0 ? void 0 : _a.priorityFeeEstimate) !== null && _b !== void 0 ? _b : null;\n if (fee != null && fee > 0) {\n return Math.ceil(Number(fee) * 1.2);\n }\n console.warn(\"Priority-fee estimate returned no positive fee; skipping priority fee instruction\");\n return null;\n }\n catch (err) {\n console.warn(\"Priority-fee estimate failed; skipping priority fee instruction:\", err);\n return null;\n }\n}\nfunction isPresignedBlockhashError(error) {\n return typeof (error === null || error === void 0 ? void 0 : error.message) === 'string' && error.message.includes(PRESIGNED_BLOCKHASH_ERROR);\n}\nfunction isPermanentPresignedTransactionError(error) {\n return isPresignedBlockhashError(error) ||\n (typeof (error === null || error === void 0 ? void 0 : error.message) === 'string' && (error.message.startsWith('Server signedTransaction') ||\n error.message.startsWith('Server preInstruction')));\n}\nclass BorshCursor {\n constructor(data, offset) {\n this.data = data;\n this.offset = offset;\n }\n requireBytes(length, field) {\n if (this.offset + length > this.data.length) {\n throw new Error(`Server signedTransaction has malformed Bounded instruction data while reading ${field}`);\n }\n }\n readU8(field) {\n this.requireBytes(1, field);\n return this.data[this.offset++];\n }\n readU32(field) {\n this.requireBytes(4, field);\n const value = this.data[this.offset] |\n (this.data[this.offset + 1] << 8) |\n (this.data[this.offset + 2] << 16) |\n (this.data[this.offset + 3] << 24);\n this.offset += 4;\n return value >>> 0;\n }\n skip(length, field) {\n this.requireBytes(length, field);\n this.offset += length;\n }\n readString(field) {\n const length = this.readU32(`${field} length`);\n this.requireBytes(length, field);\n const raw = this.data.slice(this.offset, this.offset + length);\n this.offset += length;\n return Buffer.from(raw).toString('utf8');\n }\n skipBytes(field) {\n const length = this.readU32(`${field} length`);\n this.skip(length, field);\n }\n isAtEnd() {\n return this.offset === this.data.length;\n }\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 }\n if (normalized.endsWith('/')) {\n normalized = normalized.slice(0, -1);\n }\n return normalized;\n}\nfunction skipBoundedFieldValue(cursor) {\n const option = cursor.readU8('operation value option');\n if (option === 0)\n return;\n if (option !== 1) {\n throw new Error('Server signedTransaction has malformed Bounded field value option');\n }\n const variant = cursor.readU8('operation value variant');\n switch (variant) {\n case 0:\n case 1:\n cursor.skip(8, 'operation numeric value');\n return;\n case 2:\n cursor.skip(1, 'operation bool value');\n return;\n case 3:\n cursor.readString('operation string value');\n return;\n case 4:\n cursor.skip(32, 'operation address value');\n return;\n default:\n throw new Error(`Server signedTransaction has unsupported Bounded field value variant: ${variant}`);\n }\n}\nfunction skipBoundedFieldOperation(cursor) {\n cursor.readString('operation key');\n skipBoundedFieldValue(cursor);\n cursor.skip(1, 'operation kind');\n}\nfunction skipBoundedTxData(cursor, isV2) {\n cursor.readString('txData plugin function key');\n cursor.skipBytes('txData bytes');\n if (isV2) {\n cursor.skipBytes('txData raIndices');\n return;\n }\n const raIndexCount = cursor.readU32('txData raIndices length');\n cursor.skip(raIndexCount * 8, 'txData raIndices');\n}\nfunction parseBoundedSetDocumentsInstruction(data) {\n if (data.length < 8) {\n throw new Error('Server signedTransaction has malformed Bounded instruction data');\n }\n const discriminator = Array.from(data.slice(0, 8)).join(',');\n if (!ALLOWED_BOUNDED_SET_DISCRIMINATORS.has(discriminator)) {\n throw new Error('Server signedTransaction contains unsupported Bounded instruction');\n }\n const isV2 = discriminator === SET_DOCUMENTS_V2_DISCRIMINATOR;\n const cursor = new BorshCursor(data, 8);\n const appId = cursor.readString('appId');\n const documentPaths = [];\n const documentCount = cursor.readU32('documents length');\n for (let i = 0; i < documentCount; i++) {\n documentPaths.push(normalizeOnchainPath(cursor.readString('document path')));\n const operationCount = cursor.readU32('operations length');\n for (let j = 0; j < operationCount; j++) {\n skipBoundedFieldOperation(cursor);\n }\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 }\n const txDataCount = cursor.readU32('txData length');\n for (let i = 0; i < txDataCount; i++) {\n skipBoundedTxData(cursor, isV2);\n }\n const simulate = cursor.readU8('simulate');\n if (simulate !== 0 && simulate !== 1) {\n throw new Error('Server signedTransaction has malformed Bounded simulate flag');\n }\n if (!cursor.isAtEnd()) {\n throw new Error('Server signedTransaction has trailing Bounded instruction data');\n }\n return { appId, documentPaths, deletePaths };\n}\nfunction assertSamePathSet(expectedPaths, actualPaths) {\n const expected = new Set(expectedPaths.map(normalizeOnchainPath).filter(Boolean));\n const actual = new Set(actualPaths.map(normalizeOnchainPath).filter(Boolean));\n const missing = [...expected].filter(path => !actual.has(path));\n const extra = [...actual].filter(path => !expected.has(path));\n if (missing.length > 0 || extra.length > 0) {\n const details = [\n missing.length ? `missing paths: ${missing.join(', ')}` : '',\n extra.length ? `unexpected paths: ${extra.join(', ')}` : '',\n ].filter(Boolean).join('; ');\n throw new Error(`Server signedTransaction Bounded instruction paths do not match requested write paths (${details})`);\n }\n}\nfunction validatePresignedSignedTransaction(transaction, sol) {\n var _a, _b, _c, _d, _e, _f, _g;\n const accountKeys = transaction.message.staticAccountKeys;\n let boundedInstructionCount = 0;\n const actualWritePaths = [];\n for (const ix of transaction.message.compiledInstructions) {\n if (ix.programIdIndex >= accountKeys.length) {\n throw new Error('Server signedTransaction has program ID in lookup table (not allowed)');\n }\n const programId = accountKeys[ix.programIdIndex].toBase58();\n if (!ALLOWED_SERVER_TX_PROGRAMS.has(programId)) {\n throw new Error(`Server signedTransaction contains unauthorized program: ${programId}`);\n }\n const data = ix.data instanceof Uint8Array ? ix.data : Buffer.from((_a = ix.data) !== null && _a !== void 0 ? _a : []);\n if (programId === SYSTEM_PROGRAM_ID) {\n throw new Error('Server signedTransaction contains unauthorized System Program instruction');\n }\n if (programId === BOUNDED_PROGRAM_MAINNET || programId === BOUNDED_PROGRAM_DEVNET) {\n boundedInstructionCount += 1;\n const parsed = parseBoundedSetDocumentsInstruction(data);\n if (parsed.appId !== sol.appId) {\n throw new Error('Server signedTransaction Bounded instruction appId does not match configured appId');\n }\n actualWritePaths.push(...parsed.documentPaths, ...parsed.deletePaths);\n }\n }\n if (boundedInstructionCount !== 1) {\n throw new Error('Server signedTransaction must contain exactly one Bounded set-documents instruction');\n }\n const expectedWritePaths = [\n ...(((_d = (_c = (_b = sol.txArgs) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.setDocumentData) !== null && _d !== void 0 ? _d : []).map((doc) => doc.path)),\n ...((_g = (_f = (_e = sol.txArgs) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.deletePaths) !== null && _g !== void 0 ? _g : []),\n ];\n assertSamePathSet(expectedWritePaths, actualWritePaths);\n}\nfunction assertAllowedServerPreInstructions(preInstructions) {\n for (const [index, ix] of (preInstructions !== null && preInstructions !== void 0 ? preInstructions : []).entries()) {\n if (ix.programId.equals(SystemProgram.programId)) {\n throw new Error(`Server preInstruction[${index}] contains unauthorized System Program instruction`);\n }\n }\n}\nexport class SolanaKeypairProvider {\n constructor(rpcUrl = null, keypair) {\n this.rpcUrl = rpcUrl;\n this.explicitKeypair = keypair;\n }\n get keypair() {\n var _a, _b;\n return ((_a = this.cachedKeypair) !== null && _a !== void 0 ? _a : (this.cachedKeypair = (_b = this.explicitKeypair) !== null && _b !== void 0 ? _b : loadKeypairFromEnv()));\n }\n /* ----------------------------------------------------------- *\n * (Auth stubs – fill in later if needed)\n * ----------------------------------------------------------- */\n async login() { throw new Error('Not implemented'); }\n async restoreSession() { throw new Error('Not implemented'); }\n async logout() { throw new Error('Not implemented'); }\n /* ----------------------------------------------------------- *\n * Sign arbitrary message\n * ----------------------------------------------------------- */\n async signMessage(message) {\n const sig = nacl.sign.detached(new TextEncoder().encode(message), this.keypair.secretKey);\n return Buffer.from(sig).toString('base64');\n }\n /* ----------------------------------------------------------- *\n * Sign transaction\n * ----------------------------------------------------------- */\n async signTransaction(transaction) {\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n const isLegacyTransaction = 'recentBlockhash' in transaction && !('message' in transaction && 'staticAccountKeys' in transaction.message);\n if (isLegacyTransaction) {\n transaction.partialSign(this.keypair);\n }\n else {\n transaction.sign([this.keypair]);\n }\n return transaction;\n }\n /**\n * Signs and submits a Solana transaction to the network.\n *\n * This method handles blockhash and transaction confirmation automatically - you do NOT need to\n * set recentBlockhash or lastValidBlockHeight on the transaction before calling this method.\n * Requires an explicit RPC URL configured on the provider because this method has no\n * Solana transaction payload network to resolve.\n *\n * @param transaction - The transaction to sign and submit (Transaction or VersionedTransaction)\n * @param feePayer - Optional fee payer public key. If not provided and the transaction doesn't\n * already have a feePayer set, the keypair's public key will be used.\n * Useful for co-signing scenarios where a different account pays the fees.\n * @returns The transaction signature\n */\n async signAndSubmitTransaction(transaction, feePayer) {\n // 1. Get RPC URL and create connection\n const rpcUrl = this.getRpcUrl();\n const connection = new Connection(rpcUrl, 'confirmed');\n // 2. Get fresh blockhash and set it on the transaction before signing\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n const isLegacyTransaction = 'recentBlockhash' in transaction && !('message' in transaction && 'staticAccountKeys' in transaction.message);\n if (isLegacyTransaction) {\n const legacyTx = transaction;\n legacyTx.recentBlockhash = blockhash;\n legacyTx.lastValidBlockHeight = lastValidBlockHeight;\n // Set feePayer if not already set\n if (!legacyTx.feePayer) {\n legacyTx.feePayer = feePayer !== null && feePayer !== void 0 ? feePayer : this.keypair.publicKey;\n }\n }\n else {\n // VersionedTransaction\n const versionedTx = transaction;\n versionedTx.message.recentBlockhash = blockhash;\n // Note: VersionedTransaction feePayer is set in the message at creation time\n // and cannot be modified after creation\n }\n // 3. Sign the transaction\n const signedTx = await this.signTransaction(transaction);\n // 4. Submit and confirm using shared helper\n const { signature } = await this.submitAndConfirmTransaction(signedTx, connection);\n return signature;\n }\n /* ----------------------------------------------------------- *\n * Private Helpers\n * ----------------------------------------------------------- */\n /**\n * Submits a signed transaction and waits for confirmation using polling.\n * Shared by both signAndSubmitTransaction and runTransactionInner.\n */\n async submitAndConfirmTransaction(signedTx, connection, options) {\n var _a, _b, _c, _d;\n const sig = await connection.sendRawTransaction(signedTx.serialize(), {\n preflightCommitment: 'confirmed'\n });\n // Wait for confirmation using polling\n const startTime = Date.now();\n const timeoutMs = 10 * 1000; // 10 seconds\n while (true) {\n const st = await connection.getSignatureStatus(sig);\n if ((_a = st === null || st === void 0 ? void 0 : st.value) === null || _a === void 0 ? void 0 : _a.err) {\n // Transaction confirmed but failed on-chain — fetch logs for a readable error\n const txInfo = await connection.getTransaction(sig, {\n maxSupportedTransactionVersion: 0,\n commitment: 'confirmed'\n });\n const logMessages = (_b = txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta) === null || _b === void 0 ? void 0 : _b.logMessages;\n const errorMessage = logMessages ? JSON.stringify(logMessages) : JSON.stringify((_c = st === null || st === void 0 ? void 0 : st.value) === null || _c === void 0 ? void 0 : _c.err);\n throw new Error(`Transaction failed: ${errorMessage}`);\n }\n if (((_d = st === null || st === void 0 ? void 0 : st.value) === null || _d === void 0 ? void 0 : _d.confirmationStatus) === 'confirmed') {\n break;\n }\n // Check if we've exceeded the timeout\n if (Date.now() - startTime > timeoutMs) {\n throw new Error(`Transaction confirmation timeout after ${timeoutMs / 1000} seconds`);\n }\n await new Promise(resolve => setTimeout(resolve, 500));\n }\n // Optionally fetch transaction info\n let txInfo = null;\n if (options === null || options === void 0 ? void 0 : options.fetchTxInfo) {\n txInfo = await connection.getTransaction(sig, {\n maxSupportedTransactionVersion: 0,\n commitment: 'confirmed'\n });\n }\n return { signature: sig, txInfo };\n }\n requireSupportedNetwork(network) {\n const networkName = network === null || network === void 0 ? void 0 : network.trim();\n if (!networkName) {\n throw new Error(`Supported sol.network is required for Solana transaction submission; expected one of: ${SUPPORTED_SOLANA_NETWORKS.join(', ')}.`);\n }\n if (!SUPPORTED_SOLANA_NETWORK_SET.has(networkName)) {\n throw new Error(`Unsupported Solana network \"${networkName}\". Supported networks: ${SUPPORTED_SOLANA_NETWORKS.join(', ')}.`);\n }\n return networkName;\n }\n getRpcUrl() {\n var _a;\n const explicitRpcUrl = (_a = this.rpcUrl) === null || _a === void 0 ? void 0 : _a.trim();\n if (explicitRpcUrl) {\n return explicitRpcUrl;\n }\n throw new Error('Solana RPC URL is required for server keypair transaction submission; pass an explicit rpcUrl when creating SolanaKeypairProvider.');\n }\n /* ----------------------------------------------------------- *\n * Transaction runner\n * ----------------------------------------------------------- */\n async runTransaction(_evm, sol, opts) {\n if (!sol)\n throw new Error('Solana transaction data required');\n const kp = this.keypair;\n this.requireSupportedNetwork(sol.network);\n const rpcUrl = this.getRpcUrl();\n // Helper for duck typing - checks if transaction is legacy Transaction vs VersionedTransaction\n const isLegacyTx = (tx) => {\n return 'recentBlockhash' in tx && !('message' in tx && 'staticAccountKeys' in tx.message);\n };\n const wallet = {\n publicKey: kp.publicKey,\n signTransaction: async (tx) => {\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n if (isLegacyTx(tx)) {\n tx.partialSign(kp);\n }\n else {\n tx.sign([kp]);\n }\n return tx;\n },\n signAllTransactions: async (txs) => txs.map((t) => {\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n if (isLegacyTx(t)) {\n t.partialSign(kp);\n }\n else {\n t.sign([kp]);\n }\n return t;\n }),\n };\n /* de-dupe remaining accounts */\n const deduped = (() => {\n const fin = [];\n for (const acc of convertRemainingAccounts(sol.txArgs[0].remainingAccounts)) {\n const ex = fin.find((x) => x.pubkey.equals(acc.pubkey));\n if (ex) {\n ex.isSigner || (ex.isSigner = acc.isSigner);\n ex.isWritable || (ex.isWritable = acc.isWritable);\n }\n else\n fin.push(acc);\n }\n return fin;\n })();\n let retries = 0;\n let didPass = false;\n let delay = 1000;\n let toReturn = null;\n let errorMessage = \"\";\n while (retries < 5) {\n try {\n toReturn = await this.runTransactionInner(sol, opts, wallet, kp, deduped, rpcUrl);\n didPass = true;\n break;\n }\n catch (error) {\n if (isPermanentPresignedTransactionError(error)) {\n throw error;\n }\n console.log(\"Error building and sending transaction on retry:\", retries, error);\n await new Promise(resolve => setTimeout(resolve, delay));\n // Exponential backoff\n delay *= 1.5;\n retries++;\n errorMessage = error.message || JSON.stringify(error, null, 2);\n }\n }\n if (!didPass) {\n throw new Error(`Failed to send transaction after 5 retries: ${errorMessage}`);\n }\n return toReturn;\n }\n async runTransactionInner(sol, opts, wallet, kp, deduped, rpcUrl) {\n var _a, _b, _c;\n const connection = new Connection(rpcUrl, 'confirmed');\n const anchorProvider = new anchor.AnchorProvider(connection, wallet, anchor.AnchorProvider.defaultOptions());\n const app_id = sol.appId;\n if (!app_id)\n throw new Error('app_id missing');\n // When the server has co-signed a transaction (CPI attestation),\n // deserialize it and just add the wallet signature instead of\n // building from components.\n let tx;\n let blockhash;\n let lastValidBlockHeight;\n if (sol.signedTransaction) {\n tx = VersionedTransaction.deserialize(Buffer.from(sol.signedTransaction, 'base64'));\n validatePresignedSignedTransaction(tx, sol);\n blockhash = tx.message.recentBlockhash;\n const isValid = await connection.isBlockhashValid(blockhash, { commitment: 'confirmed' });\n if (!isValid.value) {\n throw new Error(`${PRESIGNED_BLOCKHASH_ERROR}; request a fresh server-built transaction.`);\n }\n lastValidBlockHeight = 0;\n }\n else {\n assertAllowedServerPreInstructions(sol.preInstructions);\n const result = await buildSetDocumentsTransaction(connection, sol.txArgs[0].idl, anchorProvider, kp.publicKey, {\n app_id,\n documents: sol.txArgs[0].setDocumentData,\n delete_paths: sol.txArgs[0].deletePaths,\n txData: sol.txArgs[0].txData\n }, deduped, sol.lutKey, sol.preInstructions, false, sol.additionalLutAddresses);\n tx = result.tx;\n blockhash = result.blockhash;\n lastValidBlockHeight = result.lastValidBlockHeight;\n }\n // Helper for duck typing - checks if transaction is legacy Transaction vs VersionedTransaction\n const isLegacyTx = (t) => {\n return 'recentBlockhash' in t && !('message' in t && 'staticAccountKeys' in t.message);\n };\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n if (isLegacyTx(tx)) {\n if (!sol.signedTransaction) {\n tx.recentBlockhash = blockhash;\n tx.lastValidBlockHeight = lastValidBlockHeight;\n tx.feePayer = kp.publicKey;\n }\n tx.partialSign(kp);\n }\n else {\n if (!sol.signedTransaction) {\n tx.message.recentBlockhash = blockhash;\n }\n tx.sign([kp]);\n }\n // 3️⃣ Optional priority-fee instruction. Pre-signed transactions are\n // immutable at this point; preserve their exact message and skip estimation.\n if (!sol.signedTransaction) {\n const rawUnsigned = tx.serialize({ requireAllSignatures: false });\n const microLamports = await fetchPriorityFee(connection.rpcEndpoint, rawUnsigned);\n if (microLamports != null) {\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n if (isLegacyTx(tx)) {\n tx.instructions.unshift(ComputeBudgetProgram.setComputeUnitPrice({ microLamports }));\n tx.partialSign(kp);\n }\n else {\n const roundTwo = await buildSetDocumentsTransaction(connection, sol.txArgs[0].idl, anchorProvider, kp.publicKey, {\n app_id,\n documents: sol.txArgs[0].setDocumentData,\n delete_paths: sol.txArgs[0].deletePaths,\n txData: sol.txArgs[0].txData\n }, deduped, sol.lutKey, [ComputeBudgetProgram.setComputeUnitPrice({ microLamports }), ...sol.preInstructions], false, sol.additionalLutAddresses);\n tx = roundTwo.tx;\n blockhash = roundTwo.blockhash;\n lastValidBlockHeight = roundTwo.lastValidBlockHeight;\n tx.message.recentBlockhash = blockhash;\n tx.sign([kp]);\n }\n }\n }\n if ((opts === null || opts === void 0 ? void 0 : opts.shouldSubmitTx) === false) {\n return { signedTransaction: tx, blockNumber: 0, gasUsed: '0', data: '' };\n }\n // Submit and confirm using shared helper\n const { signature, txInfo } = await this.submitAndConfirmTransaction(tx, connection, { fetchTxInfo: true });\n return {\n transactionSignature: signature,\n blockNumber: (_a = txInfo === null || txInfo === void 0 ? void 0 : txInfo.slot) !== null && _a !== void 0 ? _a : 0,\n gasUsed: (_c = (_b = txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta) === null || _b === void 0 ? void 0 : _b.fee.toString()) !== null && _c !== void 0 ? _c : '0',\n data: txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta,\n };\n }\n /* ----------------------------------------------------------- */\n async getNativeMethods() {\n return { keypair: this.keypair };\n }\n}\n//# sourceMappingURL=solana-keypair-provider.js.map","import * as crypto from 'crypto';\n/**\n * Server-side OffchainAuthProvider wrapper for the poofnet environment.\n *\n * For signMessage, this generates a mock signature using SHA-256 hashing.\n * This is used for offchain transaction signing.\n */\nexport class OffchainAuthProvider {\n constructor(wrappedProvider) {\n this.wrappedProvider = wrappedProvider;\n }\n async login() {\n return this.wrappedProvider.login();\n }\n async logout() {\n return this.wrappedProvider.logout();\n }\n async restoreSession() {\n return this.wrappedProvider.restoreSession();\n }\n async getNativeMethods() {\n return this.wrappedProvider.getNativeMethods();\n }\n async signMessage(message) {\n // Delegate to wrapped provider for real signing\n return this.wrappedProvider.signMessage(message);\n }\n async signMessageMock(message) {\n // Generate mock signature (SHA-256 hash of message, base64 encoded)\n // This is used for offchain transaction signing\n const hash = crypto.createHash('sha256').update(message).digest('base64');\n return hash;\n }\n async signTransaction(transaction) {\n throw new Error('Poofnet does not support real Solana transactions. Deploy your project to mainnet to use this feature.');\n }\n /**\n * Sign and submit transaction - not supported in poofnet environment.\n * See the real providers (PhantomWalletProvider, PrivyWalletProvider, SolanaKeypairProvider)\n * for the full implementation with blockhash handling and feePayer support.\n */\n async signAndSubmitTransaction(_transaction, _feePayer) {\n throw new Error('Poofnet does not support real Solana transactions. Deploy your project to mainnet to use this feature.');\n }\n async runTransaction(evmTransactionData, solTransactionData, options) {\n return this.wrappedProvider.runTransaction(evmTransactionData, solTransactionData, options);\n }\n}\n//# sourceMappingURL=offchain-auth-provider.js.map","import { getConfig } from '@bounded-sh/core';\nimport { SolanaKeypairProvider } from './providers/solana-keypair-provider';\nimport { OffchainAuthProvider } from './providers/offchain-auth-provider';\nlet currentAuthProvider = null;\nexport async function getAuthProvider() {\n var _a;\n const config = await getConfig();\n if (currentAuthProvider) {\n // If provider exists but chain is \"offchain\" and it's not already wrapped, rewrap it\n if (config.chain === \"offchain\" && !(currentAuthProvider instanceof OffchainAuthProvider)) {\n currentAuthProvider = new OffchainAuthProvider(currentAuthProvider);\n }\n return currentAuthProvider;\n }\n currentAuthProvider = await matchAuthProvider((_a = config.rpcUrl) !== null && _a !== void 0 ? _a : null);\n // Wrap with OffchainAuthProvider for offchain chain\n if (config.chain === \"offchain\") {\n currentAuthProvider = new OffchainAuthProvider(currentAuthProvider);\n }\n return currentAuthProvider;\n}\nexport async function matchAuthProvider(rpcUrl) {\n return new SolanaKeypairProvider(rpcUrl);\n}\n//# sourceMappingURL=index.js.map","import { getAuthProvider } from './auth';\nimport { init as configInit } from '@bounded-sh/core';\nlet authProviderInstance = null;\nexport async function init(newConfig) {\n // Initialize config first so getAuthProvider can access it\n // Server-side skips backend init since it already has all needed config\n await configInit(Object.assign(Object.assign({}, newConfig), { isServer: true, skipBackendInit: true }));\n // Get the auth provider (which will wrap it if chain is \"offchain\")\n authProviderInstance = await getAuthProvider();\n // Update config with the wrapped provider\n await configInit(Object.assign(Object.assign({}, newConfig), { authProvider: authProviderInstance, isServer: true, skipBackendInit: true }));\n}\n//# sourceMappingURL=global.js.map","import { getIdToken as getIdTokenCore } from '@bounded-sh/core';\n// Wrapper for getIdToken - passes isServer=true for server-side usage\nexport async function getIdToken() {\n return getIdTokenCore(true);\n}\n//# sourceMappingURL=utils.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { Keypair } from '@solana/web3.js';\nimport bs58 from 'bs58';\nimport { getConfig, get as coreGet, getMany as coreGetMany, set as coreSet, setMany as coreSetMany, setFile as coreSetFile, getFiles as coreGetFiles, search as coreSearch, runQuery as coreRunQuery, runQueryMany as coreRunQueryMany, runExpression as coreRunExpression, runExpressionMany as coreRunExpressionMany, count as coreCount, aggregate as coreAggregate, queryAggregate as coreQueryAggregate, subscribe as coreSubscribe, functions as coreFunctions, live as coreLive, ServerSessionManager, } from '@bounded-sh/core';\nimport { SolanaKeypairProvider } from './auth/providers/solana-keypair-provider';\nimport { OffchainAuthProvider } from './auth/providers/offchain-auth-provider';\n/* ------------------------------------------------------------------ */\n/* Keypair parsing */\n/* ------------------------------------------------------------------ */\nfunction parseKeypair(secret) {\n const trimmed = secret.trim();\n try {\n const secretKey = trimmed.startsWith('[')\n ? Uint8Array.from(JSON.parse(trimmed))\n : bs58.decode(trimmed);\n return Keypair.fromSecretKey(secretKey);\n }\n catch (_a) {\n throw new Error('Invalid keypair: must be base58 or JSON array.');\n }\n}\n/**\n * Whether a JWT is expired or within 60s of expiry (or unparseable). Used to\n * decide if the wallet should re-sign for a fresh token. Server-only (Node\n * Buffer); a keypair-backed session can always re-sign, so this is safe to be\n * conservative about.\n */\nfunction jwtExpiringSoon(token) {\n if (!token)\n return true;\n try {\n const part = token.split('.')[1];\n const json = Buffer.from(part.replace(/-/g, '+').replace(/_/g, '/'), 'base64').toString('utf8');\n const exp = JSON.parse(json).exp;\n if (!exp)\n return false;\n return Date.now() > exp * 1000 - 60000;\n }\n catch (_a) {\n return true;\n }\n}\n/* ------------------------------------------------------------------ */\n/* WalletClient */\n/* ------------------------------------------------------------------ */\nexport class WalletClient {\n constructor(provider, sessionManager, address) {\n this.provider = provider;\n this.sessionManager = sessionManager;\n this.address = address;\n this.live = {\n intent: (roomPath, intent, opts = {}) => coreLive.intent(roomPath, intent, this.mergeLiveIntentOptions(opts)),\n status: (roomPath, opts = {}) => coreLive.status(roomPath, Object.assign(Object.assign({}, opts), { headers: this.sanitizeHeaders(opts.headers) })),\n };\n }\n /* ---- Auth override helpers ---- */\n buildOverrides() {\n return {\n authProvider: this.provider,\n _getAuthHeaders: async () => {\n let s = await this.sessionManager.getSession();\n // Keypair-backed session: if the cached token is expired/near-expiry,\n // re-sign for a fresh one (we always hold the key). Keeps long-lived WS\n // subscriptions authenticated across reconnects, and stops one-shot reads\n // from sending a stale token.\n if (jwtExpiringSoon(s.idToken)) {\n this.sessionManager.clearSession();\n s = await this.sessionManager.getSession();\n }\n return { Authorization: `Bearer ${s.idToken}` };\n },\n _clearAuth: async () => {\n this.sessionManager.clearSession();\n },\n _walletAddress: this.address,\n };\n }\n /** Strip Authorization from caller headers to prevent overriding wallet token */\n sanitizeHeaders(headers) {\n if (!headers)\n return undefined;\n const _a = headers, { Authorization, authorization } = _a, rest = __rest(_a, [\"Authorization\", \"authorization\"]);\n return Object.keys(rest).length > 0 ? rest : undefined;\n }\n mergeSetOverrides(opts) {\n var _a;\n const ovr = this.buildOverrides();\n return Object.assign(Object.assign({}, opts), { _overrides: Object.assign(Object.assign({}, opts === null || opts === void 0 ? void 0 : opts._overrides), { headers: this.sanitizeHeaders((_a = opts === null || opts === void 0 ? void 0 : opts._overrides) === null || _a === void 0 ? void 0 : _a.headers), authProvider: ovr.authProvider, _getAuthHeaders: ovr._getAuthHeaders, _clearAuth: ovr._clearAuth }) });\n }\n mergeReadOverrides(existing) {\n const ovr = this.buildOverrides();\n return Object.assign(Object.assign({}, existing), { headers: this.sanitizeHeaders(existing === null || existing === void 0 ? void 0 : existing.headers), _getAuthHeaders: ovr._getAuthHeaders, _clearAuth: ovr._clearAuth, _walletAddress: ovr._walletAddress });\n }\n mergeLiveIntentOptions(opts) {\n var _a;\n const ovr = this.buildOverrides();\n const merged = Object.assign(Object.assign({}, opts), { headers: this.sanitizeHeaders(opts === null || opts === void 0 ? void 0 : opts.headers), _overrides: Object.assign(Object.assign({}, opts === null || opts === void 0 ? void 0 : opts._overrides), { headers: this.sanitizeHeaders((_a = opts === null || opts === void 0 ? void 0 : opts._overrides) === null || _a === void 0 ? void 0 : _a.headers), _getAuthHeaders: ovr._getAuthHeaders, _clearAuth: ovr._clearAuth, _walletAddress: ovr._walletAddress }) });\n return merged;\n }\n /* ---- Data operations ---- */\n async set(path, document, options) {\n return coreSet(path, document, this.mergeSetOverrides(options));\n }\n async setMany(many, options) {\n return coreSetMany(many, this.mergeSetOverrides(options));\n }\n async setFile(path, file, options) {\n return coreSetFile(path, file, { _overrides: this.mergeReadOverrides(options === null || options === void 0 ? void 0 : options._overrides) });\n }\n async get(path, opts) {\n return coreGet(path, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async getMany(paths, opts) {\n return coreGetMany(paths, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides() }));\n }\n async getFiles(path, options) {\n return coreGetFiles(path, { _overrides: this.mergeReadOverrides(options === null || options === void 0 ? void 0 : options._overrides) });\n }\n async search(path, query, opts = {}) {\n return coreSearch(path, query, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async runQuery(absolutePath, queryName, queryArgs, opts) {\n return coreRunQuery(absolutePath, queryName, queryArgs, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async runQueryMany(many, opts) {\n return coreRunQueryMany(many, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async runExpression(expression, queryArgs, options) {\n return coreRunExpression(expression, queryArgs, Object.assign(Object.assign({}, options), { _overrides: this.mergeReadOverrides(options === null || options === void 0 ? void 0 : options._overrides) }));\n }\n async runExpressionMany(many) {\n const ovr = this.mergeReadOverrides();\n return coreRunExpressionMany(many.map(m => (Object.assign(Object.assign({}, m), { _overrides: ovr }))));\n }\n async count(path, opts = {}) {\n return coreCount(path, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async aggregate(path, operation, opts = {}) {\n return coreAggregate(path, operation, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async queryAggregate(path, spec, opts = {}) {\n return coreQueryAggregate(path, spec, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n /**\n * Subscribe to real-time updates as THIS wallet's identity. Unlike the global\n * `subscribe`, this needs no `BOUNDED_PRIVATE_KEY` env var — the WS connection\n * authenticates with the wallet's own session (so read rules see the right\n * principal), and is scoped to its own connection so it never crosses another\n * identity. Accepts a bare callback or `{ onData, onError, filter, ... }`.\n * Returns an async unsubscribe.\n */\n async subscribe(path, options) {\n const opts = typeof options === 'function' ? { onData: options } : Object.assign({}, options);\n const ovr = this.buildOverrides();\n return coreSubscribe(path, Object.assign(Object.assign({}, opts), { _overrides: {\n _getAuthHeaders: ovr._getAuthHeaders,\n _clearAuth: ovr._clearAuth,\n _walletAddress: ovr._walletAddress,\n } }));\n }\n /**\n * Invoke a deployed Bounded Function AS this wallet's identity. Unlike the\n * top-level `functions.invoke`, this needs no `BOUNDED_PRIVATE_KEY` env var —\n * the dispatcher sees the wallet's verified session, so the function's `auth`\n * rule + `ctx.user` reflect this client. Returns the function's JSON; throws\n * `FunctionInvokeError` on 401/403/404/503.\n */\n async invoke(name, args = {}, opts = {}) {\n const ovr = this.buildOverrides();\n return coreFunctions.invoke(name, args, Object.assign(Object.assign({}, opts), { _overrides: { _getAuthHeaders: ovr._getAuthHeaders } }));\n }\n /* ---- Signing operations (use provider directly) ---- */\n async signMessage(message) {\n return this.provider.signMessage(message);\n }\n async signTransaction(transaction) {\n return this.provider.signTransaction(transaction);\n }\n async signAndSubmitTransaction(transaction, feePayer) {\n return this.provider.signAndSubmitTransaction(transaction, feePayer);\n }\n}\n/**\n * Create a self-contained wallet client bound to a specific keypair.\n * Each client has its own auth session — no global state is mutated.\n *\n * @example\n * ```ts\n * const vault = await createWalletClient({ keypair: process.env.VAULT_KEY });\n * await vault.set('markets/123', data);\n * ```\n */\nexport async function createWalletClient(opts) {\n var _a;\n const kp = parseKeypair(opts.keypair);\n const config = await getConfig();\n let provider = new SolanaKeypairProvider((_a = config.rpcUrl) !== null && _a !== void 0 ? _a : null, kp);\n if (config.chain === 'offchain') {\n provider = new OffchainAuthProvider(provider);\n }\n const sessionManager = ServerSessionManager.forKeypair(kp);\n // Eagerly authenticate so failures surface immediately\n await sessionManager.getSession();\n return new WalletClient(provider, sessionManager, kp.publicKey.toBase58());\n}\n//# sourceMappingURL=wallet-client.js.map","// ---------------------------------------------------------------------------\n// webhooks.ts -- Verify signed inbound mutation webhooks.\n//\n// The Bounded realtime worker fires outbound webhooks for declared\n// collections after a mutation commits, signed with a platform Ed25519 private\n// key. This module verifies those signatures on the receiving server.\n//\n// verifyWebhook():\n// 1. Fetches the platform's hosted public keys (well-known endpoint),\n// cached in-memory with a TTL.\n// 2. Picks the key matching the X-Bounded-Key-Id header.\n// 3. Verifies the Ed25519 signature (X-Bounded-Signature) over the RAW body.\n// 4. Checks the X-Bounded-Timestamp is within an allowed skew.\n// 5. Rejects exact signed-delivery replays within the skew window.\n// 6. Returns the parsed, typed payload — or throws.\n//\n// Verification uses WebCrypto (globalThis.crypto.subtle), available natively in\n// Node 18+, Bun, Deno, Cloudflare Workers, and modern browsers.\n// ---------------------------------------------------------------------------\nimport { getWebhookKeysUrl } from \"@bounded-sh/core\";\n// Default to PRODUCTION keys so an omitted keysUrl is production-safe (audit\n// SDK LOW-7). Staging receivers must pass keysUrl explicitly.\nexport const DEFAULT_WEBHOOK_KEYS_URL = \"https://realtime.bounded.sh/.well-known/bounded-webhook-keys.json\";\nconst DEFAULT_MAX_SKEW_SECONDS = 300;\nconst DEFAULT_CACHE_TTL_MS = 300000;\nexport class WebhookVerificationError extends Error {\n constructor(message) {\n super(message);\n this.name = \"WebhookVerificationError\";\n }\n}\nfunction getHeader(headers, name) {\n var _a;\n if (headers && typeof headers.get === \"function\") {\n return headers.get(name);\n }\n const lower = name.toLowerCase();\n const obj = headers;\n for (const key of Object.keys(obj)) {\n if (key.toLowerCase() === lower) {\n const value = obj[key];\n return Array.isArray(value) ? (_a = value[0]) !== null && _a !== void 0 ? _a : null : value !== null && value !== void 0 ? value : null;\n }\n }\n return null;\n}\n// ---------------------------------------------------------------------------\n// Base64\n// ---------------------------------------------------------------------------\nfunction base64ToBytes(b64) {\n const binary = typeof Buffer !== \"undefined\"\n ? Buffer.from(b64, \"base64\").toString(\"binary\")\n : atob(b64);\n const buffer = new ArrayBuffer(binary.length);\n const bytes = new Uint8Array(buffer);\n for (let i = 0; i < binary.length; i++)\n bytes[i] = binary.charCodeAt(i);\n return bytes;\n}\nfunction utf8Bytes(text) {\n const encoded = new TextEncoder().encode(text);\n const buffer = new ArrayBuffer(encoded.length);\n const bytes = new Uint8Array(buffer);\n bytes.set(encoded);\n return bytes;\n}\nconst keyCache = new Map();\n/** Clear the in-memory key cache (mainly for tests). */\nexport function clearWebhookKeyCache() {\n keyCache.clear();\n}\nasync function loadKeys(keysUrl, cacheTtlMs, fetchImpl, now) {\n const cached = keyCache.get(keysUrl);\n if (cached && cached.expiresAt > now()) {\n return cached.keys;\n }\n let res;\n try {\n res = await fetchImpl(keysUrl);\n }\n catch (err) {\n throw new WebhookVerificationError(`Failed to fetch webhook keys from ${keysUrl}: ${err.message}`);\n }\n if (!res.ok) {\n throw new WebhookVerificationError(`Failed to fetch webhook keys from ${keysUrl}: HTTP ${res.status}`);\n }\n const body = (await res.json());\n if (!body || !Array.isArray(body.keys)) {\n throw new WebhookVerificationError(`Webhook keys endpoint ${keysUrl} returned an invalid payload.`);\n }\n keyCache.set(keysUrl, { keys: body.keys, expiresAt: now() + cacheTtlMs });\n return body.keys;\n}\n// ---------------------------------------------------------------------------\n// In-memory replay store (single-process receivers)\n// ---------------------------------------------------------------------------\n/**\n * A simple in-memory {@link WebhookReplayStore}. Records seen event ids until\n * their skew-window expiry and lazily evicts expired entries. Suitable for a\n * single-process receiver; use a shared store (Redis, KV, a DB unique\n * constraint) for multi-instance deployments.\n */\nexport class InMemoryReplayStore {\n constructor() {\n this.seen = new Map();\n }\n checkAndRecord(id, expiresAtMs) {\n const now = Date.now();\n // Opportunistic eviction of expired entries to bound memory.\n if (this.seen.size > 0) {\n for (const [key, exp] of this.seen) {\n if (exp <= now)\n this.seen.delete(key);\n }\n }\n const existing = this.seen.get(id);\n if (existing !== undefined && existing > now) {\n return true; // replay\n }\n this.seen.set(id, expiresAtMs);\n return false;\n }\n /** Clear all recorded ids (mainly for tests). */\n clear() {\n this.seen.clear();\n }\n}\nconst defaultReplayStore = new InMemoryReplayStore();\n/** Clear the default in-memory replay cache (mainly for tests). */\nexport function clearWebhookReplayCache() {\n defaultReplayStore.clear();\n}\n// ---------------------------------------------------------------------------\n// verifyWebhook\n// ---------------------------------------------------------------------------\n/**\n * Verify a signed inbound webhook and return its typed payload.\n *\n * @param rawBody The exact raw request body string the platform signed. Must be\n * the unparsed bytes — re-serializing parsed JSON may not match byte-for-byte.\n * @param headers The inbound request headers (a Headers instance or a plain\n * object; case-insensitive).\n * @param opts Optional overrides (keys URL, skew, cache TTL, fetch).\n * @returns The parsed, validated {@link WebhookPayload}.\n * @throws {WebhookVerificationError} if anything fails verification.\n */\nexport async function verifyWebhook(rawBody, headers, opts = {}) {\n var _a, _b, _c, _d, _e, _f;\n // Resolution order: explicit opts.keysUrl > the configured Bounded network's\n // hosted keys (so a staging receiver verifies staging-signed deliveries\n // without passing keysUrl) > the production default (fail-closed when the\n // network is unknown — audit SDK LOW-7).\n const keysUrl = (_b = (_a = opts.keysUrl) !== null && _a !== void 0 ? _a : getWebhookKeysUrl()) !== null && _b !== void 0 ? _b : DEFAULT_WEBHOOK_KEYS_URL;\n const maxSkew = (_c = opts.maxSkewSeconds) !== null && _c !== void 0 ? _c : DEFAULT_MAX_SKEW_SECONDS;\n const cacheTtlMs = (_d = opts.cacheTtlMs) !== null && _d !== void 0 ? _d : DEFAULT_CACHE_TTL_MS;\n const fetchImpl = (_e = opts.fetchImpl) !== null && _e !== void 0 ? _e : globalThis.fetch;\n const now = (_f = opts.now) !== null && _f !== void 0 ? _f : Date.now;\n if (typeof fetchImpl !== \"function\") {\n throw new WebhookVerificationError(\"No fetch implementation available; pass opts.fetchImpl.\");\n }\n const signature = getHeader(headers, \"X-Bounded-Signature\");\n const keyId = getHeader(headers, \"X-Bounded-Key-Id\");\n const timestampHeader = getHeader(headers, \"X-Bounded-Timestamp\");\n if (!signature)\n throw new WebhookVerificationError(\"Missing X-Bounded-Signature header.\");\n if (!keyId)\n throw new WebhookVerificationError(\"Missing X-Bounded-Key-Id header.\");\n if (!timestampHeader)\n throw new WebhookVerificationError(\"Missing X-Bounded-Timestamp header.\");\n const headerTimestamp = Number(timestampHeader);\n if (!Number.isFinite(headerTimestamp)) {\n throw new WebhookVerificationError(\"Invalid X-Bounded-Timestamp header.\");\n }\n // Resolve the signing key by id.\n const keys = await loadKeys(keysUrl, cacheTtlMs, fetchImpl, now);\n let key = keys.find((k) => k.id === keyId);\n // Cache-miss tolerance: a freshly-rotated key may not be cached yet. Force a\n // single refresh before giving up.\n if (!key) {\n keyCache.delete(keysUrl);\n const refreshed = await loadKeys(keysUrl, cacheTtlMs, fetchImpl, now);\n key = refreshed.find((k) => k.id === keyId);\n }\n if (!key) {\n throw new WebhookVerificationError(`No public key found for key id \"${keyId}\".`);\n }\n if (key.alg !== \"ed25519\") {\n throw new WebhookVerificationError(`Unsupported key algorithm \"${key.alg}\".`);\n }\n // Verify the Ed25519 signature over the raw body.\n const subtle = (globalThis.crypto && globalThis.crypto.subtle);\n if (!subtle) {\n throw new WebhookVerificationError(\"WebCrypto (crypto.subtle) is not available.\");\n }\n let cryptoKey;\n try {\n cryptoKey = await subtle.importKey(\"raw\", base64ToBytes(key.publicKey), { name: \"Ed25519\" }, false, [\"verify\"]);\n }\n catch (err) {\n throw new WebhookVerificationError(`Failed to import Ed25519 public key: ${err.message}`);\n }\n const ok = await subtle.verify({ name: \"Ed25519\" }, cryptoKey, base64ToBytes(signature), utf8Bytes(rawBody));\n if (!ok) {\n throw new WebhookVerificationError(\"Webhook signature verification failed.\");\n }\n // Parse and shallow-validate the payload.\n let payload;\n try {\n payload = JSON.parse(rawBody);\n }\n catch (_g) {\n throw new WebhookVerificationError(\"Webhook body is not valid JSON.\");\n }\n if (!payload ||\n typeof payload.id !== \"string\" ||\n typeof payload.appId !== \"string\" ||\n typeof payload.path !== \"string\" ||\n (payload.operation !== \"create\" &&\n payload.operation !== \"update\" &&\n payload.operation !== \"delete\") ||\n typeof payload.timestamp !== \"number\" ||\n !Number.isFinite(payload.timestamp)) {\n throw new WebhookVerificationError(\"Webhook payload is missing required fields.\");\n }\n // Replay protection: the timestamp used for the skew window MUST be the SIGNED\n // payload.timestamp, not the unsigned X-Bounded-Timestamp header. An attacker\n // can swap the header freely without breaking the Ed25519 signature, so the\n // header alone is no replay bound. We also require the header to equal the\n // signed value so the (unsigned) header cannot diverge from what was signed.\n if (headerTimestamp !== payload.timestamp) {\n throw new WebhookVerificationError(\"X-Bounded-Timestamp header does not match the signed payload timestamp.\");\n }\n const nowSeconds = Math.floor(now() / 1000);\n if (Math.abs(nowSeconds - payload.timestamp) > maxSkew) {\n throw new WebhookVerificationError(`Webhook timestamp outside allowed skew of ${maxSkew}s (delta ${Math.abs(nowSeconds - payload.timestamp)}s).`);\n }\n if (opts.expectedAppId !== undefined && payload.appId !== opts.expectedAppId) {\n throw new WebhookVerificationError(`Webhook appId \"${payload.appId}\" does not match expected appId \"${opts.expectedAppId}\".`);\n }\n // Replay cache: reject a previously-seen signed delivery within the skew\n // window. The worker's payload.id is the document id/path, so using it alone\n // would reject legitimate rapid updates to the same document. The signature\n // is over the exact raw body and changes whenever the signed delivery changes.\n const replayStore = opts.replayStore === undefined ? defaultReplayStore : opts.replayStore;\n if (replayStore) {\n const expiresAtMs = (payload.timestamp + maxSkew) * 1000;\n const replayKey = `${keyId}:${signature}`;\n const replayed = await replayStore.checkAndRecord(replayKey, expiresAtMs);\n if (replayed) {\n throw new WebhookVerificationError(`Webhook replay detected for event id \"${payload.id}\".`);\n }\n }\n return payload;\n}\n//# sourceMappingURL=webhooks.js.map"],"names":["Keypair","Buffer","SystemProgram","Connection","convertRemainingAccounts","anchor","VersionedTransaction","buildSetDocumentsTransaction","ComputeBudgetProgram","crypto","getConfig","configInit","getIdTokenCore","this","coreLive","coreSet","coreSetMany","coreSetFile","coreGet","coreGetMany","coreGetFiles","coreSearch","coreRunQuery","coreRunQueryMany","coreRunExpression","coreRunExpressionMany","coreCount","coreAggregate","coreQueryAggregate","coreSubscribe","coreFunctions","ServerSessionManager","getWebhookKeysUrl"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,QAAQ,GAAG,CAAC,qBAAqB,CAAC,CAAC;AACzC,MAAM,yBAAyB,GAAG,wDAAwD;AAC1F,MAAM,uBAAuB,GAAG,6CAA6C;AAC7E,MAAM,sBAAsB,GAAG,6CAA6C;AAC5E,MAAM,sBAAsB,GAAG,6CAA6C;AAC5E,MAAM,iBAAiB,GAAG,kCAAkC;AAC5D,MAAM,yBAAyB,GAAG,CAAC,eAAe,EAAE,gBAAgB,EAAE,SAAS,CAAC;AAChF,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAC,yBAAyB,CAAC;AACvE,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;AAC3C,IAAI,uBAAuB;AAC3B,IAAI,sBAAsB;AAC1B,IAAI,sBAAsB;AAC1B,IAAI,iBAAiB;AACrB,CAAC,CAAC;AACF,MAAM,2BAA2B,GAAG,0BAA0B;AAC9D,MAAM,8BAA8B,GAAG,6BAA6B;AACpE,MAAM,kCAAkC,GAAG,IAAI,GAAG,CAAC;AACnD,IAAI,2BAA2B;AAC/B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S,EAAE,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC;AACzJ,IAAI;AACJ,IAAI,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC,aAAa,EAAE;AAClF,QAAQ,MAAM,IAAI,wBAAwB,CAAC,CAAC,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AACrI,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,KAAK,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAAC,WAAW;AAC9F,IAAI,IAAI,WAAW,EAAE;AACrB,QAAQ,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,SAAS,GAAG,OAAO,IAAI,IAAI;AAChE,QAAQ,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AACjD,QAAQ,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,cAAc,CAAC,SAAS,EAAE,WAAW,CAAC;AACjF,QAAQ,IAAI,QAAQ,EAAE;AACtB,YAAY,MAAM,IAAI,wBAAwB,CAAC,CAAC,sCAAsC,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACvG,QAAQ;AACR,IAAI;AACJ,IAAI,OAAO,OAAO;AAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../.rollup-tmp/global.js","../.rollup-tmp/auth/index.js","../.rollup-tmp/explicit-client-only.js","../.rollup-tmp/utils.js","../.rollup-tmp/auth/providers/solana-keypair-provider.js","../.rollup-tmp/auth/providers/offchain-auth-provider.js","../.rollup-tmp/wallet-client.js","../.rollup-tmp/webhooks.js"],"sourcesContent":["import { init as configInit } from '@bounded-sh/core';\nexport async function init(newConfig) {\n await configInit(Object.assign(Object.assign({}, newConfig), { authProvider: null, isServer: true, skipBackendInit: true }));\n}\n//# sourceMappingURL=global.js.map","export async function getAuthProvider() {\n throw new Error('Server auth providers are not process-global. Use createWalletClient({ keypair }) and call that client\\'s methods.');\n}\n//# sourceMappingURL=index.js.map","function explicitClientOnly(name) {\n throw new Error(`${name} is not available as a tarobase-server top-level auth operation. ` +\n 'Use createWalletClient({ keypair }) and call the returned client method.');\n}\nexport async function get(..._args) { explicitClientOnly('get'); }\nexport async function getMany(..._args) { explicitClientOnly('getMany'); }\nexport async function set(..._args) { explicitClientOnly('set'); }\nexport async function setMany(..._args) { explicitClientOnly('setMany'); }\nexport async function setFile(..._args) { explicitClientOnly('setFile'); }\nexport async function getFiles(..._args) { explicitClientOnly('getFiles'); }\nexport async function search(..._args) { explicitClientOnly('search'); }\nexport async function queryAggregate(..._args) { explicitClientOnly('queryAggregate'); }\nexport async function runQuery(..._args) { explicitClientOnly('runQuery'); }\nexport async function runQueryMany(..._args) { explicitClientOnly('runQueryMany'); }\nexport async function runExpression(..._args) { explicitClientOnly('runExpression'); }\nexport async function runExpressionMany(..._args) { explicitClientOnly('runExpressionMany'); }\nexport async function signMessage(..._args) { explicitClientOnly('signMessage'); }\nexport async function signTransaction(..._args) { explicitClientOnly('signTransaction'); }\nexport async function signAndSubmitTransaction(..._args) { explicitClientOnly('signAndSubmitTransaction'); }\nexport async function count(..._args) { explicitClientOnly('count'); }\nexport async function aggregate(..._args) { explicitClientOnly('aggregate'); }\nexport async function subscribe(..._args) { explicitClientOnly('subscribe'); }\nexport async function invokeFunction(..._args) { explicitClientOnly('invokeFunction'); }\nexport async function liveIntent(..._args) { explicitClientOnly('liveIntent'); }\nexport async function liveStatus(..._args) { explicitClientOnly('liveStatus'); }\nexport const functions = {\n invoke: async (..._args) => explicitClientOnly('functions.invoke'),\n};\nexport const live = {\n intent: async (..._args) => explicitClientOnly('live.intent'),\n status: async (..._args) => explicitClientOnly('live.status'),\n};\n//# sourceMappingURL=explicit-client-only.js.map","export async function getIdToken() {\n throw new Error('getIdToken is not available as a tarobase-server top-level auth operation. Use createWalletClient({ keypair }) and call the returned client methods.');\n}\n//# sourceMappingURL=utils.js.map","import { Buffer } from 'buffer';\nimport { ComputeBudgetProgram, Connection, SystemProgram, VersionedTransaction } from '@solana/web3.js';\nimport * as anchor from '@coral-xyz/anchor';\nimport nacl from 'tweetnacl';\nimport bs58 from 'bs58';\nimport { convertRemainingAccounts, buildSetDocumentsTransaction, } from '@bounded-sh/core';\nconst PRESIGNED_BLOCKHASH_ERROR = 'Server signedTransaction blockhash is stale or expired';\nconst BOUNDED_PROGRAM_MAINNET = 'poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZp';\nconst BOUNDED_PROGRAM_DEVNET = 'taro6CvKqwrYrDc16ufYgzQ2NZcyyVKStffbtudrhRu';\nconst COMPUTE_BUDGET_PROGRAM = 'ComputeBudget111111111111111111111111111111';\nconst SYSTEM_PROGRAM_ID = '11111111111111111111111111111111';\nconst SUPPORTED_SOLANA_NETWORKS = ['solana_devnet', 'solana_mainnet', 'surfnet'];\nconst SUPPORTED_SOLANA_NETWORK_SET = new Set(SUPPORTED_SOLANA_NETWORKS);\nconst ALLOWED_SERVER_TX_PROGRAMS = new Set([\n BOUNDED_PROGRAM_MAINNET,\n BOUNDED_PROGRAM_DEVNET,\n COMPUTE_BUDGET_PROGRAM,\n SYSTEM_PROGRAM_ID,\n]);\nconst SET_DOCUMENTS_DISCRIMINATOR = '79,46,72,73,24,79,66,245';\nconst SET_DOCUMENTS_V2_DISCRIMINATOR = '22,236,242,185,145,61,26,39';\nconst ALLOWED_BOUNDED_SET_DISCRIMINATORS = new Set([\n SET_DOCUMENTS_DISCRIMINATOR,\n SET_DOCUMENTS_V2_DISCRIMINATOR,\n]);\n/* ──────────────────────────────────────────────────────────\n * Helper – fetch getPriorityFeeEstimate\n * ──────────────────────────────────────────────────────── */\nasync function fetchPriorityFee(rpcEndpoint, rawUnsignedTxBuffer) {\n var _a, _b;\n try {\n const res = await fetch(rpcEndpoint, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: \"1\",\n method: \"getPriorityFeeEstimate\",\n params: [{\n transaction: bs58.encode(rawUnsignedTxBuffer), options: {\n recommended: true\n }\n }]\n })\n });\n const data = await res.json();\n const fee = (_b = (_a = data === null || data === void 0 ? void 0 : data.result) === null || _a === void 0 ? void 0 : _a.priorityFeeEstimate) !== null && _b !== void 0 ? _b : null;\n if (fee != null && fee > 0) {\n return Math.ceil(Number(fee) * 1.2);\n }\n console.warn(\"Priority-fee estimate returned no positive fee; skipping priority fee instruction\");\n return null;\n }\n catch (err) {\n console.warn(\"Priority-fee estimate failed; skipping priority fee instruction:\", err);\n return null;\n }\n}\nfunction isPresignedBlockhashError(error) {\n return typeof (error === null || error === void 0 ? void 0 : error.message) === 'string' && error.message.includes(PRESIGNED_BLOCKHASH_ERROR);\n}\nfunction isPermanentPresignedTransactionError(error) {\n return isPresignedBlockhashError(error) ||\n (typeof (error === null || error === void 0 ? void 0 : error.message) === 'string' && (error.message.startsWith('Server signedTransaction') ||\n error.message.startsWith('Server preInstruction')));\n}\nclass BorshCursor {\n constructor(data, offset) {\n this.data = data;\n this.offset = offset;\n }\n requireBytes(length, field) {\n if (this.offset + length > this.data.length) {\n throw new Error(`Server signedTransaction has malformed Bounded instruction data while reading ${field}`);\n }\n }\n readU8(field) {\n this.requireBytes(1, field);\n return this.data[this.offset++];\n }\n readU32(field) {\n this.requireBytes(4, field);\n const value = this.data[this.offset] |\n (this.data[this.offset + 1] << 8) |\n (this.data[this.offset + 2] << 16) |\n (this.data[this.offset + 3] << 24);\n this.offset += 4;\n return value >>> 0;\n }\n skip(length, field) {\n this.requireBytes(length, field);\n this.offset += length;\n }\n readString(field) {\n const length = this.readU32(`${field} length`);\n this.requireBytes(length, field);\n const raw = this.data.slice(this.offset, this.offset + length);\n this.offset += length;\n return Buffer.from(raw).toString('utf8');\n }\n skipBytes(field) {\n const length = this.readU32(`${field} length`);\n this.skip(length, field);\n }\n isAtEnd() {\n return this.offset === this.data.length;\n }\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 }\n if (normalized.endsWith('/')) {\n normalized = normalized.slice(0, -1);\n }\n return normalized;\n}\nfunction skipBoundedFieldValue(cursor) {\n const option = cursor.readU8('operation value option');\n if (option === 0)\n return;\n if (option !== 1) {\n throw new Error('Server signedTransaction has malformed Bounded field value option');\n }\n const variant = cursor.readU8('operation value variant');\n switch (variant) {\n case 0:\n case 1:\n cursor.skip(8, 'operation numeric value');\n return;\n case 2:\n cursor.skip(1, 'operation bool value');\n return;\n case 3:\n cursor.readString('operation string value');\n return;\n case 4:\n cursor.skip(32, 'operation address value');\n return;\n default:\n throw new Error(`Server signedTransaction has unsupported Bounded field value variant: ${variant}`);\n }\n}\nfunction skipBoundedFieldOperation(cursor) {\n cursor.readString('operation key');\n skipBoundedFieldValue(cursor);\n cursor.skip(1, 'operation kind');\n}\nfunction skipBoundedTxData(cursor, isV2) {\n cursor.readString('txData plugin function key');\n cursor.skipBytes('txData bytes');\n if (isV2) {\n cursor.skipBytes('txData raIndices');\n return;\n }\n const raIndexCount = cursor.readU32('txData raIndices length');\n cursor.skip(raIndexCount * 8, 'txData raIndices');\n}\nfunction parseBoundedSetDocumentsInstruction(data) {\n if (data.length < 8) {\n throw new Error('Server signedTransaction has malformed Bounded instruction data');\n }\n const discriminator = Array.from(data.slice(0, 8)).join(',');\n if (!ALLOWED_BOUNDED_SET_DISCRIMINATORS.has(discriminator)) {\n throw new Error('Server signedTransaction contains unsupported Bounded instruction');\n }\n const isV2 = discriminator === SET_DOCUMENTS_V2_DISCRIMINATOR;\n const cursor = new BorshCursor(data, 8);\n const appId = cursor.readString('appId');\n const documentPaths = [];\n const documentCount = cursor.readU32('documents length');\n for (let i = 0; i < documentCount; i++) {\n documentPaths.push(normalizeOnchainPath(cursor.readString('document path')));\n const operationCount = cursor.readU32('operations length');\n for (let j = 0; j < operationCount; j++) {\n skipBoundedFieldOperation(cursor);\n }\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 }\n const txDataCount = cursor.readU32('txData length');\n for (let i = 0; i < txDataCount; i++) {\n skipBoundedTxData(cursor, isV2);\n }\n const simulate = cursor.readU8('simulate');\n if (simulate !== 0 && simulate !== 1) {\n throw new Error('Server signedTransaction has malformed Bounded simulate flag');\n }\n if (!cursor.isAtEnd()) {\n throw new Error('Server signedTransaction has trailing Bounded instruction data');\n }\n return { appId, documentPaths, deletePaths };\n}\nfunction assertSamePathSet(expectedPaths, actualPaths) {\n const expected = new Set(expectedPaths.map(normalizeOnchainPath).filter(Boolean));\n const actual = new Set(actualPaths.map(normalizeOnchainPath).filter(Boolean));\n const missing = [...expected].filter(path => !actual.has(path));\n const extra = [...actual].filter(path => !expected.has(path));\n if (missing.length > 0 || extra.length > 0) {\n const details = [\n missing.length ? `missing paths: ${missing.join(', ')}` : '',\n extra.length ? `unexpected paths: ${extra.join(', ')}` : '',\n ].filter(Boolean).join('; ');\n throw new Error(`Server signedTransaction Bounded instruction paths do not match requested write paths (${details})`);\n }\n}\nfunction validatePresignedSignedTransaction(transaction, sol) {\n var _a, _b, _c, _d, _e, _f, _g;\n const accountKeys = transaction.message.staticAccountKeys;\n let boundedInstructionCount = 0;\n const actualWritePaths = [];\n for (const ix of transaction.message.compiledInstructions) {\n if (ix.programIdIndex >= accountKeys.length) {\n throw new Error('Server signedTransaction has program ID in lookup table (not allowed)');\n }\n const programId = accountKeys[ix.programIdIndex].toBase58();\n if (!ALLOWED_SERVER_TX_PROGRAMS.has(programId)) {\n throw new Error(`Server signedTransaction contains unauthorized program: ${programId}`);\n }\n const data = ix.data instanceof Uint8Array ? ix.data : Buffer.from((_a = ix.data) !== null && _a !== void 0 ? _a : []);\n if (programId === SYSTEM_PROGRAM_ID) {\n throw new Error('Server signedTransaction contains unauthorized System Program instruction');\n }\n if (programId === BOUNDED_PROGRAM_MAINNET || programId === BOUNDED_PROGRAM_DEVNET) {\n boundedInstructionCount += 1;\n const parsed = parseBoundedSetDocumentsInstruction(data);\n if (parsed.appId !== sol.appId) {\n throw new Error('Server signedTransaction Bounded instruction appId does not match configured appId');\n }\n actualWritePaths.push(...parsed.documentPaths, ...parsed.deletePaths);\n }\n }\n if (boundedInstructionCount !== 1) {\n throw new Error('Server signedTransaction must contain exactly one Bounded set-documents instruction');\n }\n const expectedWritePaths = [\n ...(((_d = (_c = (_b = sol.txArgs) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.setDocumentData) !== null && _d !== void 0 ? _d : []).map((doc) => doc.path)),\n ...((_g = (_f = (_e = sol.txArgs) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.deletePaths) !== null && _g !== void 0 ? _g : []),\n ];\n assertSamePathSet(expectedWritePaths, actualWritePaths);\n}\nfunction assertAllowedServerPreInstructions(preInstructions) {\n for (const [index, ix] of (preInstructions !== null && preInstructions !== void 0 ? preInstructions : []).entries()) {\n if (ix.programId.equals(SystemProgram.programId)) {\n throw new Error(`Server preInstruction[${index}] contains unauthorized System Program instruction`);\n }\n }\n}\nexport class SolanaKeypairProvider {\n constructor(rpcUrl, serverKeypair) {\n this.rpcUrl = rpcUrl;\n this.serverKeypair = serverKeypair;\n }\n get keypair() {\n if (!this.serverKeypair) {\n throw new Error('Server keypair is required; use createWalletClient({ keypair }) or pass a Keypair to SolanaKeypairProvider.');\n }\n return this.serverKeypair;\n }\n /* ----------------------------------------------------------- *\n * (Auth stubs – fill in later if needed)\n * ----------------------------------------------------------- */\n async login() { throw new Error('Not implemented'); }\n async restoreSession() { throw new Error('Not implemented'); }\n async logout() { throw new Error('Not implemented'); }\n /* ----------------------------------------------------------- *\n * Sign arbitrary message\n * ----------------------------------------------------------- */\n async signMessage(message) {\n const sig = nacl.sign.detached(new TextEncoder().encode(message), this.keypair.secretKey);\n return Buffer.from(sig).toString('base64');\n }\n /* ----------------------------------------------------------- *\n * Sign transaction\n * ----------------------------------------------------------- */\n async signTransaction(transaction) {\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n const isLegacyTransaction = 'recentBlockhash' in transaction && !('message' in transaction && 'staticAccountKeys' in transaction.message);\n if (isLegacyTransaction) {\n transaction.partialSign(this.keypair);\n }\n else {\n transaction.sign([this.keypair]);\n }\n return transaction;\n }\n /**\n * Signs and submits a Solana transaction to the network.\n *\n * This method handles blockhash and transaction confirmation automatically - you do NOT need to\n * set recentBlockhash or lastValidBlockHeight on the transaction before calling this method.\n * Requires an explicit RPC URL configured on the provider because this method has no\n * Solana transaction payload network to resolve.\n *\n * @param transaction - The transaction to sign and submit (Transaction or VersionedTransaction)\n * @param feePayer - Optional fee payer public key. If not provided and the transaction doesn't\n * already have a feePayer set, the keypair's public key will be used.\n * Useful for co-signing scenarios where a different account pays the fees.\n * @returns The transaction signature\n */\n async signAndSubmitTransaction(transaction, feePayer) {\n // 1. Get RPC URL and create connection\n const rpcUrl = this.getRpcUrl();\n const connection = new Connection(rpcUrl, 'confirmed');\n // 2. Get fresh blockhash and set it on the transaction before signing\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n const isLegacyTransaction = 'recentBlockhash' in transaction && !('message' in transaction && 'staticAccountKeys' in transaction.message);\n if (isLegacyTransaction) {\n const legacyTx = transaction;\n legacyTx.recentBlockhash = blockhash;\n legacyTx.lastValidBlockHeight = lastValidBlockHeight;\n // Set feePayer if not already set\n if (!legacyTx.feePayer) {\n legacyTx.feePayer = feePayer !== null && feePayer !== void 0 ? feePayer : this.keypair.publicKey;\n }\n }\n else {\n // VersionedTransaction\n const versionedTx = transaction;\n versionedTx.message.recentBlockhash = blockhash;\n // Note: VersionedTransaction feePayer is set in the message at creation time\n // and cannot be modified after creation\n }\n // 3. Sign the transaction\n const signedTx = await this.signTransaction(transaction);\n // 4. Submit and confirm using shared helper\n const { signature } = await this.submitAndConfirmTransaction(signedTx, connection);\n return signature;\n }\n /* ----------------------------------------------------------- *\n * Private Helpers\n * ----------------------------------------------------------- */\n /**\n * Submits a signed transaction and waits for confirmation using polling.\n * Shared by both signAndSubmitTransaction and runTransactionInner.\n */\n async submitAndConfirmTransaction(signedTx, connection, options) {\n var _a, _b, _c, _d;\n const sig = await connection.sendRawTransaction(signedTx.serialize(), {\n preflightCommitment: 'confirmed'\n });\n // Wait for confirmation using polling\n const startTime = Date.now();\n const timeoutMs = 10 * 1000; // 10 seconds\n while (true) {\n const st = await connection.getSignatureStatus(sig);\n if ((_a = st === null || st === void 0 ? void 0 : st.value) === null || _a === void 0 ? void 0 : _a.err) {\n // Transaction confirmed but failed on-chain — fetch logs for a readable error\n const txInfo = await connection.getTransaction(sig, {\n maxSupportedTransactionVersion: 0,\n commitment: 'confirmed'\n });\n const logMessages = (_b = txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta) === null || _b === void 0 ? void 0 : _b.logMessages;\n const errorMessage = logMessages ? JSON.stringify(logMessages) : JSON.stringify((_c = st === null || st === void 0 ? void 0 : st.value) === null || _c === void 0 ? void 0 : _c.err);\n throw new Error(`Transaction failed: ${errorMessage}`);\n }\n if (((_d = st === null || st === void 0 ? void 0 : st.value) === null || _d === void 0 ? void 0 : _d.confirmationStatus) === 'confirmed') {\n break;\n }\n // Check if we've exceeded the timeout\n if (Date.now() - startTime > timeoutMs) {\n throw new Error(`Transaction confirmation timeout after ${timeoutMs / 1000} seconds`);\n }\n await new Promise(resolve => setTimeout(resolve, 500));\n }\n // Optionally fetch transaction info\n let txInfo = null;\n if (options === null || options === void 0 ? void 0 : options.fetchTxInfo) {\n txInfo = await connection.getTransaction(sig, {\n maxSupportedTransactionVersion: 0,\n commitment: 'confirmed'\n });\n }\n return { signature: sig, txInfo };\n }\n requireSupportedNetwork(network) {\n const networkName = network === null || network === void 0 ? void 0 : network.trim();\n if (!networkName) {\n throw new Error(`Supported sol.network is required for Solana transaction submission; expected one of: ${SUPPORTED_SOLANA_NETWORKS.join(', ')}.`);\n }\n if (!SUPPORTED_SOLANA_NETWORK_SET.has(networkName)) {\n throw new Error(`Unsupported Solana network \"${networkName}\". Supported networks: ${SUPPORTED_SOLANA_NETWORKS.join(', ')}.`);\n }\n return networkName;\n }\n getRpcUrl() {\n var _a;\n const explicitRpcUrl = (_a = this.rpcUrl) === null || _a === void 0 ? void 0 : _a.trim();\n if (explicitRpcUrl) {\n return explicitRpcUrl;\n }\n throw new Error('Solana RPC URL is required for server keypair transaction submission; pass an explicit rpcUrl when creating SolanaKeypairProvider.');\n }\n /* ----------------------------------------------------------- *\n * Transaction runner\n * ----------------------------------------------------------- */\n async runTransaction(_evm, sol, opts) {\n if (!sol)\n throw new Error('Solana transaction data required');\n const kp = this.keypair;\n this.requireSupportedNetwork(sol.network);\n const rpcUrl = this.getRpcUrl();\n // Helper for duck typing - checks if transaction is legacy Transaction vs VersionedTransaction\n const isLegacyTx = (tx) => {\n return 'recentBlockhash' in tx && !('message' in tx && 'staticAccountKeys' in tx.message);\n };\n const wallet = {\n publicKey: kp.publicKey,\n signTransaction: async (tx) => {\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n if (isLegacyTx(tx)) {\n tx.partialSign(kp);\n }\n else {\n tx.sign([kp]);\n }\n return tx;\n },\n signAllTransactions: async (txs) => txs.map((t) => {\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n if (isLegacyTx(t)) {\n t.partialSign(kp);\n }\n else {\n t.sign([kp]);\n }\n return t;\n }),\n };\n /* de-dupe remaining accounts */\n const deduped = (() => {\n const fin = [];\n for (const acc of convertRemainingAccounts(sol.txArgs[0].remainingAccounts)) {\n const ex = fin.find((x) => x.pubkey.equals(acc.pubkey));\n if (ex) {\n ex.isSigner || (ex.isSigner = acc.isSigner);\n ex.isWritable || (ex.isWritable = acc.isWritable);\n }\n else\n fin.push(acc);\n }\n return fin;\n })();\n let retries = 0;\n let didPass = false;\n let delay = 1000;\n let toReturn = null;\n let errorMessage = \"\";\n while (retries < 5) {\n try {\n toReturn = await this.runTransactionInner(sol, opts, wallet, kp, deduped, rpcUrl);\n didPass = true;\n break;\n }\n catch (error) {\n if (isPermanentPresignedTransactionError(error)) {\n throw error;\n }\n console.log(\"Error building and sending transaction on retry:\", retries, error);\n await new Promise(resolve => setTimeout(resolve, delay));\n // Exponential backoff\n delay *= 1.5;\n retries++;\n errorMessage = error.message || JSON.stringify(error, null, 2);\n }\n }\n if (!didPass) {\n throw new Error(`Failed to send transaction after 5 retries: ${errorMessage}`);\n }\n return toReturn;\n }\n async runTransactionInner(sol, opts, wallet, kp, deduped, rpcUrl) {\n var _a, _b, _c;\n const connection = new Connection(rpcUrl, 'confirmed');\n const anchorProvider = new anchor.AnchorProvider(connection, wallet, anchor.AnchorProvider.defaultOptions());\n const app_id = sol.appId;\n if (!app_id)\n throw new Error('app_id missing');\n // When the server has co-signed a transaction (CPI attestation),\n // deserialize it and just add the wallet signature instead of\n // building from components.\n let tx;\n let blockhash;\n let lastValidBlockHeight;\n if (sol.signedTransaction) {\n tx = VersionedTransaction.deserialize(Buffer.from(sol.signedTransaction, 'base64'));\n validatePresignedSignedTransaction(tx, sol);\n blockhash = tx.message.recentBlockhash;\n const isValid = await connection.isBlockhashValid(blockhash, { commitment: 'confirmed' });\n if (!isValid.value) {\n throw new Error(`${PRESIGNED_BLOCKHASH_ERROR}; request a fresh server-built transaction.`);\n }\n lastValidBlockHeight = 0;\n }\n else {\n assertAllowedServerPreInstructions(sol.preInstructions);\n const result = await buildSetDocumentsTransaction(connection, sol.txArgs[0].idl, anchorProvider, kp.publicKey, {\n app_id,\n documents: sol.txArgs[0].setDocumentData,\n delete_paths: sol.txArgs[0].deletePaths,\n txData: sol.txArgs[0].txData\n }, deduped, sol.lutKey, sol.preInstructions, false, sol.additionalLutAddresses);\n tx = result.tx;\n blockhash = result.blockhash;\n lastValidBlockHeight = result.lastValidBlockHeight;\n }\n // Helper for duck typing - checks if transaction is legacy Transaction vs VersionedTransaction\n const isLegacyTx = (t) => {\n return 'recentBlockhash' in t && !('message' in t && 'staticAccountKeys' in t.message);\n };\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n if (isLegacyTx(tx)) {\n if (!sol.signedTransaction) {\n tx.recentBlockhash = blockhash;\n tx.lastValidBlockHeight = lastValidBlockHeight;\n tx.feePayer = kp.publicKey;\n }\n tx.partialSign(kp);\n }\n else {\n if (!sol.signedTransaction) {\n tx.message.recentBlockhash = blockhash;\n }\n tx.sign([kp]);\n }\n // 3️⃣ Optional priority-fee instruction. Pre-signed transactions are\n // immutable at this point; preserve their exact message and skip estimation.\n if (!sol.signedTransaction) {\n const rawUnsigned = tx.serialize({ requireAllSignatures: false });\n const microLamports = await fetchPriorityFee(connection.rpcEndpoint, rawUnsigned);\n if (microLamports != null) {\n // Use duck typing instead of instanceof to handle multiple @solana/web3.js versions\n if (isLegacyTx(tx)) {\n tx.instructions.unshift(ComputeBudgetProgram.setComputeUnitPrice({ microLamports }));\n tx.partialSign(kp);\n }\n else {\n const roundTwo = await buildSetDocumentsTransaction(connection, sol.txArgs[0].idl, anchorProvider, kp.publicKey, {\n app_id,\n documents: sol.txArgs[0].setDocumentData,\n delete_paths: sol.txArgs[0].deletePaths,\n txData: sol.txArgs[0].txData\n }, deduped, sol.lutKey, [ComputeBudgetProgram.setComputeUnitPrice({ microLamports }), ...sol.preInstructions], false, sol.additionalLutAddresses);\n tx = roundTwo.tx;\n blockhash = roundTwo.blockhash;\n lastValidBlockHeight = roundTwo.lastValidBlockHeight;\n tx.message.recentBlockhash = blockhash;\n tx.sign([kp]);\n }\n }\n }\n if ((opts === null || opts === void 0 ? void 0 : opts.shouldSubmitTx) === false) {\n return { signedTransaction: tx, blockNumber: 0, gasUsed: '0', data: '' };\n }\n // Submit and confirm using shared helper\n const { signature, txInfo } = await this.submitAndConfirmTransaction(tx, connection, { fetchTxInfo: true });\n return {\n transactionSignature: signature,\n blockNumber: (_a = txInfo === null || txInfo === void 0 ? void 0 : txInfo.slot) !== null && _a !== void 0 ? _a : 0,\n gasUsed: (_c = (_b = txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta) === null || _b === void 0 ? void 0 : _b.fee.toString()) !== null && _c !== void 0 ? _c : '0',\n data: txInfo === null || txInfo === void 0 ? void 0 : txInfo.meta,\n };\n }\n /* ----------------------------------------------------------- */\n async getNativeMethods() {\n return { keypair: this.keypair };\n }\n}\n//# sourceMappingURL=solana-keypair-provider.js.map","/**\n * Server-side OffchainAuthProvider wrapper for the poofnet environment.\n */\nexport class OffchainAuthProvider {\n constructor(wrappedProvider) {\n this.wrappedProvider = wrappedProvider;\n }\n async login() {\n return this.wrappedProvider.login();\n }\n async logout() {\n return this.wrappedProvider.logout();\n }\n async restoreSession() {\n return this.wrappedProvider.restoreSession();\n }\n async getNativeMethods() {\n return this.wrappedProvider.getNativeMethods();\n }\n async signMessage(message) {\n return this.wrappedProvider.signMessage(message);\n }\n async signTransaction(transaction) {\n throw new Error('Poofnet does not support real Solana transactions. Deploy your project to mainnet to use this feature.');\n }\n /**\n * Sign and submit transaction - not supported in poofnet environment.\n * See the real providers (PhantomWalletProvider, PrivyWalletProvider, SolanaKeypairProvider)\n * for the full implementation with blockhash handling and feePayer support.\n */\n async signAndSubmitTransaction(_transaction, _feePayer) {\n throw new Error('Poofnet does not support real Solana transactions. Deploy your project to mainnet to use this feature.');\n }\n async runTransaction(evmTransactionData, solTransactionData, options) {\n return this.wrappedProvider.runTransaction(evmTransactionData, solTransactionData, options);\n }\n}\n//# sourceMappingURL=offchain-auth-provider.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { Keypair } from '@solana/web3.js';\nimport bs58 from 'bs58';\nimport { getConfig, get as coreGet, getMany as coreGetMany, set as coreSet, setMany as coreSetMany, setFile as coreSetFile, getFiles as coreGetFiles, search as coreSearch, runQuery as coreRunQuery, runQueryMany as coreRunQueryMany, runExpression as coreRunExpression, runExpressionMany as coreRunExpressionMany, count as coreCount, aggregate as coreAggregate, queryAggregate as coreQueryAggregate, subscribe as coreSubscribe, functions as coreFunctions, live as coreLive, ServerSessionManager, } from '@bounded-sh/core';\nimport { SolanaKeypairProvider } from './auth/providers/solana-keypair-provider';\nimport { OffchainAuthProvider } from './auth/providers/offchain-auth-provider';\n/* ------------------------------------------------------------------ */\n/* Keypair parsing */\n/* ------------------------------------------------------------------ */\nfunction parseKeypair(secret) {\n const trimmed = secret.trim();\n try {\n const secretKey = trimmed.startsWith('[')\n ? Uint8Array.from(JSON.parse(trimmed))\n : bs58.decode(trimmed);\n return Keypair.fromSecretKey(secretKey);\n }\n catch (_a) {\n throw new Error('Invalid keypair: must be base58 or JSON array.');\n }\n}\n/**\n * Whether a JWT is expired or within 60s of expiry (or unparseable). Used to\n * decide if the wallet should re-sign for a fresh token. Server-only (Node\n * Buffer); a keypair-backed session can always re-sign, so this is safe to be\n * conservative about.\n */\nfunction jwtExpiringSoon(token) {\n if (!token)\n return true;\n try {\n const part = token.split('.')[1];\n const json = Buffer.from(part.replace(/-/g, '+').replace(/_/g, '/'), 'base64').toString('utf8');\n const exp = JSON.parse(json).exp;\n if (!exp)\n return false;\n return Date.now() > exp * 1000 - 60000;\n }\n catch (_a) {\n return true;\n }\n}\n/* ------------------------------------------------------------------ */\n/* WalletClient */\n/* ------------------------------------------------------------------ */\nexport class WalletClient {\n constructor(provider, sessionManager, address) {\n this.provider = provider;\n this.sessionManager = sessionManager;\n this.address = address;\n this.live = {\n intent: (roomPath, intent, opts = {}) => coreLive.intent(roomPath, intent, this.mergeLiveIntentOptions(opts)),\n status: (roomPath, opts = {}) => coreLive.status(roomPath, Object.assign(Object.assign({}, opts), { headers: this.sanitizeHeaders(opts.headers) })),\n };\n }\n /* ---- Auth override helpers ---- */\n buildOverrides() {\n return {\n authProvider: this.provider,\n _getAuthHeaders: async () => {\n let s = await this.sessionManager.getSession();\n // Keypair-backed session: if the cached token is expired/near-expiry,\n // re-sign for a fresh one (we always hold the key). Keeps long-lived WS\n // subscriptions authenticated across reconnects, and stops one-shot reads\n // from sending a stale token.\n if (jwtExpiringSoon(s.idToken)) {\n this.sessionManager.clearSession();\n s = await this.sessionManager.getSession();\n }\n return { Authorization: `Bearer ${s.idToken}` };\n },\n _clearAuth: async () => {\n this.sessionManager.clearSession();\n },\n _walletAddress: this.address,\n };\n }\n /** Strip Authorization from caller headers to prevent overriding wallet token */\n sanitizeHeaders(headers) {\n if (!headers)\n return undefined;\n const _a = headers, { Authorization, authorization } = _a, rest = __rest(_a, [\"Authorization\", \"authorization\"]);\n return Object.keys(rest).length > 0 ? rest : undefined;\n }\n mergeSetOverrides(opts) {\n var _a;\n const ovr = this.buildOverrides();\n return Object.assign(Object.assign({}, opts), { _overrides: Object.assign(Object.assign({}, opts === null || opts === void 0 ? void 0 : opts._overrides), { headers: this.sanitizeHeaders((_a = opts === null || opts === void 0 ? void 0 : opts._overrides) === null || _a === void 0 ? void 0 : _a.headers), authProvider: ovr.authProvider, _getAuthHeaders: ovr._getAuthHeaders, _clearAuth: ovr._clearAuth }) });\n }\n mergeReadOverrides(existing) {\n const ovr = this.buildOverrides();\n return Object.assign(Object.assign({}, existing), { headers: this.sanitizeHeaders(existing === null || existing === void 0 ? void 0 : existing.headers), _getAuthHeaders: ovr._getAuthHeaders, _clearAuth: ovr._clearAuth, _walletAddress: ovr._walletAddress });\n }\n mergeLiveIntentOptions(opts) {\n var _a;\n const ovr = this.buildOverrides();\n const merged = Object.assign(Object.assign({}, opts), { headers: this.sanitizeHeaders(opts === null || opts === void 0 ? void 0 : opts.headers), _overrides: Object.assign(Object.assign({}, opts === null || opts === void 0 ? void 0 : opts._overrides), { headers: this.sanitizeHeaders((_a = opts === null || opts === void 0 ? void 0 : opts._overrides) === null || _a === void 0 ? void 0 : _a.headers), _getAuthHeaders: ovr._getAuthHeaders, _clearAuth: ovr._clearAuth, _walletAddress: ovr._walletAddress }) });\n return merged;\n }\n /* ---- Data operations ---- */\n async set(path, document, options) {\n return coreSet(path, document, this.mergeSetOverrides(options));\n }\n async setMany(many, options) {\n return coreSetMany(many, this.mergeSetOverrides(options));\n }\n async setFile(path, file, options) {\n return coreSetFile(path, file, { _overrides: this.mergeReadOverrides(options === null || options === void 0 ? void 0 : options._overrides) });\n }\n async get(path, opts) {\n return coreGet(path, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async getMany(paths, opts) {\n return coreGetMany(paths, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides() }));\n }\n async getFiles(path, options) {\n return coreGetFiles(path, { _overrides: this.mergeReadOverrides(options === null || options === void 0 ? void 0 : options._overrides) });\n }\n async search(path, query, opts = {}) {\n return coreSearch(path, query, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async runQuery(absolutePath, queryName, queryArgs, opts) {\n return coreRunQuery(absolutePath, queryName, queryArgs, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async runQueryMany(many, opts) {\n return coreRunQueryMany(many, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async runExpression(expression, queryArgs, options) {\n return coreRunExpression(expression, queryArgs, Object.assign(Object.assign({}, options), { _overrides: this.mergeReadOverrides(options === null || options === void 0 ? void 0 : options._overrides) }));\n }\n async runExpressionMany(many) {\n const ovr = this.mergeReadOverrides();\n return coreRunExpressionMany(many.map(m => (Object.assign(Object.assign({}, m), { _overrides: ovr }))));\n }\n async count(path, opts = {}) {\n return coreCount(path, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async aggregate(path, operation, opts = {}) {\n return coreAggregate(path, operation, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n async queryAggregate(path, spec, opts = {}) {\n return coreQueryAggregate(path, spec, Object.assign(Object.assign({}, opts), { _overrides: this.mergeReadOverrides(opts === null || opts === void 0 ? void 0 : opts._overrides) }));\n }\n /**\n * Subscribe to real-time updates as THIS wallet's identity. The WS connection\n * authenticates with the wallet's own session (so read rules see the right\n * principal), and is scoped to its own connection so it never crosses another\n * identity. Accepts a bare callback or `{ onData, onError, filter, ... }`.\n * Returns an async unsubscribe.\n */\n async subscribe(path, options) {\n const opts = typeof options === 'function' ? { onData: options } : Object.assign({}, options);\n const ovr = this.buildOverrides();\n return coreSubscribe(path, Object.assign(Object.assign({}, opts), { _overrides: {\n _getAuthHeaders: ovr._getAuthHeaders,\n _clearAuth: ovr._clearAuth,\n _walletAddress: ovr._walletAddress,\n } }));\n }\n /**\n * Invoke a deployed Bounded Function AS this wallet's identity. The dispatcher\n * sees the wallet's verified session, so the function's `auth` rule +\n * `ctx.user` reflect this client. Returns the function's JSON; throws\n * `FunctionInvokeError` on 401/403/404/503.\n */\n async invoke(name, args = {}, opts = {}) {\n const ovr = this.buildOverrides();\n return coreFunctions.invoke(name, args, Object.assign(Object.assign({}, opts), { _overrides: { _getAuthHeaders: ovr._getAuthHeaders } }));\n }\n /* ---- Signing operations (use provider directly) ---- */\n async signMessage(message) {\n return this.provider.signMessage(message);\n }\n async signTransaction(transaction) {\n return this.provider.signTransaction(transaction);\n }\n async signAndSubmitTransaction(transaction, feePayer) {\n return this.provider.signAndSubmitTransaction(transaction, feePayer);\n }\n}\n/**\n * Create a self-contained wallet client bound to a specific keypair.\n * Each client has its own auth session — no global state is mutated.\n *\n * @example\n * ```ts\n * const vault = await createWalletClient({ keypair: process.env.VAULT_KEY });\n * await vault.set('markets/123', data);\n * ```\n */\nexport async function createWalletClient(opts) {\n var _a;\n const kp = parseKeypair(opts.keypair);\n const config = await getConfig();\n let provider = new SolanaKeypairProvider((_a = config.rpcUrl) !== null && _a !== void 0 ? _a : null, kp);\n if (config.chain === 'offchain') {\n provider = new OffchainAuthProvider(provider);\n }\n const sessionManager = ServerSessionManager.forKeypair(kp);\n // Eagerly authenticate so failures surface immediately\n await sessionManager.getSession();\n return new WalletClient(provider, sessionManager, kp.publicKey.toBase58());\n}\n//# sourceMappingURL=wallet-client.js.map","// ---------------------------------------------------------------------------\n// webhooks.ts -- Verify signed inbound mutation webhooks.\n//\n// The Bounded realtime worker fires outbound webhooks for declared\n// collections after a mutation commits, signed with a platform Ed25519 private\n// key. This module verifies those signatures on the receiving server.\n//\n// verifyWebhook():\n// 1. Fetches the platform's hosted public keys (well-known endpoint),\n// cached in-memory with a TTL.\n// 2. Picks the key matching the X-Bounded-Key-Id header.\n// 3. Verifies the Ed25519 signature (X-Bounded-Signature) over the RAW body.\n// 4. Checks the X-Bounded-Timestamp is within an allowed skew.\n// 5. Rejects exact signed-delivery replays within the skew window.\n// 6. Returns the parsed, typed payload — or throws.\n//\n// Verification uses WebCrypto (globalThis.crypto.subtle), available natively in\n// Node 18+, Bun, Deno, Cloudflare Workers, and modern browsers.\n// ---------------------------------------------------------------------------\nimport { getWebhookKeysUrl } from \"@bounded-sh/core\";\n// Default to PRODUCTION keys so an omitted keysUrl is production-safe (audit\n// SDK LOW-7). Staging receivers must pass keysUrl explicitly.\nexport const DEFAULT_WEBHOOK_KEYS_URL = \"https://realtime.bounded.sh/.well-known/bounded-webhook-keys.json\";\nconst DEFAULT_MAX_SKEW_SECONDS = 300;\nconst DEFAULT_CACHE_TTL_MS = 300000;\nexport class WebhookVerificationError extends Error {\n constructor(message) {\n super(message);\n this.name = \"WebhookVerificationError\";\n }\n}\nfunction getHeader(headers, name) {\n var _a;\n if (headers && typeof headers.get === \"function\") {\n return headers.get(name);\n }\n const lower = name.toLowerCase();\n const obj = headers;\n for (const key of Object.keys(obj)) {\n if (key.toLowerCase() === lower) {\n const value = obj[key];\n return Array.isArray(value) ? (_a = value[0]) !== null && _a !== void 0 ? _a : null : value !== null && value !== void 0 ? value : null;\n }\n }\n return null;\n}\n// ---------------------------------------------------------------------------\n// Base64\n// ---------------------------------------------------------------------------\nfunction base64ToBytes(b64) {\n const binary = typeof Buffer !== \"undefined\"\n ? Buffer.from(b64, \"base64\").toString(\"binary\")\n : atob(b64);\n const buffer = new ArrayBuffer(binary.length);\n const bytes = new Uint8Array(buffer);\n for (let i = 0; i < binary.length; i++)\n bytes[i] = binary.charCodeAt(i);\n return bytes;\n}\nfunction utf8Bytes(text) {\n const encoded = new TextEncoder().encode(text);\n const buffer = new ArrayBuffer(encoded.length);\n const bytes = new Uint8Array(buffer);\n bytes.set(encoded);\n return bytes;\n}\nconst keyCache = new Map();\n/** Clear the in-memory key cache (mainly for tests). */\nexport function clearWebhookKeyCache() {\n keyCache.clear();\n}\nasync function loadKeys(keysUrl, cacheTtlMs, fetchImpl, now) {\n const cached = keyCache.get(keysUrl);\n if (cached && cached.expiresAt > now()) {\n return cached.keys;\n }\n let res;\n try {\n res = await fetchImpl(keysUrl);\n }\n catch (err) {\n throw new WebhookVerificationError(`Failed to fetch webhook keys from ${keysUrl}: ${err.message}`);\n }\n if (!res.ok) {\n throw new WebhookVerificationError(`Failed to fetch webhook keys from ${keysUrl}: HTTP ${res.status}`);\n }\n const body = (await res.json());\n if (!body || !Array.isArray(body.keys)) {\n throw new WebhookVerificationError(`Webhook keys endpoint ${keysUrl} returned an invalid payload.`);\n }\n keyCache.set(keysUrl, { keys: body.keys, expiresAt: now() + cacheTtlMs });\n return body.keys;\n}\n// ---------------------------------------------------------------------------\n// In-memory replay store (single-process receivers)\n// ---------------------------------------------------------------------------\n/**\n * A simple in-memory {@link WebhookReplayStore}. Records seen event ids until\n * their skew-window expiry and lazily evicts expired entries. Suitable for a\n * single-process receiver; use a shared store (Redis, KV, a DB unique\n * constraint) for multi-instance deployments.\n */\nexport class InMemoryReplayStore {\n constructor() {\n this.seen = new Map();\n }\n checkAndRecord(id, expiresAtMs) {\n const now = Date.now();\n // Opportunistic eviction of expired entries to bound memory.\n if (this.seen.size > 0) {\n for (const [key, exp] of this.seen) {\n if (exp <= now)\n this.seen.delete(key);\n }\n }\n const existing = this.seen.get(id);\n if (existing !== undefined && existing > now) {\n return true; // replay\n }\n this.seen.set(id, expiresAtMs);\n return false;\n }\n /** Clear all recorded ids (mainly for tests). */\n clear() {\n this.seen.clear();\n }\n}\nconst defaultReplayStore = new InMemoryReplayStore();\n/** Clear the default in-memory replay cache (mainly for tests). */\nexport function clearWebhookReplayCache() {\n defaultReplayStore.clear();\n}\n// ---------------------------------------------------------------------------\n// verifyWebhook\n// ---------------------------------------------------------------------------\n/**\n * Verify a signed inbound webhook and return its typed payload.\n *\n * @param rawBody The exact raw request body string the platform signed. Must be\n * the unparsed bytes — re-serializing parsed JSON may not match byte-for-byte.\n * @param headers The inbound request headers (a Headers instance or a plain\n * object; case-insensitive).\n * @param opts Optional overrides (keys URL, skew, cache TTL, fetch).\n * @returns The parsed, validated {@link WebhookPayload}.\n * @throws {WebhookVerificationError} if anything fails verification.\n */\nexport async function verifyWebhook(rawBody, headers, opts = {}) {\n var _a, _b, _c, _d, _e, _f;\n // Resolution order: explicit opts.keysUrl > the configured Bounded network's\n // hosted keys (so a staging receiver verifies staging-signed deliveries\n // without passing keysUrl) > the production default (fail-closed when the\n // network is unknown — audit SDK LOW-7).\n const keysUrl = (_b = (_a = opts.keysUrl) !== null && _a !== void 0 ? _a : getWebhookKeysUrl()) !== null && _b !== void 0 ? _b : DEFAULT_WEBHOOK_KEYS_URL;\n const maxSkew = (_c = opts.maxSkewSeconds) !== null && _c !== void 0 ? _c : DEFAULT_MAX_SKEW_SECONDS;\n const cacheTtlMs = (_d = opts.cacheTtlMs) !== null && _d !== void 0 ? _d : DEFAULT_CACHE_TTL_MS;\n const fetchImpl = (_e = opts.fetchImpl) !== null && _e !== void 0 ? _e : globalThis.fetch;\n const now = (_f = opts.now) !== null && _f !== void 0 ? _f : Date.now;\n if (typeof fetchImpl !== \"function\") {\n throw new WebhookVerificationError(\"No fetch implementation available; pass opts.fetchImpl.\");\n }\n const signature = getHeader(headers, \"X-Bounded-Signature\");\n const keyId = getHeader(headers, \"X-Bounded-Key-Id\");\n const timestampHeader = getHeader(headers, \"X-Bounded-Timestamp\");\n if (!signature)\n throw new WebhookVerificationError(\"Missing X-Bounded-Signature header.\");\n if (!keyId)\n throw new WebhookVerificationError(\"Missing X-Bounded-Key-Id header.\");\n if (!timestampHeader)\n throw new WebhookVerificationError(\"Missing X-Bounded-Timestamp header.\");\n const headerTimestamp = Number(timestampHeader);\n if (!Number.isFinite(headerTimestamp)) {\n throw new WebhookVerificationError(\"Invalid X-Bounded-Timestamp header.\");\n }\n // Resolve the signing key by id.\n const keys = await loadKeys(keysUrl, cacheTtlMs, fetchImpl, now);\n let key = keys.find((k) => k.id === keyId);\n // Cache-miss tolerance: a freshly-rotated key may not be cached yet. Force a\n // single refresh before giving up.\n if (!key) {\n keyCache.delete(keysUrl);\n const refreshed = await loadKeys(keysUrl, cacheTtlMs, fetchImpl, now);\n key = refreshed.find((k) => k.id === keyId);\n }\n if (!key) {\n throw new WebhookVerificationError(`No public key found for key id \"${keyId}\".`);\n }\n if (key.alg !== \"ed25519\") {\n throw new WebhookVerificationError(`Unsupported key algorithm \"${key.alg}\".`);\n }\n // Verify the Ed25519 signature over the raw body.\n const subtle = (globalThis.crypto && globalThis.crypto.subtle);\n if (!subtle) {\n throw new WebhookVerificationError(\"WebCrypto (crypto.subtle) is not available.\");\n }\n let cryptoKey;\n try {\n cryptoKey = await subtle.importKey(\"raw\", base64ToBytes(key.publicKey), { name: \"Ed25519\" }, false, [\"verify\"]);\n }\n catch (err) {\n throw new WebhookVerificationError(`Failed to import Ed25519 public key: ${err.message}`);\n }\n const ok = await subtle.verify({ name: \"Ed25519\" }, cryptoKey, base64ToBytes(signature), utf8Bytes(rawBody));\n if (!ok) {\n throw new WebhookVerificationError(\"Webhook signature verification failed.\");\n }\n // Parse and shallow-validate the payload.\n let payload;\n try {\n payload = JSON.parse(rawBody);\n }\n catch (_g) {\n throw new WebhookVerificationError(\"Webhook body is not valid JSON.\");\n }\n if (!payload ||\n typeof payload.id !== \"string\" ||\n typeof payload.appId !== \"string\" ||\n typeof payload.path !== \"string\" ||\n (payload.operation !== \"create\" &&\n payload.operation !== \"update\" &&\n payload.operation !== \"delete\") ||\n typeof payload.timestamp !== \"number\" ||\n !Number.isFinite(payload.timestamp)) {\n throw new WebhookVerificationError(\"Webhook payload is missing required fields.\");\n }\n // Replay protection: the timestamp used for the skew window MUST be the SIGNED\n // payload.timestamp, not the unsigned X-Bounded-Timestamp header. An attacker\n // can swap the header freely without breaking the Ed25519 signature, so the\n // header alone is no replay bound. We also require the header to equal the\n // signed value so the (unsigned) header cannot diverge from what was signed.\n if (headerTimestamp !== payload.timestamp) {\n throw new WebhookVerificationError(\"X-Bounded-Timestamp header does not match the signed payload timestamp.\");\n }\n const nowSeconds = Math.floor(now() / 1000);\n if (Math.abs(nowSeconds - payload.timestamp) > maxSkew) {\n throw new WebhookVerificationError(`Webhook timestamp outside allowed skew of ${maxSkew}s (delta ${Math.abs(nowSeconds - payload.timestamp)}s).`);\n }\n if (opts.expectedAppId !== undefined && payload.appId !== opts.expectedAppId) {\n throw new WebhookVerificationError(`Webhook appId \"${payload.appId}\" does not match expected appId \"${opts.expectedAppId}\".`);\n }\n // Replay cache: reject a previously-seen signed delivery within the skew\n // window. The worker's payload.id is the document id/path, so using it alone\n // would reject legitimate rapid updates to the same document. The signature\n // is over the exact raw body and changes whenever the signed delivery changes.\n const replayStore = opts.replayStore === undefined ? defaultReplayStore : opts.replayStore;\n if (replayStore) {\n const expiresAtMs = (payload.timestamp + maxSkew) * 1000;\n const replayKey = `${keyId}:${signature}`;\n const replayed = await replayStore.checkAndRecord(replayKey, expiresAtMs);\n if (replayed) {\n throw new WebhookVerificationError(`Webhook replay detected for event id \"${payload.id}\".`);\n }\n }\n return payload;\n}\n//# sourceMappingURL=webhooks.js.map"],"names":["configInit","Buffer","SystemProgram","Connection","convertRemainingAccounts","anchor","VersionedTransaction","buildSetDocumentsTransaction","ComputeBudgetProgram","this","Keypair","coreLive","coreSet","coreSetMany","coreSetFile","coreGet","coreGetMany","coreGetFiles","coreSearch","coreRunQuery","coreRunQueryMany","coreRunExpression","coreRunExpressionMany","coreCount","coreAggregate","coreQueryAggregate","coreSubscribe","coreFunctions","getConfig","ServerSessionManager","getWebhookKeysUrl"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACO,eAAe,IAAI,CAAC,SAAS,EAAE;AACtC,IAAI,MAAMA,SAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;AAChI;;ACHO,eAAe,eAAe,GAAG;AACxC,IAAI,MAAM,IAAI,KAAK,CAAC,oHAAoH,CAAC;AACzI;;ACFA,SAAS,kBAAkB,CAAC,IAAI,EAAE;AAClC,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,E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