///
import { UtxoTransaction } from './UtxoTransaction';
import { HDSigner, Psbt, TxOutput } from '../';
import { Psbt as PsbtBase } from 'bip174';
import { Network } from '..';
export interface HDTaprootSigner extends HDSigner {
/**
* The path string must match /^m(\/\d+'?)+$/
* ex. m/44'/0'/0'/1/23 levels with ' must be hard derivations
*/
derivePath(path: string): HDTaprootSigner;
/**
* Input hash (the "message digest") for the signature algorithm
* Return a 64 byte signature (32 byte r and 32 byte s in that order)
*/
signSchnorr(hash: Buffer): Buffer;
}
export interface SchnorrSigner {
publicKey: Buffer;
signSchnorr(hash: Buffer): Buffer;
}
export interface TaprootSigner {
leafHashes: Buffer[];
signer: SchnorrSigner;
}
export interface PsbtOpts {
network: Network;
}
export declare class UtxoPsbt> extends Psbt {
protected static transactionFromBuffer(buffer: Buffer, network: Network): UtxoTransaction;
static createPsbt(opts: PsbtOpts, data: PsbtBase): UtxoPsbt>;
static fromBuffer(buffer: Buffer, opts: PsbtOpts): UtxoPsbt>;
static fromTransactionComplete(transaction: UtxoTransaction, prevOutputs: TxOutput[], fetchTransactions: (txids: string[]) => Promise>): Promise>>;
static fromTransaction(transaction: UtxoTransaction, prevOutputs: TxOutput[]): UtxoPsbt>;
protected static newTransaction(network: Network): UtxoTransaction;
get tx(): Tx;
protected checkForSignatures(propName?: string): void;
/**
* Mostly copied from bitcoinjs-lib/ts_src/psbt.ts
*/
finalizeAllInputs(): this;
finalizeTaprootInput(inputIndex: number): this;
/**
* Mostly copied from bitcoinjs-lib/ts_src/psbt.ts
*
* Unlike the function it overrides, this does not take a validator. In BitGo
* context, we know how we want to validate so we just hard code the right
* validator.
*/
validateSignaturesOfAllInputs(): boolean;
validateTaprootSignaturesOfInput(inputIndex: number): boolean;
/**
* Mostly copied from bitcoinjs-lib/ts_src/psbt.ts
*/
signAllInputsHD(hdKeyPair: HDTaprootSigner, sighashTypes?: number[]): this;
/**
* Mostly copied from bitcoinjs-lib/ts_src/psbt.ts:signInputHD
*/
signTaprootInputHD(inputIndex: number, hdKeyPair: HDTaprootSigner, sighashTypes?: number[]): this;
signTaprootInput(inputIndex: number, signer: SchnorrSigner, leafHashes: Buffer[], sighashTypes?: number[]): this;
private getTaprootHashForSig;
}
//# sourceMappingURL=UtxoPsbt.d.ts.map