{"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"dist":{"shasum":"27f2da3733ace6c5ace344b753cd2ddebbf79b5e","tarball":"https://registry.npmjs.org/ipfs-grpc-client/-/ipfs-grpc-client-0.11.2-dfc43d4e.0.tgz","fileCount":58,"integrity":"sha512-zln1Mb7ImC6iRYY7EYrFyz6M8SXfcqZ/mVM5Lp/6C19bMBYemoajiF8nRvmQMIL955sqgN/P2QGOxjpyWVI44Q==","signatures":[{"sig":"MEUCIQCLwfRpz7uYtJmCetBlr/qqyIPWvqotON7/dd6Am9hBxwIgIP4oH8T2uY8ceZ/7kv+PAIj65skG2S8qRgvMnfMgAPY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":212671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMbUhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiGA/8D59OhagTQmN38LErgXClRg5mu67dHG6tfgRyOWtGpNxdo2pV\r\nPDI3t/MewYQLP0yqDoAZHAEaMHIlin6Yl2MrUH7CuNPQ4yLlQI68DWGP1RDy\r\nEMqzzf8xTiT6XYnGmWXP3hsVOgcaVREWK6Xa5BXEf75okAlk4l6cmVI65iHW\r\nABuCJtMYe6uPoIZnWwjgDwOPj1IVq77olCh2AyQ9JHXMpkTnLjXGo80jOHj0\r\n+tYDR83MxAM4Eq3l8DRpxQMGrQpVC3j2FADOv7FwoCj9F1HC6ZCYQlCvuBWV\r\nWb9MMZnw/NaaV8if5Af/DxlYT/RyjwCcSe1GLYKczgFOONmLQY7G33x47Lb4\r\njpsyGA2uY/7uX8YKJD8QtLFjiDsyIX4SFOsw3E0H10pLgTp2RqvO/IoLJadh\r\n0ViQmYaIEbJwtaiGB6atoIuaJiX+O5XmqYcIpcuSxHl1gpbFE7u6yPswE8no\r\nweTpwzUiEvdZ44yO+dn7oaenU9kr/I4bj19dQIvvF1PsuERVQ2H7ZFXqH4ga\r\nl/R7cWidqJUNp8lxUdu8v9UjqHsdqYaDsZiNqoUCwmb4l6Q80HfbPuIDnrAe\r\nAywUb4m1h3o+TcJs91lqLqk2K1vZSiN6RbaMTt3nWUVwb05aelYwaIPoHz8L\r\nHXxNZFjCXsW5aOP7qwy+20xVl9dWFG+vvas=\r\n=WdIS\r\n-----END PGP SIGNATURE-----\r\n"},"name":"ipfs-grpc-client","type":"module","types":"./dist/src/index.d.ts","readme":"# ipfs-grpc-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS gRPC API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Why?](#why)\n- [API](#api)\n  - [`create([options])`](#createoptions)\n  - [Parameters](#parameters)\n  - [Options](#options)\n  - [Returns](#returns)\n  - [Example](#example)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-grpc-client\n```\n\nThis module implements part of the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) using      gRPC over websockets to achieve the bidirectional streaming necessary to have full duplex streams running in the browser.\n\nIt's not recommended you use this directly, instead use the [ipfs-client](https://www.npmjs.com/package/ipfs-client) to combine this with the [ipfs-http-client](https://www.npmjs.com/package/ipfs-http-client) in order to have HTTP fallback for the missing parts of the API.\n\n## Why?\n\nThe [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) and [XHR](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) APIs do not allow for full-duplex streaming, that is, allowing the client to receive bytes from the response while also adding more bytes to the outgoing request.\n\nThis limits what we can do in browsers in terms of the API, for example streaming arbitrarily sized payloads or exposing libp2p duplex streams.\n\ngPRC over websockets has no such limitations so allows us to harness the full power of a remote IPFS node in the browser without the need to work around browser behaviour.\n\n## API\n\n### `create([options])`\n\n### Parameters\n\nNone\n\n### Options\n\nAn optional object which may have the following keys:\n\n| Name  | Type                                                                 | Default     | Description                                                       |\n| ----- | -------------------------------------------------------------------- | ----------- | ----------------------------------------------------------------- |\n| url   | `Multiaddr` or `string` or `URL`                                     | `undefined` | The address of a [ipfs-grpc-server][] to connect to               |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `undefined` | A http.Agent used to control HTTP client behaviour (node.js only) |\n\n### Returns\n\n| Type     | Description               |\n| -------- | ------------------------- |\n| `object` | An instance of the client |\n\n### Example\n\n```js\nimport { create } from 'ipfs-gprc-client'\n\nconst client = create({\n  url: '/ipv4/127.0.0.1/tcp/1234/ws'\n})\n\nconst id = await client.id()\n```\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribute\n\nContributions welcome! Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nAlso see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general.\n\nPlease be aware that all interactions related to this repo are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\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[ipfs-grpc-server]: https://www.npmjs.com/package/ipfs-grpc-server\n","browser":{"./src/grpc/transport.js":"./src/grpc/transport.browser.js","./src/grpc/transport.node.js":"./src/grpc/transport.browser.js"},"engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"}},"gitHead":"4eac92ae987d3ba6007c4742456913c865a06857","license":"Apache-2.0 OR MIT","scripts":{"lint":"aegir lint","test":"aegir test","build":"aegir build","clean":"aegir clean","dep-check":"aegir dep-check -i aegir -i ipfs-grpc-protocol -i ipfs-core-types -i protobufjs-cli","test:node":"aegir test -t node --cov","test:chrome":"aegir test -t browser --cov","test:firefox":"aegir test -t browser -- --browser firefox","test:electron-main":"aegir test -t electron-main","test:chrome-webworker":"aegir test -t webworker","test:firefox-webworker":"aegir test -t webworker -- --browser firefox"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-grpc-client#readme","keywords":["ipfs"],"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details","repository":{"url":"git+https://github.com/ipfs/js-ipfs.git","type":"git"},"_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","description":"A client library for the IPFS gRPC API","directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"}],"_nodeVersion":"16.17.0","dependencies":{"ws":"^8.5.0","p-defer":"^4.0.0","err-code":"^3.0.1","it-first":"^1.0.6","protobufjs":"^7.0.0","wherearewe":"^2.0.1","change-case":"^4.1.1","ipfs-unixfs":"^7.0.0","it-pushable":"^3.0.0","uint8arrays":"^3.0.0","multiformats":"^9.5.1","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","ipfs-core-types":"^0.12.2-dfc43d4e.0","ipfs-core-utils":"^0.16.2-dfc43d4e.0","ipfs-grpc-protocol":"^0.7.1-dfc43d4e.0","@multiformats/multiaddr":"^11.0.0","@improbable-eng/grpc-web":"^0.15.0"},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"aegir":"^37.0.11","sinon":"^14.0.0","it-all":"^1.0.4","protobufjs-cli":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ipfs-grpc-client_0.11.2-dfc43d4e.0_1664202016917_0.3285667756136048","host":"s3://npm-registry-packages"},"_id":"ipfs-grpc-client@0.11.2-dfc43d4e.0","version":"0.11.2-dfc43d4e.0"}