Contains various implementations of the API contract described in interface-blockstore
- Base:
src/base
- Memory:
src/memory
$ npm install blockstore-core
Provides a complete implementation of the Blockstore interface. You must implement .get
, .put
, etc.
import { BaseBlockstore } from 'blockstore-core/base'
class MyCustomBlockstore extends BaseBlockstore {
put (key, val, options) {
// store a block
}
get (key, options) {
// retrieve a block
}
// ...etc
}
A simple Blockstore that stores blocks in memory.
import { MemoryBlockstore } from 'blockstore-core/memory'
const store = new MemoryBlockstore()
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
Apache-2.0 OR MIT