{"name":"ipld-resolver","version":"0.2.0","description":"IPLD Resolver Implementation in JavaScript","main":"src/index.js","pre-commit":["lint","test"],"scripts":{"lint":"aegir-lint","build":"aegir-build","test":"aegir-test","test:node":"aegir-test node","test:browser":"aegir-test browser","release":"aegir-release","release-minor":"aegir-release --type minor","release-major":"aegir-release --type major","coverage":"aegir-coverage","coverage-publish":"aegir-coverage publish"},"keywords":["IPFS"],"author":{"name":"Friedel Ziegelmayer dignifiedquire","email":"@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ipld/js-ipld-resolver.git"},"bugs":{"url":"https://github.com/ipld/js-ipld-resolver/issues"},"homepage":"https://github.com/ipld/js-ipld-resolver#readme","license":"MIT","devDependencies":{"aegir":"^9.1.0","buffer-loader":"0.0.1","chai":"^3.5.0","fs-pull-blob-store":"^0.4.1","idb-pull-blob-store":"^0.5.1","lodash":"^4.16.6","ncp":"^2.0.0","pre-commit":"^1.1.3","rimraf":"^2.5.4"},"dependencies":{"async":"^2.1.2","cids":"^0.2.0","interface-pull-blob-store":"^0.6.0","ipfs-block":"^0.5.0","ipld-dag-cbor":"^0.8.0","ipld-dag-pb":"^0.8.0","ipfs-repo":"^0.11.0","ipfs-block-service":"^0.6.0","is-ipfs":"^0.2.1","lodash.flatten":"^4.4.0","lodash.includes":"^4.3.0","multihashes":"^0.2.2","pull-stream":"^3.5.0","pull-traverse":"^1.0.3"},"contributors":[{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Nicola Greco","email":"me@nicola.io"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"greenkeeperio-bot","email":"support@greenkeeper.io"},{"name":"wanderer","email":"mjbecze@gmail.com"}],"gitHead":"ee453f30bd7622bad6f185c4ded22d4cc7e9adf5","_id":"ipld-resolver@0.2.0","_shasum":"d278ed72a43a98a96df6119e543e512d6e25d1a2","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"dist":{"shasum":"d278ed72a43a98a96df6119e543e512d6e25d1a2","tarball":"http://registry-npm.ywwl.com/ipld-resolver/download/ipld-resolver-0.2.0.tgz","integrity":"sha512-77CMSs5p7gkNnze0ElUHrp43fyUMxRvuH48UGNOG8IbYBqrvwhKcchzHhOmSw1RWnPe2DktBNCNw3kVaJf3W3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFdGi79ZHbSEVFnSIVpRo0O0d4s/lCvCr5TLueJcr0CrAiAHoY80181UvA8Xuf72G92DCDCoGq7gZcSBRjG/vFFXzw=="}],"size":409655,"noattachment":false,"key":"/ipld-resolver/-/ipld-resolver-0.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ipld-resolver-0.2.0.tgz_1478187382690_0.093755446607247"},"directories":{},"deprecated":"WARNING: This project has been renamed to \"ipld\". Install using \"ipld\" instead.","readme":"# IPLD Resolver\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)\n[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)\n[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Coverage Status](https://coveralls.io/repos/github/ipld/js-ipld-resolver/badge.svg?branch=master)](https://coveralls.io/github/ipld/js-ipld-resolver?branch=master)\n[![Travis CI](https://travis-ci.org/ipld/js-ipld-resolver.svg?branch=master)](https://travis-ci.org/ipld/js-ipld-resolver)\n[![Circle CI](https://circleci.com/gh/ipld/js-ipld-resolver.svg?style=svg)](https://circleci.com/gh/ipld/js-ipld-resolver)\n[![Dependency Status](https://david-dm.org/ipld/js-ipld-resolver.svg?style=flat-square)](https://david-dm.org/ipld/js-ipld-resolver)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)\n![](https://img.shields.io/badge/Node.js-%3E%3D4.0.0-orange.svg?style=flat-square)\n\n> JavaScript implementation of the IPLD Resolver (internal DAG API module)\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n  - [IPLD Resolver](#ipldresolver)\n    - [`.put(node, options, callback)`](#putnode-cb)\n    - [`.get(cid [, path] [, options], callback)`](#getcid-cb)\n    - [`.remove(cid, callback)`](#removecid-cb)\n    - [`.support.add(multicodec, formatResolver, formatUtil)`]()\n    - [`.support.rm(multicodec)`]()\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n> npm install --save ipld-resolver\n```\n\n## Usage\n\n```js\nconst Resolver = require('ipld-resolver')\n\n// You need to create and pass an ipfs-block-service instance\n// https://github.com/ipfs/js-ipfs-block-service\nconst Resolver = new Resolver(<ipfs-block-service instance>)\n```\n\n## API\n\n### `.put(node, options, callback)`\n\n> Store the given node of a recognized IPLD Format.\n\n`options` is an object that must contain one of the following combinations:\n- `cid` - the CID of the node\n- `hashAlg` and `format` - the hashAlg and the format that should be used to create the CID of the node\n\n`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.\n\n### `.get(cid [, path] [, options], callback)`\n\n> Retrieve a node by the given `cid` or `cid + path`\n\n`options` is an optional object containing:\n\n- `localResolve: bool` - if true, get will only attempt to resolve the path locally\n\n`callback` should be a function with the signature `function (err, result)`, the result being an object with:\n\n- `value` - the value that resulted from the get\n- `remainderPath` - If it didn't manage to successfully resolve the whole path through or if simply the `localResolve` option was passed.\n\n### `.getStream(cid [, path] [, options])`\n\n> Same as get, but returns a source pull-stream that is used to pass the fetched node.\n\n### `.treeStream(cid [, path] [, options])`\n\n> Returns all the paths under a cid + path through a pull-stream. Accepts the following options:\n\n- `recursive` - bool - traverse through links to complete the graph.\n\n### `.remove(cid, callback)`\n\n> Remove a node by the given `cid`\n\n### `.support.add(multicodec, formatResolver, formatUtil)`\n\n> Add support to another IPLD Format\n\n### `.support.rm(multicodec)`\n\n> Removes support of an IPLD Format\n\n## Contribute\n\nFeel free to join in. All welcome. Open an [issue](https://github.com/ipld/js-ipld-resolver/issues)!\n\nThis repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1478187383282,"_cnpm_publish_time":1478187383282,"dist-tags":{"latest":"0.14.1"}}