import { importByteStream } from 'ipfs-unixfs-importer'
import { MemoryBlockstore } from 'blockstore-core'
// store blocks in memory, other blockstores are available
const blockstore = new MemoryBlockstore()
const input = [
Uint8Array.from([0, 1, 2, 3, 4]),
Uint8Array.from([5, 6, 7, 8, 9])
]
const entry = await importByteStream(input, blockstore)
importByteStream
accepts a single stream of Uint8Arrays and returns a promise of a singleImportResult
.