import BN from "bn.js";
import { MccClient } from "../module";
import { TransactionSuccessStatus } from "../types/genericMccTypes";
declare type SummaryBaseProps = {
    client?: MccClient;
};
export declare type BalanceDecreasingProps = SummaryBaseProps & {
    sourceAddressIndicator: string;
};
export declare type PaymentSummaryProps = SummaryBaseProps & {
    inUtxo: number;
    outUtxo: number;
};
export declare type paymentNonexistenceSummaryProps = SummaryBaseProps & {
    inUtxo: number;
};
export interface AddressAmount {
    address?: string;
    amount: BN;
    elementaryUnits?: BN;
    utxo?: number;
}
interface TransactionSummaryBase<ST, TO> {
    status: ST;
    response?: TO;
}
export declare enum PaymentNonexistenceSummaryStatus {
    Success = "success",
    Coinbase = "coinbase",
    NotNativePayment = "notNativePayment",
    UnexpectedNumberOfParticipants = "unexpectedNumberOfParticipants",
    InvalidInUtxo = "invalidInUtxo",
    NoSpentAmountAddress = "noSpentAmountAddress",
    NoIntendedSpentAmountAddress = "noIntendedSpentAmountAddress",
    InvalidPkscript = "invalidPkscript"
}
export declare enum PaymentSummaryStatus {
    Success = "success",
    Coinbase = "coinbase",
    NotNativePayment = "notNativePayment",
    UnexpectedNumberOfParticipants = "unexpectedNumberOfParticipants",
    InvalidInUtxo = "invalidInUtxo",
    NoSpentAmountAddress = "noSpentAmountAddress",
    NoIntendedSpentAmountAddress = "noIntendedSpentAmountAddress",
    InvalidPkscript = "invalidPkscript",
    InvalidOutUtxo = "invalidOutUtxo",
    NoReceiveAmountAddress = "noReceiveAmountAddress",
    NoIntendedReceiveAmountAddress = "noIntendedReceiveAmountAddress"
}
export declare enum BalanceDecreasingSummaryStatus {
    Success = "success",
    InvalidInUtxo = "invalidInUtxo",
    NoSourceAddress = "noSourceAddress",
    NotValidSourceAddressFormat = "notValidSourceAddressFormat"
}
interface SummaryObjectBase {
    blockTimestamp: number;
    transactionHash: string;
    sourceAddressHash: string;
    sourceAddress: string;
    spentAmount: BN;
    paymentReference: string;
    transactionStatus: TransactionSuccessStatus;
}
export interface PaymentSummaryObject extends SummaryObjectBase {
    receivingAddressHash: string;
    receivingAddress: string;
    receivedAmount: BN;
    intendedSourceAddressHash: string;
    intendedSourceAddress: string;
    intendedSourceAmount: BN;
    intendedReceivingAddressHash: string;
    intendedReceivingAddress: string;
    intendedReceivingAmount: BN;
    oneToOne: boolean;
    isFull: boolean;
}
export interface PaymentNonexistenceSummaryObject extends SummaryObjectBase {
    intendedSourceAddressHash: string;
    intendedSourceAddress: string;
    intendedSourceAmount: BN;
    isFull: boolean;
}
export interface BalanceDecreasingSummaryObject extends SummaryObjectBase {
    sourceAddressIndicator: string;
    isFull: boolean;
}
export declare type BalanceDecreasingSummaryResponse = TransactionSummaryBase<BalanceDecreasingSummaryStatus, BalanceDecreasingSummaryObject>;
export declare type PaymentSummaryResponse = TransactionSummaryBase<PaymentSummaryStatus, PaymentSummaryObject>;
export declare type PaymentNonexistenceSummaryResponse = TransactionSummaryBase<PaymentNonexistenceSummaryStatus, PaymentNonexistenceSummaryObject>;
export declare abstract class TransactionBase {
    protected privateData: any;
    protected privateAdditionalData: any;
    constructor(data: any, additionalData?: any);
    /**
     * Exposing the private data for the derived classes (dev only/python like privatization)
     */
    get _data(): any;
    /**
     * Exposing the private data for the derived classes (dev only/python like privatization)
     */
    get _additionalData(): any;
    /**
     * Transaction hash and TxId (for utxo hash and txid differ since segWit)
     */
    /**
     * Transaction ID
     */
    abstract get txid(): string;
    /**
     * Flare specific standardized txid (hex encoded string of length 64 (32 bytes) without 0x prefix)
     */
    abstract get stdTxid(): string;
    /**
     * Transaction Hash
     */
    abstract get hash(): string;
    /**
     * Array of all references found in transactions
     */
    abstract get reference(): string[];
    /**
     * Returns standardized payment reference, if it exists, or null reference.
     */
    abstract get stdPaymentReference(): string;
    /**
     * Returns unix timestamp of the transaction (block of the transaction).
     */
    abstract get unixTimestamp(): number;
    /**
     Returns an array of all source addresses that are a source of native tokens.
 
     One or more of so returned addresses pay the fee
 
     * In account-based chains, only one address is present.
     * In UTXO chains, addresses indicate the addresses on relevant inputs.
    
     Some addresses may be undefined, either due to non-existence on specific inputs or due to not being fetched from the outputs of the corresponding input transactions.
     */
    abstract get sourceAddresses(): (string | undefined)[];
    /**
     * Array of a receiving addresses. In account-based chains only one address in present.
     * In UTXO chains, the list indicates the addresses on the corresponding transaction outputs.
     * Some may be undefined since outputs may not have addresses defined.
     */
    abstract get receivingAddresses(): (string | undefined)[];
    /**
     * Gets transaction fee. In some cases it can revert, since fee is not possible to calculate.
     */
    abstract get fee(): BN;
    /**
     * Gets transaction fee in elementary units (e.g. satoshi, microalgo, ...) and the address that paid the fee.
     */
    abstract get feeSignerTotalAmount(): AddressAmount;
    /**
     * An array of spent amounts on transaction inputs.
     * In account-based chains, only one amount is present, and includes total spent amount, including fees.
     * In UTXO chains, the spent amounts on the corresponding inputs are given in the list.
     * If the corresponding addresses are undefined and not fetched (in `sourceAddresses`), the
     * corresponding spent amounts are 0.
     * The amounts are in basic units (e.g. satoshi, microalgo, ...)
     */
    abstract get spentAmounts(): AddressAmount[];
    /**
     * On transactions that were successfully this is the same as `spentAmounts`.
     * On some chains transaction can be in block and fail, intended spent amount represents the amounts that were intended to be spent by each address.
     * Note: We only extract intended spent amounts for "nice" payment transactions that intend to transfer native tokens.
     */
    abstract get intendedSpentAmounts(): AddressAmount[];
    /**
     * An array of received amounts on transaction outputs.
     * In account based chains, only one input and output exist.
     * In UTXO chains ,the received amounts correspond to the amounts on outputs.
     */
    abstract get receivedAmounts(): AddressAmount[];
    /**
     * On transactions that were successfully this is the same as `receivedAmounts`.
     * On some chains transaction can be in block and fail, intended received amount represents the amounts that were intended to be received by each address.
     * Note: We only extract intended received amounts for "nice" payment transactions that intend to transfer native tokens.
     */
    abstract get intendedReceivedAmounts(): AddressAmount[];
    /**
     * Returns transaction type as a string identifier. A set of types depends on a specific underlying chain.
     */
    abstract get type(): string;
    /**
     * Indicates whether a payment is a native payment.
     */
    abstract get isNativePayment(): boolean;
    /**
     * Currency name on the underlying chain.
     */
    abstract get currencyName(): string;
    /**
     * Amount of elementary units that constitute one basic unit of currency on an underlying chain (e.g. 1 BTC = 10^8 satoshis)
     */
    abstract get elementaryUnits(): BN;
    /**
     * Returns transaction success status.
     */
    abstract get successStatus(): TransactionSuccessStatus;
    /**
     * Ensures that the transaction object has all the required information retrievable from current client
     * Make
     * @param client
     */
    abstract makeFull(client: MccClient): Promise<void>;
    /**
     * Provides payment summary for a given transaction.
     * It can only do so for well structured "native" payments, that come from one address and goes to one address (utxo is a bit special).
     * If payment can be successfully summarized, the response will contain a `PaymentSummaryObject`. and status of `PaymentSummaryStatus.Success`.
     * If method throws exception only on critical occasions:
     * - connection to node is not stable or provided
     * - transaction data was corrupted when creating this object
     * - unhandled errors (usually indicates bugs in either this library or the underlying chain)
     * @param props.client : Initialized mcc client for the underlying chain
     * @param props.inUtxo : Vin index for utxo chains and ignored on non utxo chains
     * @param props.outUtxo : Vout index for utxo chains and ignored on non utxo chains
     */
    abstract paymentSummary(props: PaymentSummaryProps): Promise<PaymentSummaryResponse>;
    /**
     * Provides balance decreasing summary for a given transaction.
     * Must be able to analyze any transaction, and provide a summary of the balance decreasing actions, that either reduce the given address balance or are signed by the given address.
     * If balance decreasing can be successfully summarized, the response will contain a `BalanceDecreasingSummaryObject` and status of `BalanceDecreasingSummaryStatus.Success`.
     * Method throws exception only on critical occasions if:
     * - connection to node is not stable or provided
     * - transaction data was corrupted when creating this object
     * - unhandled errors (usually indicates bugs in either this library or the underlying chain)
     * @param props.client : Initialized mcc client for the underlying chain
     * @param props.sourceAddressIndicator : AddressIndicator (vin index on utxo chains and standardized address hash on non utxo chains)
     */
    abstract balanceDecreasingSummary(props: BalanceDecreasingProps): Promise<BalanceDecreasingSummaryResponse>;
}
export {};
//# sourceMappingURL=TransactionBase.d.ts.map