{"name":"ipld-resolver","version":"0.4.2","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.4.0","buffer-loader":"0.0.1","chai":"^3.5.0","ethereumjs-block":"^1.4.1","fs-pull-blob-store":"^0.4.1","idb-pull-blob-store":"^0.5.1","lodash":"^4.17.4","ncp":"^2.0.0","pre-commit":"^1.2.2","rimraf":"^2.5.4"},"dependencies":{"async":"^2.1.4","cids":"^0.4.0","interface-pull-blob-store":"^0.6.0","ipfs-block":"^0.5.4","ipfs-block-service":"^0.8.1","ipfs-repo":"^0.11.2","ipld-dag-cbor":"0.8.2","ipld-dag-pb":"^0.9.4","ipld-eth-block":"^2.2.1","is-ipfs":"^0.2.1","lodash.flatten":"^4.4.0","lodash.includes":"^4.3.0","multihashes":"^0.3.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":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"wanderer","email":"mjbecze@gmail.com"}],"gitHead":"6100a7c08f62b3a0b5376ca89ba356e1a93c7298","_id":"ipld-resolver@0.4.2","_shasum":"ba3ed9ec673f1be151bb435a9c626b25a97f831c","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"dist":{"shasum":"ba3ed9ec673f1be151bb435a9c626b25a97f831c","tarball":"http://registry-npm.ywwl.com/ipld-resolver/download/ipld-resolver-0.4.2.tgz","integrity":"sha512-0jqo2Mpp/HJcqf8qy6UXonMvx00ZktFeW/bPTbGKj47SGpjpsFgJWmeUJ5SC1lmRRRKxXTTBkxHVbc7BR83eyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFLBqoGgSNlhOtAA/bsNV/RJYYjAJT+L3LpnOhY6ebBUAiEAj6oyLGXmS+R/NFMdtQpCegA/dpvsCrZP/LEABtx8Ej8="}],"size":1481146,"noattachment":false,"key":"/ipld-resolver/-/ipld-resolver-0.4.2.tgz"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ipld-resolver-0.4.2.tgz_1485709900123_0.7529128263704479"},"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":1485709902853,"_cnpm_publish_time":1485709902853,"dist-tags":{"latest":"0.14.1"}}