helia

Home > helia

helia package

Create a Helia node.

Example

import { MemoryDatastore } from 'datastore-core'
import { MemoryBlockstore } from 'blockstore-core'
import { createHelia } from 'helia'
import { unixfs } from '@helia/unixfs'
import { CID } from 'multiformats/cid'

const node = await createHelia({
  blockstore: new MemoryBlockstore(),
  datastore: new MemoryDatastore()
})
const fs = unixfs(node)
fs.cat(CID.parse('bafyFoo'))

Functions

Function Description
createHelia(init) Create and return a Helia node
createHelia(init)  

Interfaces

Interface Description
DAGWalker DAGWalkers take a block and yield CIDs encoded in that block
HeliaInit Options used to create a Helia node.