import { QuantumBIP32Interface } from '@btc-vision/bip32';
import { Network, PsbtOutputExtended, Signer } from '@btc-vision/bitcoin';
import { UniversalSigner } from '@btc-vision/ecpair';
import { Address, BinaryReader, ChallengeSolution, IP2WSHAddress, LoadedStorage, RawChallenge, SupportedTransactionVersion } from '@btc-vision/transaction';
import { UTXO } from '../bitcoin/UTXOs.js';
import { BitcoinFees } from '../block/BlockGasParameters.js';
import { IAccessList } from './interfaces/IAccessList.js';
import { EventList, ICallResultData } from './interfaces/ICallResult.js';
import { IProviderForCallResult } from './interfaces/IProviderForCallResult.js';
import { OPNetEvent } from './OPNetEvent.js';
import { ContractDecodedObjectResult, DecodedOutput } from './types/ContractTypes.js';
export interface TransactionParameters {
    readonly signer: Signer | UniversalSigner | null;
    readonly mldsaSigner: QuantumBIP32Interface | null;
    readonly refundTo: string;
    readonly sender?: string;
    readonly priorityFee?: bigint;
    feeRate?: number;
    readonly utxos?: UTXO[];
    readonly maximumAllowedSatToSpend: bigint;
    readonly network: Network;
    readonly extraInputs?: UTXO[];
    readonly extraOutputs?: PsbtOutputExtended[];
    readonly minGas?: bigint;
    readonly note?: string | Uint8Array;
    readonly p2wda?: boolean;
    readonly from?: Address;
    readonly txVersion?: SupportedTransactionVersion;
    readonly anchor?: boolean;
    readonly dontUseCSVUtxos?: boolean;
    readonly maxUTXOs?: number;
    readonly throwIfUTXOsLimitReached?: boolean;
    readonly linkMLDSAPublicKeyToAddress?: boolean;
    readonly revealMLDSAPublicKey?: boolean;
    readonly challenge?: ChallengeSolution;
    readonly subtractExtraUTXOFromAmountRequired?: boolean;
}
export interface UTXOTrackingInfo {
    readonly csvUTXOs: UTXO[];
    readonly p2wdaUTXOs: UTXO[];
    readonly regularUTXOs: UTXO[];
    readonly refundAddress: string;
    readonly refundToAddress: string;
    readonly csvAddress?: IP2WSHAddress;
    readonly p2wdaAddress?: {
        readonly address: string;
        readonly witnessScript: Uint8Array;
    };
    readonly isP2WDA: boolean;
}
export interface SignedInteractionTransactionReceipt {
    readonly fundingTransactionRaw: string | null;
    readonly interactionTransactionRaw: string;
    readonly nextUTXOs: UTXO[];
    readonly estimatedFees: bigint;
    readonly challengeSolution: RawChallenge;
    readonly interactionAddress: string | null;
    readonly fundingUTXOs: UTXO[];
    readonly fundingInputUtxos: UTXO[];
    readonly compiledTargetScript: string | null;
    readonly utxoTracking: UTXOTrackingInfo;
}
export interface InteractionTransactionReceipt {
    readonly transactionId: string;
    readonly newUTXOs: UTXO[];
    readonly peerAcknowledgements: number;
    readonly estimatedFees: bigint;
    readonly challengeSolution: RawChallenge;
    readonly rawTransaction: string;
    readonly interactionAddress: string | null;
    readonly fundingUTXOs: UTXO[];
    readonly fundingInputUtxos: UTXO[];
    readonly compiledTargetScript: string | null;
}
export declare class CallResult<T extends ContractDecodedObjectResult = {}, U extends OPNetEvent<ContractDecodedObjectResult>[] = OPNetEvent<ContractDecodedObjectResult>[]> implements Omit<ICallResultData, 'estimatedGas' | 'events' | 'specialGas'> {
    #private;
    readonly result: BinaryReader;
    readonly accessList: IAccessList;
    revert: string | undefined;
    constant: boolean;
    payable: boolean;
    calldata: Uint8Array | undefined;
    loadedStorage: LoadedStorage | undefined;
    readonly estimatedGas: bigint | undefined;
    readonly refundedGas: bigint | undefined;
    properties: T;
    estimatedSatGas: bigint;
    estimatedRefundedGasInSat: bigint;
    events: U;
    to: string | undefined;
    address: Address | undefined;
    fromAddress: Address | undefined;
    csvAddress: IP2WSHAddress | undefined;
    constructor(callResult: ICallResultData, provider: IProviderForCallResult);
    get rawEvents(): EventList;
    static decodeRevertData(revertDataBytes: Uint8Array): string;
    static fromOfflineBuffer(input: Uint8Array | string): CallResult;
    private static resolveNetwork;
    setTo(to: string, address: Address): void;
    setFromAddress(from?: Address): void;
    signTransaction(interactionParams: TransactionParameters, amountAddition?: bigint): Promise<SignedInteractionTransactionReceipt>;
    sendPresignedTransaction(signedTx: SignedInteractionTransactionReceipt): Promise<InteractionTransactionReceipt>;
    sendTransaction(interactionParams: TransactionParameters, amountAddition?: bigint): Promise<InteractionTransactionReceipt>;
    setGasEstimation(estimatedGas: bigint, refundedGas: bigint): void;
    setBitcoinFee(fees: BitcoinFees): void;
    setDecoded(decoded: DecodedOutput): void;
    setEvents(events: U): void;
    setCalldata(calldata: Uint8Array): void;
    toOfflineBuffer(refundAddress: string, amount: bigint): Promise<Uint8Array>;
    private max;
    private ensureUTXOsAvailable;
    private computeRequiredAmount;
    private acquire;
    private bigintMax;
    private getValuesFromAccessList;
    private contractToString;
    private parseEvents;
    private base64ToUint8Array;
}
