declare module 'ipld' { import BlockService from 'ipfs-block-service' import CID from 'cids' interface Options { blockService: BlockService formats?: Function[], loadFormat?: Function } interface AddOptions { hashAlg?: string cidVersion?: number onlyHash?: boolean } class Ipld { constructor(opts: {}) put(node: object, format: number, options?: AddOptions): Promise putMany(nodes: Iterable, format: number, options?: AddOptions): AsyncIterable resolve(cid: CID, path: string): AsyncIterable<{ remainderPath?: string, value: any}> get(cid: CID): Promise getMany(cids: Iterable): AsyncIterable remove(cid: CID): Promise removeMany(cids: Iterable): AsyncIterable tree(cid: CID, path?: string, options?: { recursive: boolean }): AsyncIterable addFormat?(ipldFormatImplementation: Function): Ipld removeFormat?(codec: any): Ipld defaultOptions?: AddOptions } // eslint-disable-next-line import/no-default-export export default Ipld }