{"name":"ipld-resolver","version":"0.13.4","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.0.8","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.3.1","ipfs-block":"~0.6.0","ipfs-block-service":"~0.12.0","ipfs-repo":"~0.17.0","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.9","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":"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":"8bfec1d088be0d2901fbafe9210946c353e57221","_id":"ipld-resolver@0.13.4","_npmVersion":"5.4.2","_nodeVersion":"8.4.0","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"dist":{"integrity":"sha512-jyMYvSESTocKGYuI5b6WCP7650GId9W/SalIr3fvk23Q8w2T/TuIaYOSyaalZasNy+gxzFqxAU8KtNe++7/w+Q==","shasum":"cc2d75220c884b5cdc2251187c8373efbf6dd058","tarball":"http://registry-npm.ywwl.com/ipld-resolver/download/ipld-resolver-0.13.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDesbmxsUZvcFzspbAjfYYXDXLUSI/rqFRRhqcX8b17bgIhANlb/j3iudbRjG36bR5D32ykK+lmisnNGdDVCyDZ9A0R"}],"size":957918,"noattachment":false,"key":"/ipld-resolver/-/ipld-resolver-0.13.4.tgz"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipld-resolver-0.13.4.tgz_1507748677100_0.9383664063643664"},"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":1507748678793,"_cnpm_publish_time":1507748678793,"dist-tags":{"latest":"0.14.1"}}