Skip to content

Documentation / @etherfold/browser / BrowserPublicationOptions

Type Alias: BrowserPublicationOptions ​

BrowserPublicationOptions = object

Defined in: packages/browser/src/publication.ts:37

WHERE A PUBLICATION INDEX IS, and what this tab takes from it, as createIndexerState's publication option takes it.

The trust contract is the snapshot's and the seed's (ADR-0066) ​

The CALLER names the locations and owns that choice: the index is fetched where it is pointed and nowhere else, and so are the bodies it names (relative to it). Keep the list in the BUILD, as the snapshot and seed locations always were.

Properties ​

fetch? ​

optional fetch?: typeof globalThis.fetch

Defined in: packages/browser/src/publication.ts:67

Injectable for tests and for a host with its own retry/timeout policy. Used for the index and the seed.


locations ​

locations: string | readonly string[]

Defined in: packages/browser/src/publication.ts:45

The index locations (.../publication.json), in the order they are tried. A location that does not answer, or answers with something that is not an index this build reads, is skipped for the next, as the snapshot bootstrap fails over between mirrors; the FIRST index read is the one used. A relative, hostless path is a first-class location (a build-embedded copy), ordinarily LAST.


seed? ​

optional seed?: true | { expectedContentHash?: string; maxEventsPerBatch?: number; reachBackTo?: number; }

Defined in: packages/browser/src/publication.ts:56

Whether to install the STREAM SEED the index lists for this tab's stream. OFF by default (ADR-0095: "the stream seed is opt-in, at both ends"): an app with a small state over a long history pays only for the state, and no seed is fetched even when the index lists one.

true asks for it with the install's defaults; an object asks for it with the install's own knobs. It needs a keepStream, exactly as the seed option does, and it EXCLUDES that option: one seed per boot, from one place.

Union Members ​

true


Type Literal ​

{ expectedContentHash?: string; maxEventsPerBatch?: number; reachBackTo?: number; }

expectedContentHash? ​

optional expectedContentHash?: string

An OPTIONAL pin, as BrowserStreamSeedOptions.expectedContentHash. Keep it in the build.

maxEventsPerBatch? ​

optional maxEventsPerBatch?: number

As BrowserStreamSeedOptions.maxEventsPerBatch.

reachBackTo? ​

optional reachBackTo?: number

As BrowserStreamSeedOptions.reachBackTo.