import { Transaction as BsvTransaction, Beef, ChainTracker, WalletLoggerInterface } from '@bsv/sdk';
import { ServiceCollection } from './ServiceCollection';
import { WhatsOnChain } from './providers/WhatsOnChain';
import { ARC } from './providers/ARC';
import { Bitails } from './providers/Bitails';
import { BaseBlockHeader, BlockHeader, FiatExchangeRates, GetMerklePathResult, GetMerklePathService, GetRawTxResult, GetRawTxService, GetScriptHashHistoryResult, GetScriptHashHistoryService, GetStatusForTxidsResult, GetStatusForTxidsService, GetUtxoStatusOutputFormat, GetUtxoStatusResult, GetUtxoStatusService, PostBeefResult, PostBeefService, ServicesCallHistory, UpdateFiatExchangeRateService, WalletServices, WalletServicesOptions } from '../sdk/WalletServices.interfaces';
import type { FiatCurrencyCode } from '../sdk/WalletServices.interfaces';
import { Chain } from '../sdk/types';
import { TableOutput } from '../storage/schema/tables/TableOutput';
export declare class Services implements WalletServices {
    static createDefaultOptions(chain: Chain): WalletServicesOptions;
    options: WalletServicesOptions;
    whatsonchain: WhatsOnChain;
    arcTaal: ARC;
    arcGorillaPool?: ARC;
    bitails?: Bitails;
    getMerklePathServices: ServiceCollection<GetMerklePathService>;
    getRawTxServices: ServiceCollection<GetRawTxService>;
    postBeefServices: ServiceCollection<PostBeefService>;
    getUtxoStatusServices: ServiceCollection<GetUtxoStatusService>;
    getStatusForTxidsServices: ServiceCollection<GetStatusForTxidsService>;
    getScriptHashHistoryServices: ServiceCollection<GetScriptHashHistoryService>;
    updateFiatExchangeRateServices: ServiceCollection<UpdateFiatExchangeRateService>;
    chain: Chain;
    constructor(optionsOrChain: Chain | WalletServicesOptions);
    getServicesCallHistory(reset?: boolean): ServicesCallHistory;
    getChainTracker(): Promise<ChainTracker>;
    getBsvExchangeRate(): Promise<number>;
    getFiatExchangeRate(currency: FiatCurrencyCode, base?: FiatCurrencyCode): Promise<number>;
    getFiatExchangeRates(targetCurrencies: FiatCurrencyCode[]): Promise<FiatExchangeRates>;
    get getProofsCount(): number;
    get getRawTxsCount(): number;
    get postBeefServicesCount(): number;
    get getUtxoStatsCount(): number;
    getStatusForTxids(txids: string[], useNext?: boolean): Promise<GetStatusForTxidsResult>;
    /**
     * @param script Output script to be hashed for `getUtxoStatus` default `outputFormat`
     * @returns script hash in 'hashLE' format, which is the default.
     */
    hashOutputScript(script: string): string;
    isUtxo(output: TableOutput): Promise<boolean>;
    getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise<GetUtxoStatusResult>;
    getScriptHashHistory(hash: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise<GetScriptHashHistoryResult>;
    postBeefMode: 'PromiseAll' | 'UntilSuccess';
    /**
     * Soft timeout used for each provider call in `UntilSuccess` mode.
     * This bounds request latency when a provider hangs before failover.
     */
    postBeefUntilSuccessSoftTimeoutMs: number;
    /**
     * Additional soft-timeout budget (ms) per KiB of serialized Beef payload.
     * Helps avoid false timeout failover on legitimately large submissions.
     */
    postBeefUntilSuccessSoftTimeoutPerKbMs: number;
    /**
     * Upper bound for adaptive soft-timeout in `UntilSuccess` mode.
     */
    postBeefUntilSuccessSoftTimeoutMaxMs: number;
    /**
     *
     * @param beef
     * @param chain
     * @returns
     */
    postBeef(beef: Beef, txids: string[], logger?: WalletLoggerInterface): Promise<PostBeefResult[]>;
    private getPostBeefSoftTimeoutMs;
    getRawTx(txid: string, useNext?: boolean): Promise<GetRawTxResult>;
    invokeChaintracksWithRetry<R>(method: () => Promise<R>): Promise<R>;
    getHeaderForHeight(height: number): Promise<number[]>;
    getHeight(): Promise<number>;
    hashToHeader(hash: string): Promise<BlockHeader>;
    getMerklePath(txid: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise<GetMerklePathResult>;
    updateFiatExchangeRates(targetCurrencies: FiatCurrencyCode[], updateMsecs?: number): Promise<FiatExchangeRates>;
    nLockTimeIsFinal(tx: string | number[] | BsvTransaction | number): Promise<boolean>;
    getBeefForTxid(txid: string): Promise<Beef>;
}
export declare function validateScriptHash(output: string, outputFormat?: GetUtxoStatusOutputFormat): string;
/**
 * Serializes a block header as an 80 byte array.
 * The exact serialized format is defined in the Bitcoin White Paper
 * such that computing a double sha256 hash of the array computes
 * the block hash for the header.
 * @returns 80 byte array
 * @publicbody
 */
export declare function toBinaryBaseBlockHeader(header: BaseBlockHeader): number[];
//# sourceMappingURL=Services.d.ts.map