import { PsbtV2 } from "@ledgerhq/psbtv2";
import type { AccountType } from "../newops/accounttype";
import type { DerivationAccessors, DerivationElementType } from "./types";
export type SignPsbtClient = {
    getExtendedPubkey(display: boolean, pathElements: number[]): Promise<string>;
};
/**
 * Extracts the scriptPubKey from a non-witness UTXO by parsing the previous transaction.
 */
export declare function getScriptPubKeyFromNonWitnessUtxo(psbt: PsbtV2, inputIndex: number): Buffer | undefined;
/**
 * Extracts the scriptPubKey from an input's UTXO data.
 */
export declare function getInputScriptPubKey(psbt: PsbtV2, inputIndex: number): Buffer | undefined;
/**
 * Generic method to fix BIP32 derivations with wrong master fingerprint.
 */
export declare function fixDerivationFingerprints(client: SignPsbtClient, accessors: DerivationAccessors, elementIndex: number, masterFp: Buffer): Promise<boolean>;
export declare function fixExistingDerivationFingerprints(client: SignPsbtClient, psbt: PsbtV2, elementIndex: number, masterFp: Buffer, elementType: DerivationElementType): Promise<boolean>;
/**
 * Generic method to set BIP32 derivation data on an input or output.
 */
export declare function setElementBip32DerivationData(accessors: DerivationAccessors, elementIndex: number, pubkey: Buffer, masterFp: Buffer, path: number[], accountType: AccountType): void;
/**
 * Populates missing BIP32 derivations using the provided known-address map.
 * The map must be built by the caller from the wallet's known addresses (e.g. receive/change).
 */
export declare function populateMissingBip32Derivations(client: SignPsbtClient, psbt: PsbtV2, inputCount: number, masterFp: Buffer, accountPath: number[], knownAddressDerivations: Map<string, {
    pubkey: Buffer;
    path: number[];
}>): Promise<void>;
//# sourceMappingURL=derivationPopulation.d.ts.map