/** * Miniscript correctness helpers. * See COMPILER.md "Correctness vs malleability" for details. */ /** Basic miniscript output categories. */ export type BasicType = 'B' | 'K' | 'V' | 'W'; /** Correctness flags for a miniscript fragment. */ export type Correctness = { basicType: BasicType; zeroArg: boolean; oneArg: boolean; nonZero: boolean; dissatisfiable: boolean; unit: boolean; }; /** Discriminated result of a correctness check. */ export type CorrectnessResult = { ok: true; correctness: Correctness; } | { ok: false; error: string; }; export declare const trueCorrectness: () => CorrectnessResult; export declare const falseCorrectness: () => CorrectnessResult; export declare const pkKCorrectness: () => CorrectnessResult; export declare const pkHCorrectness: () => CorrectnessResult; export declare const multiCorrectness: () => CorrectnessResult; export declare const multiACorrectness: () => CorrectnessResult; export declare const hashCorrectness: () => CorrectnessResult; export declare const timeCorrectness: () => CorrectnessResult; /** Apply the `a:` wrapper to a correctness type. */ export declare const altCorrectness: ( /** Child correctness to wrap. */ correctness: Correctness) => CorrectnessResult; /** Apply the `s:` wrapper to a correctness type. */ export declare const swapCorrectness: ( /** Child correctness to wrap. */ correctness: Correctness) => CorrectnessResult; /** Apply the `c:` wrapper to a correctness type. */ export declare const checkCorrectness: ( /** Child correctness to wrap. */ correctness: Correctness) => CorrectnessResult; /** Apply the `d:` wrapper to a correctness type for Segwit v0. */ export declare const dupIfWshCorrectness: ( /** Child correctness to wrap. */ correctness: Correctness) => CorrectnessResult; /** Apply the `d:` wrapper to a correctness type for tapscript. */ export declare const dupIfTapscriptCorrectness: ( /** Child correctness to wrap. */ correctness: Correctness) => CorrectnessResult; /** Apply the `v:` wrapper to a correctness type. */ export declare const verifyCorrectness: ( /** Child correctness to wrap. */ correctness: Correctness) => CorrectnessResult; /** Apply the `j:` wrapper to a correctness type. */ export declare const nonZeroCorrectness: ( /** Child correctness to wrap. */ correctness: Correctness) => CorrectnessResult; /** Apply the `n:` wrapper to a correctness type. */ export declare const zeroNotEqualCorrectness: ( /** Child correctness to wrap. */ correctness: Correctness) => CorrectnessResult; /** Correctness rules for and_b(X,Y). */ export declare const andBCorrectness: ( /** Left child correctness. */ left: Correctness, /** Right child correctness. */ right: Correctness) => CorrectnessResult; /** Correctness rules for and_v(X,Y). */ export declare const andVCorrectness: ( /** Left child correctness. */ left: Correctness, /** Right child correctness. */ right: Correctness) => CorrectnessResult; /** Correctness rules for or_b(X,Y). */ export declare const orBCorrectness: ( /** Left child correctness. */ left: Correctness, /** Right child correctness. */ right: Correctness) => CorrectnessResult; /** Correctness rules for or_d(X,Y). */ export declare const orDCorrectness: ( /** Left child correctness. */ left: Correctness, /** Right child correctness. */ right: Correctness) => CorrectnessResult; /** Correctness rules for or_c(X,Y). */ export declare const orCCorrectness: ( /** Left child correctness. */ left: Correctness, /** Right child correctness. */ right: Correctness) => CorrectnessResult; /** Correctness rules for or_i(X,Y). */ export declare const orICorrectness: ( /** Left child correctness. */ left: Correctness, /** Right child correctness. */ right: Correctness) => CorrectnessResult; /** Correctness rules for andor(X,Y,Z). */ export declare const andOrCorrectness: ( /** Left child correctness. */ left: Correctness, /** Middle child correctness. */ mid: Correctness, /** Right child correctness. */ right: Correctness) => CorrectnessResult; /** Correctness rules for thresh(k, subs...). */ export declare const threshCorrectness: ( /** Threshold to satisfy. */ k: number, /** Child correctness list. */ subs: Correctness[]) => CorrectnessResult;