UNPKG

@metamask/ocap-kernel

Version:
21 lines 1.03 kB
import type { KVStore } from "@metamask/kernel-store"; import type { EndpointId, KRef } from "../../types.cjs"; import type { StoredQueue, StoredValue } from "../types.cjs"; /** * Get the base store methods for managing stored values and queues. * * @param kv - The key/value store to provide the underlying persistence mechanism. * @returns An object with methods for managing stored values and queues. */ export declare function getBaseMethods(kv: KVStore): { getSlotKey: (endpointId: EndpointId, kref: KRef) => string; refCountKey: (kref: KRef) => string; getOwnerKey: (kref: KRef) => string; getRevokedKey: (kref: KRef) => string; incCounter: (value: StoredValue) => string; provideCachedStoredValue: (key: string, init?: string) => StoredValue; provideRawStoredValue: (key: string, init?: string) => StoredValue; provideStoredQueue: (queueName: string, cached?: boolean) => StoredQueue; getPrefixedKeys: (prefix: string) => Generator<string>; }; //# sourceMappingURL=base.d.cts.map