minca
ApiSessionFunctions

Function: storesFor()

function storesFor(account, folder?): StoreFactory;

Defined in: packages/core/src/session/places.ts:125

The stores for one account.

Paths are account-scoped either way, so two accounts in one browser never share a store, the same way two accounts in one folder never share a subtree. A pod's registry is sealed under the account's local key, so someone who copies the folder cannot read the private spaces in it.

Parameters

ParameterTypeDescription
accountAccountSummary-
folder?{ directory: DirectoryHandleLike; local?: StoreFactory; localKey: CryptoKey; }The unlocked pod and its local key, when the account lives in one
folder.directoryDirectoryHandleLike-
folder.local?StoreFactoryWhere this device keeps a pod's own stores; default this origin's IndexedDB (folderStores)
folder.localKeyCryptoKey-

Returns

StoreFactory

On this page