API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceContainerBlockStore

@codexo/exojs / assets / stable

Where a reader keeps container blocks between visits. A block is addressed by its hash, never by the pack it came from, so two packs that share a block share the stored entry - which is what makes an update cost only the blocks whose contents actually changed. Every method may fail or answer nothing without that being an error: a store is an optimisation, and a reader that gets nothing back simply fetches.

0
props
2
methods
0
events
Import
import { ContainerBlockStore } from '@codexo/exojs'

Where a reader keeps container blocks between visits.

A block is addressed by its hash, never by the pack it came from, so two packs that share a block share the stored entry - which is what makes an update cost only the blocks whose contents actually changed.

Every method may fail or answer nothing without that being an error: a store is an optimisation, and a reader that gets nothing back simply fetches.

Methods2
get(hash: string): Promise<Uint8Array<ArrayBuffer> | undefined>
The stored bytes for hash, or undefined when the store does not hold them.
put(hash: string, bytes: Uint8Array): Promise<void>
Offer bytes for hash. A store is free to decline, evict, or ignore the offer.
Source