{"version":3,"file":"index.mjs","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/sanitize-headers.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 { Connection } from '@solana/web3.js';\nimport nacl from 'tweetnacl';\nimport bs58 from 'bs58';\n// OA-0001 assessment: this file used to carry a presigned-transaction validator\n// (`validatePresignedSignedTransaction` plus its borsh parser and the\n// ATA/sponsor setup guards) for the retired client-side transaction-building\n// lane (`runTransaction`, deleted from AuthProvider when EVM removal took its\n// last live caller). Nothing called it any more, and it carried the same\n// comparison gap as the finding's client lane (program/app/path checks only,\n// operation contents skipped), so it was REMOVED rather than left as a dead\n// validator a future caller could revive unbound. The live server-side signing\n// lane - WalletClient.setMany -> @bounded-sh/core operations.setMany ->\n// handlePreBuiltTransaction - now binds the full requested operation intent\n// before signing (see tarobase-core src/client/solana-operations.ts).\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}\n/**\n * DS3-0414: does the transaction already carry a REAL signer signature? A Solana\n * signature is computed over the compiled message, which INCLUDES recentBlockhash, so\n * the blockhash must not be rewritten once any signer (sponsor / multisig / co-signer)\n * has signed - a rewrite silently invalidates their signature. Legacy signatures are\n * `{ signature: Buffer | null }` entries; versioned signatures are 64-byte arrays that\n * stay all-zero placeholders until a signer fills them. Mirrors turnkey-signer-bridge.ts.\n */\nfunction transactionHasSignature(transaction) {\n    if ('serializeMessage' in transaction) {\n        return transaction.signatures.some((s) => s.signature != null);\n    }\n    return transaction.signatures.some((sig) => sig.some((b) => b !== 0));\n}\n/** The highest Solana transaction version this provider reads back (SIMD-0385 v1). */\nconst SOLANA_MAX_SUPPORTED_TRANSACTION_VERSION = 1;\n/**\n * getTransaction that survives a SIMD-0385 v1 transaction. @solana/web3.js 1.98.x\n * validates the response `version` against `0 | 'legacy'` and throws on 1 even when\n * the request raised the ceiling. Legacy and v0 keep returning web3.js's parsed\n * object; when web3.js refuses to parse and the connection exposes its endpoint, the\n * same result is read as raw JSON-RPC (plain `transaction.message` object, no class\n * helpers).\n */\nasync function getTransactionCompat(connection, signature) {\n    var _a;\n    try {\n        return await connection.getTransaction(signature, {\n            maxSupportedTransactionVersion: SOLANA_MAX_SUPPORTED_TRANSACTION_VERSION,\n            commitment: 'confirmed',\n        });\n    }\n    catch (error) {\n        const endpoint = typeof (connection === null || connection === void 0 ? void 0 : connection.rpcEndpoint) === 'string' ? connection.rpcEndpoint.trim() : '';\n        if (!endpoint)\n            throw error;\n        const response = await fetch(endpoint, {\n            method: 'POST',\n            headers: { 'content-type': 'application/json' },\n            body: JSON.stringify({\n                jsonrpc: '2.0',\n                id: 1,\n                method: 'getTransaction',\n                params: [signature, {\n                        commitment: 'confirmed',\n                        encoding: 'json',\n                        maxSupportedTransactionVersion: SOLANA_MAX_SUPPORTED_TRANSACTION_VERSION,\n                    }],\n            }),\n        });\n        if (!response.ok)\n            throw error;\n        const body = await response.json();\n        if (body === null || body === void 0 ? void 0 : body.error)\n            throw error;\n        return (_a = body === null || body === void 0 ? void 0 : body.result) !== null && _a !== void 0 ? _a : null;\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     * SIMD-0385 v1: the server keypair signs the exact message bytes; kit places the\n     * signature in this key's slot and leaves every other slot (sponsor,\n     * attestation) untouched. Refuses when the keypair is not a required signer,\n     * because a stray signature would be silently dropped and the write would fail\n     * later with a misleading missing-signature error.\n     */\n    async signTransactionV1(transaction) {\n        const kit = await import('@solana/kit');\n        const signerAddress = this.keypair.publicKey.toBase58();\n        if (!Object.prototype.hasOwnProperty.call(transaction.signatures, signerAddress)) {\n            throw new Error(`The configured server keypair (${signerAddress}) is not a required signer of this v1 transaction.`);\n        }\n        const keyPair = await kit.createKeyPairFromBytes(this.keypair.secretKey);\n        return await kit.partiallySignTransaction([keyPair], transaction);\n    }\n    /** A server keypair can sign every format; the write request advertises all three. */\n    supportedTransactionVersions() {\n        return ['legacy', 0, 1];\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        // DS3-0414: a Solana signature covers the compiled message (recentBlockhash included),\n        // so refreshing the blockhash after a sponsor / co-signer has already signed silently\n        // invalidates their signature - and this is the sponsored/fee-payer submit path, where a\n        // co-signed transaction is exactly what arrives. signTransaction only ADDS this keypair's\n        // signature (partialSign), it never re-signs the others. So only refresh the blockhash\n        // while the transaction is still unsigned; once a real signature is present, sign and\n        // submit the caller's message verbatim.\n        if (!transactionHasSignature(transaction)) {\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        }\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, _e;\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                let logMessages;\n                try {\n                    logMessages = (_c = (_b = (await getTransactionCompat(connection, sig))) === null || _b === void 0 ? void 0 : _b.meta) === null || _c === void 0 ? void 0 : _c.logMessages;\n                }\n                catch (_f) {\n                    // Log retrieval is diagnostic only; the on-chain error is the verdict.\n                }\n                const errorMessage = logMessages ? JSON.stringify(logMessages) : JSON.stringify((_d = st === null || st === void 0 ? void 0 : st.value) === null || _d === void 0 ? void 0 : _d.err);\n                throw new Error(`Transaction failed: ${errorMessage}`);\n            }\n            if (((_e = st === null || st === void 0 ? void 0 : st.value) === null || _e === void 0 ? void 0 : _e.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 getTransactionCompat(connection, sig);\n        }\n        return { signature: sig, txInfo };\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    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}\n//# sourceMappingURL=offchain-auth-provider.js.map","// #023: strip caller-supplied auth headers so an operation runs as the isolated wallet, not\n// as whatever headers were forwarded in. HTTP header names are case-insensitive on the wire,\n// so a fixed `Authorization`/`authorization` destructure let a mixed-case `AUTHORIZATION`\n// survive and ride along. Drop every header whose lowercased name is authorization (plus\n// proxy-authorization / cookie, which would likewise leak a caller identity into the session).\nconst STRIP_HEADER_NAMES = new Set([\"authorization\", \"proxy-authorization\", \"cookie\"]);\nexport function stripCallerAuthHeaders(headers) {\n    if (!headers)\n        return undefined;\n    const rest = {};\n    for (const [name, value] of Object.entries(headers)) {\n        if (!STRIP_HEADER_NAMES.has(name.toLowerCase()))\n            rest[name] = value;\n    }\n    return Object.keys(rest).length > 0 ? rest : undefined;\n}\n//# sourceMappingURL=sanitize-headers.js.map","import { 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, reconcileSetResult as coreReconcileSetResult, waitForSetResult as coreWaitForSetResult, ServerSessionManager, } from '@bounded-sh/core';\nimport { SolanaKeypairProvider } from './auth/providers/solana-keypair-provider';\nimport { OffchainAuthProvider } from './auth/providers/offchain-auth-provider';\nimport { stripCallerAuthHeaders } from './sanitize-headers';\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, config) {\n        this.provider = provider;\n        this.sessionManager = sessionManager;\n        this.address = address;\n        this.config = config;\n        this.live = {\n            intent: (roomPath, intent, opts = {}) => coreLive.intent(roomPath, intent, this.mergeLiveIntentOptions(opts)),\n            // Route status through the SAME auth merge intent uses so a server-keypair\n            // agent's session token rides the request. Without it the agent sends the\n            // public app id only and the server returns the slim anonymous shape rather\n            // than the full diagnostics the authenticated agent is entitled to (#102).\n            status: (roomPath, opts = {}) => coreLive.status(roomPath, this.mergeLiveStatusOptions(opts)),\n            // Agent-as-player view stream: subscribe to THIS wallet's per-player view\n            // under the wallet's own session (per-subscription overrides — no global\n            // auth needed). The view id defaults to this wallet's @user.id (== its\n            // address for keypair identities). This is the missing half of the\n            // documented \"external agent joins AS a player\" pattern: intents could be\n            // sent, but the agent could never SEE its view from Node.\n            subscribeView: (roomPath, opts) => {\n                var _a;\n                const ovr = this.buildOverrides();\n                return coreLive.subscribeView(roomPath, {\n                    userId: (_a = opts.userId) !== null && _a !== void 0 ? _a : this.address,\n                    onData: opts.onData,\n                    onError: opts.onError,\n                    _overrides: {\n                        _getAuthHeaders: ovr._getAuthHeaders,\n                        _clearAuth: ovr._clearAuth,\n                        _walletAddress: ovr._walletAddress,\n                        _config: ovr._config,\n                    },\n                });\n            },\n        };\n    }\n    /* ---- Auth override helpers ---- */\n    /**\n     * Return this wallet client's current bearer token, refreshing its isolated\n     * keypair session first when the cached token is expired or near expiry.\n     */\n    async getIdToken() {\n        let session = await this.sessionManager.getSession();\n        if (jwtExpiringSoon(session.idToken)) {\n            this.sessionManager.clearSession();\n            session = await this.sessionManager.getSession();\n        }\n        return session.idToken;\n    }\n    buildOverrides() {\n        return {\n            authProvider: this.provider,\n            // Pin every request to this wallet client's snapshotted app + endpoints so\n            // a later global init() can never retarget its reads/writes (CTA-05).\n            _config: this.config,\n            _getAuthHeaders: async () => {\n                return { Authorization: `Bearer ${await this.getIdToken()}` };\n            },\n            _clearAuth: async () => {\n                this.sessionManager.clearSession();\n            },\n            _walletAddress: this.address,\n        };\n    }\n    /** #023: strip caller Authorization (any casing) so operations run as the isolated wallet. */\n    sanitizeHeaders(headers) {\n        return stripCallerAuthHeaders(headers);\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, _config: ovr._config }) });\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, _config: ovr._config });\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, _config: ovr._config }) });\n        return merged;\n    }\n    mergeLiveStatusOptions(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, _config: ovr._config }) });\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    /**\n     * Reconcile a `submitted` write receipt through THIS client's own provider\n     * and app binding. A bare top-level `reconcileSetResult` cannot serve a wallet\n     * client: the provider and config are private to the instance, and a later\n     * global `init()` would otherwise reconcile against the wrong app.\n     */\n    async reconcileSetResult(receipt, options) {\n        return coreReconcileSetResult(receipt, this.mergeReconcileOptions(options));\n    }\n    /** Bounded repeat of {@link reconcileSetResult}; see `waitForSetResult`. */\n    async waitForSetResult(receipt, options) {\n        return coreWaitForSetResult(receipt, this.mergeReconcileOptions(options));\n    }\n    mergeReconcileOptions(opts) {\n        var _a;\n        const ovr = this.buildOverrides();\n        return Object.assign(Object.assign({}, (opts !== null && opts !== void 0 ? 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, _walletAddress: ovr._walletAddress, _config: ovr._config }) });\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                _config: ovr._config,\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, _config: ovr._config } }));\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 one Solana 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    // Snapshot an IMMUTABLE copy of the resolved config now. Every request this\n    // client makes is threaded with this snapshot (as `_config`) and its session\n    // manager mints against this app+issuer, so a later global `init(...)` for a\n    // different app/environment can never retarget this client's reads, writes,\n    // function calls, live intents, or session mint (CTA-05).\n    const config = Object.freeze(Object.assign({}, (await getConfig())));\n    const sessionConfig = {\n        appId: config.appId,\n        authApiUrl: config.authApiUrl,\n        authMethod: config.authMethod,\n    };\n    if (!('keypair' in opts) || typeof opts.keypair !== 'string') {\n        throw new Error('createWalletClient requires a Solana keypair');\n    }\n    const kp = parseKeypair(opts.keypair);\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, sessionConfig);\n    // Eagerly authenticate so failures surface immediately\n    await sessionManager.getSession();\n    return new WalletClient(provider, sessionManager, kp.publicKey.toBase58(), config);\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, getConfiguredAppId } 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;\n// Negative-cache TTL for unknown key ids (audit U-053): bounds how often a\n// forged X-Bounded-Key-Id can force a refetch of the hosted keys endpoint. A\n// genuinely rotated key waits at most one TTL before a refresh is retried.\nconst DEFAULT_UNKNOWN_KEY_TTL_MS = 60000;\nconst UNKNOWN_KEY_CACHE_MAX = 256;\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// ---------------------------------------------------------------------------\n// Negative cache for unknown key ids (audit U-053)\n//\n// Maps `${keysUrl}\\n${keyId}` -> the epoch ms until which a forced refresh for\n// that key id is suppressed. Without it, every request carrying an unknown\n// X-Bounded-Key-Id would evict the key cache and force one fetch of the hosted\n// keys endpoint — N forged calls = N upstream fetches (refetch DoS). With it,\n// a repeated unknown key id costs at most one refresh per TTL window, while a\n// genuinely rotated key waits at most one TTL. Bounded size; when full, the\n// oldest-inserted entry is evicted (LRU-ish; entries are re-inserted on\n// update, so Map insertion order approximates recency).\n// ---------------------------------------------------------------------------\nconst unknownKeyCache = new Map();\nfunction recordUnknownKey(cacheKey, notFoundUntil) {\n    unknownKeyCache.delete(cacheKey);\n    unknownKeyCache.set(cacheKey, notFoundUntil);\n    if (unknownKeyCache.size > UNKNOWN_KEY_CACHE_MAX) {\n        const oldest = unknownKeyCache.keys().next().value;\n        if (oldest !== undefined)\n            unknownKeyCache.delete(oldest);\n    }\n}\n/** Clear the in-memory key caches, including the unknown-key negative cache (mainly for tests). */\nexport function clearWebhookKeyCache() {\n    keyCache.clear();\n    unknownKeyCache.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, _g, _h;\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 unknownKeyTtlMs = (_e = opts.unknownKeyTtlMs) !== null && _e !== void 0 ? _e : DEFAULT_UNKNOWN_KEY_TTL_MS;\n    const fetchImpl = (_f = opts.fetchImpl) !== null && _f !== void 0 ? _f : globalThis.fetch;\n    const now = (_g = opts.now) !== null && _g !== void 0 ? _g : 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 — unless this key id recently failed a\n    // refresh, in which case the negative cache (audit U-053) suppresses the\n    // refetch so forged unknown key ids cannot force one upstream fetch per\n    // request.\n    if (!key) {\n        const unknownCacheKey = `${keysUrl}\\n${keyId}`;\n        const notFoundUntil = unknownKeyCache.get(unknownCacheKey);\n        if (notFoundUntil !== undefined && notFoundUntil > now()) {\n            throw new WebhookVerificationError(`No public key found for key id \"${keyId}\".`);\n        }\n        keyCache.delete(keysUrl);\n        const refreshed = await loadKeys(keysUrl, cacheTtlMs, fetchImpl, now);\n        key = refreshed.find((k) => k.id === keyId);\n        if (!key) {\n            recordUnknownKey(unknownCacheKey, now() + unknownKeyTtlMs);\n        }\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 (_j) {\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    // #072: bind the delivery to an app by DEFAULT. The shared platform signing key means a\n    // valid signature proves \"from Bounded\", not \"from your app\"; payload.appId is the ONLY\n    // per-app separation. Previously the bind ran only when expectedAppId was passed, so the\n    // secure check was opt-in and a malicious app owner could point their app's webhook at a\n    // victim receiver. Now: an explicit expectedAppId is authoritative; otherwise bind to the\n    // init()-time app id; a multi-app receiver must set allowAnyAppId to accept any app; and\n    // when no app id is resolvable we FAIL CLOSED rather than silently trust any app.\n    if (opts.expectedAppId !== undefined) {\n        if (payload.appId !== opts.expectedAppId) {\n            throw new WebhookVerificationError(`Webhook appId \"${payload.appId}\" does not match expected appId \"${opts.expectedAppId}\".`);\n        }\n    }\n    else if (!opts.allowAnyAppId) {\n        const configuredAppId = getConfiguredAppId();\n        if (!configuredAppId) {\n            throw new WebhookVerificationError(\"verifyWebhook cannot determine which app this webhook is for: no expectedAppId was \" +\n                \"passed and the SDK has no init()-time app id. Pass expectedAppId, or set \" +\n                \"allowAnyAppId: true to intentionally accept webhooks from any app.\");\n        }\n        if (payload.appId !== configuredAppId) {\n            throw new WebhookVerificationError(`Webhook appId \"${payload.appId}\" does not match the configured app id \"${configuredAppId}\". ` +\n                \"Pass allowAnyAppId: true to accept webhooks from any app.\");\n        }\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.\n    //\n    // SHW-05: delivery is durable + at-least-once, and a RETRY of one delivery\n    // uses a fresh timestamp (to stay inside the skew window) and therefore a\n    // different signature. Keying replay on the signed, per-delivery `deliveryId`\n    // (stable across retries) is what actually dedupes those retries; the old\n    // `${keyId}:${signature}` key only caught exact byte-identical resends and\n    // would wave every retry of the same delivery straight through. Fall back to\n    // the signature only for a legacy payload with no deliveryId. Pair a shared\n    // store (retained for the retry window) with this for exactly-once handling.\n    const replayStore = opts.replayStore === undefined ? defaultReplayStore : opts.replayStore;\n    if (replayStore) {\n        const expiresAtMs = (payload.timestamp + maxSkew) * 1000;\n        const replayKey = typeof payload.deliveryId === \"string\" && payload.deliveryId.length > 0\n            ? `${keyId}:did:${payload.deliveryId}`\n            : `${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}\" (delivery \"${(_h = payload.deliveryId) !== null && _h !== void 0 ? _h : \"?\"}\").`);\n        }\n    }\n    return payload;\n}\n//# sourceMappingURL=webhooks.js.map"],"names":["configInit","Buffer","coreLive","coreSet","coreSetMany","coreSetFile","coreReconcileSetResult","coreWaitForSetResult","coreGet","coreGetMany","coreGetFiles","coreSearch","coreRunQuery","coreRunQueryMany","coreRunExpression","coreRunExpressionMany","coreCount","coreAggregate","coreQueryAggregate","coreSubscribe","coreFunctions"],"mappings":";;;;;;;AACO,eAAe,IAAI,CAAC,SAAS,EAAE;AACtC,IAAI,MAAMA,MAAU,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,EAAE,I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