import type { BlockViewer, IndexPublishRunner, IndexSummaryFamily, IndexWatermark, XL1BlockNumber } from '@xyo-network/xl1-protocol/protocol-lib'; import { AbstractS3Provider } from './AbstractS3Provider.ts'; /** * Publishes the multi-family chain index (blocks, balances, schemas, transfers) and transaction * inclusion lookup as static REST layouts that `RestIndexViewer` reads. Frames and inclusion * records are immutable. The runner reads blocks from its source viewer (MongoDB, or the * finalized/chain-state buckets via CDN) and writes both projections to the index bucket. * Independent watermarks prevent an existing summary index from hiding an incomplete transaction * backfill; each watermark advances only after the immutable data it covers is durable. * * When the bound `s3` connection declares a `readUrl` (a CDN / public R2 domain), already * published frames are read back through it — immutable, cached — instead of the S3 API, so * resume / skip-if-present and cross-pass sub-frame reuse are cheap cache hits rather than * per-object S3 GETs — the bulk of the read cost during catch-up. A CDN miss (404) is treated * as not-yet-published, so the caller rebuilds it; writes and the head watermark always go * through the S3 API. CDN reads use `context.fetchFn` when set (custom agents, auth headers, * tests), falling back to the global fetch. */ export declare class S3IndexPublishRunner extends AbstractS3Provider implements IndexPublishRunner { /** Connection kinds supported by this provider. */ static readonly connectionTypes: readonly ["s3"]; /** Primary moniker used to resolve this provider. */ static readonly defaultMoniker: "IndexPublishRunner"; /** Provider monikers that must resolve before this provider can be created. */ static readonly dependencies: "BlockViewer"[]; /** Provider monikers implemented by this provider class. */ static readonly monikers: "IndexPublishRunner"[]; /** Moniker implemented by this provider instance. */ moniker: "IndexPublishRunner"; protected _source?: BlockViewer; /** Finalized block viewer from which index summaries are derived. */ get source(): BlockViewer; protected get fetchFn(): typeof globalThis.fetch; /** Creates the provider instance after its dependencies and configuration have resolved. */ createHandler(): Promise; /** Builds completed summary frames and transaction inclusions, then advances both watermarks. */ publishCompletedFramesUpTo(ceiling: XL1BlockNumber): Promise; /** Publishes one completed frame for a family (and any missing sub-frames it depends on). */ publishFrame(family: IndexSummaryFamily, stepLevel: number, stepIndex: number): Promise; /** Dispatches a single frame to its family builder, writing it (and missing sub-frames) to the bucket. */ private buildFamilyFrame; /** Builds a family's frames in (previous, ceiling] across every level; returns total completed frames. */ private publishFamily; private publishTransactionInclusion; private publishTransactionInclusions; /** * Reads an already-published frame. Through the CDN (the bound connection's `readUrl`) when * configured — cheap and cache-friendly for immutable frames — falling back to the S3 API only * on a read error; a CDN miss (404) is treated as not-yet-published so the caller rebuilds it. * Otherwise reads via S3. */ private readFrame; private readTransactionHead; private readWatermark; private summaryMap; private writeHead; private writeManifest; private writeTransactionHead; private writeTransactionManifest; } //# sourceMappingURL=S3IndexPublishRunner.d.ts.map