@metamask/kernel-store
Version:
Ocap Kernel storage abstractions and implementations
26 lines • 975 B
text/typescript
import { Logger } from "@metamask/logger";
import type { Database as SqliteDatabase } from "better-sqlite3";
import type { KernelDatabase } from "../types.cjs";
export type Database = SqliteDatabase & {
_spStack: string[];
};
/**
* Makes a {@link KernelDatabase} for low-level persistent storage.
*
* @param options - The options for the database.
* @param options.dbFilename - The filename of the database to use. Defaults to {@link DEFAULT_DB_FILENAME}.
* @param options.logger - A logger to use.
* @returns The key/value store to base the kernel store on.
*/
export declare function makeSQLKernelDatabase({ dbFilename, logger, }: {
dbFilename?: string | undefined;
logger?: Logger;
}): Promise<KernelDatabase>;
/**
* Get the filename for a database.
*
* @param label - A label for the database.
* @returns The filename for the database.
*/
export declare function getDBFilename(label: string): Promise<string>;
//# sourceMappingURL=nodejs.d.cts.map