UNPKG

blockstore-datastore-adapter

Version:
55 lines 2.52 kB
/** * @typedef {import('interface-blockstore').Query} Query * @typedef {import('interface-blockstore').KeyQuery} KeyQuery * @typedef {import('interface-blockstore').Pair} Pair * @typedef {import('interface-blockstore').Options} Options * @typedef {import('interface-datastore').Datastore} Datastore * @typedef {import('interface-blockstore').Blockstore} Blockstore */ /** * @implements {Blockstore} */ export class BlockstoreDatastoreAdapter extends BaseBlockstore implements Blockstore { /** * @param {Datastore} datastore */ constructor(datastore: Datastore); child: import("interface-datastore").Datastore; /** * @param {Query} query * @param {Options} [options] */ query(query: Query, options?: import("interface-blockstore").Options | undefined): AsyncGenerator<{ key: CID<any, number, number, import("multiformats/cid").Version>; value: Uint8Array; }, void, unknown>; /** * @param {KeyQuery} query * @param {Options} [options] */ queryKeys(query: KeyQuery, options?: import("interface-blockstore").Options | undefined): AsyncGenerator<CID<any, number, number, import("multiformats/cid").Version>, void, unknown>; /** * @param {AsyncIterable<CID> | Iterable<CID>} cids * @param {Options} [options] */ getMany(cids: AsyncIterable<CID> | Iterable<CID>, options?: import("interface-blockstore").Options | undefined): AsyncGenerator<Uint8Array, void, unknown>; /** * @param {AsyncIterable<Pair> | Iterable<Pair>} blocks * @param {Options} [options] */ putMany(blocks: AsyncIterable<Pair> | Iterable<Pair>, options?: import("interface-blockstore").Options | undefined): AsyncGenerator<any, void, undefined>; /** * @param {AsyncIterable<CID> | Iterable<CID>} cids * @param {Options} [options] */ deleteMany(cids: AsyncIterable<CID> | Iterable<CID>, options?: import("interface-blockstore").Options | undefined): import("it-pushable").Pushable<any>; } export type Query = import('interface-blockstore').Query; export type KeyQuery = import('interface-blockstore').KeyQuery; export type Pair = import('interface-blockstore').Pair; export type Options = import('interface-blockstore').Options; export type Datastore = import('interface-datastore').Datastore; export type Blockstore = import('interface-blockstore').Blockstore; import { BaseBlockstore } from "blockstore-core/base"; import { CID } from "multiformats/cid"; //# sourceMappingURL=index.d.ts.map