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 readonly getStatusForTxidsBatchLimit = 20; static createDefaultOptions(chain: Chain): WalletServicesOptions; options: WalletServicesOptions; whatsonchain: WhatsOnChain; arcTaal: ARC; arcGorillaPool?: ARC; bitails?: Bitails; getMerklePathServices: ServiceCollection; getRawTxServices: ServiceCollection; postBeefServices: ServiceCollection; getUtxoStatusServices: ServiceCollection; getStatusForTxidsServices: ServiceCollection; getScriptHashHistoryServices: ServiceCollection; updateFiatExchangeRateServices: ServiceCollection; chain: Chain; constructor(optionsOrChain: Chain | WalletServicesOptions); getServicesCallHistory(reset?: boolean): ServicesCallHistory; getChainTracker(): Promise; getBsvExchangeRate(): Promise; getFiatExchangeRate(currency: FiatCurrencyCode, base?: FiatCurrencyCode): Promise; getFiatExchangeRates(targetCurrencies: FiatCurrencyCode[]): Promise; get getProofsCount(): number; get getRawTxsCount(): number; get postBeefServicesCount(): number; get getUtxoStatsCount(): number; getStatusForTxids(txids: string[], useNext?: boolean): Promise; private getStatusForTxidsBatched; /** * @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; getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise; private tryUtxoStatusProviders; getScriptHashHistory(hash: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise; 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; private getPostBeefSoftTimeoutMs; getRawTx(txid: string, useNext?: boolean): Promise; private applyRawTxResult; invokeChaintracksWithRetry(method: () => Promise): Promise; getHeaderForHeight(height: number): Promise; getHeight(): Promise; hashToHeader(hash: string): Promise; getMerklePath(txid: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise; updateFiatExchangeRates(targetCurrencies: FiatCurrencyCode[], updateMsecs?: number): Promise; private collectStaleCurrencies; private fetchFiatRates; private mergeFiatRates; nLockTimeIsFinal(tx: string | number[] | BsvTransaction | number): Promise; getBeefForTxid(txid: string): Promise; } 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