/** * Far-side verification of P2WPKH ECDSA signatures a wallet returned, over * the PSBT we requested (trusted prevouts) — the Native SegWit sibling of * `verifyKeyPathSchnorrSignature`. Reference: btc-vault * `crates/btc-wallet-remote/src/client.rs:945-1000 * verify_finalized_p2wpkh_spend`. The wallet's success/finalization is * never trusted on its own (CLAUDE.md §8): prevout script and value come * from the PSBT we built; only the signature bytes come from the wallet. * * @module tbv/core/primitives/psbt/verifyP2wpkhEcdsaSignature */ /** Only claim P2WPKH: 22-byte scriptPubKey starting `OP_0 PUSH20`. */ export declare function isP2wpkhScript(script: Uint8Array | undefined): script is Uint8Array; export interface AssertReturnedP2wpkhSignatureParams { /** Hex of the PSBT we built and sent (trusted prevout script/value). NOT the wallet's. */ requestedPsbtHex: string; /** The wallet-returned PSBT input carrying the signature material. */ returnedInput: { partialSig?: Array<{ pubkey: Uint8Array; signature: Uint8Array; }>; finalScriptWitness?: Uint8Array; }; /** Index of the input the signature is for. */ inputIndex: number; } /** * Assert that the returned input carries a valid P2WPKH ECDSA signature * over the BIP-143 sighash of `requestedPsbtHex` input `inputIndex`: * `partialSig` (BIP-174: the value is the exact witness-stack signature * bytes, the key its pubkey), or the finalized 2-item witness — and when * both are present they must be the same bytes. * * @throws If the requested input is not a P2WPKH spend, no signature was * returned, a finalized witness disagrees with its `partialSig`, * or any check of `verify_finalized_p2wpkh_spend` fails. */ export declare function assertReturnedP2wpkhSignature(params: AssertReturnedP2wpkhSignatureParams): void; //# sourceMappingURL=verifyP2wpkhEcdsaSignature.d.ts.map