[]previous and next page

createFileKVStore

Creates the file store.

Creates the file store. The file name is the SHA-256 of the key, and the file holds the key, so any key (up to 512 characters) fits in a file name.

Import#

ts
import { createFileKVStore } from "@shadow-js/dusk/node";

Signature#

ts
function createFileKVStore(options: FileKVStoreOptions): KVStore

Parameters#

Name Description
options The folder, the value bound and the clock.

Returns#

A KVStore.

Examples#

ts
const kv = createFileKVStore({ directory: ".dusk/kv" });