• Uses the given blockstore instance to fetch an IPFS node by a CID or path.

    Returns a Promise which resolves to a UnixFSEntry.

    Parameters

    Returns Promise<UnixFSEntry>

    Example

    import { exporter } from 'ipfs-unixfs-exporter'
    import { CID } from 'multiformats/cid'

    const cid = CID.parse('QmFoo')

    const entry = await exporter(cid, blockstore, {
    signal: AbortSignal.timeout(50000)
    })

    if (entry.type === 'file') {
    for await (const chunk of entry.content()) {
    // chunk is a Uint8Array
    }
    }