{"name":"ipfs-block-service","version":"0.19.1","description":"JavaScript Implementation of BlockService","leadMaintainer":"Volker Mische <volker.mische@gmail.com>","main":"src/index.js","types":"dist/src/index.d.ts","scripts":{"prepare":"aegir build --no-bundle","lint":"aegir lint","prepublishOnly":"aegir build","test":"aegir test","test:node":"aegir test --target node","test:browser":"aegir test --target browser","release":"aegir release --docs","release-minor":"aegir release --type minor --docs","release-major":"aegir release --type major --docs","coverage":"aegir test -t node --cov && nyc report --reporter=html","docs":"aegir docs"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-block-service.git"},"keywords":["IPFS"],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-block-service/issues"},"homepage":"https://github.com/ipfs/js-ipfs-block-service#readme","devDependencies":{"@types/fs-extra":"^9.0.8","@types/lodash.range":"^3.2.6","abort-controller":"^3.0.0","aegir":"^31.0.4","assert":"^2.0.0","cids":"^1.0.0","events":"^3.3.0","fs-extra":"^9.0.0","ipfs-repo":"^9.0.0","ipld-block":"^0.11.1","it-all":"^1.0.5","it-drain":"^1.0.1","lodash.range":"^3.2.0","multihashing-async":"^2.0.1","native-abort-controller":"^1.0.3","uint8arrays":"^2.1.2","util":"^0.12.3"},"engines":{"node":">=12.0.0","npm":">=3.0.0"},"dependencies":{"err-code":"^3.0.1","it-map":"^1.0.5"},"contributors":[{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"dignifiedquire","email":"dignifiedquire@gmail.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Bryan Stenson","email":"bryan.stenson@gmail.com"},{"name":"wanderer","email":"mjbecze@gmail.com"},{"name":"Hector Sanjuan","email":"code@hector.link"},{"name":"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ","email":"victorbjelkholm@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Vijayee Kulkaa","email":"vijayee.kulkaa@hushmail.com"},{"name":"Dirk McCormick","email":"dirkmdev@gmail.com"}],"gitHead":"8798c938d365bf152384c10ecd75b3c6a3da0a1a","_id":"ipfs-block-service@0.19.1","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-HG6do0t280FOcFR+mQB+c13uq/0Ty+2urkWIGbsjWt7jrHPOYgnCbR9XrsvWZasLU2/iLtpK34ojkbmR+/bbFA==","shasum":"ac1e7c6ee77115068a0d82541514b9c03f631d05","tarball":"http://registry-npm.ywwl.com/ipfs-block-service/download/ipfs-block-service-0.19.1.tgz","fileCount":13,"unpackedSize":30355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFAALCRA9TVsSAnZWagAAh+YP/3AA3T2nL8sdgQhDuwud\n/7FrdMiArrx1nWhAbVskNIvDYdJ5kXJg5Lw8ueNFDnQFf6K953m19SXvPXzU\nLmNbvh2+U8H8PUr75jSbbjiYP7QuPvUGz4NyvlAIrCe30R8YfEdYCq28SBvk\nMG/+ZyHdyxQcvXT5a7pOhFkZK4+clE7FszAkV0T469lUYs1ylOjEE6fVLB+V\n2ZnwV3Xy10+X39T87OYPRpIsxY/NFeOWXZqPp5AONqGAs8yCWGuJbAoaHukE\nYRiLVqNk8utgQqGGiN4lkDpZKwiKXNxGgClktNy1LiHS9VScecwnSxzVSKUL\nsFjMlG92F5RT5HbPz+EDdqwsWDTozWUTu2WIkAS6Bf5lNIh6/MUseA/qu9M6\nzzEVVAkhUygLQY1+/9SOV5vd7Ba/CPGkQTnGXA5ZWxVar1hBqmVuAHDmM2tq\n7x98qiknbkqco/ChvM3DdclqIensT2L+uviCE8rK5AC8pyM5Wl/CxOB33nr2\n+tO9U8RQFloxDZm7zFhhxJIys7e2WR/cjo3y6vhRksh3tOKrAukQZzwL6yuM\noqwPGGbrfTNvrpqdAZWK2TL12ha3GKBSsfEb3DtYgK9Qqtp3hYqwJ3JRmblg\nuOFN6FFKq1YAqDLBsgz0HnGpcwZoCr2j9U2gbySSpZmyLzWSmLX6HdrZ7fEZ\nC7LC\r\n=G7RA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFZanD9ONgAKM8uPOKmrFui8Auf1u6+vxKThQz3TeUd1AiA52OobDu3RlOTNExkg2M9fAW73JbShg/Kwe+2JW9xeJw=="}],"size":8804,"noattachment":false,"key":"/ipfs-block-service/-/ipfs-block-service-0.19.1.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"vmx","email":"volker.mische@gmail.com"},{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-block-service_0.19.1_1628700683023_0.07770845823090045"},"_hasShrinkwrap":false,"deprecated":"This module has been merged into ipfs","readme":"⛔️ DEPRECATED: This module has been merged into [ipfs](https://github.com/ipfs/js-ipfs) <!-- omit in toc -->\n======\n\n# IPFS Block Service\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[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs-block-service)](https://travis-ci.com/ipfs/js-ipfs-block-service)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-block-service.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-block-service)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\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> [IPFS][ipfs] implementation of the BlockService and Block data structure in JavaScript.\n\n**BlockService** - A BlockService is a content-addressable store for blocks, providing an API for adding, deleting, and retrieving blocks. A BlockService is backed by an [IPFS Repo][repo] as its datastore for blocks, and uses [Bitswap][bitswap] to fetch blocks from the network.\n\n```markdown\n┌───────────────────┐\n│    BlockService   │\n└───────────────────┘\n     ┌─────┴─────┐\n     ▼           ▼\n┌─────────┐ ┌───────┐\n│IPFS Repo│ |Bitswap│\n└─────────┘ └───────┘\n```\n\n## Lead Maintainer\n\n[Volker Mische](https://github.com/vmx)\n\n## Table of Contents\n\n- [IPFS Block Service](#ipfs-block-service)\n  - [Lead Maintainer](#lead-maintainer)\n  - [Table of Contents](#table-of-contents)\n  - [Install](#install)\n    - [npm](#npm)\n  - [Usage](#usage)\n    - [Node.js](#nodejs)\n    - [Example](#example)\n    - [Browser: Browserify, Webpack, other bundlers](#browser-browserify-webpack-other-bundlers)\n    - [Browser: `<script>` Tag](#browser-script-tag)\n  - [API](#api)\n  - [Contribute](#contribute)\n  - [License](#license)\n\n## Install\n\n### npm\n\n```sh\n> npm install ipfs-block-service\n```\n\n## Usage\n\n### Node.js\n\n```js\nconst BlockService = require('ipfs-block-service')\n```\n\n\n### Example\n\n```js\nconst BlockService = require('ipfs-block-service')\nconst Block = require('ipld-block')\nconst multihashing = require('multihashing-async')\nconst IPFSRepo = require('ipfs-repo')  // storage repo\nconst uint8ArrayEquals = require('uint8arrays/equals')\nconst uint8ArrayFromString = require('uint8arrays/from-string')\n\n// setup a repo\nconst repo = new IPFSRepo('example')\n\n// create a block\nconst data = uint8ArrayFromString('hello world')\nconst multihash = await multihashing(data, 'sha2-256')\n\nconst cid = new CID(multihash)\nconst block = new Block(data, cid)\n\n// create a service\nconst service = new BlockService(repo)\n\n// add the block, then retrieve it\nawait service.put(block)\n\nconst result = await service.get(cid)\nconsole.log(uint8ArrayEquals(block.data, result.data))\n// => true\n```\n\n### Browser: Browserify, Webpack, other bundlers\n\n```JavaScript\nvar BlockService = require('ipfs-block-service')\n```\n\n### Browser: `<script>` Tag\n\nLoading this module through a script tag will make the `IpfsBlockService` obj available in\nthe global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-block-service/dist/index.min.js\"></script>\n<!-- OR -->\n<script src=\"https://unpkg.com/ipfs-block-service/dist/index.js\"></script>\n```\n\n## API\n\nSee https://ipfs.github.io/js-ipfs-block-service\n\n## Contribute\n\nFeel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-block-service/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\n[ipfs]: https://ipfs.io\n[bitswap]: https://github.com/ipfs/specs/tree/master/bitswap\n[repo]: https://github.com/ipfs/specs/tree/master/repo\n","publish_time":1628700683178,"_cnpm_publish_time":1628700683178,"dist-tags":{"latest":"0.19.1"}}