UNPKG

blockstore-core

Version:

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

17 lines 1.17 kB
import type { AbortOptions } from 'abort-error'; import type { Blockstore, InputPair, Pair } from 'interface-blockstore'; import type { CID } from 'multiformats/cid'; export declare class BaseBlockstore implements Blockstore { has(key: CID, options?: AbortOptions): boolean | Promise<boolean>; put(key: CID, val: Uint8Array | Iterable<Uint8Array> | AsyncIterable<Uint8Array>, options?: AbortOptions): CID | Promise<CID>; putMany(source: Iterable<InputPair> | AsyncIterable<InputPair>, options?: AbortOptions): Generator<CID> | AsyncGenerator<CID>; get(key: CID, options?: AbortOptions): Generator<Uint8Array> | AsyncGenerator<Uint8Array>; getMany(source: Iterable<CID> | AsyncIterable<CID>, options?: AbortOptions): Generator<Pair> | AsyncGenerator<Pair>; delete(key: CID, options?: AbortOptions): void | Promise<void>; deleteMany(source: Iterable<CID> | AsyncIterable<CID>, options?: AbortOptions): Generator<CID> | AsyncGenerator<CID>; /** * Extending classes should override `query` or implement this method */ getAll(options?: AbortOptions): Generator<Pair> | AsyncGenerator<Pair>; } //# sourceMappingURL=base.d.ts.map