minca
ApiCoreFunctions

Function: folderStores()

function folderStores(directory, options?): StoreFactory;

Defined in: packages/core/src/node/stores.ts:70

Stores in a data folder several apps and devices share (spec 05 §14).

The folder holds the registry, sealed, and each space as segments, the way a mirror keeps one in a bucket (folder). Everything else is this device's own, in local. Nothing else is read from the folder: whoever can write it could plant a writer id or a key's last place for this device to take.

Parameters

ParameterTypeDescription
directoryDirectoryHandleLike-
options?{ basePath?: string; local?: StoreFactory; localKey?: CryptoKey | null; }-
options.basePath?stringWhere this account's data starts, e.g. accounts/<id>/stores
options.local?StoreFactoryWhere this device keeps its own stores, outside the folder. Default: IndexedDB under minca-pod:<basePath>. Required without IndexedDB: in memory, a restart would sign at a place it signed before.
options.localKey?CryptoKey | nullSeals the registry. Without it nothing is sealed.

Returns

StoreFactory

On this page