JSPM

  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q29244F
  • License Apache-2.0 OR MIT

peer-to-peer, collaborative states using merkle-crdts

Package Exports

  • welo
  • welo/dist/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (welo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm Codecov node-current NPM

welo opal painting

welo

HLDB implementation in Typescript

Install

npm install welo

Usage

import IPFS from 'ipfs'
import { Welo } from 'welo'

/** look at js-ipfs for configurations */
const ipfs = await IPFS.create() // 

/** see more config options in the API docs */
const welo = await Welo.create({
  ipfs,
  libp2p: ipfs.libp2p // ipfs.libp2p will throw a typescript error; it's a hack for now
})

/** create a manifest for a keyvalue database */
const manifest = await welo.determine({
  name: 'this is the databases name',
  type: 'keyvalue'
})

/** open the keyvalue database */
const keyvalue = await welo.open(manifest)

/** The keyvalue API docs are not uploaded yet */

const entryCID = await keyvalue.put('key', 'value')
const value = await keyvalue.get('key')
const entryCID = await keyvalue.del('key')

Check out the tests for more usage examples for now.

API

Check out the API Docs

License

This project is dual licensed under APACHE-2.0 and MIT.

Funding

Thanks to Protocol Labs for funding this project through this grant.