UNPKG

blockstore-core

Version:

Contains various implementations of the API contract described in interface-blockstore

15 lines 782 B
import { CID } from 'multiformats/cid'; import { BaseBlockstore } from './base.ts'; import type { AbortOptions } from 'abort-error'; import type { Pair } from 'interface-blockstore'; export declare class MemoryBlockstore extends BaseBlockstore { private readonly data; constructor(); put(key: CID, val: Uint8Array | Iterable<Uint8Array> | AsyncIterable<Uint8Array>, options?: AbortOptions): CID | Promise<CID>; private _put; get(key: CID, options?: AbortOptions): Generator<Uint8Array> | AsyncGenerator<Uint8Array>; has(key: CID, options?: AbortOptions): boolean | Promise<boolean>; delete(key: CID, options?: AbortOptions): Promise<void>; getAll(options?: AbortOptions): Generator<Pair> | AsyncGenerator<Pair>; } //# sourceMappingURL=memory.d.ts.map