Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.
/ js-blockstore-core Public archive

Contains various implementations of the API contract described in interface-blockstore

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

ipfs/js-blockstore-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-blockstore-core

codecov GitHub Workflow Status

Contains various implementations of the API contract described in interface-blockstore

Lead Maintainer

Alex Potsides

Table of Contents

Implementations

Install

$ npm install blockstore-core

Usage

BaseBlockstore

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
}

MemoryBlockstore

A simple Blockstore that stores blocks in memory.

import { MemoryBlockstore } from 'blockstore-core/memory'

const store = new MemoryBlockstore()

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

License

Apache-2.0 OR MIT

About

Contains various implementations of the API contract described in interface-blockstore

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors 8