/** * Asserts a wallet-returned PSBT encodes the same unsigned transaction * as the locally-built PSBT we asked the wallet to sign. Per-input PSBT * metadata (witnessUtxo, tapLeafScript, sighashType) is intentionally NOT * compared — those fields are committed to the Schnorr sighash and the * vault provider's `verify_depositor_signature` rejects mismatches there. * This primitive defends the path where a colluding VP would otherwise * accept a wallet-substituted signature. */ /** * Thrown when a wallet-returned PSBT encodes a different unsigned * transaction than the one the caller asked the wallet to sign. */ export declare class PsbtSubstitutionError extends Error { constructor(detail: string); } export interface AssertPsbtUnsignedTxMatchesParams { /** PSBT we built locally and asked the wallet to sign. */ requestedPsbtHex: string; /** PSBT the wallet returned after signing. */ returnedPsbtHex: string; } /** * Compare two PSBTs and throw `PsbtSubstitutionError` unless they encode * the same unsigned transaction (version, locktime, inputs, outputs). * * @throws PsbtSubstitutionError on any mismatch in the unsigned tx * @throws Error if either PSBT cannot be parsed */ export declare function assertPsbtUnsignedTxMatches(params: AssertPsbtUnsignedTxMatchesParams): void; //# sourceMappingURL=assertPsbtUnsignedTxMatches.d.ts.map