import { Chain } from '../../../sdk'; import { ChaintracksOptions } from './Api/ChaintracksApi'; import { Chaintracks } from './Chaintracks'; import { ChaintracksFetchApi } from './Api/ChaintracksFetchApi'; import { BulkFileDataManager } from './util/BulkFileDataManager'; import { ChaintracksClientApi } from './Api/ChaintracksClientApi'; import type { BulkFileDataCacheApi, BulkFileDownloadBudgetApi } from './Api/BulkFileDataCacheApi'; import type { BulkFileDataValidatorApi } from './Api/BulkFileDataValidatorApi'; export interface ChaintracksSourceOptions { /** Preferred go-chaintracks or Arcade source. */ chaintracks?: ChaintracksClientApi; /** Disable the credential-free public Arcade default. */ disableChaintracks?: boolean; /** Maximum number of headers requested from the remote source at once. */ remoteMaxHeadersPerRequest?: number; /** Disable the configured CDN source without changing its URL. */ disableCdn?: boolean; /** Disable the keyless WhatsOnChain fallback on mainnet/testnet. */ disableWhatsOnChain?: boolean; /** Persistent checkpoint/cache storage used before any remote bulk download. */ bulkFileCache?: BulkFileDataCacheApi; /** Optional byte budget applied before remote bulk-file downloads. */ bulkFileDownloadBudget?: BulkFileDownloadBudgetApi; /** Optional complete-object validator; Node services should use a bounded worker implementation. */ bulkFileDataValidator?: BulkFileDataValidatorApi; } export type ChaintracksArgumentsTail = [ whatsonchainApiKey?: string, maxPerFile?: number, maxRetained?: number, fetch?: ChaintracksFetchApi, cdnUrl?: string, liveHeightThreshold?: number, reorgHeightThreshold?: number, bulkMigrationChunkSize?: number, batchInsertLimit?: number, addLiveRecursionLimit?: number, sources?: ChaintracksSourceOptions ]; export type DefaultChaintracksArguments = [chain: Chain, ...options: ChaintracksArgumentsTail]; /** * Shared parameters for configuring Chaintracks ingestors. */ export interface ChaintracksIngestorParams { chain: Chain; whatsonchainApiKey: string; maxPerFile: number; fetch: ChaintracksFetchApi; cdnUrl: string; addLiveRecursionLimit: number; sources: ChaintracksSourceOptions; } export interface ResolvedDefaultChaintracksParams extends ChaintracksIngestorParams { maxRetained: number; liveHeightThreshold: number; reorgHeightThreshold: number; bulkMigrationChunkSize: number; batchInsertLimit: number; } export interface CreatedChaintracks { chain: Chain; maxPerFile: number; fetch: ChaintracksFetchApi; storage: TStorage; chaintracks: Chaintracks; available: Promise; } export declare function resolveDefaultChaintracksArguments(args: DefaultChaintracksArguments): ResolvedDefaultChaintracksParams; export declare function toDefaultChaintracksArguments(params: ResolvedDefaultChaintracksParams): DefaultChaintracksArguments; export declare function createDefaultBulkFileDataManager(params: ResolvedDefaultChaintracksParams): BulkFileDataManager; export declare function createDefaultChaintracksStorageOptions(params: ResolvedDefaultChaintracksParams): { chain: Chain; bulkFileDataManager: BulkFileDataManager; liveHeightThreshold: number; reorgHeightThreshold: number; bulkMigrationChunkSize: number; batchInsertLimit: number; }; export declare function startChaintracks(params: ResolvedDefaultChaintracksParams, options: ChaintracksOptions): CreatedChaintracks; export declare function createAndStartDefaultChaintracks(args: DefaultChaintracksArguments, createOptions: (...args: DefaultChaintracksArguments) => ChaintracksOptions): CreatedChaintracks; /** * Builds the shared portion of ChaintracksOptions that all storage backends * (Knex, Idb, NoDb) have in common: the options shell and bulk/live ingestors. * * The caller is responsible for providing the storage implementation. */ export declare function buildChaintracksOptionsWithIngestors(params: ChaintracksIngestorParams, storage: ChaintracksOptions['storage']): ChaintracksOptions; //# sourceMappingURL=configureChaintracksIngestors.d.ts.map