ipld/js-ipld

Name: js-ipld

Owner: IPLD

Description: The JavaScript Implementation of IPLD

Created: 2016-04-08 08:34:07.0

Updated: 2018-05-18 15:14:06.0

Pushed: 2018-05-14 15:21:24.0

Homepage: https://ipld.io

Size: 183

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

IPLD hex logo

The JavaScript implementation of the IPLD

Travis CI Circle CI Coverage Status Dependency Status js-standard-style

The JavaScript implementation of the IPLD, InterPlanetary Linked-Data

Project Status

We've come a long way, but this project is still in Alpha, lots of development is happening, API might change, beware of the Dragons ?.

Want to get started? Check our examples folder. You can check the development status at the js-ipld Waffle Board.

Throughput Graph

Tech Lead

Volker Mische

Lead Maintainer

Volker Mische

Table of Contents
Install
m install --save ipld
Usage
t Resolver = require('ipld')

ou need to create and pass an ipfs-block-service instance
ttps://github.com/ipfs/js-ipfs-block-service
t Resolver = new Resolver(<ipfs-block-service instance>)
API
.put(node, options, callback)

Store the given node of a recognized IPLD Format.

options is an object that must contain one of the following combinations:

callback is a function that should have the signature as following: function (err, cid) {}, where err is an Error object in case of error and cid is the cid of the stored object.

.get(cid [, path] [, options], callback)

Retrieve a node by the given cid or cid + path

options is an optional object containing:

callback should be a function with the signature function (err, result), the result being an object with:

.getStream(cid [, path] [, options])

Same as get, but returns a source pull-stream that is used to pass the fetched node.

.treeStream(cid [, path] [, options])

Returns all the paths under a cid + path through a pull-stream. Accepts the following options:

.remove(cid, callback)

Remove a node by the given cid

.support.add(multicodec, formatResolver, formatUtil)

Add support to another IPLD Format

.support.rm(multicodec)

Removes support of an IPLD Format

Contribute

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

This repository falls under the IPFS Code of Conduct.

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.