import { BitGoPsbt } from "../fixedScriptWallet/BitGoPsbt.js";
import { RootWalletKeys } from "../fixedScriptWallet/RootWalletKeys.js";
import { BIP32 } from "../bip32.js";
import { inputScriptTypes, outputScriptTypes, type InputScriptType, type OutputScriptType, type ScriptId } from "../fixedScriptWallet/index.js";
import type { CoinName } from "../coinName.js";
import type { Triple } from "../triple.js";
export declare const signStages: readonly ["unsigned", "halfsigned", "fullsigned"];
export type SignStage = (typeof signStages)[number];
export declare const txFormats: readonly ["psbt", "psbt-lite"];
export type TxFormat = (typeof txFormats)[number];
/**
 * Utility type to make union variants mutually exclusive.
 * For each variant T in the union, adds `?: never` for all keys from other variants.
 */
type Exclusive<T, U = T> = T extends unknown ? T & Partial<Record<Exclude<U extends unknown ? keyof U : never, keyof T>, never>> : never;
/** Base input fields */
type InputBase = {
    value: bigint;
    /** Wallet keys to use. Defaults to root wallet keys */
    walletKeys?: RootWalletKeys;
};
/** Input variant types */
type InputVariant = {
    scriptType: InputScriptType;
    index?: number;
} | {
    scriptId: ScriptId;
};
/**
 * Input configuration for AcidTest PSBT
 *
 * Either specify `scriptType` (chain derived from type, index defaults to position)
 * or specify `scriptId` (explicit chain + index).
 */
export type Input = InputBase & Exclusive<InputVariant>;
/** Base output fields */
type OutputBase = {
    value: bigint;
    /** Wallet keys to use. Defaults to root wallet keys. null = external output (no bip32 derivation) */
    walletKeys?: RootWalletKeys | null;
};
/** Output variant types */
type OutputVariant = {
    scriptType: OutputScriptType;
    index?: number;
} | {
    scriptId: ScriptId;
} | {
    opReturn: string;
} | {
    address: string;
} | {
    script: Uint8Array;
};
/**
 * Output configuration for AcidTest PSBT
 *
 * Specify one of:
 * - `scriptType` (chain derived from type, index defaults to position)
 * - `scriptId` (explicit chain + index)
 * - `opReturn` for OP_RETURN data output
 * - `address` for address-based output
 * - `script` for raw script output
 */
export type Output = OutputBase & Exclusive<OutputVariant>;
type SuiteConfig = {
    /**
     * By default, we exclude p2trMusig2ScriptPath from the inputs since
     * it uses user + backup keys (not typical 2-of-3 with user + bitgo).
     * Set to true to include this input type.
     */
    includeP2trMusig2ScriptPath?: boolean;
};
export { inputScriptTypes, outputScriptTypes };
/**
 * Creates a valid PSBT with as many features as possible (kitchen sink).
 *
 * - Inputs:
 *   - All wallet script types supported by the network
 *   - A p2shP2pk input (for replay protection)
 * - Outputs:
 *   - All wallet script types supported by the network
 *   - A p2sh output with derivation info of a different wallet
 *   - A p2sh output with no derivation info (external output)
 *   - An OP_RETURN output
 *
 * Signature stages:
 * - unsigned: No signatures
 * - halfsigned: One signature per input (user key)
 * - fullsigned: Two signatures per input (user + bitgo)
 *
 * Transaction formats:
 * - psbt: Full PSBT with non_witness_utxo
 * - psbt-lite: Only witness_utxo (no non_witness_utxo)
 */
export declare class AcidTest {
    readonly coin: CoinName;
    readonly signStage: SignStage;
    readonly txFormat: TxFormat;
    readonly rootWalletKeys: RootWalletKeys;
    readonly otherWalletKeys: RootWalletKeys;
    readonly inputs: Input[];
    readonly outputs: Output[];
    private readonly userXprv;
    private readonly backupXprv;
    private readonly bitgoXprv;
    constructor(coin: CoinName, signStage: SignStage, txFormat: TxFormat, rootWalletKeys: RootWalletKeys, otherWalletKeys: RootWalletKeys, inputs: Input[], outputs: Output[], xprvTriple: Triple<BIP32>);
    /**
     * Create an AcidTest with specific configuration
     */
    static withConfig(coin: CoinName, signStage: SignStage, txFormat: TxFormat, suiteConfig?: SuiteConfig): AcidTest;
    /**
     * Get a human-readable name for this test configuration
     */
    get name(): string;
    /**
     * Get the BIP32 user key for replay protection (p2shP2pk)
     */
    getReplayProtectionKey(): BIP32;
    /**
     * Create the actual PSBT with all inputs and outputs
     */
    createPsbt(): BitGoPsbt;
    /**
     * Sign the PSBT according to the sign stage
     */
    private signPsbt;
    /**
     * Generate test suite for all networks, sign stages, and tx formats
     */
    static forAllNetworksSignStagesTxFormats(suiteConfig?: SuiteConfig): AcidTest[];
}
