{"name":"ipld-resolver","version":"0.14.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 --target node","test:browser":"aegir test --target browser","release":"aegir release","release-minor":"aegir release --type minor","release-major":"aegir release --type major","coverage":"aegir coverage","coverage-publish":"aegir coverage --provider coveralls"},"keywords":["IPFS"],"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":"^12.1.3","chai":"^4.1.2","dirty-chai":"^2.0.1","eth-hash-to-cid":"~0.1.0","ethereumjs-block":"^1.7.0","lodash":"^4.17.4","ncp":"^2.0.0","pre-commit":"^1.2.2","rimraf":"^2.6.2","rlp":"^2.0.0"},"dependencies":{"async":"^2.5.0","cids":"~0.5.2","interface-datastore":"~0.4.1","ipfs-block":"~0.6.1","ipfs-block-service":"~0.13.0","ipfs-repo":"~0.18.2","ipld-dag-cbor":"~0.11.1","ipld-dag-pb":"~0.11.2","ipld-ethereum":"^1.4.3","ipld-git":"~0.1.0","ipld-raw":"^1.0.6","is-ipfs":"~0.3.2","lodash.flatten":"^4.4.0","lodash.includes":"^4.3.0","memdown":"^1.4.1","multihashes":"~0.4.12","pull-sort":"^1.0.1","pull-stream":"^3.6.1","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":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Victor Bjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"greenkeeperio-bot","email":"support@greenkeeper.io"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"wanderer","email":"mjbecze@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"}],"gitHead":"6e2249fc62d7f2ef070d0e26cbbb1b53d13d0bd6","_id":"ipld-resolver@0.14.0","_npmVersion":"5.5.1","_nodeVersion":"8.8.0","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"dist":{"integrity":"sha512-ZQwQUKD7fXDkGONElv2TuvLSwtNXhfwgVslyw/0+27qi5rkYJQc9xSSP595hq8qm/Z/xEOruymTs9QZALkFRKQ==","shasum":"eff38f6675e89e2dd34f671de1ad1d9eeed8dd15","tarball":"http://registry-npm.ywwl.com/ipld-resolver/download/ipld-resolver-0.14.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGB9zC7FNPuBfYebQp9vsrL0VbF0HDPAKqBy39nvuHgQAiAzN8+GoMbeghhKF6nvbUX7scSAL+8g8Xyq5e1UbT8eyw=="}],"size":964532,"noattachment":false,"key":"/ipld-resolver/-/ipld-resolver-0.14.0.tgz"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipld-resolver-0.14.0.tgz_1510006038305_0.03839411656372249"},"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":1510006040028,"_cnpm_publish_time":1510006040028,"dist-tags":{"latest":"0.14.1"}}