import { Blob } from '@aztec/blob-lib'; import { type Logger } from '@aztec/foundation/log'; import type { BlobArchiveClient } from '../archive/interface.js'; import { BlobWithIndex } from '../types/blob_with_index.js'; import { type BlobSinkConfig } from './config.js'; import type { BlobSinkClientInterface } from './interface.js'; export declare class HttpBlobSinkClient implements BlobSinkClientInterface { private readonly opts; protected readonly log: Logger; protected readonly config: BlobSinkConfig; protected readonly archiveClient: BlobArchiveClient | undefined; protected readonly fetch: typeof fetch; constructor(config?: BlobSinkConfig, opts?: { logger?: Logger; archiveClient?: BlobArchiveClient; onBlobDeserializationError?: 'warn' | 'trace'; }); testSources(): Promise; sendBlobsToBlobSink(blobs: Blob[]): Promise; /** * Get the blob sidecar * * If requesting from the blob sink, we send the blobkHash * If requesting from the beacon node, we send the slot number * * 1. First atttempts to get blobs from a configured blob sink * 2. On failure, attempts to get blobs from the list of configured consensus hosts * 3. On failure, attempts to get blobs from an archive client (eg blobscan) * 4. Else, fails * * @param blockHash - The block hash * @param indices - The indices of the blobs to get * @returns The blobs */ getBlobSidecar(blockHash: `0x${string}`, blobHashes: Buffer[], indices?: number[]): Promise; private getBlobsFromSink; getBlobSidecarFrom(hostUrl: string, blockHashOrSlot: string | number, blobHashes?: Buffer[], indices?: number[], l1ConsensusHostIndex?: number): Promise; private fetchBlobSidecars; private getLatestSlotNumber; /** * Get the slot number from the consensus host * As of eip-4788, the parentBeaconBlockRoot is included in the execution layer. * This allows us to query the consensus layer for the slot number of the parent block, which we will then use * to request blobs from the consensus layer. * * If this returns undefined, it means that we are not connected to a real consensus host, and we should * query blobs with the blockHash. * * If this returns a number, then we should query blobs with the slot number * * @param blockHash - The block hash * @returns The slot number */ private getSlotNumber; } //# sourceMappingURL=http.d.ts.map