import BN from "bn.js";
import { MccClient, MccUtxoClient } from "../../module";
import { TransactionSuccessStatus } from "../../types/genericMccTypes";
import { IUtxoGetTransactionRes, IUtxoTransactionAdditionalData, IUtxoVinTransaction, IUtxoVinVoutsMapper, IUtxoVoutTransaction } from "../../types/utxoTypes";
import { AddressAmount, BalanceDecreasingProps, BalanceDecreasingSummaryResponse, TransactionBase } from "../TransactionBase";
export declare type UtxoTransactionTypeOptions = "coinbase" | "payment" | "partial_payment" | "full_payment";
export declare abstract class UtxoTransaction extends TransactionBase {
    protected get data(): IUtxoGetTransactionRes;
    protected get additionalData(): IUtxoTransactionAdditionalData | undefined;
    protected set additionalData(data: IUtxoTransactionAdditionalData | undefined);
    constructor(data: IUtxoGetTransactionRes, additionalData?: IUtxoTransactionAdditionalData);
    get txid(): string;
    get stdTxid(): string;
    get hash(): string;
    get reference(): string[];
    get stdPaymentReference(): string;
    get unixTimestamp(): number;
    get sourceAddresses(): (string | undefined)[];
    get receivingAddresses(): (string | undefined)[];
    toBnValue(value: number | undefined): BN;
    reducerFunctionAdditionalDataVinOuts: (prev: BN, vout: IUtxoVinVoutsMapper | undefined) => BN;
    reducerFunctionPrevouts: (prev: BN, vin: IUtxoVinTransaction) => BN;
    reducerFunctionVouts: (prev: BN, vout: IUtxoVoutTransaction) => BN;
    get fee(): BN;
    get feeSignerTotalAmount(): AddressAmount;
    get spentAmounts(): AddressAmount[];
    get intendedSpentAmounts(): AddressAmount[];
    get receivedAmounts(): AddressAmount[];
    get intendedReceivedAmounts(): AddressAmount[];
    get type(): UtxoTransactionTypeOptions;
    get isNativePayment(): boolean;
    get elementaryUnits(): BN;
    get successStatus(): TransactionSuccessStatus;
    balanceDecreasingSummary({ sourceAddressIndicator, client }: BalanceDecreasingProps): Promise<BalanceDecreasingSummaryResponse>;
    makeFull(client: MccClient): Promise<void>;
    /**
     * Asserts whether the vin index is in valid range. If not, exception is thrown.
     * @param vinIndex vin index
     */
    assertValidVinIndex(vinIndex: number): void;
    /**
     * Asserts whether the vout index is in valid range. If not, exception is thrown.
     * @param voutIndex vout index
     */
    assertValidVoutIndex(voutIndex: number): void;
    /**
     * Asserts whether vinvouts Mapper is full mapper and only has unique and matching indices
     */
    assertAdditionalData(): void;
    isValidAdditionalData(): boolean;
    synchronizeAdditionalData(): void;
    /**
     * Extract vout on vout index. If vout index is not valid or data is corrupted, exception is thrown.
     * @param voutIndex vout index
     * @returns vout on vout index
     */
    extractVoutAt(voutIndex: number): IUtxoVoutTransaction;
    /**
     *
     * @param vinIndex vin index
     * @returns vin on vin index
     */
    extractVinAt(vinIndex: number): IUtxoVinTransaction;
    /**
     * Gets the vout corresponding to vin in the given vin index. If the vout is not fetched, the
     * input transaction is read and the corresponding vout is obtained
     * @param vinIndex vin index
     * @param client mcc client for fetching input the transactions
     * @returns input vout of the relevant utxo of the input transaction on the vin on the index `vinIndex`
     */
    private extractVinVoutAt;
    /**
     * Gets the vout corresponding to vin in the given vin index. If it is not stored in the additionalData,
     * it's fetched and updated using the client.
     * @param vinIndex vin index
     * @param client mcc client to fetch transaction data
     * @returns input vout of the relevant utxo of the input transaction on the vin on the index `vinIndex`
     */
    vinVoutAt(vinIndex: number, client?: MccUtxoClient): Promise<IUtxoVinVoutsMapper>;
    /**
     * Checks if the input on index `vinIndex` is fetched.
     * @param vinIndex vin index
     * @returns true if input on the index `vinIndex` is already fetched.
     */
    isSyncedVinIndex(vinIndex: number): boolean;
    /**
     * Fetches all the vin data from input transactions and makes the payment full_payment.
     * @param client mcc client to use for fetching input data
     */
    makeFullPayment(client: MccUtxoClient): Promise<void>;
    /**
     * Doge has additional brackets around addresses in out tx
     * @param vout
     * @returns
     */
    private processOutput;
    /**
     * Validate that the pkscript and address for a given vout index match.
     * @param voutIndex
     */
    abstract isValidPkscript(voutIndex: number): boolean;
    /**
     * Weather a output is a valid "nice" payment output currently P2PKH or P2PK
     * @param voutIndex index of the output we are checking
     * @returns weather a vout script is standard P2PKH or P2PK
     */
    isValidPaymentScript(voutIndex: number): boolean;
    /**
     * Checks if the output on index `voutIndex` is P2PKH. (Pay to public key hash)
     * @param voutIndex index of the output we are checking
     * @returns weather a vout script is standard P2PKH
     */
    isP2PKH(voutIndex: number): boolean;
    /**
     * Checks that address specified by `address` is actually the one that can redeem the script for a valid P2PKH output script
     * @param voutIndex index of the output we are checking
     * @returns weather the output script is spendable by address
     */
    isValidP2PKH(voutIndex: number): boolean;
    isP2WPKH(voutIndex: number): boolean;
    isValidP2WPKH(voutIndex: number): boolean;
    /**
     * Checks if the output on index `voutIndex` is P2PK. (Pay to public key)
     * @param voutIndex index of the output we are checking
     * @returns weather a vout script is standard P2PK
     */
    isP2PK(voutIndex: number): boolean;
    isValidP2PK(voutIndex: number): boolean;
}
//# sourceMappingURL=UtxoTransaction.d.ts.map