UNPKG

blockstore-core

Version:

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

18 lines 916 B
import { BaseBlockstore } from './base.ts'; import type { AbortOptions } from 'abort-error'; import type { Blockstore, Pair } from 'interface-blockstore'; import type { CID } from 'multiformats/cid'; export interface IdentityBlockstoreInit { maxDigestLength?: number; } export declare class IdentityBlockstore extends BaseBlockstore { private readonly child?; private readonly maxDigestLength?; constructor(child?: Blockstore, init?: IdentityBlockstoreInit); put(key: CID, block: Uint8Array | Iterable<Uint8Array> | AsyncIterable<Uint8Array>, options?: AbortOptions): CID | Promise<CID>; get(key: CID, options?: AbortOptions): AsyncGenerator<Uint8Array>; has(key: CID, options?: AbortOptions): boolean | Promise<boolean>; delete(key: CID, options?: AbortOptions): void | Promise<void>; getAll(options?: AbortOptions): AsyncGenerator<Pair>; } //# sourceMappingURL=identity.d.ts.map