Documentation / @etherfold/browser / HostSettings
Type Alias: HostSettings ​
HostSettings =
object
Defined in: packages/browser/src/host/settings.ts:30
WHAT A TAB MAY TELL ITS HOST WHEN IT CONNECTS: the part of a worker host's spec that is DATA, and so can cross a port.
A worker entry holds what is CODE (createState, createProcessor, a processor module, a keepStream), because code cannot be cloned and has to be imported where the fold runs (ADR-0082). What the tab knows at run time and the entry cannot (the chain the user connected, the deployments, where the publication is, how long a catch-up may take) is this, handed over with the connection the way webevm's createWorkerNode({worker, ...options}) passes its cloneable options: connectToIndexerHost(access, {provider, settings}).
Every field is under the name the worker spec (HostedIndexerSpec) and createIndexerState already use for it, so a value moves from the entry to the tab without being renamed. It is CHECKED for cloneability on the tab, naming the field, so a publication.fetch or a config.keepStream (both functions) is refused where it was written rather than thrown out of postMessage. Those stay in the entry.
One value, one place ​
A setting may be given by the entry OR by a tab, and a host told two different values for it REFUSES the connect, naming the fields (HostSettingsConflictError), rather than picking one silently. See settleHostSettings for the rule.
Properties ​
catchUpWithinSeconds? ​
readonlyoptionalcatchUpWithinSeconds?:number|"always"
Defined in: packages/browser/src/host/settings.ts:38
The returning-tab catch-up budget, as HostedIndexerSpec.catchUpWithinSeconds.
config? ​
readonlyoptionalconfig?:ProvidedIndexerConfig<Abi>
Defined in: packages/browser/src/host/settings.ts:34
As HostedIndexerSpec.config. A keepStream in it is code and stays in the entry.
promotion? ​
readonlyoptionalpromotion?:PromotionConfig
Defined in: packages/browser/src/host/settings.ts:42
The promotion policy, as HostedIndexerSpec.promotion.
publication? ​
readonlyoptionalpublication?:BrowserPublicationOptions
Defined in: packages/browser/src/host/settings.ts:36
Where the publication index is, as HostedIndexerSpec.publication. A fetch in it stays in the entry.
seed? ​
readonlyoptionalseed?:BrowserStreamSeedOptions
Defined in: packages/browser/src/host/settings.ts:40
A stream seed to install, as HostedIndexerSpec.seed. Needs a keepStream, which the entry holds.
source? ​
readonlyoptionalsource?:IndexingSource<Abi>
Defined in: packages/browser/src/host/settings.ts:32
The contracts and events to fold, as HostedIndexerSpec.source.