import { Buffer } from 'buffer'; /** * Compute the BIP-341 TapLeaf hash for a tapscript leaf: * `tagged_hash("TapLeaf", leaf_version || compact_size(script) || script)`. */ export declare function computeTapLeafHash(leafVersion: number, script: Uint8Array): Buffer; export interface TaprootScriptPathBinding { /** Tapscript leaf version, e.g. `0xc0`. */ leafVersion: number; /** The tapscript leaf being spent. */ script: Uint8Array; /** BIP-341 control block: version/parity byte, internal key, merkle path. */ controlBlock: Uint8Array; } /** * Recompute the P2TR scriptPubKey that a `(leafVersion, script, controlBlock)` * triple can spend, by walking the control block's merkle path to the taptree * root and tweaking the control block's internal key with it (BIP-341 * "Script validation rules"). * * Comparing the result against a real previous output is what proves the triple * belongs to that output rather than to some other taptree. * * @throws If the control block is malformed, the leaf version disagrees with * the control block, the tweak is off-curve, or the recovered output key's * parity contradicts the control block. */ export declare function computeTaprootScriptPubKey(binding: TaprootScriptPathBinding): Buffer; //# sourceMappingURL=taproot.d.ts.map