{"_id":"ipfs-message-port-server","_rev":"293-4a94ea55ac669a450a919815e380ec4b","name":"ipfs-message-port-server","dist-tags":{"latest":"0.15.1","next":"0.15.0-7b79c1b8"},"versions":{"0.0.0-dev":{"name":"ipfs-message-port-server","version":"0.0.0-dev","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir test -t electron-main","test:electron-renderer":"aegir test -t electron-renderer","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^0.8.0"},"devDependencies":{"ipfs-message-port-protocol":"~0.0.1","ipfs":"^0.46.0","aegir":"^22.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.136.0"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"contact@gozala.io"}],"_id":"ipfs-message-port-server@0.0.0-dev","_nodeVersion":"12.18.1","_npmVersion":"6.14.5","_npmUser":{"name":"gozala","email":"dev@gozala.io"},"dist":{"integrity":"sha512-H2r6fI2uGVSiZH7qml2b7XPobE12yhTnhO6Xo+avgg0E5EJIA1znQd+97dIlqMqAT2y2urFo5BcKoUVuyA/vGg==","shasum":"551a2720875bf1f03f20f1b9c232dbdfd3d61745","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.0.0-dev.tgz","fileCount":10,"unpackedSize":34198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfD1+lCRA9TVsSAnZWagAAPOcQAIai31107vSReGUqIjFe\nRRA7bZFZUlVoEdXxGP/i4al+yEy+s3HmBawhYUX4u1XDOpsKjtETNAw8Ck8A\ns4A2X5zRcPWL7SKw4yiZCOieDNsMqrid1FHRjT1Ac/FoERJtAQC4BWKaR5ce\n0k5XKfvsq6ARFFhCW9i0I4JjTqh8Nt2Y/TerKZl5BuVV/myKUjAgyKahtLID\nXlL7rm2mpKpwWIwYEu0xyBQGLnnr+wfrD0jDklPIDKqfZG1lUTeL9lQ8XvzV\nxXpT6xzHOEeWt0rWPQ5PXa7K5Cf8gIraHT8NuzIa24qDhwzkMopVSLu0Khui\nE6aG4ZMzzYgZz7Ti0ex6WLhtGhitxSZiyPQZ6Ylq+l/IqHKfn5eVfvbg++fG\nJauTdmTcq7zi2SH3Eab55ey1AgYQaB0HmvWAh6ov5+PSZpqB2tAmEunEb7Yl\nfiXQN1uLDzD/2pzAB6HxJ+pBAzM/fa+6xrLAGoONFxA/kzxBrmIK3R3yd5Dv\ncAUk5ntsTy49Cv/ga8U5oEEgiSzZnwb/7DzBRF3mS6wNTDrrjkkU8bhK0mbj\nEn8o/3Hs3kPlmbsxJNKnX+DMShxIr8rBoE/XnPKuZOaB1MhabPFAtQAhq+zE\nYlZ4GsaOeZ97KyHO/CsONzwPAWXer/Ha/87C2aKgImgavACG6nxiFpxBy+L+\nNYHM\r\n=y3vx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB3BEg/1CS+wj+jvG+sdfaV52OxWfCigK2yRx0XFkhx6AiAWbEvs5SujDfyLp3kphxIcMkn+RwvraalYzBN0nSpBUQ=="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.0.0-dev_1594843045427_0.7734115180996295"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.1.0":{"name":"ipfs-message-port-server","version":"0.1.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^0.8.3","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^23.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.139.0","ipfs":"^0.49.0","ipfs-message-port-protocol":"^0.1.0"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"e7396bc883ad5a6620e2f7bc32e7baf4e636e230","_id":"ipfs-message-port-server@0.1.0","_nodeVersion":"12.16.1","_npmVersion":"6.14.1","dist":{"integrity":"sha512-PWXKUiPRYKKmVFVKqRYE56p9ktHQfD/POaTzg3PfIDizEzDOFAWikQKDl1FVO9fTxkbmW1mOuu5bX3yf1ELSBQ==","shasum":"24ceaa2244b86ff7f10c30f3e8366675a39901ee","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.1.0.tgz","fileCount":11,"unpackedSize":37022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM8m2CRA9TVsSAnZWagAAFZYP/j6RkieilDe70pczxzbU\nBgW0Ms4AnkV0dcRYZUi+6ii9Svu7c+2SGmbPldjP9Q+/ll7jPNZ+Sz0JdKbY\n0M4maaZFOhVQfgYbqDvViYE1NAJXzA/fUbpuhHrShTopL/EMZPkEAgWED/LF\nClJ3gD/QUmgPNhYWglOF1mBHd0OtVLZ6FMaH9lLbRuG5eEfozU05FkhZhCVr\nz2jVQ2souiz4ze5ZnMZde4bRgCuUwjGPs0lclYE/02SwoDCuhpuzEzVTo6Q4\nxfea4yBaTRkIWhUiYP19HTLYTSGwyTzGbNbslPeUZURH8ApWBJtm0S2kXEzb\nrlpS5QvWTspe0kW680yLgNNpgqNws86FRPgEZkVQpoiKzKW1YaQTmjcbF2/i\nHMS2UX4YK6PaihFI7+9fHLTm1eeLnINgoB++tAIqfL7U7LTGodidzU1dwsq9\nG/47LvYblLYDuzhdHZteSfB7rfwpkdux23upkyu4GpribuuICPfqDjlUxgnt\nztVh0dgiIfinPCy3yav7chmtNP5k3H1qg0pZ2sxesn513RZQpDNNygWP1i1g\nEIeChaons0o78Dq7drgdnuX9GNVMqLtoKpXrGLr8Plgaa10HMSpFQzFL2Vvk\nbnRVZhI95gZW38n0Y69JgLgYmQAmg5DEQJOFo8Pg3IV546Sbxaphp1bvUA5h\nq0ps\r\n=MKaF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaZ3/Bw0XCJ8Un+5L10BLUEUtt7Vcz7dq0DAHZqXq+7QIgTANU65jt90OFlf1kO7r9hr2ZoHwyAWDA+6bHqwiUu6w="}]},"maintainers":[{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.1.0_1597229493624_0.6494962579524224"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.1.1-rc.2":{"name":"ipfs-message-port-server","version":"0.1.1-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^0.8.3","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^23.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.139.1-rc.2+5cc0e086","ipfs":"^0.49.1-rc.2+5cc0e086","ipfs-message-port-protocol":"^0.1.1-rc.2+5cc0e086"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"5cc0e086b036e7ba40b09768b67b7067adca43c1","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.1.1-rc.2","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-pJit1sJxj778oOVDTVf2ztoHA+IbpuCzffCqCNZlexPPHP6QGFGJRpj1aAzA6av1z2Tss7wGKsxyGJRsCwmZ9w==","shasum":"66e7a4d884108e7b943725ff1c568e28fc1b244f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.1.1-rc.2.tgz","fileCount":13,"unpackedSize":100995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfO/s1CRA9TVsSAnZWagAAq04QAJcEkazxms6W8Uas3m5V\nwEmg6sZ9dBvWEHKN7iQKk9Ng5/kJK8/634AuSwPJeWSF2WAYqvlUbesOELZq\n+zPClqG0qkz+DLOW/TvS158d0TH2At6GubdqIDk/cf8o3F/50PDI5kKZiJ5g\nzf5mZdWxU9zcrV+HY1gJq93lUwhxWwww7gIvosQe5wyUXIXtiDOTdeu3z6a8\nA+pO7EAQQf/nuKY2KyZFMf1+69AR3R2kPIwKGFn/cwmyzkBc3QLjHTEGb/Dt\ntlBoML74rSEov774zGAlzLL5LrHi8jrnfc12OhjaJPMQ42zC5AEJCUYsQIi6\ndXgbuGQtCVm1h5TbTJHZ83Xd06V+xSPqtEwwuBLcE86Tb1nmFrmmvK4pU56t\nIZJD4EYSkJHeXWqXrxY7UJhs7NLMLSn/99q4tUX1SsOJ+ucri/7QJNdJrj+E\nnvIIi2gmGvkXoa9byK6X4Vc5Q67W/mQzf0Cg9FgjD/2LKlbi0NNsVpSwPIlo\nNcl2UKnR7xB+7COyVHeU5dyZ2XgdpFtZeN7oA77ZaLLorJUa8GLynxpQ8VXc\n8MlTXOh/Vd75WB7cjcFavCWNwaBiSefkfvmbXkoM9xl9RBT4Y4R2fs4jWVD8\nCOMghdSoxM1B8st6kUUOQgCmb2EUJPzI6t2y4CSJoOYAJHvkzmApZYgvQVIc\nJ+fN\r\n=ZErY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICmj6X0PJNcg5TqW/uesds92XVc6qVW1KGc1nPscEdatAiEA25N7gIcUBUHInwXgCbNIENpXvxX2OSgTFLyJ5Oz6cnY="}]},"maintainers":[{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.1.1-rc.2_1597766453418_0.4359320003653424"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.1.1":{"name":"ipfs-message-port-server","version":"0.1.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^0.8.3","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^23.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.139.1","ipfs":"^0.49.1","ipfs-message-port-protocol":"^0.1.1"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"84cfa553ffc717d5d8bf94fdf6a306f182c9aee4","_id":"ipfs-message-port-server@0.1.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-mb/WYb3mFGi39SHEobuB6usHmLjGjJ8BAyxR4cJiSkaQNCwAitCZ3mJyLDDUz9i5cnV+mkdOYVSe/5dX7hIAnw==","shasum":"c695982812b23885c550ee05c24e428889d87bce","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.1.1.tgz","fileCount":11,"unpackedSize":37222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ/GmCRA9TVsSAnZWagAAcjoQAIoxpfOgyV+xnUd8Mqus\n6a2nM2qfnN1DwQXQu2FBK+9m701e87xG6Yh4p3qpG9qa+kOqCLFET9fdRWRg\nBalloQyQMcuRoRDyO5fLI73awNGmSIgv+Wo8z038iD8x1Aa8nPGMS0HlUlhu\nUY65iKTLNSJpxti7KtewF6pySmT4k8gzdgAjDF6UhqcwYiuQXm8aQdODD1TI\nEdOPCR1hB+ePwrzNXTUGcjZ2Dkf2Y0+oHxbseSzrCItsW+LO8UX0OP4UgcrM\nxOw6vVWltcy/EQp4fsQPC+Zg7I9KJu8FeWrpGLSm9wCnWcfrTNa7zRrj/Nou\n31e1Cg7ZYRZ2lIhbkxow4CXevGpxE992bUZLb1baiaskYGkm7UdKNLOKRriX\n0Y4uzjOV9OtiALTNnsZwFwWqxtQIWHDg8fpjJugvy/04SWol1vtTcqGNtS99\nPDUV9EvhIdOoTax3GwNh9cKaAiPvyrTy9XzFDwl7i1erN6sJoDB1vPPSD7ZB\nIPaRL+dqgrkmKaCXfyjmBReaSXS/A8AVBmPcnnv8L4aJssHM333m4GstHpr/\nhJSceePduu6VDqU5YljaluL/ZGqgolRW9ITdk5n2iJCnA5Th7sfaRuettybK\nJkamqR01wGjBfGLWNpwQhdhn046gcVKQXXf9gw9+YfSBStdPw9+v9LKYMuep\nl7Bc\r\n=RbHa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlE7ybPNrP1HMh+BoVKzNeprJhXhzt3Xu5kmoVFUYXGAIhAMY9OcLjOtPNPHb5N3LOr/cb9CLDBHXcJFjaDjw+e1dy"}]},"maintainers":[{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.1.1_1598288293931_0.7040415441956553"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.1.2-rc.0":{"name":"ipfs-message-port-server","version":"0.1.2-rc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.139.2-rc.0+64b7fe41","ipfs":"^0.49.2-rc.0+64b7fe41","ipfs-message-port-protocol":"^0.1.2-rc.0+64b7fe41"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"64b7fe41738cbe96d5a9075f0c01156c6f889c40","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.1.2-rc.0","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-WVNXn9uTGEgkBbGdWZ6R+iHWEeyULkdKXTf+OTLNW7+LjE4GhtoZZIp3tE9xjHFCThHGrfG/0pritAwpuOnL1Q==","shasum":"4a91d2e9676c476176f53955776cb66d5e12f713","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.1.2-rc.0.tgz","fileCount":13,"unpackedSize":103264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRLnYCRA9TVsSAnZWagAArr8P/2kvSTxqw5BcLsSLVru2\nEmCIcHCR1IDbbdarYmXIEUxcHqyD86NMXTWT2qi6Xl4gug7bl8JG2FGrrbCn\nlV3+BNRRWjT4MG2kBtbRcJ5cMafAjNGqPHU6Pjq1xYkL2ch+K0xfqrsTZpga\nvFqFLHiXqPyR86Et/r6zaKO9//pPXtq4r4Sq3AA5oLyRWXSpUI29/zrJjoEo\na1XfqR/eYjdQDv5OAuvsv3qP86SJNt3t2nimT+GcqzCVR1DRZao8aukTc41C\ntDgJWpHSwbBLl+ULfG0DF/04tRTEXUwetzFwdMEmIkCv+XDebv4t+5UfM842\nvvkGi0xTOOoo5S5ax1XhlJ3RpEwDfwaChf3jeJHPfARArtOkixql5WaJ7rw3\nAY87m/HdX1muw3U+wpm+Di3PcFhE/fZPDj8LWVoWd0gdqPBOWqcHU8RMTQWX\n0LB+B7hwvwXWulA1Lo040jha2Jq/Edqtshmu/RDmRF+ASIyq5xE1WkKTsJDo\nL5ZJOibxhCeiwkuPRPd1WdSu7bH0KSa+5mMutEg2yND0E5cboMlH9pMThcLE\n4MJ8HkX9C+yqtd+Z+pylFycDSGwAGppsauQgWj84jvp36nt1m/zveEx5xNVQ\nwXra/9ym5AdB8VKtEUFzff1osXkQIFNUi1rWl2jzPywjdQN+rnhhYlXytAF8\nu4CY\r\n=yqhw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA8AVhgdAiXdvN4b6qlccx27+N5Iobfn/sencz4L4hg7AiAB+3cheBNPl9J94XFMlLuHI/qpKmO3bGtssQuBFz/BJg=="}]},"maintainers":[{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.1.2-rc.0_1598339544232_0.5927691170828886"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.1.2-rc.4":{"name":"ipfs-message-port-server","version":"0.1.2-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.139.1","ipfs":"^0.49.2-rc.4+63d4d353","ipfs-message-port-protocol":"^0.1.1"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"63d4d353c606e4fd487811d8a0014bb2173f11be","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.1.2-rc.4","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-Xs7kBp0lhoD8NbPIFYZ3M3hmrP5/+sip1HdKHqLkqTj73DZpr2Q0hh9EY61cGUWFWEPGIY1vDKplUStPEydJjA==","shasum":"c6048bfd15bee7990d66482a6c54083b41276842","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.1.2-rc.4.tgz","fileCount":13,"unpackedSize":103236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR+iLCRA9TVsSAnZWagAAF8UQAJLhMCOzmkC/R2wCNCkF\noTUn+4HF/KgYlGH9+Di9vcl7w/LfOw7L6H5R2ZPkszLED7whYIMoxlHyNdK/\nQKcps5sEQdI2axRBXXebfd1sRWB5AjNSJSmMrcIt9DTzAXNFFB9ZTdaAvzHq\nLMLetmN13rIuQnCu1BUpMGDUMlBItA8IjPPS2TO3UdgeeLphze3k+BiGAtAd\nNjyU78thqBrpXWF4+T7EPHzTHwlUZEIJ697YxBM/+uON+OwqKvrR95yWjaJO\npdOa5tTAcbrUfXUBJsbqgK/+ghr650KRuXpY0rPz2vV9wj8c+JFNc3r2D2Qe\ns8/tXrWg/qQg0zAr2zyF+AgyzOJA0kj0tV8fOi/Swvvr5G/NV+nhYow1p4Rv\n62gVXyOiW3+7SKzGVwdUupKcnVtayH969/V5uvc8RoP+NpqmCMJZzWk6Ghl+\nkTKMcIq8gxhvyCCsaJca8x0YJUvxf5dDKMLt15QsgUSHCBhi14mN4OEnQW88\nr5A7EXlqx806XOlkhpsqhH7OYpNQAnFvup7g0D3H09xhlhcdheqca06hp9I8\nsfc9Y3puFC8uo+58M5zmh1o1Y51LrdNzHZm6KPgDqkuf74H06+Vw2H3skXwz\ns/53UVFuAZW6JWTlD/D3S6EUcvDeTqt7RK9RKouyGpX/M0NZvM+YA9gI3Uo1\nZBS4\r\n=0aVv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPNlhtUsNK6l/L56i+GiVjiJf+ENqApYjOsjs/bQbJyQIgC1Y3dKpDXeOxyYKmxfb9mzXHYUPlsXVaWLffqhMkXQo="}]},"maintainers":[{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.1.2-rc.4_1598548106995_0.9848619562727501"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.1.2-rc.3":{"name":"ipfs-message-port-server","version":"0.1.2-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.139.2-rc.3+997508d5","ipfs":"^0.49.2-rc.3+997508d5","ipfs-message-port-protocol":"^0.1.2-rc.3+997508d5"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"997508d5674631f63aff9a3c0295e57510363080","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.1.2-rc.3","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-RJA2gG0HoRyArwr7L5qIS8yZUtZk5UlmfJUe0MGT4JN2ptVJk6rv43HMJftpf8BJhX2GVTglkZJVFKnktiI94Q==","shasum":"4f1e75910e66c25400717218c3288e5e933d7d66","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.1.2-rc.3.tgz","fileCount":13,"unpackedSize":103264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR+0oCRA9TVsSAnZWagAANOoP/iuWHiR7rlQFP5RUc/V9\nEx08RFeczOXwc4z2CbwLhkP8l+DOPXYBZq4dqgrMs7nXNjrU3JASUKReGx94\nmQtD1cnt+WhPvrKNDLzRWYmvePUosOSyBcSRAU151RWupPooUrdCUzH4yG6e\n68w6nJDG/4svWSK2XFEUa6XvF2MSE+vy4MnRgKPhBMolK3AVddYAtYw52Z6j\nVcHCmQrp7IIap36gOqrqbHMVmmXE3UDiatGwLUidpWem2P3fh1dtHrljpZUz\nxMMCO65UoCmnqjlt20OFwvnNCt8X1F7dbci8qq3wViCJV6dkuXZq5BsV+Q5R\nosswUnsotorF0NfPdjWpNKxIV0PUPdZVK8f8X+9tHlpvJuStOGtoMXxXCdGY\nsC4zZOPEg+5q6q+QGC9SGRQiPHjoMCXc+Ku/sf7i1lw0RXiV3XQ2YpQdkcFh\nvxZvfh2591hjnra0/md/eIhf7szI3erdcD/+dJk12pmiX/QoNMlk1jy353R7\nHY+ZXakdZCGiV7SVyEn0+MqoHOWF4ohls1nJrPDullbwsKdDoonzogP/OG2l\nGaVEepT3cg6flp4pi2w4iHxRXSssJQg6onmiLdlQlI2pBfzReHmyN8LCyPAQ\ntJSFjyhgM/n6sVgWmsvKTIHj6Y+MHsFDe2BQjvghzFFrrHRMjc+y9E2aQ+Y8\nLWXN\r\n=RtPU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCruCWMmuf6Fet837y+/TRnfzGA321yDY9BgcyU2Cbt/AIhAKM+klLE+mDWCloEV5yK+8GBIJJgqjZ6nm2qiGLDiY1G"}]},"maintainers":[{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.1.2-rc.3_1598549287975_0.5390332698254388"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.1.2-rc.5":{"name":"ipfs-message-port-server","version":"0.1.2-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.139.2-rc.5+1b6cf600","ipfs":"^0.49.2-rc.5+1b6cf600","ipfs-message-port-protocol":"^0.1.2-rc.5+1b6cf600"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"1b6cf600a6b1348199457ca1fe6f314b6eff8c46","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.1.2-rc.5","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-uIrVpz5UXf+jEGnPZePsCoE9dgDpsVom2k3RaVqhOfVUSshh0t6EY129JB8x3ZOWvAi6Bks6+cCBOk6uRfbS7w==","shasum":"1cc58be46dd47a737d458407b2b7d3f605ca1526","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.1.2-rc.5.tgz","fileCount":13,"unpackedSize":103303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT33vCRA9TVsSAnZWagAACWEQAKQCn+ZM4rsSzgpBmTHi\nqb9RLQmITPTC2auaTCRHYvfHRLgdC6xZyEt0ngWNuOZGFHrokVlQxc2MQCY5\nR8voqjXXtzJZaNyq4h/nve13sFpLPh+geh3uc5/V+8VtL/xZboHi0KrlfUlB\nAmKNyvUShZ2SKQbbDFzF3SkDH4Ms05EMGs8yCUyJoFfcLVsy0j6wAhiZ5Vhw\nxgrCD4/YXmBoA0hwbXaN6xIAZhfx22bdCMNwq2/TDU3dKSWsHajx1pzEJ42S\nQidyAeujCfxjlVG870ejyFFY3Xs0nzjW3gR+0EVbN2RMxfztlS3s3JBKC0kb\nYdPmI9O7IwctzAnCPMUvVtDpqabUmA1af9/vt16IS9cuqVaNkc64BG57qfvn\npxTu52kqCY8r7WR8vU1CDRb254hO6vBVzjNHG3aTV6UUew9PltB8mCP99CJ1\n7xwbuzqtqpUrqtfAmwDd0Bm4UpXq5BMj57HXvPiyswf5Tspfgbyic44o6Va1\n/2T1JeTyZdF0eGVJIf2bg4EQFtXxsIkffr++qya9/VOW2CGuMJXrGjp4+aot\nyg0Ol5V4oPBkxT+ppBu25hpu2dZfhXAd6vCWYvF4VBsNWAmukP4vEM4Z2DgO\ndfu8zp8ACGiKZZtlAjSfuud4JUjgjVd+Qq6YX3FFLW3+ekRAHx47LjTACHhX\nM7Vr\r\n=Ojpf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCuRet2GPkf3f+hXU3MKQWUbiuFVLCUNwckSBxCj+0tgIhALQthpkCBqr2Vd5WhMffhCl1UbkwytV0p/xAo7XTYtfK"}]},"maintainers":[{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.1.2-rc.5_1599045102819_0.9764166814812849"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.1.2-rc.12":{"name":"ipfs-message-port-server","version":"0.1.2-rc.12","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.139.1","ipfs":"^0.49.2-rc.12+6816bc64","ipfs-message-port-protocol":"^0.1.1"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"6816bc64ccb9bf852c2b9a26d9ddd19b9439dae6","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.1.2-rc.12","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-gAL+opn5J/iDG0igLL7IzQz58giycXfc1jkOO9NLXwRIpdWKBsK5twc/tbB+rVziNqJEPuiPsRyGffoyXrR1hA==","shasum":"37842894294ccf062501bc0f9eed84824f1053a5","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.1.2-rc.12.tgz","fileCount":13,"unpackedSize":103277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUOi2CRA9TVsSAnZWagAAGPwP/RuI2qqmZJ1uCNwLi8ML\nEGut5TSJnUHHQ03GIRIXD1K1b1dRjiswSW6DNKG4PhBlOhSa3bC4ZAAEtz43\nI8MFSM0mUhx4+jacCf1pnW06HhUbzHG0A+6n+0FXVpE4SDMSeAr2IqCisqRb\ndZ71hyDgi1Ft/zgjC8J7ylDjvpzj/v81MwaLB5HRFjcRh0fLvdLVk5YJPg+4\nx5tgK1CzMAdCPBfCpfexH3PeyN0dxP5ic2hmtd8lmdzCgWjcZqEiRI/AHT7H\nkGMM3fAcdWMpQ4iGmrndBLIrk0488mCldzcdI2cigdU2VMwjhr1x6KQYqVw8\nJ7KLUAgFdUzXdnFgN0IgleqDUfhgBVRI5qFNAW7IyCKLTL0IItHa14qkW4dI\n/sSr7zoqmHmnRxfScRymNNLlq+a+boDeq5HON2SY/RsVtjGyZ2ViY+tDYmOK\nr2hADC67XT409tC1haONUC0n/iUb/m99f/GGEQu2FNhoCU7/Hhot2Vy3+vSY\nOK7gFg/LXO/jt1+zuwX3elaGJoShQ/IgGmXzVvcPu/nfcXCq3XBz+2/GiUfN\n7JlJKGSkZ/8Hkeywh5aP/I3hykdv9T+CsNyZix+gc/odBvVqRlF5i2zeoijq\nMCN//vqqtevDjiuRBrx8DFEqucSaGR98FSsk8c7Dr1nHgvBxzD7JMECRuF+n\nVsCt\r\n=V9za\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBvDvKCH/02/x0z0u/u/lWbMqHTgrBFYLkM4WKb4ywobAiEAppz3ms8tXsLT+x9BewVCiVZXnxvUnTiwcdfZzRrgnhM="}]},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.1.2-rc.12_1599137969706_0.3262319704759671"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.0":{"name":"ipfs-message-port-server","version":"0.2.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.0","ipfs":"^0.50.0","ipfs-message-port-protocol":"^0.2.0"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"5ea027cc1d92148210e4c42d56b583078cddefa0","_id":"ipfs-message-port-server@0.2.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-wJVLBbk+RpjwvnPMR9/2MI10TCy4YVglSsspgwGq8dPGlLko5JsKmsh+CGbX7s5dbs8Q8rMdzvrGFywy5TUFJg==","shasum":"c0818ddbf8b8edc43d566af6ca533c3f718fa6d2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.0.tgz","fileCount":11,"unpackedSize":37572,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUPs6CRA9TVsSAnZWagAALjMP+QHCHY3jsm/vfgwEmWDf\nxvqzd7NTtWYpNJcpDcZVC+MxvGCVg5yeASn14wPifzTbJGXOM0+DLpklnNv0\novLRZVtBqcNbr0L+LMDbezk0DiQXhaZYfN4vXgKd2B4JzKLeoOyY0kX9EQqZ\n6D+ClhvjuaeZrEUMUdSejCQat/95KgVKcTn7L5ZILArn1mdCPuC4X/lGMEUd\nJt436TpLISwu/yA90jwlLCFFXKlgs3R7lNvB2WwOheHzLo8gMTHa31UKZAHr\n1g9veF63a8eZoQve9nTAkk8Dv/ZCgS5I9FmNUWyZfLSCnw3C2ZGSVezfwAu0\ncSpylGGW7X+5vko9Qtrk453jCbPse4Xh7WARFd00QRf4l2rKJkJyipzJis2t\nExYkPv+vz5T0lE5JEIzAf1Zs1OXB3R/i82Po3NTen96TiH5wl5Bg2Ak85VoU\n1FJ8S6J+fLRa0z/Hsh7KPAACMuXEdLkCKOVWasE+aYJEGf5p2JJUKnCiyo8x\ngPZkENguXpYGd/MkeRIK4BJaZSjRRsNxqDawP8fje1lil0ZGHT5T38zL7wUd\nJyMk0dTPvgBfrpLKyYRg3KWl2K6OiBkbX0kPErY+H8oKe3B5F7WtvWOP65ME\noaLBVaowwUOeIgKHCTAMSRFovJzXlERJrM5XcFt0jmzQgc85fPktwsERhltp\niUQY\r\n=6+jj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICU8k/yxdV1tv94MKm0o59HXuwxHVL2QFDyolwmVB56/AiEAqUy1LMM7g5/iGmvzUAvmw/4PU7FFUiTpHCGCkE2Omhw="}]},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.0_1599142713460_0.1363788843590914"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.1-rc.25":{"name":"ipfs-message-port-server","version":"0.2.1-rc.25","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.25+6b7796af","ipfs":"^0.50.1-rc.25+6b7796af","ipfs-message-port-protocol":"^0.2.1-rc.25+6b7796af"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"6b7796afb534876d7e529788b604b120d4114f25","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.1-rc.25","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-O29ibw2lMUsXMrgGH+FWw9rEuX8DY7y0U+zG0Por0cCpv7nHFTmo3sGTseRC1Lk0kVINYwPdUpDxHjpi5vp6dA==","shasum":"57913677ba2aad1fd09c465d108a68fcf1022dd4","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.1-rc.25.tgz","fileCount":11,"unpackedSize":37632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUk7PCRA9TVsSAnZWagAADCMP/1QgEtM87E8N2kDF8Gjb\nQd0vNGVM3vRcNBe4O2w0JlKbNKshXCMbye6K4TJF2xP0gTP5zEYgIjCxAA+T\nDT3su3fXF64nqSAPmeEJbHxJedEw7mXG53kJOlpXQfwubcjM98QKXXv2XCT+\nUYTK7/VE9l4xPWsSlP4XHPB/0JTommrv5tey4LpuKJEse668OOms/GjufJnG\n9RNCE8f57+/6YAg98lOsW1uyJQe/K49f7wWAOmqS1hEB3RBRwm0Ztwn3Jb2K\n+h8SeSWx/tljW44+IVY1YQ+QXJeRIDYCaX1XPNbSBhHhrnK4h1YKJq8QEXJ1\nqwwsctyNLTqvuV4t1gSNUMme1wFLn6OIvBcxqf6OKTV1mv4MB8A3lHkSl7aC\nErm0qpi94Qk30TCxb4diLZFF8kLLLtJAKtxKdUaghKJLec6RC1tssy6QTzhF\nMjVnJGI6kDWy0wPKyu/zvH1PQgoDoZxrO6qjy5JmsMXfavfrKRiU8KXRWKjQ\nCDL8JhJAYmjix0K2nKeAxUdfoiL/yjWDKh4hD4Iekqo0mxbNHRZQlh4be0Za\no85PC7M8TXqdsb2jlG91vBrfCD5QJwXdGiUL5EfFXUed8K/V1X08/Q+x6f1Z\n5lAENHlQcsQvb8UwcOHHaxgAc/zP+GsnJvt/imK4xJ12ktBubUzZoKs76/Us\nBUmU\r\n=y8fL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHUds5Ur6tkbDLn7fRO8rsGxa4Eh8zXnronsAEt0jLtiAiBDmpQrb63VLRcuhw6umvJ+YcHQr3Z71CF4CKWcL/TyvA=="}]},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.1-rc.25_1599229647506_0.13221520038906776"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.1":{"name":"ipfs-message-port-server","version":"0.2.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.0","ipfs":"^0.50.1","ipfs-message-port-protocol":"^0.2.0"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"67d048216ca391b9d9020dab35ffe7a46062b93c","_id":"ipfs-message-port-server@0.2.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-Jtf6qw4hx4zh8hstdbZNw1dvcR39DgBAigrFvute5Gv12cYPtGx7/ZgQIG8aq+ETDJAPQlR01dG1cQXM16KyNQ==","shasum":"e54ed5c269b25c364e750a28e771c56478acdd84","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.1.tgz","fileCount":13,"unpackedSize":103787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUld0CRA9TVsSAnZWagAA7TUQAIYPYG1OwlCujnnhuqjm\n4SgfXJMCNy9d74Npb0497J8eLpJF/pLqQAFAJusgf/F7EESgs9DL4X0sXEWz\nLCUbWj+ylID7dcqeS2OKlKnuE4F4h+YbJQPE6KKVjRNFue3rhWIKT9YC3Q++\nra+BysoGp2ySnf7ZGyh28KQqZ20IQnj31E9/HH6SbCZCkVox3ezjvyzWn/PH\na1ZmD9FEi3CHQYM3jCXfz6ek/dgtvqI8GcVgFlrYhr/h3lZeKli0ARFnjwW+\nKtV8GlT9q4f5tUUQs/9E+zCIt8I9ckDbpWxlV/V3FA05/ZAyZibtHuC5r5jC\ndrcv8Yma43iGEzlaGoaFr2o3w1EsbzsZPaiKuwSHHmWXQgUrscBOzTQhm9hf\ntvbWGhATTdCkrHy95UisvUdX3BD0OspQ9izh8k061HpheJaCykqMqQG+kT+R\nhy70Yiq61PH2hqgJV1uWZ49abYvGmbI9zUQXYfoU9d+cjOfrPsH50bg3oQgO\nfHw1Fq72H790R5dZOmZDrLVgADrKZS4y0tcvtpBU0couQ/RnEusdSADnsYp9\nZ4Ar1G2Hu3PPFTROjuCNCOlUSkRIxfFjPeUTmiM8Zn6Qrzr7hP5VnO11WBgY\nRN645V7XA1sOi4+ROZucfnNBJ/6rCfnygIK7MsgQvdghpWHnqoD5E9lW2tFP\nLW+W\r\n=1ZcN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8XkzQpd/Y5FC/2S46hbJ/IyWwA3W/KT8dJU6rQPQoKgIhAMVJl9OywZX6OjDHlR14+rqVeFsuMfnjYNrBm5VQlPYm"}]},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"dev@gozala.io","name":"gozala"},{"email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai","name":"ipfs-npm-publisher-bot"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.1_1599231859525_0.39118555749216455"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.2-rc.2":{"name":"ipfs-message-port-server","version":"0.2.2-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.31+d68bf64b","ipfs":"^0.50.2-rc.2+d68bf64b","ipfs-message-port-protocol":"^0.2.1-rc.31+d68bf64b"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"d68bf64b6340750779fdce1e3ca47e8d6fdf8a16","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.2-rc.2","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-mnKd7D7Q9J/3JgS8ZrY4+FZw0auGAxZvs/6dWT14RanE3iX8eMb9KknWRYLBW0I4spYGz3ctB+Yjeh1txqzWpg==","shasum":"460e72db6489ea51d9a9221267b361b3abc4341a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.2-rc.2.tgz","fileCount":13,"unpackedSize":103765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWMFiCRA9TVsSAnZWagAAmTkP/30wK47+r8qCdMcsYYGc\n6lz6zigdilz8DDnjbEaXS3QQY41C9bZfPJjTkZPBiynX4IrAWhuGDoOnkjab\neUxkH4hq08OJmtEklTeJ3i+JY+d3Tl79i+mBD902bmZKPyymKG9k3CRnD8dC\nRKSKXqbW6HMfyjdREFEnayHJLIB8BoCvuTCnMAzxUWgG8oMmL1hKTOJo0QQa\n2d+sp3eLXMFLBGYLVAQ+lOrDEphGclnI8fMyRR28tXMQz85FjFLRzdXzPGFP\nmldcq4fT6egGFLYXDL3sS5jHAVyOCQGW1J3iUkdiuxRfaqYycDC6FvapRX80\ndkMp3Bee+adoi3YxJCTuk8RLscxDxPwuvGuoXFyVJ9Ct/qvDR9TOCyrYaVoy\nqCTO65Il9GMbQAxw+Pc4OWDXGp2M9UOMFhuNa/IWsGBqBFT8TBkrB6QIthqB\njLuqicyB09n59B3GMk/yiX3xlpGtBgT9ZprTxyKQQJ5bA5agwGtKVf/Dy08S\nF+LXpn6Ahe54/hyr143jJa8RMatMGxoxI49gj1KCzJ2claTlmLhbAJf9Y3VD\n0T0XEdXHOI6+UHX0qY9sl6KFxcwCWoNiiK3cGUXbhdkER5tBl7xWFVj/WEhb\nc6W4oJgDVpud/JOMsfgjk8yX6gaBuNyM+Son6Mp2i01KLoYteKM8iOrwZX1L\nqOvX\r\n=SDqg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFthjGk9RGK3xnExJQkgOJvEeFEBTmvzkmiXG9AMnUhIAiEA6H4gyLbkBNzgQSzSD8b+D5YPvhlbyC3raNWeI2E/5Ks="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.2-rc.2_1599652194323_0.7623593469304957"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.2":{"name":"ipfs-message-port-server","version":"0.2.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.0","ipfs":"^0.50.2","ipfs-message-port-protocol":"^0.2.0"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"99c762ba6b3b71e07596b2930c09fb143451aafe","_id":"ipfs-message-port-server@0.2.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-4P7atAujBZIMvyy3X1bb6bWLxkOxJgp0AMD5cqwfYovNxzvsX8dFeQ7y9N40Bnbo5fGSoAOX0TjxcRZimwtCZg==","shasum":"cd2ca792b90b884c3eec47f89e8236fbf2c96b24","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.2.tgz","fileCount":13,"unpackedSize":103907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWOYZCRA9TVsSAnZWagAAuOgQAIoXVoO9p421E11lN0Pg\n9wUiMYgOsYSSWC+fGvYaWu3rh02tWTEhRIlzbS+t9wqo8v3tdfVqFWsWOVIL\nHC4QbQ82rWIJuDXVXVveLParhu4eVDvn9ICSGmMb2f8GLJz3iGx1RQgPZigu\n0AIhgnJR1xGDRVv6kZTa6YZSLZUWUUAnbNljFQ5gH4KTkRqpsikqbJSG40YV\n01Wnvyr+1j0hvpgS69Cc8hPe8kolpBM0RT3QVx/ioJVtVvCKqJaUOeEmu0eD\nR1UPZiHJEDh53elA/hLJmmADRkjRMzMmgsna9iNXfPb8P6nlbgWPUTCrwrWU\n6lh0hdQ3hRzlD1NXcIu6EenB27ourE+yLnKIhcBqzIONYrZccwrrcOVizzsx\n5qq+XcLJVroWShrGDcwPQNQvi67HjstEA6q3o3NJVeHkrAw7OpEQSXzkcLL3\nYPLdN2JSqcB4FhJ6VIinkJe2j9QXKY9uc2X8+/LTBK8Ja8VL8T+u2PlaLYs3\nskb6SbhcWQy3MMl2lOk3A6aMqCYU2gCAklIyjSdjH4IGP9OVmA7DRMsUy7WM\nUkL92vXH0Dv84dyRP757SljmY6DxNnBTVJMfqP2ImlvXPON1axSTpl6Ww7GB\ndE/CxKvaS4mouAIY48UWqRsnO18W9dbsAP9OoZ9fbFfEIL6GJ3p9gbNZYEo6\nTLjl\r\n=5lGi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxcDoptLgf3LWavZtyPqUDcQ6ShXfiwgmtKjbVL8FxhAIhAIhUv6sqAWV+ek5TotUzgl3JLXz/hdJQpOI56YqwSDWG"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.2_1599661592793_0.5918891687506309"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.1":{"name":"ipfs-message-port-server","version":"0.2.3-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.35+867d6bba","ipfs":"^0.50.3-rc.1+867d6bba","ipfs-message-port-protocol":"^0.2.1-rc.35+867d6bba"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"867d6bba8561adbe6ff67221472f0cbffe4e1801","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.1","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-wPXG2I4fYaDkAuQPrOb0NMuwCUZFTgFBPjgbVa6nk7O1W5rHd31un6gzeMFpZPuEDKdQ098wEEshj2CjugeSTA==","shasum":"846376a290ed40f16d93e2d6aad403896cd72fcd","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.1.tgz","fileCount":13,"unpackedSize":103965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWeDKCRA9TVsSAnZWagAAdCQP/2Ujyfs9yKZZAKdvDbr/\n9MmsEraa9nqi71CSTz/BoelJeaHOgg9f8UzJ9qaXX9tOo5kHF/yiMyAcjAxe\nRRx3K5+rDaZ4CxsEWEaeuwSZl88W8ZDBk/nDJC1r8/FyG+yMry0fy5YkZsgg\n5mKuybMg6YXJKJhJYTtrRD2CQrU0Ra0QMBbRvpd75h2ZO7jgElNUsBn9i/q5\ntQRmqvefRSWCxXMVB08VR2yXdDpA17R0XCZQPgDR6K9U82Rpyh/SYjtu8O96\nng2NpQrUuKKS1XfHKjU5c2NhXlyXpxTpMdY1mDrqD7wRLhGconH4AgXhewtn\nyRKXvVT34mbJy5aI6K1F6YSx7Ilk2kF3QgQKXH50TsIDWEOLsg9LTIo/0ruV\nuF89o2r4VqNQurdu6ozALDUnWXKJ18qXplA6V0zdwSnwmamCc61zo/AB1+AQ\nBgH7Fms2C2Loz+Ljzyl+hKDjIoidFIM8/0drmCOF8Px+Dg1aA6UT0WzowipD\n6q/CGcW+5QFlImesM6Ex/hqk5XPE8NFWc5oPkBmhP10iLl9t2plu6GaBm42p\nw23yBTmhFZOxWcgKUn6rxmtjPUvn7ITbvsFxdKLHSq21RWSpusxiWfHLph7y\nIkUcJdHdIrGoHGYeoRfI5MAr2tXA85YR52DYHc+35HbxcgJZQVHRupk9hwRQ\nUILO\r\n=cquu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCx1MOS1BiGpA4F9kuY4cKCc+a9+HpWyrLr163DzdgXnwIhANCet7o5NND9WuDH6+u/fzYSpgtV9gWfJXsmC/3ZboOo"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.1_1599725770089_0.9326732437685157"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.2":{"name":"ipfs-message-port-server","version":"0.2.3-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.36+49628a6f","ipfs":"^0.50.3-rc.2+49628a6f","ipfs-message-port-protocol":"^0.2.1-rc.36+49628a6f"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"49628a6fe9879ee8beb1eb97236de05fdcc74a5d","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.2","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-4CK8FxWvLnzNWtIN+TeJjpj1BIPTIY9jlioDSnIa0vOzzdG/8DkYXZ0dRVxAnvEdlRwxj3HvqcQbMr2p4R1zwg==","shasum":"a020694120f723ec23a5dfdfb4e2bf0fe4d73bd9","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.2.tgz","fileCount":13,"unpackedSize":103965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW5PICRA9TVsSAnZWagAAJTMP/jNj0bGQ46EPtpfyeIS+\ndf0F4K+k1Ggjbqrv3W58TIltqrEyfXItQdSSkcSEgP0gDYcQ3siJTktH7yL8\naRBmlIA7rJNbrhyjL/1+RPI7aZyeJBApNLt4WRqmVznoFocffnDGmolYl+up\nfzbUhbc33gQiDujAmFkaGVjxxB631HT2eV1A/OjvAMHpQYPk7qNoFaQr3qoZ\n7v7sFYXBb5Nm9UF/Idp2PH1//f3F6tdoA8fAji/QcbmHW2QYPMbkiX4+ZbIw\nkwhYqKVPRC2GCln+baHXnz4lzBAjFeetujJeoRJ4QdFVPgirM92GlIn5hNxN\nU4YJe20D3yAMmWTvVUvCrY3MJ7eZG0q0xOaWbC2/u/ub3wOHRbdYBzx0xk/r\nB7fYU9IdmYb4J0iXmUef3rYrPJt+S9S6p2W/IP5stGuK4wz3JbF0o05kPYPC\na9Lmbpst3DY1+490eEy4qOa7He4U0tbTXWM9SfbRsjspZ2giq2Jg4Mnl/6AW\njZfwuOIEVHCRqSgUTtzWxaEItT2E5DhQHEbPT/zwZceCz2xRrO6qcfDMqlkY\nc2YK1FDdgREiDIl0PvypFMkrsknHUpVtAEp0eS5Gvgr6VjyxNDPutI3kb/yT\nayUPe0P3PgFBwuaMX0TEkFXuS67GneeU6QpRTfKiKXTPShvlUaJs0g+N3p/1\nH7CT\r\n=j9os\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZkuYS0oXB9DSGHZOKc3zE16AJYWt4LRccpcoHMrJJGQIgBAuEKruRcVrubPeGEgXju4B4qR3fPXkQAFIHybpRfQg="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.2_1599837128337_0.15085305468553045"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.3":{"name":"ipfs-message-port-server","version":"0.2.3-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.37+420cddb9","ipfs":"^0.50.3-rc.3+420cddb9","ipfs-message-port-protocol":"^0.2.1-rc.37+420cddb9"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"420cddb99873a27e4afbf1973c7f06c5415fb883","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.3","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-4Dk/pkHWSmLlagv7IkuMEwiOJ5IhmhEEEqyl8Ha/OmMEgzNcleolVsPcsBvVG3yRHIR06NJ9ImYkJ4qFCa2JYg==","shasum":"da61b3ee3db218c8645219d3021acf938c3d2460","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.3.tgz","fileCount":13,"unpackedSize":103965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfX2tgCRA9TVsSAnZWagAAJhYP/AzJ3Q05syQJatLn2/Da\n4r/fFw5QD0c8IQTvJOr+TvIj+YHrohcnWrQrpAvg/BXpNd3osKhNNm6qYycR\nVmKB4j1ZdcyEl44vyMAqFbayCgYz/a1fgVmjJ1dDrnLos7gfOEq+18MeBbnW\nO3w0Dm5nDdJEzPXHcbUYzY4UeyctcuQ4KnLA4uuHUN22stalShemVJzQtZHk\n3ix0Mmxh0cdrCeR9gCe1Wewl48zt6+h9QCfy5PBJQWGNIB858lpPpfViQC5a\n47uJO6hJz+0+EISTmRg7LG7khMehkEvuw5sxCRQbSzvdyI2IT86nGlqG7tKW\nUw54as9CTXtO4qVI7+pvSWu+w73t62YqsOWi24/qVdVgs3tpNEdUYzwyIgex\n4R9BdTmRt1XOd/qGNTR5hwiirsWCahBXuTDPPQW4GYZrR+Sj6HVIGHPDe3i+\nVFoRx9jYwRfBUAT20InXioQrynGqUX7Xn9ZOIqQRgzL8hltrufumi3/HZCf7\nrOl5zvpkrTfKtoSyfMV5OBpV6h28IXymujidvs0u7D+CKeCydG2AF0TsLHVN\noCFFoEylHaP/wWSxdal9X6rVWQmu663uCExL5/BwLG3vLHnb4mD0TkTMoXnu\nBBxwZ6Pvzqa2gCT6s3iwAazSxm8AIjgJNxvt82lrS21U4oLdlEsSylFgtcK8\nnjH0\r\n=JD0I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcyxjimumldaMme4k/Vp3+TRkAhhR++rE2Aq6asxLKrAiEA+lIjc2xZEmSLEztYcKUW8CGhD5nIMjsrB5dAdP0bYUw="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.3_1600088928051_0.17310657691356424"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.4":{"name":"ipfs-message-port-server","version":"0.2.3-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.1"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.38+e8c38f48","ipfs":"^0.50.3-rc.4+e8c38f48","ipfs-message-port-protocol":"^0.2.1-rc.38+e8c38f48"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"e8c38f48611a4628b04fce4f3b1feb628eabc121","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.4","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-4nHamDwKsVvBZGgBo9uA78buX2sc+Q4FdyPpMWRWKY9pTIEiHJD+t6pxlKeBWOXoeeBU8bRFtW8YH/5XX/kiLw==","shasum":"034d692a2815719988d5b12cec7d2a30ddd97a44","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.4.tgz","fileCount":12,"unpackedSize":80685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbfVACRA9TVsSAnZWagAAhV4QAJi+CrSlMCG2hzUFILsO\nQ446I7R2HFJ9xbj+2FRDrwBD8yeILgEMpAOqFPPB7aYK1T++AjeOnk1/Gbd3\nZqbRrcH4LntNioKDmMIvHtNzTeSt+F6HxslPyLJlKXOPnQbBhYQzd2Y6NtX8\n81g9sq5POVT/JBTKgtHbagZ3afXJVgR1Gi2CuX1tINOkJjme6LUJV7+p3fbW\nQsyPbTU4zd4nurtjSjSXMWTYmpnSO3jiPQL3eGup3E7HElWMevIUEO2mHm0i\nzkSSgzwTPuUTFam/GcmJWxNHOwxWL1p1zox401zluC6WuIcONbYBMGtcEt3G\nWU3A8z1OFczROJL9LFrClaaXUP8dQuMzV8oUPSD8nyVI//0U+gMp2SR039dJ\nC4pmKQuiJ0QL4fQb9RvgDSbiFvrWXwTGEMmRs17LUNDHLSrrgaPE62hYGqGO\n6gyF3nmls0gJTWfuIHDVKOkmIyXkuFlqmr2kmLeyUeyegjKe0hEHvBeQwEp5\nWxqwKiNhPg8MU4hHcK3ra76BYWwRXO784JxaZ4fXxa+gDgCyCOJE+84kngz2\n3nc+aJZGCf0RqfueE7u4UUFGul+LJ+ApooocXOGrFJWNqz97sTaQ7aGjSEnB\ngql6E66Z6TQ9Dc8C7LjmZqQrNVSPAAiohrp5200p/NkueGVaR7V5YDHyf50/\nIHpm\r\n=fXvM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhbQyBs10PMayCvm0tlbZoMdpMY7F2kBaibOu/hEp6CwIhAPJj21dWsNOLlDIT1718a7SJBBHYNg9s2YkYzU3keBeY"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.4_1601041727803_0.06894050097318938"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.6":{"name":"ipfs-message-port-server","version":"0.2.3-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.40+6fd99c19","ipfs":"^0.50.3-rc.6+6fd99c19","ipfs-message-port-protocol":"^0.2.1-rc.40+6fd99c19"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"6fd99c19c0595d1d6e4c3aed698c76dfd979a438","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.6","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-uLou1wD8F1s5MGAiIErmIjHBGCM3Qq+nzC383Wb4BR77BKljrGodHT8ogbJdP66rV2GOJ4/UtvcfhB7w0oTZNw==","shasum":"cd0f852eed0c6752927869176c9ec307d0d65053","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.6.tgz","fileCount":12,"unpackedSize":80685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe5t0CRA9TVsSAnZWagAA1BUP/iWgUrWhI1xUJWla/sMA\nXQL/8yKvk6QGbzifcWvgJ1XWzsXAPCSJe5r0jLN4HkKNAnIIe0Hplw62WTyd\nfYhFaV73JYVfX3u4jjVxS5NCqyY2O0hXB7bEoTKefnzsxBTaRhH4XUQ/1BX1\nxlms4Gj5ZjrJrulpxaV4YLKCbY75elCWgmS0iIUVJ2ek8w94Dt1BGrpEfC2R\nYTROW3gYhY/au057MveaZW3GDTEUJVdLVa2lEuVlhdXriZcwyHIUU41Z7+0D\nuPCRzwbucYmt0GEEUQZ982xv0ov3bXbAcCzA46t+zBzcczdrQ3C4pfv+WDvd\nEl6kL673aqslHEo3T7Qd+07aFzQ1XowmTBXcAaXgqD2y4PGvLug8Egiz++KW\nrQIe55SD2pKHOjSyy3D5Mcha5h72z6GLHWvWenosal20uGlZ/qlsXP46jJ9E\nIE0efU7yszoglqhG8KZjt1ujCtY5t6C5oy4ePpELaj5TQAfnP2d+GyXyJVcN\nkBeO+zjfLWmGoL5xQTVOl6/1gFyVwTP/5E8yUudYaqi+yWqVS8nUf75spGSl\nFRGkDwxau57LFErm5o/9ACx+kIeOgCN8FUKUPKZCRIG/AkGLWZlAaVYOPyCK\n2/PKmTQPN2Uc6KnlYYTbY8+tlO0srzVQZSNU7S0NyeZZa9/KXql7NsiGRwxD\nqEz+\r\n=EA5X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPVUXZRJ4DUJMEq8Ak84N+VQ85ietNgbik5YfPFPtwxQIgf7JQ2Iw19nNZLATUOiAeQTUqGbW2kzXgpZU6z1gXnd0="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.6_1601936244189_0.3772624727275742"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.7":{"name":"ipfs-message-port-server","version":"0.2.3-rc.7","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.41+0312c415","ipfs":"^0.50.3-rc.7+0312c415","ipfs-message-port-protocol":"^0.2.1-rc.41+0312c415"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"0312c4158640b6ee9640ace9d91d7469df7210b3","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.7","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-9DkJdxAORpKPdHEJ7qbCqTDnmTqszkiGuOOO9WJU37adB/zYizyI/YqZkn70Dj6O4WVMoYpvi1HOSJsGb3yg0A==","shasum":"47ad575153fe3e27bc4d15a00b1d0d3a19ca86ba","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.7.tgz","fileCount":12,"unpackedSize":80685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe95VCRA9TVsSAnZWagAAiM4QAJXucQSIOg/Py+Ww5SF3\nO7DZTV5awIJ1o0R6bN/KHYUKr++dj3rFVx3sfcoap88F7MmPClT9N63eSLVb\nBk/8src8z8RIGuz3xIVVzoVvj1sXRC131j1JDbMmcCyavi+9MHul1MZ2i3Ja\nVZ0AH7jL5pdYKIcWGk/TgdKfU1wJa5Mod6zSmLRZRZzPntVEW9HYBLlMGMLM\nDTlew3GgDRmMBBk3+lxbiLEG6N7NAigeUwhMXQpBa76RstcF+aAobZTITzxF\nUpT2ZhKo15chsCrmAdI7dixYHx+k7yX6tcLCkNTTcmeRkwtSRBV0nkpYNP2a\nusCf9OuSd57dj3ke6eGf0hKE0Xtzd6/OrBMO0fhzBJqVsRqy864QeWRUDvUF\nSp55R5OYT1/14Z3KbbpB0U+75WeOTGjnt43OcRmfbDHsaMxzwpTjSfekzieO\nDjflp4W4t5SIOPX9Mz5BN8IjbH5yNVaic5QQ0PDF4jSjFnNdcY5o77UZLBCV\neSih5k1LRlwvdCC7uifMCusMzATh0YCRjY/SBl12r3qkcGfzGl5Is46vNyqq\na3OlC1QgDZMdwQesmGEBMk+v23C4D1OuNL7lVc9Rf9dszIhr55JPeE4WoMYC\nWn+1tJuBl+iPPsweBtz2RXEn3k8ox4ctdWi9OkzyGcNPHUucROhvu7/lPzP6\n2cJZ\r\n=79Vd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmjYr/Ci72Dxy3DWDb7qgCrrbcoS4I1n7R952gkt6T7AIhAMzm6+nxioG40MMQK5DBlRmQ4kGLAXk7GGBMdJ4QCsZA"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.7_1601953364936_0.36617969256130456"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.9":{"name":"ipfs-message-port-server","version":"0.2.3-rc.9","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^26.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.43+988fd211","ipfs":"^0.50.3-rc.9+988fd211","ipfs-message-port-protocol":"^0.2.1-rc.43+988fd211"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"988fd21191886b9614b97cfec1bce53cc8a83aeb","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.9","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-dXTL+ed5b+MPsdR3m/Ghp5SBFGxB8RvybSO3MqGW1ZqSvQcmUwX8taoOhs0ULCoRVTOWrmL0fMLo1pTXrJSKFg==","shasum":"19086ae92a697f6a014de832e325f23c3e2e2685","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.9.tgz","fileCount":12,"unpackedSize":80685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffEtHCRA9TVsSAnZWagAAAN4QAImnJPPcuSYXPEjn16Y9\n7Uejwl+qXLy5axdYnoDbW/1gI+CzH0gZVZ3meyh+WREFZ4coAwptgcEGpjXg\nG4mYIr9YUNmAKPTiUySSGpwmzbMsRMJNEfYaCVxRTnw2+bhpr0H61zcYhAxm\nLeB8uKB3Z9CVP2n/SB/Ywfq5bPsTwrVZXHK9eB89LieyyYEwrPOygbgKofzy\nYfEpwEpbqJ32kt/aczxL0wfckZEYTUbjfrSIVAlPNHrY7NuehDKsqJ59FH9O\n81FvmvoOjp8nNnZWrPQ9X1XT+veuhk3LsgGKOZHB5VlAl3w1MtlCip7zYmjv\nc+yo97OpSBnXFgvd2340s/KMAgfhPCE6K6uXemu9g5pSvcFYIH+eXB1eY6ML\nN4srRKq/yrqzs7Q2sOX2KAaZcs8gQDXL4OihuMGOerOqI++YNQzU6VdLmjkZ\nrJ94AO7nb26hgHZBO5I5fVFDRXCpu1+x+Ewzbrcvv4yvKOwIUvdRKX4Yrvau\nmIwr086RKMafFtF/7BnmDCiA6k5Q3rleWS11xVhNyFk46EQn60NPDQ3+ZehJ\nF1EN7F+ADVk2mEpwPUX+JccI/qKXuwFEkeXDHg+sRbTpEd8A72pfkdKYUkNt\nxdNCa9Q/lj6FiwqBcm+yhVP/ihkjXkP5U93F5m4fYNHCtAtLeVQ/t+EXRWLU\nfDmL\r\n=5bmO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZkOmhmr6ZneeTx792c63ujtbax0uEOsR+JgpWuK/elQIgaioQvLOleyKnT9Vu1p0wLgo9zjGOb1SUu71KVZ4Zors="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.9_1601981254912_0.10369903750877407"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.10":{"name":"ipfs-message-port-server","version":"0.2.3-rc.10","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^27.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.44+2d17bba7","ipfs":"^0.50.3-rc.10+2d17bba7","ipfs-message-port-protocol":"^0.2.1-rc.44+2d17bba7"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"2d17bba7136c0a517d2de208ca917b9112d70619","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.10","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-F8Xmc0JpSlMc9wlG+AVtuwsasq5TwVFqgKtLfi4aFCuvdDgsTSPx6++FSiEK2m30L6rFi5Kkez35eTyBRRxdjQ==","shasum":"beebcebaeec28a67ca10053e3a938f0370812ec5","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.10.tgz","fileCount":12,"unpackedSize":80730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffGZiCRA9TVsSAnZWagAAiKwP/A4FtD5+WrExRrKN/l/4\nBZI2HVEpQoq8MfbsdKI0t6f6uDfZzgJP417aYSwwelsymlcz5k1ndB/nU5Tg\nDDN+XERTLDbc4/sunZ1qneoUlC10ZZS9o+Bf0lUllSIfGASbEWdcPuZlK39P\nH3+wslRLjXQ1MvvXkpUAbyH0gGKzRUNFILzNoIVzel4oAFF4GMU7hRY1RTDA\nIzJbbkh7P7BsmVY0FYugPrp7JuQKHjMqNnHAwn3FFs+G/lMegbhtMn7SszPT\naonm4KswYZrKpsEcLv+mP0fODfJ29h8dks4uZs234qb+rBkuCYAD8V4XX6hc\nsb8CWEAKPhhsmoG6htZYNI1tSqDVaObE+CXWF3w1SCwh3tQe/WriJpLeTP7U\n6puZbmCjf0pGw+iLWM9y7qHDm2eidCz2C7kw95j/hptsyro5zcRvr89bU1rR\nr4E05Dke+f5HSbtNySStTLm4R7hIHzilgWm+QJlr+BMHBCzPK9CiABW7ufCH\nBDs+YHpqvYRKclgyuyWb6X9PEHoHKavaHNozAIzKxiY0BcZvj2K3BWbrgD+s\n+pf7njEWSj3GwcYPJcPtacQDYCUYLeC4elWaimMMvPB9+CPkA4htz6xksVXF\niSayLd+5tl8R/RCpChJVPR/HVK8tUxhAkM7U5bm9/sgKTBhS7VhoL/PeEFa7\n6K4l\r\n=h0zK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFWpRrzTo3HT0FCZeIHAc0ON9QMUyRicogWpjnvb0U3mAiEAn0Xq5dU9vivsQfb7S2h7+Fe9MkfLtCTY6XIdtZdtayA="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.10_1601988193812_0.846273672483548"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.11":{"name":"ipfs-message-port-server","version":"0.2.3-rc.11","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^27.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.45+381d54a5","ipfs":"^0.50.3-rc.11+381d54a5","ipfs-message-port-protocol":"^0.2.1-rc.45+381d54a5"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"381d54a50a855b3f6c408d3ae8f1e3e5f9546598","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.11","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-nV+9s7WAPIdGdNDitdQQmEK92pT2uLOZoYxh99uqE1IfPOVsBXLuVgx5dRBQcxsF04nP4MsMTL86W/GIp5kwRQ==","shasum":"62b10983455ab50ee385016468a26302fd7ebde1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.11.tgz","fileCount":12,"unpackedSize":80730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgW15CRA9TVsSAnZWagAAktoP/iE7eL1pzatd8stR/SZ3\nlh3oMx/93GRcsJILEfxmOxAmwU4YHBtbzc5CzOXkLwBkI01XZjDvfobbWEHi\nAQ+VLek166GkOk/d2lP2aMnPMSPj50CZfZ+rrHApfer1jp+4tll8j+9Qf4v5\nzPzS1H2Swwq1If169lRxokxdqnVCmDajYSCNeJ8Y1AcXPZbI0yjNgIQy8apx\n6B9o5HmQTjBcm1WofbDxGZrdQBUql4Is59OuEeco3ySwozulNLbbISR6zIHt\nnWRaG78r7qOXsm4YZbb2GNqfUpZgL1UWL+2oOwutnmIM6+my68lie2rSsNCm\nztGmLtoUsUKtnOP9AhGds8Kw2rXcs0gZoKJx28lnx7Zxk9DLaUVHzX3opW7w\nmqtMlbbTtUtiLrsklOG+sIBUWOwtWn6gsfUpd9DVnyh3eZEBNx0a7iiVr98/\n42GeVKPj0FYSbXgEiuQBGoJQ2fXa5UQ7RbknkkCISNWF0XYrbKX72QplNL9p\nNNoTSxuCcCrhafORfKl2I8XEf762FXIOP/1L2XUMG95o+SATPazM6YU+oDz8\n42Ra3DEF5WqQr79qwpTD7Fhs8XZUmW9iYWzgDuKXTMOV1rJW404FxwC9kL1A\nWHxhxQe+flz+ou49tE0K6Oxy+kHK0Tqug/1jKteWvrkzaFtqT+P5/1O9ukYf\n4Off\r\n=cHAn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjKP49QzfH0NB9w4OD6DjIqzyYNdmh+HcqX9MVUtcOBwIgCN6Lecd3p/vViO9qoTgJ+6qv+3q4v/Q3q2lDXpz0BgY="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.11_1602317689042_0.5289536077267079"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.12":{"name":"ipfs-message-port-server","version":"0.2.3-rc.12","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^27.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.46+0613d79e","ipfs":"^0.50.3-rc.12+0613d79e","ipfs-message-port-protocol":"^0.2.1-rc.46+0613d79e"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"0613d79e3c4dd088d32de823e89099e81eef7333","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.12","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-LI5vFNlL8X0onw5sB5x07KpGlMOR4lN1IqMJsZRuoFgFEhEBH7Y6/X/sBjR92ae1mDuVoenSIyj0PRUhordmlg==","shasum":"6a96b8dc3215f85e5d19f40432b970d15b6b30af","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.12.tgz","fileCount":12,"unpackedSize":80730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgYk1CRA9TVsSAnZWagAAqtwQAJciQl1eBWeya4snMqc+\nM1VWeDA8QrKLGQ46w8NHSbP/t0pXa+bB8Zle2qY2Eber6sVibmE2DiD/5mZt\nVLmHBwczt6VCiwSFE+65Z9tJ1jDsJrJYyGHLX2Epjy871MB+wmcSKIBejh9G\nes+niNcj8ZSxhcAE2JdBVOK0A3WaP+cHAfcBwX5Ppg2EdeSDe34HY11BCKQu\n+Pwmd4S3RBq5AtMoa5iDJUwx5nA4cHugNp+1ojQJniHTyUkdC/2fKyq7z8Hm\n+1yhPr/ctOuArq867eqfppQmZUGCTiVomzjScsLzNw/IGXXxOH+dbHgw3kJG\npvKvqoWK4QXyWuPh579uM52IEGmGpR9PlOnNlUuCoknSBPO1ITlH1KsPqnxt\ntblcoQpQhYnSDRc6bH3ZJB9hbwqTVHk/gexIcfinaZMoPMjiIEoImOr6lOzl\nENjDS6LavtfdnL8CAg7UKNPOnx4oxw88vFSVNEGTpm78zRRx82f7N0MWNwhc\nC/BYDih4lg6UDdQk8UNt8KtNy56xG2sJS8hFEUR0LXnqd7Fagugwc8sfp5Hq\nLR7UhDlYFtyaVu+v0PN9fVi4yLu98o+QqE8zjfSeos0FOUwh1AbIoEZT6/a+\nGSyNqTb/mya4IFaQaXLSx0CfKer1UC+7iZSeOyBOPpeUFhgj2h0z19iZrElZ\nl8dq\r\n=RG83\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDXaurAw1AGxI/6HwEkCW95riWcR7upQRKktmApGi6VlAiEAgdUMXgMo6H5D7/muAdmFuNGhnQANtWX3SKzeIEKkviE="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.12_1602324788790_0.4225161656084073"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.14":{"name":"ipfs-message-port-server","version":"0.2.3-rc.14","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^27.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.48+8afb88e5","ipfs":"^0.50.3-rc.14+8afb88e5","ipfs-message-port-protocol":"^0.2.1-rc.48+8afb88e5"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"8afb88e5ea3b0678af1aaa633f0eca6156b2130d","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.14","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-DRvKTuBzFDEB68f3fOEbkM5N8pPuzt7CZVYfT4rwAKulWCZg/QWR+rSiOEfafuqjxHD9prtBlBHgYE9WTRY1zQ==","shasum":"89a28fe27f7c9f3e840ae645e310e4a7df275b28","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.14.tgz","fileCount":12,"unpackedSize":80730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiG6eCRA9TVsSAnZWagAA03cP/3PkHUuWBAyh1it8RUqT\nlBfKGC8A2T5tG8ogOlAGUmKF3EEFEkAgYqNscvOcM5x7AOZ5i1IAZgiw2rFT\n5YIRwZ1kA+EQz8TRfVQlbWyFYFpoV52+TGo/BXvoVHnV7AKxHvfvpksCRksK\nZb+DDw+eu3SrazR2nm1LM/zRv/x0P4Xd/afnlwP4HyOL++hmgmleXucptob/\nXFHNWufDEYalL9juQwDHoRaicgGxqg7evj4QHs10yJniMO1Uv7v9mSiSp/jZ\nN8lW4AkbPTJ5l9Mar1p2/uB0caPE6EkqijBQZVypRzH2qqRHbl9VO7KXlfTG\nqcd0ATEE4/boyLI7axxTvJD1AQskVOGVGlTxc33ArhLQ/QoppK/dtztTnOp4\nx6WN9BXlTBvFeQTzDCg5krETJs7GlxU1jY1Fehx/nG2BirMTunsBQTDH3TSw\nN8u+QTdQKkDK/ECChRl7TaVa7yZD0i+40h1AGkRFiJRjS9fz5VdZXcbwQYWx\n/6lVmJICaaZpBE1rBDxdLCbCqBCEvgs2MT1MP5P7HaIC+aCPBTeumD0YdDpc\n0TyxlCzIAmiorUBAxJocNobB6297Mt65GU5xwtId5AdetUPaKxDHFV81Okcv\nrPlv8C2rci/VeMT7XW6Pud7wOhwxlclFmS/xYmkOEedeQWCOTRwqo3ancFJb\nxLLa\r\n=cxP3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpUmVwCbFny98CxZBZhf/3n0VAyqNzdGtZiRkzaxfBDAIhAJKxEOMDDYHMQ/HaA4TgFUbbxHSUx8fD/Tv+2mkFJ+0M"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.14_1602776734439_0.5139930719426467"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.15":{"name":"ipfs-message-port-server","version":"0.2.3-rc.15","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^27.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.49+b579b3f7","ipfs":"^0.50.3-rc.15+b579b3f7","ipfs-message-port-protocol":"^0.2.1-rc.49+b579b3f7"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"b579b3f742cd07f8461a74e1f8a08eedf1ee6503","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.15","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-E3U89am0v9uCNcNw7/7Adt3p1rnqvpd1lVZFr2GoZ076kl4k7z/eUGJIjlrRRYYLGOaFWvfGgQeyxZhBcUmvMg==","shasum":"682cd19b1a8daa5036f12abaa6a3ad0fed2b14f1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.15.tgz","fileCount":12,"unpackedSize":80730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiHLoCRA9TVsSAnZWagAA7TUP/A7PLEIvU31rsYHdO0PN\neeJBfaegNxAsdto1opUd23JjG3g7h5StVOJDMKtfsD2D6acwQGT4ZZRsYkwx\nztvJDlmrNKiiLLaJqzI8CjjOFrFMW39QkH4XfauTjG/ny4CXoeyZ5rZm0zaq\nTWWh1OjWgzzkYyAiRn6OuSm7BNIKRsuLHroTaQWci/6GpJ02ooFjqWhYiKPN\nlrqCgmPbKUexOjRMPIPvRMZHgdPkmAnNwOydr/PKDjaH11zxhiXkWmdY202Y\n0MIFkY/nAz/05aRFsJ06TWK9V5efgHtWnQ3RJTvHUkWj7BcpYLFLiyFZ59ur\nEtzbgp3kOLEZ78d1drjTGynzBiNPQdCQhTC3hxivYaLSigbCG6P3jOUB2Gyl\nC5ft0FYb0FcUic8/PXyveruZpbj4J9skhWjX1X9CDJuD3W8MgsZcMeVJXAx7\n21hNzXyjsmyqPAQe1OspjP+7PWv//mUQfV4gJvFMlB8EHS1ghtZgIImDmVki\n+FxRNY6V9SYIpD8PdJxsY6iMffAH+2xSAs3ElLDkHdcwhkWoqa7nYTN/Uc3K\nz1KsYFI7hMqmQPzdCtg0Biw+IbtWJ4ggN/4QepnambyeiMF4D8aLTcAwTjpP\nI6RSp3dbo1HHTMvwi9LCWEhUVGP4YcGTeN10aBrvlczKPTI3bpfBUeREk9d3\nAGFv\r\n=NlLQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGzgl46+0XD0+NdRwN3NkFAPl4OFcrPk426P74dB6qWtAiBtJw/DEK0nxQLztUDp2sdukVRd3SXQWAKyWZtqB7ht0g=="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.15_1602777832356_0.4221082090441255"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.16":{"name":"ipfs-message-port-server","version":"0.2.3-rc.16","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^27.0.0","cross-env":"^7.0.0","interface-ipfs-core":"^0.140.1-rc.50+c53491cd","ipfs":"^0.50.3-rc.16+c53491cd","ipfs-message-port-protocol":"^0.2.1-rc.50+c53491cd"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"c53491cd5fb075025f2bb995a8298b56e0ad0865","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.16","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-2k5EKq62k/eHBM+dZ8gUqz1GEtJNsqj4yu7/UE4zRGNlnOyLBsmHciY/3QitR5ZJT9o1Yb/bnn0Hoc6TsHzDkQ==","shasum":"508737401dce3c35f2b07946979f731273342723","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.16.tgz","fileCount":12,"unpackedSize":82438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkGXfCRA9TVsSAnZWagAAdcsQAJubTyVJ0m07XFYJ4ww/\nKGJcHTsRU1ockD8Rm44lW10u8WzW2zxUci7ORZJ2ZO18HkLoZd3cvCeIWBrP\np/XTwV3WQIcgdhFLAbXV3sFaIHjC7iEeC3xyVhykBnpGHIjCtPgJFQSoSrTh\nfp+9CVVBlZN5cSoFaDF7VzrorF5sRls6/HE+8OLbnuB038mNFfwwSu4E40dK\nbZ7Pb918jARPYoSZA3xmUM+6VkJ2Al+moPYGJgsuXYemrj63ShAY345WZLZV\nhT1DjH3N6Nc4Qo+WXTb0Az0rSnoRL1wKA6OiL6z1wzoXlrKdj1XYrOIYKzWz\nN+mVPPDFALECpPn8i1yJWN6qC97AeTKQjuGro/ZGnEmVeO/1nXkfqT9uxu70\nDNYRy0VGc1cbp2+LrJaWAJKYFsqlnOaziv6VJ/7C5fA0UzfQ6rCunb8n6Wuw\njXQoizstJk3bIJdtVxDKxbLI9ClH0qNAWidfuaTfGJ95XBYmOro72q0138Jl\nCCaHshtHnamBiSvhB3phJ6xdBswtKUzRun1z6b/Flr5UPkqVX7agmHygw97h\nihr0DA+Ce8OIZ3UourvelAMiLfaDnETy662rTxVz+M/vc+Miz5vGIj4W1+4d\nDwRVW5yFZp3tlzWhyQ9+HiABdznaCJE40pdjPG75QtMJCWV2j82SkWzPpuGM\n/ORu\r\n=k/rt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEnVDoeWydg+l8CXKro4bX9ziAhErxBaR+SX49+DTSbEAiBF8KdQLxwC2/n8wzzBgXAS/K2LCmAAApIk46aNnk0MAQ=="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.16_1603298783432_0.7953556492407028"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.22":{"name":"ipfs-message-port-server","version":"0.2.3-rc.22","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.2.1-rc.56+a00bb678","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"a00bb678f58a07194ecd130edcc8c1c7148e60b2","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.22","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-1GQiN3LY5N9hHd7wE3LfBtqaXr7EH9hL8Q371Nnj/2Z4T1xabjiYkL/Q5PmMB2M44+Aik9lalx+KZeKkmypeYQ==","shasum":"61f8b8fdcf84ac86895246d2796e6a8e2c20d9f2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.22.tgz","fileCount":29,"unpackedSize":213998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkZGPCRA9TVsSAnZWagAAjWcQAJ7sDq/XIaRXw47nXT6S\njnjD3p8D81g2Xw8pizjS9Cpr8fPrnhLIWX3QZ77wyl+EN/Aow00x1PNhXMWp\ni1+CVF+T/TdBG3sPomdj61vrhm5bV7AevCIplzl6Yzvjw3BfI4bqO3oVPvnw\nZTEfFS8s7SyntpUgwjyGIPl20vXzEOeSWgEtTu0lUh93Yg6Im3QyR6bbcopa\ndYHRmJYBB9MvemloSLeiuKKoafN+IlmVOTXmLPPKXcVd+ZbBco5y2dsR+Vwm\ncgysPZ/tjmWat0+gq7UtU2Zw/v2DM1Ck4tddFOOwRlSic7MMKRLjRHmt2Umq\nnT1ikFUaZPnshmskBnN6RRrSNPa7EGbZ5bz5CkV1gsmYhf95SzjgNqfLXZr3\nONLE0KYWHGQrQQ60k9OdDMEEDDy4p74AFSkkgfGwowfCSPW0LaoqEKpDIQCD\nNlkoxtiZf9qriJmkuZdyVKxVVxTRsMhgLTHBLyIdPP0DR/UfYV1ANkEIHZP+\ndLUKllpZXoioqCzWcEMhlrBHqbgwIFljncnt+Fm0ODiqkQ0oTSJsyikrALUP\nqDPOW+sNf91mYVfC/3C9a8uoMvl8kMM9AN33XbWYo/Adt7inAO4ki94P2ykg\nYl8U/0EAM+Q/tAJYjqsZ4OEObpq+kunfqrP4lvh0bzTd9goQf1JhSvs7QVUL\n2Mzi\r\n=U5Zn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGqmGMLwEtdAGlsYHmnsU6YZXVKXV9qpJtidHVwCeaugIgOPhd0Ilh3GuOvP/8fzOeuqaJAJkniCmx2dhmuivO1sM="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.22_1603375503092_0.7399016131204712"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.24":{"name":"ipfs-message-port-server","version":"0.2.3-rc.24","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.2.1-rc.58+13eda29e","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"13eda29e37af836f49727d05c1a95fd072d940a8","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.24","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-KFWYlOqO+R/MtRF+VOFIUwS2Pd0O1AP22BdzGoabvAZ0JS1Rg+mFO9E7PklDwieNmvBr1jcwPpsdGCK0A+1PLA==","shasum":"6b6fb7ca28a86e43dbd9d1cfc6abfadf9e4a8681","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.24.tgz","fileCount":29,"unpackedSize":213998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkr9oCRA9TVsSAnZWagAAyEIP/07l/f5Qmr/txz9UGku7\ngEoeDOLz+y3MniVR0jvqcQHG3+XfIvVYFnwoc1dvRYrlHElbHbeBqt/hBsGq\nsFTbK6IHKt/K3V6S+Z8WDuWxLu8R4BDqWQ/MObJqZr27bFfK8MZUInBqix4h\njAnvrjL44JQa0pK/DawluSMsMhBq7px5QYDnMqktLk9uZEsogBj6lZyEQv9Z\nddy7kbmPCwuhTAUEbPXYMuEW3/8OshXeDE+/gGXHHazapovRCEyq1M8Q3/Er\nTi+wyoLQwCSllSrfao5OW9rZhVkaYfF0jBYiy9V1GiD5M8nHe5YdDTzMW21s\nHujoiBIzm+02eJP6bT70OUiDVHqCGz12/jDXIO8egI5QbXQmC1wTiQAFV3J7\n5E2ypeSJfd6wF/ZCwb0kWamHEAsyhYcDD4Ay0oZ3MBwbyrb5XDUsrRhD9qSv\nTU3lcPESEE6CjxC05/L670opt43Q/peKPzFpp9OA5yLCP/obb22/FRiTlR9L\nKsJxMq7ub98ybsGHehQc2dgpJ+2NcyRUEXyWC6aFccwZBgjWh0vn6aPO9wXA\n2BT2mKDsuGB8NAY37Sv50dNLDl7Jsk72GV+Q+uUW61OjLWdejbKofRMWf0JF\nnu7aFGuYi7BfPoVqM7jThHLmJgaPShY6wSSBQvcLcc666BsAl2LJNjwzuTen\no0vP\r\n=8P9S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOQuZfUarseWdCEFl2bP3Ri+c5hpWhJuMD7A1trU9ZJQIgDl02jLqHiRbiBbeK+kE5syAy9Y2Pw3jZn6ulg8Vzvok="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.24_1603452775446_0.586702714427495"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.25":{"name":"ipfs-message-port-server","version":"0.2.3-rc.25","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.2.1-rc.59+94df21ea","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"94df21eae28c3a87bcf57e168b1379edd4674cc9","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.25","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-R7sUPEZQXWv7Bo29UrFWWY3R1ur0UOhoZOiqBM5WbTlycvUu1zfrXOSUuxl7PSCOWao7iH8Qy196dwRI5ohEfQ==","shasum":"33aecaae923fe8d5a6c8c7a5a4d0c5a475037ea1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.25.tgz","fileCount":29,"unpackedSize":213996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl9IICRA9TVsSAnZWagAAszgP/3ANI3CHItlNVczOofwJ\nsPDEZBm60xgiDooRrRlyOGHi4aYKslTf8qsC8jG1x/AIJvtBeRKj7QmhJalJ\nvRb/XwAL2+cuRHYg7DGYOSu8d64m2QONEc2/JfpBhDe904AJ4sa/xv+5MLw4\nakt/XVvQzYvCzuCM2Bgx3S5LBS9+F6jE+AKbl0p+5C1mvpD/cjT+XPT1K0w6\nMva3SOf69anp1mWasoIhlzYJKJKYKZ+JcVHGM1slXB1o3dVcyL1jzMKtltE9\nMGodGWb91X4Xuw1y55EqK7FvGlHMdmb+CqL7tZEsRSd4CocC+6bX4Z+W+ZOE\neQqRiPE/zWcf3VXOHDh5ivlZqG3zbgwY/xhZXtP5O43nLxhJg/XbtP1NYRu6\nWGEqbH58GqL+kToULrQ3UPXq4TzfJTUDvOZv3ywWbvRZDPf7pTZou68BdhYy\nZeuxLYIG2AX1cX9kDA+9z9GAxx0dlpKJQkPaM8IrK1JIUD/Vj3+B1vnJkFCS\nX++DllzGVDKcYBRsXXoJQmLFA8ylRdqbrhMU0yEjNOQpSyTg1+5dub+ra0dL\nrjgRSyv1A/ow76lJaOLHwmN4UUv9vLnbd5m0Oqpyl3ssaWokJk5wlT4Jnioi\nwnDa0A6moBEV74g4OLFngkuugEKVTUtzgQJebRAZfd/5W4gakHmUBdDI6T/1\nlI6A\r\n=Kgkv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbJ+Ze6IBMA7qauM8aYpKopb4M8GkCkh7eHdzWuSqB0QIgSsB6qK78MZ/X9IhRHDm0bl+yQnH7YqoiwQyw7V/RzV0="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.25_1603785224186_0.48639149963203265"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.26":{"name":"ipfs-message-port-server","version":"0.2.3-rc.26","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.2.1-rc.60+467adc3a","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"467adc3a3746f1c554616fbb4b79b1d62ddfcd35","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.26","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-0PPmFEnY+Ha7yqm4fhom36Uk5NOhMewOdyrjbduF4eAgPAyDqVh4dcCep4ktIbrnVkZlSOv59scfYn7Pl+YD+w==","shasum":"2bcf7c95cb055e21bd0b2d8f7db5c7f3fb2a3286","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.26.tgz","fileCount":29,"unpackedSize":213996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl+cxCRA9TVsSAnZWagAAz08P/RLjgyBS+EzWUUhX0oo8\nlCFM6gjw0keY3TAcZsYLfmpSd4hqDz9edQyKJk7Q5Xa0U8IiA2hrfEyDX2aq\nwUvHDuELbIYw/C4skRvYpDLg+Lw/ZY5WzQVt+loktCk9+vEPz0dwDTeb/Za7\nPeEZOM740I4bL58xEmy3dyea0FhPQeXrDdK+ESUw6CIYsInpba1CY+4Zor8K\nmxf0gQIWPQ1jtshr20EKTBaTe6OUnMXRgblMOzsJl/fvH5Q5ziodKEmKAoul\nnwARBfVjB54wKhxxjtCe1QGPZfp7sPZG9l589I+8+ypoi7kSFPYRubo3aS8v\ncMuZH9z+X/9Bqcq0xeKEFdJmXcrKSDgG2B0WpvF8UZVOeTrPJXkqn2YYKuhO\ngRMaDbJmQlNyoQd4MKnG8dPrOEzNhbrKzdHAvg0y+//gBgniqa9mcFvT1uZC\npXhI4YOyIbXsHw/wKIgRyD13JGkXaaH9jaWJsRn7dYWL270vCth+M0JXPk05\n+JaSAJkShkuQTE3c+/EPQExwSBxQFOqCN1Rz83bxJxhfJHc8NQQ0T93eazLU\naj79FKBVVJFB5qZdJxpNvaprJ7y6MLamHJF8ZDZaVsTba3/u+jdz6zrXnA3G\naHUj0I/i2xO2gHlVacYjWI9X4j8PORld2w4lSnrl6NwXYivp2Msy9icCYlql\noJLz\r\n=YZVV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDoymHWT4KumwaG2sSpHrlw2bhHxiMGI/6RtZcaPiqzAIhAM+cb8fqbI92zH9wN3/uIAhg37oSwFv/u2092JXmUfpa"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.26_1603790641484_0.3917304705044351"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.28":{"name":"ipfs-message-port-server","version":"0.2.3-rc.28","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.2.1-rc.62+345765c9","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"345765c9287df55deb215c772bf0d863a205b116","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.28","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-avKXU4ugFox2VjnLwB9iOh+kuo8AwtKXcsOO/NZEghz9Hn0ezp8mJc4FUQFJOA4FKyCdFm95lJ+kbeIWMiLAmQ==","shasum":"2a84460dbdecdb607dc34093bb6e67c7cce5caf4","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.28.tgz","fileCount":29,"unpackedSize":213996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmB2yCRA9TVsSAnZWagAAOsMP/3vdJXFfaglk3QRe0Jem\nNaXI07buuv3THdv5VP8sPTs23r2Wt7JNVwY5SP9mtCn6m7rAa9QlYB+1tgDX\ndS/QH1Z4DcOKHDqtamHEsBrhoLVU62kDt0QYJDjFWWMXBo6jS9kD3Ilsdz41\njjZXtXbsS4q37A/aVLyeLp39Ey4jTQnD2GqG6835cXH3NWjgJy1AcfGP5pPd\nUWyAtMDnfZhYAqLVTqdXBspXOgEDBl7vgCTL/ExCqYIDNEZxpZM86soV6sEk\npaC+8ZrCXNw6rIP8Snp6fS/ggPAIK8kr29q3oYc2h3e4AkGcQlim/9RX5S1e\n8EmfSP4MjdTJEl9d2sMz5H5/z1pEdquLeaHlQQlXfw/qLG8YdmyB7zBTLuqr\nwx3IonJw2JXDJF5xvzw6aBEnVc78jlEy1ZX+EAqV/ZW03vftEHnA/C7EhLRD\ncmL5xeVo/axteQydBpnoXjv0YF9d6uLbyiqUmKaP5Ew2a4JD/WD6FYeG4XTY\nL7/I2q/Y1kO2/CO2AMVRLM5tCQruDYsZziLjO07NnXUtZACMPz5z3bJnE+cu\np1EQsxfWObtnco6oIGHwnQVDb5AJMh+g6TtxMRtqCQbKvWVCy5yEE3AnxOJQ\nO4BvBjG0RH+VyokAxNN6FZZhMyxlmcwY/wqSB0OhnuDcZI80pVkA7U8YRwqx\nVHDB\r\n=Qotu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtDBDqz6aDFIi4wX+kFQauDZBhpU25hXHoTn9KAKi6DgIhAPGyAFJAjZamdj4DTHUTg/lFdDDmGNQnM51+trnPQNJi"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.28_1603804593891_0.9990214779939433"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.29":{"name":"ipfs-message-port-server","version":"0.2.3-rc.29","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.2.1-rc.63+c3772b4c","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"c3772b4c91855da1347eb954a5cee186fc46a562","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.29","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-i4B/MPPcVNy7I+SSQWw+iwlZH2egwEqP2LFAUnCzRype+U7Dkhy6zltEqMmGgF0ncE6BsQ6JAgxZxE0dwm8fAw==","shasum":"237a4aaf05fe15300b0b765af2c6ba357aebc558","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.29.tgz","fileCount":29,"unpackedSize":213996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmDh/CRA9TVsSAnZWagAA2qcP/AkzU3EzMDvUakusmRQe\nXNU5thOvsBhNU2mPgmLB7Xpd0LUJ1JNsXs5HbPHW9mFOpYhZYwyGR3pGiskD\nqRYmd49Sgcv6IOBpjW//iY8HpRJNU6lRPEVYr24JAWhT3gaoTNLyXacXqpqQ\no0GlsqgsYZF3Oh2TWh7wPaxhldXCZQfop4djKIWAiiIiVM3PFcYcu5MqEokF\nNJbyCXYLqFpM5kSFIxAUG6zjktIAY29PqfQ8pQoYo1CbXqmpGA5Dr7EL3jcD\nlEs32lF+AmrKLoZ8oKjHOdw2zgCoKtUlKUfFa0qumyQDhxUFchPjiy1VtfY5\nFPNDAjJ1RFVxejx97uEg2aUJGA4D+glkGyB6HmUsvR5dOl7UYROfuA98x5cm\nApzq/HBXgFF6U3NMebiqiIElAscaJT3VEsfaaliVmdOohlQYclY9/VYEEqZk\nFuosv/IpqNdskP8Rpb1yNt0kHyKjEHNiCOpY5qTrMnYXcFLFoBSPrMfY7Ktd\ndysyt1ert2xhkz91nx1LSptBEqUWf5iRHcfypLZpgQPJSYSZRr9s9erSH/Hx\nGdKUXqnujIfT1e1+MtOOYUMtYpFVCy7w9RW062H8/RN/HuHGq1Mdrbr+AwE+\n5Ns80erF8dZJR/g6oAMwTzlAJgwrbHqFVaSOPWS8164hc0sAQkYpzwrw0IfB\nC6zb\r\n=Dlhb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoNIbhFR1bsgsaKmcpuqy6HId07t9CWeybxfSineJhFwIgQCqgrT9dR5tDSTT9aE5QHrH0QuhOz1NexW2pru/ffjs="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.29_1603811455208_0.1517472559304276"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.2.3-rc.31":{"name":"ipfs-message-port-server","version":"0.2.3-rc.31","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.2.1-rc.65+70196444","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"70196444f942cec93d00e8feb637dbc79d5fe37a","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.2.3-rc.31","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-VRDv3YOTpc857SIRPk/UpOFA0RkSMQRmcbbPQ99P94qZrOqGJbZNrARxME2fTTLI/OhnTio2il5hS8dKX7GR3Q==","shasum":"f2989299738911ca6ad4d688306370dfff3429a3","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.2.3-rc.31.tgz","fileCount":29,"unpackedSize":214934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmYGcCRA9TVsSAnZWagAAvpwP/RgwdPZqsO6kWon1Maev\nZrsf6kaphAWwmXStukOci+xL07OUT2CyAs7Og3jyXyk07t7MlRByoMCP/Fh9\nLl/pE7TgB93AeDbzv9GzaqHLnRzp1/OgNRS6Aada6+7/IHEwQoZlRk9KvvFN\niiIDgOd5A4O4kAa1I/utZWGjPRkzN9JIz3pCdylKbpHNpEzCn2fc0GFWicX5\n5B0+FO+L/OkSEv7RrrXxvkCKB2NMRx6IiPgP4ON73KeOb00cHRkKybNaIkzj\nM0qO1QGRqfZqn3ub4ETGJCIqlu+KIzXl8x6PM0RDjqR14TvKtCiX+Fgiaohk\nPJRVC97T8AegsPD+ZkollpPYpaKrN3iTZjtFGpLll1zeJiK+0d0sds6/uTSg\nSjza4D8KpyTE5GNLqzImJ5PqGzlZViV1SaopbOA+zWwyrXliRxd/TwhX5lf2\nci2Q3njcrkorA/WS2X1okHmMHNGTeFumWIAfGihYRWGpC2oxWo/sv2T9DwIE\nqOo5TGVlpSC7pn7SMSQzDDZ6Q0U/xf6nwxLAfn71NhE8M+B3oWkqojWhhZei\nK0QF2gBNtu+6YbYWRJ6IxmZrS86hdO/wZrkczA3pthME4ykaMrazdkN0J+PL\neie15esrlxRNRsfZ/ODVnlOEXdZt4I0pwlWB7HqJn+bJ/FzPlgbOr/7tf2sC\nNGSr\r\n=oe4r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE1FDCPeN9kMKFb5AtSXinvCkTjfKjhwPM62Rm3mTFNQIhANGR2vpxlY4cHV74+fWRU1vtqB2JMLmpZHH7BvDkcwhk"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.2.3-rc.31_1603895708466_0.38858003249755835"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.3.0":{"name":"ipfs-message-port-server","version":"0.3.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.3.0","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"3f407ae0b36d6f7d2804abef956c9f035f3d298e","_id":"ipfs-message-port-server@0.3.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-CkoB9qhqa5HbnfUk6j6Jb8QuYbXRnkBmIYLyiE6S2+x2m/wlgvuLrC7OYk4EQpchs9xpUzjl4fN0grjVFiA3Uw==","shasum":"16e24f127192dae49d7d4d22da7263b9500899f7","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.3.0.tgz","fileCount":29,"unpackedSize":215422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmZOkCRA9TVsSAnZWagAAg7wP/03Wj12IG93I2WUC4eg5\nn4mkCmuw08V1cBZw4R0vWs2pIX+fYjulYkC8M1LrdzRUCiU/xzsj/Em4Hh7d\no2m40inb6TMTzeuF/poDAvEVGYmg/SQ+OYtBnsBJ6cq0rGRHzl85sQByWMGu\nYEOFaOj75pzjgzjM+/KBaxJUzBgO4HUmRof2cjgQ5z+5NtUIbwljFCb1jN3/\nEaIAa8FY+TSWAQfYeOOMbj2N4lGnwzaHF1IAHCkO/T/WuWTRzNbFmGOGYa/y\nghjZMPG7ZIdeCRIPsSkGlfIeExqOWqnPBW7qZ52HCaAwUXoMU9MVgOxES+S7\n2SFSPr1SzqgFdNSq5CHcthlegb0NDxiOpoCqLxF2qfQPrqfH2+YQvy1cWJIj\nkh0I8wRmczkqECkpGxHgd+kcsWw0XGkE63IkWhM+FvoMxfZ6v/Pu/3dGZTdQ\nDnwDlMJdngg+9FnULghtHhkmtORqOHv53jO9yo+JrQ1TezHL2Giay+QS+4Vy\nE5z0dJ6lAvldlBSZudW6ihR+DJT5mo38NAiehBxmYhs0OnfiUNOzfjNgpZMb\nUVbTqikgTIJJhNYKlpf1U4LQTyhMeLCegWMxnRTclyTpO5yqjk50XdtK/kvz\nuFfL/kKtL6v/rUOqiJfSQfm7P0WM37XvdYW9pVcuplVNU2V3pwki3Z4ixXO0\nfRgr\r\n=UVGk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyjgnDUmW5RHG0kfsO8EvBdttpgwd33KEW5UI0mTqeQwIhAJ1nmVzv9aq9P+ozWE/S21B2zorSWR6QISc1v/KGdOTn"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.3.0_1603900324137_0.7453033057311331"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.3.1-rc.2":{"name":"ipfs-message-port-server","version":"0.3.1-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.3.1-rc.2+097d7cec","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"097d7ceceaed9fa7983bde829f90066676b664b4","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.3.1-rc.2","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-bWntnRBfQ2miIrUWyWXAjPpe4jT7aBZmuKbfazZS0EJZ+ytWTXP/2rr28izIOwSPaV5rF/IVabfWw2yLiR1PMA==","shasum":"793f8bf14a59af973440d9e7c9df6d04671876ea","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.3.1-rc.2.tgz","fileCount":29,"unpackedSize":215450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmaVcCRA9TVsSAnZWagAAGLYQAKGXXGDJP2dnaDpPM6I7\nU+4Y3d7Bfb4iBOv3OPkGP1Ja+nyn1qtlTHeJNC4u5RbQ5OQMIohdpLk8XOhO\nbJNvN/+izEa65ORnNrq3XO1/YJ+GTluvjVTyLA6oFoE6f7MAqMeSPZkdIoHA\nunaqToTNUKQxSgOYHipuIk4zyet1X2d4ZuVOcxynNBRXfLmA8j/eqxXi73yO\neDODamG0EdmbxJBsCSNva99SOw41hYhynvUokMTtWtyteXRXaszmQyhJARLH\nuoUybc2tk+pfROaraLNIEpY3q2Qpy1yk8B/LCpH6+wJYFZQNBXirqDOQrilO\nIuHgxiapO4FgNLrhJ66pv7Z/tw0z3+kieiatR22swdOtKDbMNrek3LaWftNn\nUbWEYEktlF9Zs6f4UpJPNygppLZ5j0xernDKhNqkNkU0STQPJn3XXolkWkVr\nmE69APIrruIeH332+stuu7ldAiy0i7jqnnsPPnkJ+los1qACjU4MmtLy4JGT\n/QLRiYdLWPsimTJF+/eOM0lizyJcCpnsYM14Xk/LdvBxmpMDuUqeTjtfu/Ib\nuZzTt17ZsPjknc1PpOTCkquUNI5NnyrxraNr7/Q2TFqyq86/Xjgv2KCBErrt\nLKBh3t9GoTgjqw2vW25BAwX/Bze3ssoAkueJ/fWot18NbBQs85klqDafDbpQ\nPc9s\r\n=9/pq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB519LL42xFLNGt4VO5Unhf3vWKTJxAr0u7fjmypZrWHAiBPWnzbzX+KoeHxz0qFI2/IvIIzmxGuK1B565+6QKKQzA=="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.3.1-rc.2_1603904859780_0.9741501005103002"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.3.1-rc.4":{"name":"ipfs-message-port-server","version":"0.3.1-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.3.1-rc.4+c4d7505c","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"c4d7505c6c5a2fbedae72d9047f1363747b4c2b0","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.3.1-rc.4","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-bFL6whM14ZiFESxf6zw0Sqbuck77x3F/8Sq0cNKjx8aRsqlhtb7GXP1tV1iWe2f+dgmsiD2b935b/59of5bHAw==","shasum":"e9020d5ee15c98978b0bb1af797f53300a8ddb51","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.3.1-rc.4.tgz","fileCount":29,"unpackedSize":215450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm/mFCRA9TVsSAnZWagAAUisP/1+PiZtu3DpulPbYbX+z\nadq0Ii5sy+u5tnZ+2k8WmWTtXqAmfQPuc9RmgobiCXYs7a2fpc2HBAIJKgdZ\nDzMEnTWqkgyWQy5693oRvxzu7/kA3aZ3XhsOqKJYQdWx37qXczZFnjgHSj/W\nxQRJYo7Vznc2OueSta4vgaBZlyEIIW+iGbD4cAody9PD/HIIU43yDFFKqVEx\njNMEJO/EYDJ8JcjIN+6kicitN8sF+EryYFOaqddQAATaD88pa1nlWRABWytW\nMveoVKc2C3GuQXutRUZnwpSJzwM7yAfP8UivU+OclLwhdUlhAkH26b+j5646\n2CDgCHw6gbH+lms7Fu2PbV7pKFvszGN40S0gbKxSbNGhL8GbYLTBQwNXKNLG\nE9JKiTKiBOvRO8yzHtRo9qFk6/bIO1s82GG6MfaJd1BsuGanqL63VAbftCfu\nQHNb7VO6gFCU+B24VTcf3b9ujSfbACoT4UitPbCdeWKQDjosTydLlwm7lKmC\nYYeBlmmAPCIrJPwrTCt+yxjjAq0F4dgzz9xH4SPhP67D1CEMF1SeK7GgIulZ\nXaaOON2HxCL4ihNIeuXg5L3q+evynGgjtkRgzaXJa8babpLxHE5jCyib2v8m\n+aQHi7hlO+0FESh+bc2hjIdKJM2Lv3exXs5gYbJhoFN8zC5XR6gelRnDzTZJ\n8eq8\r\n=t9/D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG024h5RBdNoMmaHmcNVQ3i5Se8nH46AWKWLMMZws7XhAiBUIqMfnj+2wRnM9OdS6yn425VYWcR86QKUvUkhuAXthQ=="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.3.1-rc.4_1604057476884_0.6522383463634971"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.3.1-rc.5":{"name":"ipfs-message-port-server","version":"0.3.1-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.3.1-rc.5+bd8708ca","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"bd8708cad08c9723c3c86457ddc14cec84d1793e","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.3.1-rc.5","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-uVbqIIPOYo5vmaeSZBxn3eURuopAXp2tpbq4E/rBGZ1XkfuOlw2xzFMrcZS03lEHxByFirf//rRzDsUDrAhsvw==","shasum":"4b803fd1aecdb693b659e6076090101fa17c1c84","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.3.1-rc.5.tgz","fileCount":29,"unpackedSize":213705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnDLaCRA9TVsSAnZWagAAjF4QAKJZ3W3uFMznZT4iuzzN\nRZEiKALAK00IBw/tqXtt9CpLjKoTFEEodU/t5WPxJ7yKXBVAH/F3ptyy0wMr\n1IkHJPuLCAnZRn5lgtQ2a1ZCUk18sZr/XIV9cV2B9aVMBYGPFFPa9a2ibc5p\nUDQibAMYOtHv5e0Thl03T2EqjovCm6q5I9kr7QUOl3z9tK4PmHfnLRI2KV4U\nB3GYQtE0JQTHEh2Dobgly1dOYrBP4jFdA0Pd1kNBjMS3Yfrbz+5QR2QeWH5h\nr77L6e94SuMu3kFkl9hSjuCbs7Ypeh+DHeb8MEpX9N77CrpdimY9f8Slx7n4\nlKrwu5AsdrerismisfwWRdRsOXFKgq3kKFSIqAbZULeVU6+NoboYIyw1te/V\nZ63PkIQGtHnGHX+NQpreSBWUvA9Czrdjy7B0451tfqQNwmLmKccMInFra4rP\nnuX0E+iYtccZQPWNeZh3QsFi+YPq5LVuvpscAjkvzWMF50yAwiSVCLDJbHE/\ny4ClalMTIKOLhH2EuGKwY8CzbLYa1Iqfsq5ksAv2ANEt8WjMTuxUO48cTL3w\nz9KlhTDWWkkjG40WEvB41FtuER6s62KlVR1NJJOjLAlh2pDYB0YQDRa9aRra\n07VvDXdQMG71H1j11OLIVHRTsgWFKtXENt06q+sORXG9MeUpqA0Z19Tz6nj6\nD6tq\r\n=6U2I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPuVocwoGGoi/0hIZM2gZOQh5DJYu66qjACMoJvrL6TwIhANSEm6X0N3qbQ8yJ+TlyRXOgu6WpYAJVNVRodXaZIpSI"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.3.1-rc.5_1604072154414_0.5747157422464304"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.3.1-rc.6":{"name":"ipfs-message-port-server","version":"0.3.1-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.3.1-rc.6+059520a2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"059520a2a3467952650dc9f45d8df790251f932a","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n- [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.3.1-rc.6","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-RtUWuxzFIY1jqvQ+3d/DZ47LKMH18Jw+P0miJBdJm/CLrGITpEkj/8t1vY9Tg6iCqMQqZjhN1iPZv2MDPz/jpQ==","shasum":"2f05e2a2343fa4ebd7f6be4f5cf8387db473e8de","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.3.1-rc.6.tgz","fileCount":29,"unpackedSize":213705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnEUgCRA9TVsSAnZWagAAnVUQAKS6PHeLzMg2niEqWiWV\nxI1nvvRymYOpqghUYhnsz0gDiI0g7EzySfQ+qrB6IBaJklIQkJ4ILcwGTdLv\n8Q8U+Q1p9EhAPy3f12TSj4qEAnzsDsuZwJlQTi9oO4X93ggTqU6FqttadXLh\nJXGYya3Bwkh0jFds4/WTy0XhNFZZ8eBr1YaOYWpEYjiFy9Qp2WAqOVSXlpjy\nlFomdvPJxeFROA8xErSR2Fj9ifRehrwd+Xk+ijT8yDaeTxjVm/CytAiw9h30\nT8ctGrE4F3q4IBOhhSdgn/shAN5REd0cMW30ZzDFXFVgQxwSeWQiQotMZnsH\nHeptmMrz2rESlPxHXbB9sm6s1abY0whVgFvCnhrjJpoR/JdFP8uMse0aWxWZ\nh7zfgx1pyNMHq9mJEOJDZLwfqUQCtGJkNROm6z9VzqhGe00btIQPsiXlt9EV\n6CETOOltRUqaTGcB7Y3xOvrK38ZxG4elhXkyGxpgIA1EwvZAknEw9H9vdIiS\n2N3HgCDSffY5F1E9OwevI1iVy1ln/8jT8qqtx+GilzfyjpcjQC2fNysxWVrv\n4Vh+OBg05WXSredMUlLwzMeZ7Fi+O3pmGrHUsrNfM0qd7wYWUne6j+K0HwM/\nOwDAD7DthrKCe+uvWsrAjfviYjmYLLXSh+09L7FxuqYgLoZxH2zs39cg+l46\n+nTO\r\n=O9sa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQH/9cFRWkzELsA1YqP+HcZ/7RJcSd7/Jtpu60UGleNAIhAIoKHbvc6SpqABX8hhb+MeiBsePIcbacKr+xpQ60qoS9"}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.3.1-rc.6_1604076832330_0.6380076664905434"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.3.1-rc.8":{"name":"ipfs-message-port-server","version":"0.3.1-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.3.1-rc.8+3d2d63a7","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"3d2d63a7dbb2f5870e26620ce1addda9dacad893","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.3.1-rc.8","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-8LKMKDh7wLc/F0JKbLCZMviDPAt+1iy0A/C/aTRRCu0QXipJVp5rCI2ZjsEgHtet8drj+AoUbTbHmVfApjP1ZQ==","shasum":"b0221d6fde44eed69417d3781e846ca2050a4898","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.3.1-rc.8.tgz","fileCount":29,"unpackedSize":214903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoA8wCRA9TVsSAnZWagAAvQgP/A0V1OyT2mlbJ7EwWEh+\n5BammHXU9vENig98FEKPDCILDJjLd8/i3MLo8qH4v73/mXhMHKsWyjz+Dh7p\nj8mRu1hSQh+9R2EeqdgRUjZBJqSfgyjoN+dC6sl0rJULfbqC+yp8wLrH4mXK\nCfmMprGwVWS8mKV6PkF/afxvuvWRZFnpagvd2YuM+nN6BricNQekNIr2/YoZ\ns7ShNkfQT7K9tPDVfhV79BOB+1UGOUY3CHpcCmXPXcC8FPyIA/pq9kLI7OQB\nfdtY1M9q8xd0KzDPvsGKYx+W+Kgf6p+FHRomyX3MTcB72HbweF4XRuMM22go\nhNb/4w+ZgFC0+oP0KtBExTCgEJuJ49iJIzvHWNwkViJ3IWEzP3gUL997svgz\n3YB8ObFuLwfF0JUY90e/0bGgsveXJTMJqZZHrt32nZme8roVT7TicSQP+vvj\n36jO7iMrsK16O3mn3esso/9LrSvSiqYd9Jt7SBDK37LLzqVaCVlvEKXAs0IV\n0G8cctbt0ZfSRdnPjFFVKAf2FMVaCFELSWn4jhcBa0mxgMM8Fb7fSu2mk6FP\nRBeNjCb8wTEctb0HCIZuHq1Hra0ilhmUOWIBWysQZ5YDU2/ZKFuWVw4HQadu\nJIeEQRxLmakF2zHJvmGwnXK4chQA3odbBL6+C0t2mUB26+Jd759HrNorB341\nHiWH\r\n=6LwL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDD0jvl7DZwn5LLSAasJK8/xxZ+F6DlKrsMIWyvyWgpPgIgXjIDtFJ/o4k7KAL03iC044kYAQ4TMByH/Ac+9cs4u48="}]},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.3.1-rc.8_1604325167595_0.9677217062111243"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.3.1-rc.10":{"name":"ipfs-message-port-server","version":"0.3.1-rc.10","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.3.1-rc.10+02dcac1c","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"02dcac1cbd713706f6d241bac4c6c9a8bf7c03b1","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.3.1-rc.10","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-fSOmOlh2Zhquru4mrIloBsTeXWcgo+PNX1788QUaQSUUYqxT1hl0AKLgiL/2/O61vBoesub2sB+mRNA5dBlmeg==","shasum":"e6be3232687e0922edb5adc74a62c50d9aa0016f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.3.1-rc.10.tgz","fileCount":29,"unpackedSize":215189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpZViCRA9TVsSAnZWagAA3QAP/iUkATB5OKIO3V1zESZ6\nA2fSc2GVvL6ZhRt4dDV8sTIoN8E56vlOttc/A+GPczhhBd6Skx60QO0n4aDz\nR/n7yxggzExUsaWdLkRll8HEtCFoPVQUmaMteQD2hUg/F+S1fSgeGLj23at3\n/iy4oyDjmHXLq8AjPvO65w5kGCOQXoLwJBWtJbXtfcHjk6qRUdTzDuezw4po\nhX6Ju9Eq0EtXjzruRbeXOhl03Z5F13n68sFeCQPaK0TLNwz2d/F+ZFgfUOrk\ndd/h+Vsha+YmCM5Hh8pRhi4JPJCUFtU94l1GPxjCTvlZFmlXesolG64ofr5s\nCcjIOKpsrRLr7eMgftsi3PhYxB9xc2qq56r30U3pWqpGUlKe4XlHJlL/3Izo\n6wxFtKgVNbKK3mshR8AtSN5lmHvKr7gAgPa5vpbXtvhNpfdv5nn5X3cCwYzy\nkWmDiLAmU4yFCagaTC8ulMe9g+OyiBa6j5hitfZco4XAvGQhkrfUCXyrKePP\nviK8tno9PcZ/VWFA5IU0F4D//P4IVIN/roo5kk/ZLU9ySfH1DDRtx3xc1j4U\nzOUiKQurW5uJuqvAI0hZmnKpw8OZjXAZMcL5Vl8ydJMW6rKtWKRpbSpLgIX+\nVNj5JUqQN7hjPhqj7+cZyTaNlXH7kMQJQAUelMNExPoaSHRNHzUOtnDZSZPH\nd9xR\r\n=+Sh+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH9Cb5LGMlMxBWSf6EqhUA8Ax0TWcCBbtChN8ubqqlFkAiEAhlDFgvJ1v+eUKmFWejTx1hS7TNbB44PXn5usmwthhnA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.3.1-rc.10_1604687202390_0.9704375519346884"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.3.1-rc.12":{"name":"ipfs-message-port-server","version":"0.3.1-rc.12","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.3.1-rc.12+022afda0","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"022afda0dd6c3825c59c70dbcff9af2a64a1683d","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.3.1-rc.12","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-gtTZGZE9W+ON21nSwgNaRngl0uSNeqbmZYnIxkA/N839Fn8SaZ4xDLER0Onl8s7UeJjJ29G4/wBoVhdi/TzMfQ==","shasum":"5b75b42c23ab1f116e2b977792bbd451d655ef2d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.3.1-rc.12.tgz","fileCount":29,"unpackedSize":218363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqWprCRA9TVsSAnZWagAA7WUP/2qveGU6XwqcRfiuEEJf\nm+q/Xr1g4Shru9bj75quV4gTKaI75Jne5bd951UPSfYwk2mq9KagSMuLAoWj\nz+H2uu8pdAaapf9YnjqyLFqDE7cw/0VqWbMA6fvQHsnCWfqXEXj4T3FBmylR\nZUXHGYYOExTSowCBsPCrUJTfJgRQtlwlzIfwk50ApXMzb7s52QlqhODPyWbz\nTgEp4ES8+0oSZmvvzXDpjWCQDFelOPOhnq3aliCV9uBPkuZbjKHFUqHhRMvL\nZbJb39deex9QUVkpacgSSFgHd9Ri70NlLYSV+GkJiu5rr9Gr6wy+1+zxhck0\nrMechjcgiyC/OtIgLJuHslDBSJoiYx8Czqoh46mJqJlqfZa22jYXuTGYeYxs\n0d4VQ42xWcEdPaW4Eq7MiW5daIpKtQWqT3gclKnG2rA8ltDSIR3zOFesVKT2\nNWDrivzeBdwLQ0Qs29pUGg2GbudS9exTjYfGFclRro0O59V14/YMsEawFfTT\n0gABGjGHZ1hzN5cLUe/y2IU1YFxS4jr9UWAJyZUgBLN2mVcxtRNjBl8Blz4G\nZIQGZyAqtOXo2n9j5tUjkYiH6V2qDcMbVEf4DqhnoptpI7Ddzkw3XYGNL21u\nI+5XGwWDaKVHztNyp+wr3XJ7GkEGiF10iTQKreSlLEUAHXuy3l+9ADBDcOnA\nP4k8\r\n=xb1E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUi3SGLSjQS1gaCdx6yW0n+5YM2T5xaR7t1wTSc6ylFAIhALDvRWDaSJql2jQ/YhyfBy1F1ZpiFb5lMypU7vcpONFb"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.3.1-rc.12_1604938346527_0.15191060548254254"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.3.1-rc.13":{"name":"ipfs-message-port-server","version":"0.3.1-rc.13","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.3.1-rc.13+d2505075","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"d25050758405c784269aa59537b6a49eb9106986","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.3.1-rc.13","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-uSI0+b8ERIS3YWOYbiNkyPnrVDktLoE7N6uyYy7g734DUlcw7XR9axxGgAYX700bSNTDWQG0gWqyeQc28RsuAw==","shasum":"1a6e7dd4582169646b89268299d104f7a0fa3b06","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.3.1-rc.13.tgz","fileCount":29,"unpackedSize":218363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqXRbCRA9TVsSAnZWagAA5PsQAKT/bOwcnd+vXH1n3urF\nzbul6YMkjqCmM3p14365Z5AXAOiOP9/FwT0SJPxFPGbST7KSAosnSYdk2YNx\nfyaGBjnnonxbV4xxNmE6xJHmIv9KrG2v+jKApkrMVRFSNvJnh2MI7oTRY6ZC\nF4Vm/DwMi8ArXMIHEehv6cukadHRViWkY1Wur4UXzXQT7+cnX4gY58czRKvq\nRZiQh2AldaYlBBrXpf/Ll9/vf35mv3aIdaANWJkMty9w83c+nBKS+Q/kO9Xk\ny2OaD/kSmS8HxdYlS4os3/CJ1aUBG59sMXj8MhGP6HQaKHUk2OvJl5C94VI4\nVRpkXOJW14GtK8Ajs2nTgk0Jz44MGMt182TaQthIiquLcy0SF+BannoMUIGK\n4LBW8EZcLKCOULhTWSaLRJVMeRltyPYw+xyb9YzbSYZmTxJKHDdYs0iqWheg\n1Q6l7G635mOXQ8mmtZp7iHDipiFG/eCoM8wkqvc4yHEMTtZ67bk5sWnywjMm\nY2vRbKMBkMt1VgcZIVnXxUhyOI4Yc6LzbgKT4D7IwZ7za9p+eTXPdosX6TFq\nVyxsuOvVQhBlK7ml1ELCNSwcmg/i9i0O1vyACPzqGxkFz036MDtFhboB315Z\n76LIC42ZkiXQeqncf3DgvmBHZeQj1K3s0ELMoNM0tjRtGbLgsLRnHycwYdGz\nZ/2p\r\n=RFuc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLumEygh+YldZ226F/wwnFBE3r8gCD5AD1duT+fdggKgIhAKbsUZ9tGAi4JP7/OibXdXgf3xABxhWALrnLxyG3cI1T"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.3.1-rc.13_1604940891541_0.8220697318506156"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.0":{"name":"ipfs-message-port-server","version":"0.4.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.4.0","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"fee87c5ed915f45535be1d36b3547f4be5ac0932","_id":"ipfs-message-port-server@0.4.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-P14m76iSZwtSm4Ly+ERBngc6LqWKoO1LI0ZTPuJnI3oDgMbC8484wTfWPRUaJx0eK3wDgXzhxWqnkyvMel4ahA==","shasum":"aa1f001ee0b79196dd93848d3b5c31dfd056bad2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.0.tgz","fileCount":29,"unpackedSize":219113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqXfECRA9TVsSAnZWagAAOkUP/2xH1K+mdjLwxyx2WZKR\n7oac8XE9yklv7HSQS8/0P35GWADARxwseznuqi5oLtWq/lLC18pNDRJQ0e4C\n4rWDpUBSr1pA/G866vUPBuXN8G7VbOyKinsoQ5kvS0UKsKogAeKUTztlATKB\nVQdGUI4h2CDLKXkTu+j7WZpeDE+P/WFufj9eAULgwBltTRCqodR2siPUtyPO\nqtJJzSqDvLC5dV++1cOlGLUaBJfeE8QRRoPHnka2CCdGAuyihDNT27XrCvy6\n0HGcTPu7QMKdfbsh3hQyMX0V5OfmDnI93Dkx4nqXhkZFgUtdpL5PSctMvIsi\n08N2M9Q6P+NbFEeJIisH4hbjBB6Fd52ENDLzwnEBTTbtRdwAft4M0xFKx/xK\nYcaH+GWHpe9fZUadT6Z3LDb+2CR7k8J4shSoApFyZ/0f/+r9b9NH3m10/6kB\nheYylXJKzwk0tiC0SqOHnSFNpn+yzZyIf3gDUw/3NJqiY5FcSWX1tvJO81jm\nQfMY+2dxg7nHsogy89xTtxFQrY5+xQ3XZ824JCxg1T+CxgZzIoM3ZK1g8JGp\ng/u/Z7XprRy/uwiCXybyduxvxtnRl+aqqct9CvEhABGJKzMSC7CEbJPB7VP4\n9KGIKkw406DKLkHTSM6m9r5tr2SNLvJC2T2IwAWqfLw/wF64hyotbKht4i6P\nPI7l\r\n=ET0c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbvq6ezEnGzN/0KWRfXT0GbSXd0af8qpW3roWCgLaptgIgR+GQLXXTqJVxWtx8WQLASo1ibSz2nsaLNFj6FqZfXhc="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.0_1604941763884_0.6684776158059549"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.1-rc.1":{"name":"ipfs-message-port-server","version":"0.4.1-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.4.1-rc.1+500b504f","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"500b504f363d72ea8c29f4ffa471b1cc30cad1cd","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.1-rc.1","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-cpxxnHzdMzuo0+TQmgjfAIJs0RE38gNsmbbzTle6gSD4Jg/o/tvBCltt20sNiHsrucYlRRenFNJkaBrNcA5Lhg==","shasum":"422fb6ea6910d637b7f4a767a4ccccd878498b14","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.1-rc.1.tgz","fileCount":29,"unpackedSize":219119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqlm8CRA9TVsSAnZWagAAs2sP/3WDeXv6nScw5dW2dISZ\nN+fBC1kFl5VpOlaMLOBSP2IVnFcyAf3TvCgCETfkJ4dYR8mSkV0d7i1LwfQT\nDt9/SumVn9Ag8bqSkAqivl3t7WVGJOlW3RwKWOPOT7elwaYwSMUcLt+b50Fj\n5mG1Fpamkn0S4ZGf2CRCqk8Zqn7BsYGibxC/o/uAEVPOd3CiitM7DvzXY4tB\nyqFzVH/y2G/TC/2k2o5X0XQeRI8gcCh0uwHpgYGU1EKJHmYfZPcxAGX+O0Xu\ne/81pdGjZdLd2R1I4eImgUooEjj95dBkEY6uESd50duxOriMXOH1K+3pTp8L\nyhRmzwieY60iYAobQDJCzPF0n/uf+NYHAKHNuBkJTEpPmx6Tlpk5LRH60eUR\ndCx3aBOr3c9NLRDLxxrTtJdc8r1iXEFzO5H6Yt24SuK+WTKYG6NC06j3a+xa\n/Itl4fu3nX2qK5O16MINJkRE4uCsG1x2z/aaudl3eN6ZoC5nb+q7s7whBprU\nYHMt/WDAQUWQmnS/QGMy7+ProTJ6yK+5d9g6dupC1SnABeHSeQoM2Ri9UcHV\ngUDsnfQnrjfQAJAWuHSwB7bXBraQhDKrOwLTS/g71IrBCpcJWEPg7qbW+QWQ\nvegoHxnssRT4aHGChTmWvIsdBP6Wk/cdxGAV+WdzSZ9EFVVitG+v/dFY8aJR\n4tOv\r\n=QQlA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9/Cyu/sx8u282Yu8MqUggeKerPGTocxNn7bjdG+MtOAiEA1NoMCHdhTt8SuR4l45h7LiWJz1r1E7v/fgu1bC+X+aE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.1-rc.1_1604999612425_0.2969099488321909"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.1-rc.3":{"name":"ipfs-message-port-server","version":"0.4.1-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.4.1-rc.3+6e383dff","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"6e383dff2aa34816bc9feac240d4780a3f88cabd","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.1-rc.3","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-tSIpaaPHXUq23hbh/olplETio+StWFHdHxYakpwCvabeWQpPzie3/kZY6tu0yiobY/0kArhPzW4OTGVPq3bqtQ==","shasum":"70985756d8ca9f8c76183044dcaac9a2024a0196","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.1-rc.3.tgz","fileCount":29,"unpackedSize":219119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrSyVCRA9TVsSAnZWagAA1qIQAJuD0Ya7EJSG+4b64kAn\nHXIFKrU/IWdtin5AlFJRpOeq3eBWh7rlrcVlkoICjy2NBbtXzv+w39puzR6Y\nCJLEuSjBdFXxHZ/Zy85ydU10leBYjKUjArkOLX8jXmNLUoOmn1LNh/MD4FC3\nsJHJ8f9GVarlgdkYob2iOpspmMjqANytqwywz+XFWoUNQuTnZz0ATMPW1wm7\ni2dfphrn1dovX5Mzeg7hxoIHEfADf0AkAFgYRRUraMAqkAt/IJPEYm6kQ3CQ\nxNcaVelqVxkZRd7UXNSZ7uf5jPJybhUzEJh41N63QoGGFvSxxoVXaKFhp3x6\n5yly800/MyHGhT2nTUqvtOey3GmlQIXcwVj66tKxa1/QoFwvCcjpn7ZcKo0P\n30D8ocCXBUp8dmyoQf2bdC71bFsbq6LdJdU2KtabyUQ6ejbIqIW60yo/ueka\ngbNeYQ2FJb/3LVQDFOhGFjsjxvwfg+lCyoLtDGufYoNNOI4Ny/bN3HePDzt+\nirpx+TGDMyIrO22Mc7CoH3T7MRlAGgvSw90OcFd4SvCaNWqfKzrqGduJCrlI\nRZDrZBI2bjssOyfg1IOybp50Y6gqKWDWZfr2xo00etqSCMBwL6omeFwNHiRr\n5vBvZfbptnqCZS3GC42nNXBsweSsgO2dB78w+2Exwp3Urvg0tOXB0aU4Hli2\nZprr\r\n=8d4v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCv41cEILTYs0TlF+ykWy8YUox1C6xtgwng7nfe1f5rdAIhAOp496D6d2ecHFrWAU54HdsuuzhyJZA3+iqCrKg7yefD"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.1-rc.3_1605184660668_0.7497111207250946"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.1-rc.5":{"name":"ipfs-message-port-server","version":"0.4.1-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"dependencies":{"cids":"^1.0.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.0.0","cross-env":"^7.0.0","ipfs-message-port-protocol":"^0.4.1-rc.5+8ff134b9","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"8ff134b9a2844dabb27bef38ba3f241e2c72f78e","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.1-rc.5","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-t6wH9LB3WDFk6qJ4lo8VjQ/QQWpjkR4zRSYlICeOG6k1HnTrZXCxLnSBr5ZysytDgeS6AF/sJXzIcoZjFNB0NA==","shasum":"3804ef5a09afa0fa33181a955042b3ae1af96ee7","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.1-rc.5.tgz","fileCount":29,"unpackedSize":219119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrlBBCRA9TVsSAnZWagAAHRUP/395l9XWvMeAzvB6oOd+\n/x4eaSPXyCIr+nlkXcC6yeN4CbR+TbOuq09oUf4eyqS5B99MgWcL7bHOsBVx\noT0T+xbBMvT7HIiA3iqiZtOqbALBZ+InsA6DgoXLYD3dz+9Z9EdX3cYqhUdq\nSR2/kMtc3N1vnkU5wEJFewA1D6+RkPP/fBdlfjhdBrJeXZhwCcoPxTKXlF2B\n+0YIStvr2NGtPhs2OH3IcdfL3yO9jvOUIC/bNe3V7VOmSfUYo0dxC024KLwr\nP7mtMwSws2loVn/JAg/cwdkxUkXcXUdS+tPIxCVjMP1H6zlsNjpPNCt0S4l7\nPw3rcKR8oS5GxMKYLE6k0JPNcyxOiHTW3Slbffmxu1mjI09UXRJiQrPjtevU\n+U/hHKn1peOmBPKRKNNMjq0GuaPtNcXrdNx2aKKRWj3JvVFMR0AADwNzyaKy\nFgIMCm4OKpoXZ8WUbNqdEDuP1jpQFcpyjEKHj2LuI1hsQLgRezjLdoEAG0iM\nU46DHtBMw6V7Vj+j8W2dAcEtQSRoUi3Lx2kC98CIOFlcvbUlspvXiDlnrbHn\n7klHEApILSh30m0vQQRPrvg2bJHQZ9eBjlwIu1p8dS9Sncf4MugGK5rmilSY\nnZd/1dPiW7pFZyjoyDoki6LNcczkevTOiF8LWARwSqS0VrmPr7AkFZl7ILML\n1Uud\r\n=zj75\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCx35b6qljJObnBsYO9iJvjtryH+eYgPG1Ecn2D7Gig7AIhAMPApwa3hMyymkAm6CCR5/YUD/ORqqAN+2ZR7WMkuEv/"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.1-rc.5_1605259328720_0.44903020686760753"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.1-rc.7":{"name":"ipfs-message-port-server","version":"0.4.1-rc.7","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript"},"dependencies":{"ipfs-message-port-protocol":"^0.4.1-rc.7+d26681ab","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"d26681ab35601d9449d71f2ca5760896418e3e79","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.1-rc.7","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-g+zk/wmns5u1DglrVaIeLTcOEo1z//ztqwBMzETltW+maCVnPJ8eTSdyvx9CQKU0gMrr4sDw8I3Ao2KzE7SHgQ==","shasum":"5ac1ed935a73979f0f04a85bef9d62b5753aec99","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.1-rc.7.tgz","fileCount":29,"unpackedSize":219096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfskjUCRA9TVsSAnZWagAAPkcP/jyAPJbqnW28tu65+JJJ\ngscP5ckIEORgdvFx76+/99TzwUk7mGoJIjgrThbpNPXzOqUTiiB+H9Vv3wc/\nCJ0AATUe2Acue56Ant5RbHGvQ4ls1iufWX5ht5uBAvCT42a77WbIhAlH4TY9\ns6dtTHWNv6kewFEAC/+28asAGOmIx34gIkFfFAMJTYwHbNjXSM39bonwyT+Y\nocc5Ygj9qSyA7JMHSYkdZdpJz4O7usSWCgQwjHxcx50gbECqy5HpemxwMnQm\nGTHSqrL9u1yofWNSC88ET1vDZKy1H/9bpliy8IJp2ngpILXL6GgGNG7U3XR3\np5feiaQTOjI8h2r02kwewU5zmXLpcdY5PHDVhyASV2dbvkVXaUC+P8neGIW+\nM5f9Zpvt+7AvGHvYwY1OXupJ6aMZRnwCiSn3uNlDZvYPBPjdpp01bpRo2pyh\ncA/mqGd7pN0UmRApEjtvRvyE2sG4jZ3wlXAbdMx80w+IVf3IP2MyN2lyLGRZ\nV9//UtyjEunC7L/FlB4oN2kz9gjWAbQ7CNFVZDlbFgLib2mL03c6GJ/7oyHc\n36VURhQ2r1cmdPT2NnLuJCn9QAjNLSF/YDnzofck8yeFRnQXD0K8kIFq1EZ8\nchZrc3fR+AiQLoML3NVt+dos4aIj76/Ncm/L2vgmWPNn6uEgokzZfWgy5m2+\n2HL8\r\n=iN4W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGkdy33gh9qIrCte/vMKo+MtDMwrXVIdjaOH/qI1J0dwIgbxzI6pkjAH4h/7FzXHqtzFkL/5Y9ThqzalfV1OsocFo="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.1-rc.7_1605519572336_0.4365992271369903"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.1-rc.8":{"name":"ipfs-message-port-server","version":"0.4.1-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript"},"dependencies":{"ipfs-message-port-protocol":"^0.4.1-rc.8+4921e9aa","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"4921e9aaa627c6fd03562c26cb7dcb201d6af936","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.1-rc.8","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-3KwvP5O8RwWyP2vMU4MJQZs3fi/RKc5R57hylenX36Z0PUWPk4Cq2ZkYfDRLmv733y5FTnEO/edjRqbzkg76Xg==","shasum":"7379e64d5dfcccca9432811b5b8e3e337e7c8a3c","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.1-rc.8.tgz","fileCount":29,"unpackedSize":219096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfslaJCRA9TVsSAnZWagAAt1QP/j3bH6xHVdYMtNbfxbUW\nwun8j0zZjtVSDHJ2h5dBsTAfz58oW9TrhkIzWbDzehgIgbGpDHpmWsZKuLOd\nFZdzrPEOiZF+wEFBEtcLER6qK31fcfxgpRhw8S4fbJaeuGII4vYU5YxLEuhf\nUd0/glmuD4V6Go6wlpf5Pm9SepI3I0+v93TBGqxtkPqLg6aOhlVvsr8Jmk4m\nMMsU18rLYw7q1HWITLRqHpVBs1iVgHfVAMlwj3ISORlkz0u+DnZXkUpuBrxq\n175I1zJ5vUt3ExVVzNvyVvhZAhsAEvfP6mUKUCwXFF36rph2kdQN17NLII4c\nQWpGvVfvufC1sVyiaAVe4uCSdhBkPWkUOlbHN33dsI9t14O+haVKCHQe+JZg\nLNwUrZ2l+MIsrLVKkLcx3lIRQ4lNL6izjiAmcDvtlv3c5BSq89rA39uEJPEZ\ndHWGvKOHB36Jk/0TqGKODyLxnBY6XqtXholcej5c7T0MZCyt3bgBiL+64Cou\n3rulTH/dXsEOodEUUy/Kct5gAit+lHTjoByq+WStAefmz0YSM5zdLnOuPyqF\nWzL/qAcXX4Z5u1DJ5+9ONp1UNKGZyBFKr5tLeq6sobP3k7iztmdp41poVhAt\n7OU0JPqVL4yl1eCYvSDgrTB/kXGzJr2fnY5db5VzhYTBX+VWvmcP56r85pqq\nZtjv\r\n=rL7X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOZouPK9njev/SHXmuk8RhLG6gPbSDyh09T6fZEoSIPgIgBe5XkcqgHnU5lpvWM21QDWAzGu4uyIY1tgYtsjK05gA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.1-rc.8_1605523081265_0.8668845815252249"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.1":{"name":"ipfs-message-port-server","version":"0.4.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript"},"dependencies":{"ipfs-message-port-protocol":"^0.4.1","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"fade64683d1209971cd7572ba1b556a275259541","_id":"ipfs-message-port-server@0.4.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-LJhzby1/ppCgqWdKl3cw/JapsGkwdnviYJ9sTrkIi79eP31c5g9JAftyG+vEpp+1+uCtTuCQR45Nhmvl5n/mcA==","shasum":"47fc5d6f790c837539508ebea8f19081174e6f23","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.1.tgz","fileCount":29,"unpackedSize":219437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsmJoCRA9TVsSAnZWagAAf+kQAJA0RdaLRYkflvPlYxOK\n2g1iiqFqrlvSy4GpDW0CMRQo+8JCWVHJW8n7yTr8RgazFW5Ik4Laa5g1Oa/G\n4U5lvi7t8tl4jLeN8TP3G02pEHyyKymp2NZXH7otOrUqWSkA5K+6/WXQwBK4\nWhbhBMr/JLpyc9oJBHgjg5ISG6UT3tTeEKn9/BMbJ+n92HR4H1wFVNEtQ1z+\nFGnEIUlCLN7OEsiGHkgmolnesDE9axLX7FbIb00KfPPHhVj7PboKV+28GZ52\nt9Uc2dTh3VsLlQFgSVHaZ5C50CwQcHEARIU2NFYaubSOuEQL8UVAnO0jDl67\n5nZAZKH0xDcGg2RVhq9Hjqni+0zDPCwE3WiZSQHRf+MVZAKr1tHr4Wazn36O\n/OzRJj2/fpBelwhQ3tI1zygF9y+fmW5DKij3Q+KKggH+j0Rn0j4x8tP/7oZ6\ngnJ7BFoQXPuCM/iVZ5dl3AvPAojq32qgdad9iZYGmLqMlVEvr0Cm+OIDCDcZ\nFWwQ3+qASB4Oxte5JgxpKFXPF60FCCrXXrfZOOkromTRov5W3WwAImrHw6a+\nvybeYyyCvz88D8UbniAm59iQTYWYAXvcBKbAcza9Wi/zyyBDfW1i8Kjp777p\nxOCrwomCA/F+WPeo3Szq6y2EM1eaMkEEzjunBm0NEOw2BAF1Dwo6NtYoKOFC\n9HZ5\r\n=4DsS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyTtErGDs69C2Gg2GuwIDEf64w+MTvs8vuncnZMhruUwIgHyCGnCgkFXyk7mHtHR/YvgKuiooFGc3lmCy5ZJ5ry/A="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.1_1605526120102_0.9475442490770507"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.2-rc.2":{"name":"ipfs-message-port-server","version":"0.4.2-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rm -rf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript"},"dependencies":{"ipfs-message-port-protocol":"^0.4.2-rc.2+c93ae14e","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"c93ae14e65b8a9ab4fbdad1fc69683db55430178","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.2-rc.2","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-zNERhYIjNAg2Qwda4w4e+5MUaha0OT7YJotAG/vn5zXU2GzIkuQzrUM5MZH9dQgQ0WA3swB6mWLV1L0iDGKbjg==","shasum":"9e6c3d393726ddeb3e44bdda0519d6c10a3d6461","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.2-rc.2.tgz","fileCount":29,"unpackedSize":219443,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsny0CRA9TVsSAnZWagAAzFcP+QGmMZYjJPWNesavPdZi\nz91V6FYNxsf9IV71+RkXOoP2u9LJgk11sh4w4vIR4h3Qz9NlRDVopdvfy5On\neEETgZYcCDcxo3UqZLV2mS/uPagdqtpsITM9dDAe01kdC8uj22Uce2XozMhR\nAaMAzpfzg/Cnl35TsSGw1VjZrGngjOopvaUPLPnW26Fg2x2kd4XZZu4OAoE7\nc/tAQT/IBvRzyyfFvjudFpfG+pArQqw/oiwBs5/xe0lF3f2TRF70nWmWuGrx\nSWybJkLmAdZek5hQmCONgpXx6qV7v1rDVbGZ3ZU4MD/BD7YFJ03dyZ4We2aO\nRMyXxFbvw69jW5ZjN5o3xK82VwqRK8VYFFtmUHb0t2LHJ6/66UVJD3CdbyQ8\nRfz52gCOCDU7ovV6PCK6KctMAMsPhoPBBMDQvJrGGOk4vy2FiV4b9OvFxUYn\nrkfDqiIDm/hgjP1DhCx9J1E15X6SWj8awX7WmqXOkYcb/0F1Um0q/cd2ueIo\nIYpFdmPXiguYO5ZBvBMxx9BhYND1XmxLp91ZujuGDNTsHEVmNymI4CCuLYcz\nCJaHRKjChNpj0K1cZAkQbmHhTs9WDngXSCBYp+BGY+QrQ9I4+HP/zl9YK1Mq\nVgYKdmEuiw+Lzu8gJS8hRg118hK0+Ww744ZDfwTYaaSrd0gcxh4J9tWctg4X\nkJbi\r\n=0R2a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuxcjOWiNhKUSvHldBwgPX0JLcXODqcLtlnGlz41yk9AIhANfljx0yg0qZDc8m4C0Vzfa6VFXuG/u/5ZXpG1ci8Hun"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.2-rc.2_1605532851887_0.04717994256132485"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.2-rc.3":{"name":"ipfs-message-port-server","version":"0.4.2-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.2-rc.3+4fde9221","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","rimraf":"^3.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"4fde92214ca8ddef37d04ccdd2efb3a344098b3b","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.2-rc.3","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-PJnL9RifgWmpwv5Mu0CCtBwskzhit4RyUlHAkSX5/91ItONzJtnxb/4tLK1yYcvThMAy6YObvBzpSgnNChLJtw==","shasum":"6f1b888486f975a9679961470971baaa857a2bd9","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.2-rc.3.tgz","fileCount":29,"unpackedSize":219477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftRkfCRA9TVsSAnZWagAAbRQP/i7bMm/GRZ+oQT1f7Cpe\nDWdqiEdM2O+96QCf+fQErjbubV+oJvFPqhgqNKUe255XORT8gr0f6K3jWaqS\nn5opT54E1+oo4knDPqNgrapJ3c4uq66w90VFI6G5suBk8VzZoccxvwXX/kRb\nUTXqdRjhQEChzkvMMsiyR/6j+CgD5c+RcjVgmjOQl+1aHvo6frvoZYzNO4vU\nT/olbSy16d4gG/1pTsraTylvRm7G5HxiJv+jdV37PKhYy/ss7nPoOmkS4+y3\nUHGqdnfzeG4W+0jnyWx4RtSHLjqazOj+whZNfEDcIoPoXB92p1XYmsYtdkVe\n+y6ULcwL+5E/DbL5vAsRMoULWEXywddIKJA0joMXSqemKdhqGEihWQRFSLJk\ncvZnvnyRg6f8tqiVRTneGyDBokhlqGv4afgqdFtnFbOxm8xV4S3v0FPsMkXb\n7IYqPiEhA1I6mcSiNDd9EqD0p3mTSKwDU74oZXYftS6Z0hCX1Kjjx8PBYHMg\nSQ6e/rz0vb1npS54of4T5VarqGr/wNW1r7hG4ld/viXaX9aDSTh1SL1Nf2AA\nRjTc+MSWxPdJ6E6ngzGsd3EgNWz8DlDl7QLkw96A55wDfgPVQGaUPe9sZ1tb\nnw0ykwdnAFC9PUIiVS1cRpuHgXDHo0xt2PdudEiejevABNKnQkbv/QB3kGA4\nCbvz\r\n=e/N7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjnC3EjijV/Cw6N4djypg3tDqm51NnBFf0uyQkv03XNAiBJDBPdfXs8bvirnIncgWnAJjb1ooa450kuA0rD1ASrow=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.2-rc.3_1605703967014_0.7259127295542338"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.2-rc.6":{"name":"ipfs-message-port-server","version":"0.4.2-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.2-rc.6+4281b404","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"4281b40413165595e691853df3cfa19a6c219bb4","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.2-rc.6","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-OxFzx3Kp3CZqfEXO+fQnVHCqQB5n9fovMpQEJL+oa64mg2WqNeoJkSgrcLCzzPS2Rll54fAuU1ejKejQ1MOD4Q==","shasum":"9c057cfc787ed62ad889b0a42fba0ad85dde91b6","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.2-rc.6.tgz","fileCount":29,"unpackedSize":219493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuFNCCRA9TVsSAnZWagAAHowP+QHuhqBZUl0rFnodi58S\nnqAs36YNRn2bfrx6c4DiV/Te8sTqveKhSNBjX09Z3Aha+3leLJULyPgxDdWE\nUMVkiOhXE0vumKd7SMUAfuMD2wPVbxasGikrbPZqxXuZ3U8q+3FO7ZQ2hcjP\nOZOs72n88kIf1u5RmoXjo4g4MaRzXxL9q3d7w4KzosohEZ/VGEVF5gSe2+CT\nNsCaHR/nnI8G6Fc9tVRD9ULo0sGtG0Nr/xM0RWf0JsO9Jk/jO2ahrQehcP0j\nHOg847y5/Mj+xX6rsh5bW9HV72uzkVJm2zJ3E42gAEoNf/tNXc4t6LoagOeR\no0aG7pew4EXFR+doj536Z9bV7gUuptb3iW5/nM0trhEOho3uk9HX3g4BDqZK\n+eewgTN0k1GWMv7VtMmEPL7gGGYwNv+7awDdErFtILDgumpjTBV5Zm/SX98S\nxgjosj0TKTvFII3WJi+dGFb5460f2uBpucqzPjdJh88y9mx9tevBdQQeTIiZ\nDu9UW65DRdB9YDamCfSZw8YsP5HNTX4OU/VExzWsTP3AawvN3t2u4d8ufT4y\nFRU2ZopFug+SQMfD+mwSk50vEtkAk35zxIgFtu4puOi6mWrJJ0fEOW3fYPDX\nnMS+Qqew7g0ogZZXvi+TObm7/X4OP7XD9mSgHY3NvFTPOD4XQYS87wyQGupL\nk+cV\r\n=Xjt6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGp1eHPS4EilSS24xOOC0OSeKx8gJXPXwpN3cYDRYlceAiALrXKIw0TpCg/u/Q4z8883o/zNH9xfMZ578Gl0Jl3QFg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.2-rc.6_1605915458447_0.3484334363058097"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.2-rc.8":{"name":"ipfs-message-port-server","version":"0.4.2-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.2-rc.8+406667af","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"406667afee7db879ef505badfac8b0745fd17646","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.2-rc.8","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-kLHvLjlUMxx9dMG2GJagON7vCGxDtaKYIz36+K5t3A2WHDA/bwvD3b1vrFALo04BVWo6BN5s5ke6I3braW7NeA==","shasum":"ef96967a80bcb6a3ef6fb306dd03be373fc5df7c","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.2-rc.8.tgz","fileCount":29,"unpackedSize":220397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvg3gCRA9TVsSAnZWagAACYUQAIH6Pna/mveWIulG4FRK\neld4Sjv6gyRO6kjDdlnGeaW19WDPYcf9HFRiHCqAzmWmrwirdejL5Ndrfk5R\nqWtPvDrN6EPlvqUe2+ROHFiu+c2fP4Ej0YqOLnl9/ppcnfiGGKspbh8x9msx\nZLAwmRArEEcZFiXLWe/tb/grphmxIs9TNCUF6sfDTMABr/pub4imI6wleIZA\nSpM9ugnap4AoobWEjmua7bM5F8DSZQerh7ZP/v1KOsXDP422MMkVsL3jNNWZ\nQRvR5TSnnpxJgsvh9eWmAIIVeA7PPebRQo+QxsXX+Uk68DhM2o2FeD3w17FE\nwRCpSJ9aE5BAQ918JEj55Gb/qoNoGb6ZsmWoKkkT9Zntj8j7de+WuWSJgZFK\n1/kU3aDaEwnaPXwajPSl3ud9IQnybvsXaFUecxh0IhCkoN60AWGPX8hd2bdr\n82HXgdhS8OuebOygUTzAR2DnT9RAYQE5myutzt3+tk5wu9Nhm53gjlDU+YzO\nvnZbGbfYHxk49wZkU+QSP4+TjloDWd1Noct79FZAmOON/K2ZPA0sFIh5wr5L\nkGNYlOOsqKr0kdEJb0rE6gSAEtSmzdTQ/wDCuOGfaNGbLe3lT5l6myjRHJ//\no9WfNMu2mkqnJmzKJtEaCiY/cuA5xuFIqhLszt3fIZwETWKtsbOelcBduBNZ\n/dlK\r\n=isZ/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEuaY4XmjQ9QsNZVP9QgHWDFe9vYx9ZOaEREdHxIzvylAiBj+OyZUVuR0oTfd4foLxGEzht5s1vYCA2wXOGeTC59HA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.2-rc.8_1606290911574_0.8159718115037136"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.2":{"name":"ipfs-message-port-server","version":"0.4.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.2","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"6e660f50d3a4611f7ef909804249d3b0172e018d","_id":"ipfs-message-port-server@0.4.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-wJ+3GFIMWwyfSKUSdp3g6WDvenPNFmv/nV3AIw/HpDb0awqjbLLGKHTT9LaoTfvD+bEeTEn7IWzfXlojg0/wHA==","shasum":"6b47bfb388e928986bd9e31c8da26d7fc4f36b99","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.2.tgz","fileCount":29,"unpackedSize":220583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvhfVCRA9TVsSAnZWagAAJd8P/RIWhcMSeSyycCV+jm42\nnBr9gtTKABT2jqOW03BO4qDiBkIK4Wvl0Dd/v/aFczBLoa3mkZXdnqF7xSfI\nL2NcSDuc5mBn8rBYJ8MUb++GMfd5yqZnBIFbXT6i1iLeUJOi7+NC3RYcJkEL\n8RCxY3ptlRYfhii2fecHZpPLFv6Af2uXT7hyYVdRUykdo8HW1orFp88SNdw5\ni1ys5wAJ2TedNhFGICiFTKyxyhiilHyXWUOp1y2zh2MgYcNIS1xtA0i9rieG\n9dgNBfUlFGqgv/NVKZC1xYXvXPBtIbGd/67qk7yvywirbQnmV8opfdyNotUL\n4SWeuwvAP5gMOTBszUnUbL0FJ7Kx9YW/M6G1ioJovIXBvpgKsW3Re9Y2gCWb\nhi0zQswze8TU4fkGCfhLrQRrFnu7POabjfbR4WoKr/oO925ZVkw5Sw99PT5w\ny/dz7qi1GjTMyRkPQduBeY9aRhwMcI4/fPhoHLFZv754OmSFL9dqzVG2F8zh\n38VQGyuLX8iyCBjUwopOLA+4Sl0crqVvQomx/59DFrumRm0qJTUe4r2DHZYI\n6bs98Vgp0+DXo8jm+g5mYey6Bh3G7nC5cZTvrsDrsaZj3hTQCjRCI3ZXN1WB\n/KLLT0UNGsbAgTO7Tskk8AUFtSVpBlsDRaxtR1gGPGVgKb2Hy51e01C2MulH\nr91y\r\n=InQV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCf1Yj/g2cQznDh4nMjC+a44m/Vr2+mZesQNZ0SPTWxMwIgbI9k54SJ8AIJyIijT7Qav35ft1omJ/pbqNrRijXzpbQ="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.2_1606293460879_0.9758242780523723"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.3-rc.1":{"name":"ipfs-message-port-server","version":"0.4.3-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.3-rc.1+bc6e3890","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"bc6e389099df351b06772e10fea7923ebb028f66","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.3-rc.1","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-66Acpt9AiCVDhOzTFBP275G6PEo7rtZCHYmhp5VeU/eLJ/R1qI8HoyxrQ7Jza4J/3m/gAZ6dXCcGKgJGTTBQ5Q==","shasum":"5a35970a63ba08cc590244ebdef806921d94608e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.3-rc.1.tgz","fileCount":29,"unpackedSize":220597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv2Y9CRA9TVsSAnZWagAAzNoP/3BhHjdoG3H8XM+rUKIv\nc9260STatFdUvxFpoMveXxBvwkdx8fT81mozoYMu0WXdivghix7rLiSZgfZK\n+FWkKgv1U4zhUEKnb02S9n1fnF7Zg0G4nnMBF19b0d6Ahg6MscVERE0BUv1X\nj0o7IFRZamDJQvz+lLSiDztzmOffEilJMiOPVIlI+60FzNSsmE8z2XCP78RM\n5g6LanQGr5A1TToWOyNVnbUFl93zav5KPwEbHeFBcwnWGRwVlTNUFF5K+6ft\nIBAMqbv1CP+ENnVPBBEim8jee42vCiGRGcbbuTAKW4ANKU8qKW+4QiZOZDzG\n3mLyB9Nz5+1ds8Dj8dbc5NKbrDB3C0qqZOk6roVwdD/8tAb00fzeXYEK5e8+\n3bxX6h/cbaNsV3iGGVDN1TDXRQeoj4E5TyjZ960Z+uWeIRbTEQTS0p9fHkQL\nd99UGxOzHyzvuFpYYaJQqT+bPXxtrNEiQFFJ1gMXW4TV8vLtIBHM53bGkSx4\nD5dS1Ms2GLcG4dHlCmGGFGrEn/x4hETZl0tFOfQh+1EwtqM7pFYXb3DvbsoP\ntscmc0356RRqcNpRTYqwAFFS3yKyfefpqfgEd4xJy2Hi1tMaNrzwo85Hblcf\nID9Qgem/9T7VOvVqmrpC9nTkkwey3/a/UcaKgLQKXsdE0xdv5oh+GyeQmxYE\n6izt\r\n=ed6z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGgx9EW3hwI2IegkdaUj+G0XPp9WWPRAeE9T1Yixshn4AiBRbjl3rUy/NpEpA2pV5mvYbNHy1grYQ0oDTYxeGpvkkg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.3-rc.1_1606379069179_0.7820960822077359"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.3-rc.2":{"name":"ipfs-message-port-server","version":"0.4.3-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.3-rc.2+4ed94928","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"4ed949286dcbd7590c3a55880cfa9f3ff6a16f13","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.3-rc.2","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-2xamUYBzn5mvOI8Gke6cxeLlpZJwR3q0LLCQVch42tILOAVMUNfv7byKG7PJZ9SHVYww+gu7eC9MKjb0U9cOeg==","shasum":"ae553bfc776fe19c466a4996f3c3f2602bd065da","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.3-rc.2.tgz","fileCount":29,"unpackedSize":220597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv2iyCRA9TVsSAnZWagAAnJIP/22pzXkXcJg5f14KPQy2\nwbxUOLv6wi+DmwV8Be9j6Pe1O2zJCySEf2ZVgHsL4TMKbw/LL/RYjz7apeJB\nSbhkrjFHuAS7ps4+7eLuEftebqELSTTTPNeOP0hyyA71V8I7i6fhH7/z9IzS\n1t505A3s+9pIddDVlYEzt6iTSiPuXeZj2mGjmOqkeGfULdwIyN36I/SI3/uS\nX6PoXx8ut69NSjHaoerLtk1suIOYh6Vv7pRRhBNZkv6/WrwUF2E2nnkTutn7\nD38mRrjbD0xZggdZ5nov/upQW1nSkbD9VLLPRiHUzR7534RJieRnmC7Pyj1x\ncH3ofQe46l95JvgQSKxYe5/CfRREcky1+3Odoxbphi58454VC0VlJzoDdW6e\nYDJIdnsplmzijZIdSlGYv75vrqJ/XLOrTwT1B9eETviKq0cvHVCEPhpDXCzj\nlwv/AaXEiE0SK6Kym46AHo3VtJtNstAB2V8vh0UfzbE7BvV7ar+uEBZD03QN\nRPCSkfi/8rPQ6qLr5/hnl5dfIH/jKKv/0UUMGXWNmtEBUlgE1QAcXMlAZquI\nuqOhp/CUgr7sQtQqiwNfXopN1ToQHDS0tRuRFJ0WE1dXyBovLAPLQgA+viou\nCEr0VPt2lhse3/39YSqXZL5jm6yRwf4kQI9haaNjajY4omphr86yQmJ6vt5d\nCg0i\r\n=y4NU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICiIUCs98Q01gEdL9tgCTO1n6oLv11Qd2ec9eKjojfWlAiEArNmNcvfXxTEN5XVDm4TLkxaB3NzmwGIHVbKZ0hLP8XA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.3-rc.2_1606379698147_0.4511815094878624"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.3-rc.3":{"name":"ipfs-message-port-server","version":"0.4.3-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.3-rc.3+0755c253","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"0755c2534cfde193e50c9b490c8717ef8ba89c63","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.3-rc.3","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-d7HZQy+1iKi18U2sQaGg7TS3BPCXkDhZWlUzGVlMzmWJsUEDc2CBY43ULxRMVCGZeHp5CZ46polu28wbP2gsjA==","shasum":"8cb919592c87830b7371fe92689a40ddf026dd35","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.3-rc.3.tgz","fileCount":29,"unpackedSize":220661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv8qPCRA9TVsSAnZWagAAx8cP/12ZWb9NFz9hiN2dNeOS\nqHnEwnih48mcy0w0k5Mjwmldpx/1DCVQiCrJD+iY0fIaZ0Mll0Oj+YIIOCVH\nhpB4Zw7O7RDWfa64EmnA3SdO2vosUN4xDSre6OK2VD7VisEje1cOzvP+K7Up\nT97zgyIhAabDuKzM5B66eZBwERek1ezNJfoi3IG4AMs+du2AYN4sYP2egB6e\nMOAc6gort2k8+Kz/IKqaYhEq3nzS9UWfB9cF7nQGalLdxBVG+hU0e2VAJ1Kb\nZ6Zgqf9/JNxIl07OPfSD16wAVuqRvwO/fcv3CAjjS+Jt1gf8srEGTiNvo+8J\nBvRTLBS67h/NVH7PTmNNUnXbJX5RF/S/ueY8bBZ7P2bVhRFzp/USSnXbUbfk\nlVEhETMhW5lfMCR+0NZFekSSSkC4ZVQ4PvaAUFN4CZmGqTbKQXff6VYRUfsK\nPFpTFs/k+yS81o65hOby3vvQ5UvYExZcDai8YQof/HEmi54lL3FtAZ6OckHb\nhrwEWIJPtc8/KF8U3+FeAexUlyw4XVz/KwR2XMM1KiCL3fUirabWbvFkOye+\nTYAaitlXCt2L6QaP/lVM+/0/Osajwk3Oic1pxniv0MyZQpIQ2ar/qYSTDaBX\n5NTub5Po1yG9tBzi4nKGf6I3RXd4+qvzgIJaU/ljgT1HFM+MZ/jNzeM40Mik\nFaIH\r\n=qXZs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKfxg94IWvz2PROqfQWempS3EQQVl6BRtfdLwZ2874GAiAl+5/S+2Kl5RcSvKoiLETOHW2O8Lat7o+2krLzlWVmqQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.3-rc.3_1606404750990_0.031714770669856174"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.3-rc.4":{"name":"ipfs-message-port-server","version":"0.4.3-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.3-rc.4+06712481","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"06712481604985f60a3d5d832b51e174e965c6bb","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.3-rc.4","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-0rgroAg0Na5AGSDJW309WZhoZcfKaJXe+UpELZax8Gb3pwns8z6ttgLE4645LUP/El5/3PejFL7+i3PrqlwtJg==","shasum":"2986f6b18a620b7c8df4e1b843340a3fc1e38256","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.3-rc.4.tgz","fileCount":29,"unpackedSize":220661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv/eGCRA9TVsSAnZWagAA01gP/ixzZhkxLk7yNinlDYcc\nK4OW1mL5iFrXzik/6Kj90iGG07SjAvABsASzoV78gc8taVyBw3prrOWN7grN\neCntW5KBERXsGI2DvAHE2NQaoMOA0fYAd7M3LlIraVC/0fS/zEbLyYHfYe0z\ntjmC4MMxiGcdwS1etanPGIhJfGdEt4kFdSThz4rWkEFsLhxxCchrUplEucUi\nU5QLc2PavomLbkHu8kq1a5QZ88+gQFgK8SrBcaNgh6/mYojnirby7HcMdoi/\nIbi2YuuNZil/67iGetAmeLi3PvS1bQSM01eJyJ+XziGDL75tm77xr8r53Vuf\nZe35y51hrytPVJ6GCKijRmJ4qzyzd9B3iY0HY0Oo8U8/DtSnE9S6CZXQAFFX\nIVIbRL/UEpLY3E+v5r2d1WH6DkPv8DQUZS8QstjMLSQtAW/rbC6zNxal88R7\nlKmVAqNqzVhjjF/ZSCcWOvUQcReXQOyD+TtKKh29t7IqPGUZBz12ArwiTIVM\nAg6xYURYQxrD3mOWmoVN52+i9WTSSqU/mfrN0BzFjK8QldcC309nxS0JXDFg\nV2Lr8OZNezzbwg/OeL3I+zSaX0HFuKM3OZxmYljj7G19AisWNtdqk1Y53S1z\nBIM16aSDqDHRQb3A2mlARbDNJLigGltYDyZJDaFLyld169uhk+CwF8znOKBX\novgj\r\n=chqc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMP9+Sf0o/OlfemGjhBu9t2RpAqAMXS1VsyDJ4Au8DgAIhAMYAybK6R0YW5MXlEUNxQ8xUaxFNHkH4GAK3isDAHObu"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.3-rc.4_1606416262257_0.01483871254370972"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.3-rc.7":{"name":"ipfs-message-port-server","version":"0.4.3-rc.7","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.3-rc.7+a4ea8fe4","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","cids":"^1.0.0","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"a4ea8fe4ddd0f247b7bcf42dd78a77c988667011","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.3-rc.7","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-ZDKmBOlQvuD0dvCiap/f/r4hipwSlLQfvalDPQU97IHcenA1y4BzprzVt3PMpCo9E4b0dThL9T20bUCs0gdvjQ==","shasum":"afef0c984cfdea8747dc61c42cbddce92767c341","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.3-rc.7.tgz","fileCount":29,"unpackedSize":220840,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyRqBCRA9TVsSAnZWagAA2rUP/2KAsQ/c6HSjwf34quJ8\nLLuA8HhwCghd9MvlTI0sQTnIrxXD3NBUNSWyHy8btKPGIy4ciHjwAdPYOc4a\nhZg+Oxrdnu4sLU+J3u7JcySJWMK/8lMlFYxBNq43z5wm06RCLJk3xsGna0Xc\nKwKsmIwXuIlbLSKiODTTS+bk3Hq5+qWnMqjGcOdBZh+DkLgyenhWKKBKUL8o\nglI9IatVgPP2FI8GfAk9K5/SY4I4M0AJYxpl+r7dqGk+Zs1lsxJI3s/qbOP4\nGC/VJETONdDs2ZHSsmZgI/gWyxzMEVm7s32t2P97n16lcn1hcph2T80Ugtnn\nLhBDVv8NLtLoqsb75HNsKwFbdzNfhwbEkkPTW6wHfDqTyZ5obHHUS/S63taq\n8qpyRwiuuJ/N9xYlUeAoATH3v7y2J4PR8/WSxelz4UyI8nQlmoWWvBU9QJfk\nDNHPzuSQbxqW7otBuev6n8IqwK54eVZ74y2V9KUZxcZe4aUuHagx8wQaRSqx\nFDaJwKKdc5FFML1NSEY0nucHjQtMPl3vvBVTRE/x8PWLJ8IIBzkqfxsXyOrX\nDhCoknG/THK59COn1XYJYxFOKAsD3OkjY1ehiiXWGN+Vd7JKiYwqwi6NtBMt\n/XkJWgqp8bz3g1UmigAdWV1oeP3ejPPp6U96k5HN8kjnBjOj1+WmUqji+SHa\nFXJT\r\n=X7VF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfRNQxOiEAK8ku7eO0RUU8WmLPzeIzKKeccq1kGBSraAiA2zWIyhVh2fjBtni3y7crOxkANiHHQ1k30pk0RpJhXeg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.3-rc.7_1607015040687_0.8143879202298323"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.3-rc.8":{"name":"ipfs-message-port-server","version":"0.4.3-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.3-rc.8+8ae40100","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^28.2.0","cids":"^1.0.0","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"8ae40100552ec4a389112e4dd4885904219ae4ee","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.3-rc.8","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-gz5PUOgaGAWDzT3wof3zGidQUBxiCvV81m9A+eLNjz3fEQdm9oTQavz2dVnGYe5LiWEZQ6bwpTRpnnCBP/9ERg==","shasum":"6f97c1dccce8fda5f693d767f3948d94fde02158","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.3-rc.8.tgz","fileCount":29,"unpackedSize":220840,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfySDDCRA9TVsSAnZWagAAs6kP/RiBevqJ/y94cV2ZOk/q\nVPeVZViuvHeZzAC6C5sjIEtzXnAmcghpQ1/CARpeGbhaRCVx4XjNm8FkRl7q\nWRDn6ivFTSieigCCb6P/Vkt5NsUHbQ31nxXAjZB5avIqt5Msf9NMc5MZpqus\nt2szElKhggBrsyPrByMcLxPSU5ieJhby7Syn/JEhH8LRIkCXN1HNuy5TZXV+\n4V4G1kWKv9JNQGtz8S74CjWUfR8P9bEZZQvxKKLAkJ1bI/cddW9VQ0MQQPoP\nyY9DqfeyN07HM5Fl1PeMMqUv6OBAd9hNxsng4ZbjftXUjvogj/t1KNxeV/W/\nE7HlKwQ2e5VtU44R580fWBhEd/rzBQ+mBmRAbtwPbzvdxT0aBaAXPkuJmiZO\nArhe3QG8rWQ/XGjSGt91uJsRXZTNdA2jZU8lqOLx4g7yNExmKGp8rvI7rBTV\nujnp03I4Wp+rrWzSWQdyLRuwn0dngvnlJ9lc+JITgY3EXevp6DvKR4BIt3L1\n/0TTCmLxsWpaLIBd/W3+vAJztXfbSv4vlpA9AwoXYqNn0CVP3pFZSlsUN+FG\nzcCNkf5wJbuz1q89Qdh+pHsQdzjfRgSAnIBbMgmF2/3iyDF7TttbKw55dgAM\nLjoTV2HoF3THC/wGLLVi7zoEvLrOvfNwhaNdBW5ZNgIcLQQP3heA+djZi/UX\nnMQr\r\n=sHyG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5JGOp56k0s09P5FzmJGVpkwM5o94REERn9EDMjZdxuAIhAJw75Wnhkk5ZL9uY7J1RCJLo++MI2ZDr2FRSorJyU9LF"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.3-rc.8_1607016643509_0.46361126201700786"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.3-rc.11":{"name":"ipfs-message-port-server","version":"0.4.3-rc.11","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.3-rc.11+f7a7a0bf","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^29.2.2","cids":"^1.0.0","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"f7a7a0bff2f87a03e554113a83c5e5aa728cba89","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.3-rc.11","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-hnmTr//H5fROMD7mRfA0PM1YgfHU3dXpTgErobw7eddoc+G0LzMubeAMrmHl/TMfVdEP8l8omaUdEzkM2+wJRA==","shasum":"fbd40bb9acd30088ba72b8c88bbc51539879b56a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.3-rc.11.tgz","fileCount":29,"unpackedSize":221174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfy0SjCRA9TVsSAnZWagAAdV4P/jDxT+AiNPbGPNZiG3qr\nc7yl/Rj0F1OyUYmJEUVZDhQXn2kxk5jqXAm+Y3urOKTEDEX5ayMYtDO9htyt\nKBOOHQ5/1wPTQUlPWEblewuVOa6CxTMEV2+KU8D/aa/Cn4EONlLw5tWmEfDc\ndP3azlLTZQOtouRNSGRKgueoNPsvYhwO0la+SAsnXBp+vBDry17lOokJJEX3\nj/rWvxViHpmxPdhNVG5RewFLlr48oUD6iEOXF+znXvrMgX9eJ0KFxGKsrlzu\nbxqoMWd3VEcCoklSl894FDxVQdsdIW6SL4qIUAAFZJNvh3uFE4fAnR4ITSFr\nkQyfx62gYKQv1zbmPqcMzalzKOuFbi1PfIizkgVfp3Nvwq3oa3PZe2ekALnI\nSn59JeQ0RvoYXEtFZc9QP0VO6tqlBbO5dqXY+gYKBdzjRTT4cNh6KcX/wmNV\nNNWWYL2PpYfAfLiegOrzbqhAJZ2waQKVfPb3OOp9o26f/OuijbC3D5HEr/OL\nEe81Nmk6Yb+pnfjzu5p+sXJhC8YEhSeiO0NA4NbyA98E9kaJBCbuxgGrsiQG\nMAr56K5UcZowyTmqXzUPd3JZvTGF8kKRgDVbXNrSf7J22rziNvHLaIt9baOk\ntMRRH/E6Qj6AtfTugV2TOwvzcvRPsgAJfpLiZZ0AtaGtjJ4h2OrAz3z5YeH6\n/LYQ\r\n=pIOj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFfv2yeRCSGsswqeTFHPlkdSIiTFYVHl+qkasRPE9MtwAiEA/E+GgdQWXJ0tpJvrUI3HNCs6W0qfHzl4C3vDz7lqHKc="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.3-rc.11_1607156898723_0.03344476242006733"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.3-rc.13":{"name":"ipfs-message-port-server","version":"0.4.3-rc.13","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.3-rc.13+299a64cc","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^29.2.2","cids":"1.0.2","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"299a64ccbe4c4c28e4e3da3f70dac363e14c78ed","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.3-rc.13","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-AUX/11Wtg5/y4cKJV/42OX1wzQLrZ4k4M6jZLUq4qem3cKCpyvE7GktUJZjJePNqxnnCshXy4fTKR3c04tbTWA==","shasum":"9489371820f642302e9c75ecf6fe8d7b57292ee6","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.3-rc.13.tgz","fileCount":29,"unpackedSize":219927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf13cECRA9TVsSAnZWagAAHZYP/i8JPMg0fHctWBvvOLde\nru3cOGWKGSWjjGwRq82X0JvE9vPFVVAWH2Lc51SKpQw/RogSFBS7YDnWZMPR\ngVgDukXEtPhL8YwKbTTNnDzLychcHQro6fAzqBmYACRIxc01F0NwVd4IL0ce\nml9HpNkwYmIY/HdI+4GGwc9jt5uEhMTpKT6Uv8kx0ZXzY0V0giGHKh/JWIQc\nZzxHisyUoNX+sD+tt6DD6H91afJezsKrJnGTxEAmVtbN7fYinIUR4fO4Ygmc\nzfT3q2lGdlJ7jp6f0Ar6VdDpm54Iiu8da4RLqbc+xFLacJ9Xmf+Rcc1Xonus\nh3XNzSDrjFyWszZuVBfG8pqLneN6FtlbDFmUmN5Fw0NfulcPfBkP4E0yzaY7\nA24QzwPhTVTohmUYqvmzUViuyhKHOhkcDu9685GdHQBRshxitTA2KWczKFIw\ngmA9XK2dY7i+JgVcNXq61xTWR9TOrpHWmaPqPjDsBQ9TEbmQZVTGBkjCBRr8\nQbHqrhOUCKroUn9DWMhiJO9G7uy8D8xtO/RqZgqkCUMbNoR1r0GVgkrcj2sM\n0sVIpRzgU/thlDYomIQt9iGq7IFtMH5q+FMt3bqHyOcMK0pQ1D9zTrcuPBIs\nDN0vzS/eQ9sSR5BbhxMFBdSbAv2xcBDTlbl2IWtGUZ1QFcaODym88shtP0Pz\n0/dK\r\n=07ak\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYyhYnykt87enaXjgoRW1pDNg3r6OPf1tk/wJw8reV/gIgIzmSEb+BlJycq9PYUUFdSZdafFMMSXAFz28y4XW9npw="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.3-rc.13_1607956227875_0.9134881929762573"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.3":{"name":"ipfs-message-port-server","version":"0.4.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.3","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^29.2.2","cids":"^1.0.0","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"6b207d77cd66bc5326f260221e53914192807861","_id":"ipfs-message-port-server@0.4.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-xzadf8zJ+yz/ddUIsZY0ckOUKRJagRx2zGs+mLIDQTAY63cRfm3K4jzwW/TxC+9Sx2Lo9ORIEMORCH1Yh77Egw==","shasum":"42be11839858731d160ffe822f4d9bd63805ce29","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.3.tgz","fileCount":29,"unpackedSize":220613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2eEICRA9TVsSAnZWagAAMjQQAI9InHhYK59fbHeyl/yg\n4aayY7gmR9aeLet0Bm/WcPDXMrvpMOKe6KVYKkCappFk/FJB0z42O7Y4HCF/\n4GaURity37ImzapzeQBTr6XztRKglAAyD+4aOdXhPmVQ7vPpi54TF3JuBENn\n22QTqCN6fCr3FamLCbEvm9GsEvyXpcfDcm3GENEqpMTt2e/J7medrSb2JCAX\nHi//3PTTwfJRl+57FhytOP63KrG7NNwY6TjWWskWsD2ThSzq6N43TaXAoWTq\n/yWrE1hK22yYbKTjBnjEh55jusMa/SfVKTqWgEEi2jZCK+WXYydGLnk5bmAJ\nLP4FknXqYOTkiYNk4ljHhJvg6OrZcD7yPHVt8mlRRsmHiqzK+KyM+MlGUOdJ\nBK2NYdGFBvGEhIDUzu7ryhBJw5lFQ8QCnwV73vKxMjSo9F2MATlZvMgWKbLo\nSrIzeM1KW+h4T2wi+es8YNv9CeQCaqcpJf6AAmMFRdc64B7joKVLVZW3G3th\nPO0GiuZeyqYXvoELLF4cy9F506OHEXXtGrnGecdTnt/W46RCXF45xnvXKH6H\nf3v311nH95uZ7oy62uvSfkQod6hTmO6jorPZscVBEtVfxFZDGi+2KevnQmNT\npuxTmZYCelsPDlpMILjcTTcB6ixmCbavJDMoUUv9UPI95uqAYjsz6cfGWe/n\n/qio\r\n=iz7g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY3b5y8Jwnxs9eAD1K18zNg28mCaZWG5FtVytSltM4HQIgCbhwANbXTIeAySn9GyT13GadYFcjaF1ptZB+jkMInzk="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.3_1608114439485_0.671398519238438"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.4-rc.1":{"name":"ipfs-message-port-server","version":"0.4.4-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.4-rc.1+50147d77","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^29.2.2","cids":"^1.0.0","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"50147d77a2d69918a9371edd7329c9561626e4e1","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.4-rc.1","_nodeVersion":"14.15.3","_npmVersion":"lerna/3.22.1/node@v14.15.3+x64 (linux)","dist":{"integrity":"sha512-NfPm3TNLssqpSovtZQxzuXGjnvyT9+y5QKCsObml/11fgK+r0wM+I48K9zHITRkvN7RnQGQFvpAZZwoQLvZopg==","shasum":"82ecf38f156958deee81c847076a0935e79a7694","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.4-rc.1.tgz","fileCount":29,"unpackedSize":220619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3L/7CRA9TVsSAnZWagAAuuAP/2u45Kl5eOOK3UFJ2MsA\nujNGpK7n7aNbmt1gh0S/u4BKmOmeeRfeDPjnWY1NQEX5gNSBRc/9JVephIDq\n1cllIpIMdSb5JxrPOGSSqNaiR5Ej9pHp38DD5bzLqWbN6/s+DGRZlpzL/hGn\n4Jrs/0VFmszVXejH4oCvA8fMhGXB1PsK46Elsgk19Sz+dw2etwiIljJ1MIgB\nmiej+wYbUXGgxXUtdcgTzFsilGF5osYppNWqIYxlkAPmyo5HmN2D0Jm3CzIe\neG01b6kO0sRy8mRMu3hu4srH9yHyeYUF2AYRmvFMgI6AGRFU57VP1eMC/4rp\n2u0pYhCheb//Q3AQ7DoEzk2UBwYtts7rIJN8VtGLsxR21KNipV5v0bBhnaQe\nBbzx1+vSsaMHusPJCbwDPfKnmc8Cdj4zPQHL+qCt1M1megjrgUwvnYPG1L2/\nYfHeNz9PdzqiWXLW8K31+HgbnM+TD75TtQlOMh5o5u2tYortn78zUUMMzhH2\nHLhpYhqBh6A+6JK0h5mEhhqv5Xpc/z6nmsafcGfR5UOs6bLT1xZ3/MA+GFBj\nQjQuSgvDdZdV2jC2jchXObvOpnDOfNZwZg4byXWaZuggdUDdNJr/U64SF79U\nr2s9qCnAJXmdjH5PJFBFaULhKeWtNPErAe3kZy4m6TQQSGix7Is9EmCP/B99\neZDt\r\n=1o6s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBerPt8p3RQ3RyvSHEmbDa1oBfiKQB5DsSUTBeQ/iWTEAiA9I3XDZ59Xpvc9GsNxL0Jdh+KnDL6qqOcoV/Wiucl+Zw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.4-rc.1_1608302587381_0.24777660997072437"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.4-rc.4":{"name":"ipfs-message-port-server","version":"0.4.4-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.4-rc.4+ae497111","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^29.2.2","cids":"^1.0.0","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"ae4971113534c8f988aa14314e43a00fc3df854b","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.4-rc.4","_nodeVersion":"14.15.3","_npmVersion":"lerna/3.22.1/node@v14.15.3+x64 (linux)","dist":{"integrity":"sha512-WTurUiffDHC2eYFUmgG5/AGiMYfv6hU9q3HX+GIN2IgCilBsc8PpLgDvJsrspnWV45tXxoqJj47YwaL4rX3goA==","shasum":"d3958a966177a722d22a19810f1fb1494ce85ed7","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.4-rc.4.tgz","fileCount":29,"unpackedSize":220847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3OsPCRA9TVsSAnZWagAA+8YP/3nFwVABmalhGHNqyHuN\nP01Y8l+rug3MNlWDJ0dtI0vooclugWQtW2UXskBeMuVJTsevRugU66s/Atli\nWHK+A0DkdU05nme7lqfQpm5QUH8gzFZS+0b0mMC3H6hRAuJNugP2DBpJxUZV\nmaikn+5C+Vuw6fnKElmffKJDjqnHE3KqXmX9SWmESYaLA87ur2swUpZY3oJV\nEmeFLDpjkZMmsxIpjKfjoXn8pAiPi4kzanlweusshCw1WGQBLMFJhKmZD/wa\nPFjFgblH7wIeLE8ZXrPZL8WBhgSdx5I2YtdZohgVBZzX120E4VQPJURvfKSW\nKWZR6EFy41JTlG5caYj6Bn3nWeINwVkj6w/JdsAA7ja3/u/ulr3qjcKg+ksf\n01ICEvfjINJKFrkOi2GPNiDG/nrYY1UrGtxE90tFEQ2oyFqKAEPehB4bIcJg\nnKKc3x4Asz7ukqGv75CABjaJw+iBJDFB55Ejn8FIofXDYSw1rPAbGVgZ/UOO\naucs4O61NoTxs6GXUTYY6xvuhCPeMKYvaMcfyfPb2rVas9214jNFOURPCRKm\nNtXpVUeEHAQAukHEkb3CT+37hAZape4IAC1qceYOdyRp2YJTav6PB7Harp2e\nEsTIvqWFZMyAJAtoFB60Ro2buXob2rXv0Xabk4RIH88Yzvy0dUkuV+m2YOUk\nC4Pp\r\n=4+6a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDa0dNqoDlwdskjBIffmzncoo6u7vTrg8XXW0c9z7cF2QIhAK4lq89b8/uu1wEsbQohHxhFYiD9eL5E01mQh+UYxd9q"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.4-rc.4_1608313615319_0.4880563270488514"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.4-rc.5":{"name":"ipfs-message-port-server","version":"0.4.4-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.4-rc.5+fad9b740","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^29.2.2","cids":"^1.0.0","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"fad9b7402e67a459e9967a1319870da165ba722a","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.4-rc.5","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","dist":{"integrity":"sha512-7OhMPm3cXyDkCsMjFqWleKxWEHghZ4Oq73qr8irLOF7cGSIoOE+DZW+yJRYvIBK3A4qGHIlM1P6QYduKCcsZyA==","shasum":"d733e3a3e49639f758d37cce88a875b337272cfb","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.4-rc.5.tgz","fileCount":29,"unpackedSize":220847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/ubqCRA9TVsSAnZWagAAsiYQAJQSPCBtRsU7jsn3yrrV\n+487d7ptYrfP+s5qcQyt3vrwJeCxfdxptA6Qc1HzYGqHEbtHU2UpacCvTxR4\nDEp7fChTd6wefXmk9PYM1AzVtQGbkLm1ol7KqRLhEHErr6J0BEK2Mu5rxfLY\nYttnJFww3yul3iZXy9tHSzKyP165/fr0WhpzXDATo7gTSP23ub/d/JY2mdkU\ncCSeRCxiRTJlDyj9NPlx23jGx3g8NISjGEwOmTE8AjSC88KrCEEcF/7/udox\n1vBmSNax5g0IVVWElDv9LkNA9ahqHj8bK1NRN5gXIaun148i16lymB5x1aZE\nUYCGdncVxdwOGq1hbesPH316SAle4rP3YiB1uJVo5AvjHeyzQ5VDZOk0VT95\nQaSs6wu+3sSofNvZx4a/1njmasykerx9ntva/auFNXFTtpgvDViZRoicwEW/\n9uFsTpjgIubLjfkB3GBkPGLYjlmPPkYsKYqd2j97GSnxVs2mPiFx1bQx4PCM\nGgmvjbHusSETzRZPPEqc78KB7Z4DX5iAw8ublGPFkhQq3anehpzmIfpotIaF\nmPnR6BBvnMeXa6umM5QFY5fUjOvTbub5AjhED7zr8YwhmKj0E/aPeGn5ejYw\nISS/+7fyhWLtIefsasvqTyoZR6LMOoKvJH2Y4a3ikkq0Ic+dtv1LLgWZUsAV\ntJ1y\r\n=RP2+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIARXz8HZERQwsWSzOf7lFMeizm4h2YBsglE4pQrQzTwbAiBaYWOUnWqNaZJqxi5L176bHhbJNaFioPmwoTe0bvV6lQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.4-rc.5_1610540778208_0.08841845969870143"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.4.4-rc.6":{"name":"ipfs-message-port-server","version":"0.4.4-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.4.4-rc.6+b90a495b","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^29.2.2","cids":"^1.1.5","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"b90a495bd07cc81ac7a9dcad75c5625b59dc3dd9","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.4.4-rc.6","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","dist":{"integrity":"sha512-sQisX8uSZOiuAZNsyjao4w3YYSreq0PkHK7t0huZgsBtnhjEzwQ15erKQ8jcRIpg8L+vGycc8BtL7YiQLgjl5g==","shasum":"78c8f3d51710f9513f8e522da623146a53f81533","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.4.4-rc.6.tgz","fileCount":29,"unpackedSize":223334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAVeGCRA9TVsSAnZWagAAEg4QAJSpcGjp1f0Mf/sUzSOi\nOvLlhRSWULqUcJHarfMtypmWCXuY+4bLD5Es9yMeqLyUUwxmPxx+JIhId6jL\nHSfSWMMGc+qi3MtmWXf5x9pafMiY1FqmdDS/aDe5mVeSCIsVIJO+l7ApaBqS\nlgIB963HI/glugObKPmTXxyM2Red0O5i4v4DSz1uwMkbbWkLjnvgeD0GZMAW\nbxIsKF4ZmEzQMEqAXG1AHFh7D4YG1GYW4CksXRG3bXpWejZxK07Z9mm2skXl\nVM3ul5REx0p0LU7LRihukbVmunWhOS+f6rozzhuh9Uk7UlDMZ9h5GM+BPUC3\nbl23Cv0jjY0+6set1viT5MZEuc5dJJOL6xGCpdj9XzT+EZyrSPr0Roubu6Bq\nwsNm8HAVS2QrjYH8sjttAB5/ZqwmZqBesh+8BvvbKvz+/SBrMqyKu8nrzJFE\neBCdQfyvhp08zddbr2CffDEnWmnaMpBYfeVgrQOfbqN1wjK51EwR/7ptjzGz\nlKIUBCSrhJNl8jrvPBURbivGxnOpk1CvO5hDzQ8qvTN4pCkeqadTBAVzKFwj\ncaHxD7scscsxNxutVfm31wXcD+Ar4ssoq2tXG6BCWFJH7Zc+ftXNsU848HR2\nmG66XBXQr9/qt8QX2lZM1Id4tF2zj4gAKkGy2CkleuNLG1pQ4nIl42SB7Bqj\n57ot\r\n=yfB/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZwKtItyP/9K1WcugcHcDmYuseEAmPPfy6Lr9rd1DNjAiB60YAioBLbnlMWnNt9a1fYOxERFiy2nWRMaIAGYL5Ozw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.4.4-rc.6_1610700677720_0.7505352330018893"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.5.0":{"name":"ipfs-message-port-server","version":"0.5.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.5.0","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^29.2.2","cids":"^1.1.5","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"09f6f0cc98e2b8b2f1dacc69c9491555b507da28","_id":"ipfs-message-port-server@0.5.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-eMWQoDThuJoSb/mVxJcvHMRRmgaqkDcgfrK7Mm3Lxfcy3NiAt8nNCKbJAFhccJJ0QvSFRUFJ3nQ+jY2jnbWgLA==","shasum":"1ededd16a4bd475cbe07bbc1c8957f56c2ed2478","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.5.0.tgz","fileCount":29,"unpackedSize":223393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAX+5CRA9TVsSAnZWagAAKAMP+waE13OGkFpGVDpUV1Tt\nhB35KwTOyAmlxhDJWlc3Z79KarapZZ0gszcOBxnkLh9F50p/fJi3tqgPJ/xI\nLvmr0JKHHiCC8SMkvaXmyy956JVBL1g0H2UgZ7MihVGqHwW4GGSWmvTcT+I+\nNbIUvhGQbyE0KhY9DNfhLSXPYN4dpdR4w7jItWl5Mnx6QHRoUjfT68agX8Hq\n4meLH894Ia0l+oa55Xc3db5SJ6BzQpPANlA690C0A5Cpf8OAJmBJF3rHxaS/\nuP41VLmYXlj4O8nH9zwNu8qK6vhIji1uUBxlLClm1jMBiBOO2Al8mZ/OYAp0\no6ZTnlgIcMAhZvacHtcWgRkUA+/RbyMkx2DUKjqegEaZ4i7C9a/FB6WRZpto\npDqS2IFlqCy0TgXBkquPMJTjGEDNkFooPGa1TV5MnhKiNZLaXjxolXf9YHjb\nsgyqgozxIIRjfN1s6kWpleE9cLBSmWgtwC06hHFg7hXZnb4vdXZwSv9lD+57\nQRGDIsOwfx2iQuUcuZ4/3U5qsCllnIO4KLkX92oLR7agNOL7h2trb+do4Ibu\ndppOEcOffyxTkmHo4vcjxdE0N1GvFkIllfq79uxs+Q9uOI2HmX2zN53zBu7d\nQqDoc9aADKtDUjH7+h+GiW3xfgX/nTUJ9XspsrBHrIU5+v5ENsCVFvIQ++dw\nIfEC\r\n=2vhB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBdOW2dkARm5hnXoGc6l4dVgVEUNLJ2P1JaTtRv3OBRZAiEAsg7gx0PSRuiOP1cRB3IcfakFi/gqLcNsVFvu1Lu07Xs="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.5.0_1610710968867_0.10758515489805331"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.5.1-rc.13":{"name":"ipfs-message-port-server","version":"0.5.1-rc.13","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:bundle && npm run build:types","build:bundle":"aegir build","build:types":"tsc --build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i @types/* -i typescript -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.5.1-rc.13+6ae31055","it-all":"^1.0.4"},"devDependencies":{"@types/it-all":"^1.0.0","aegir":"^29.2.2","cids":"^1.1.5","ipfs-utils":"^5.0.0","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Irakli Gozalishvili","email":"dev@gozala.io"}],"gitHead":"6ae31055d21fbb0243bbb17cc697ebe18d84acff","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.5.1-rc.13","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","dist":{"integrity":"sha512-w0LE/FO8xY9ZVfeJyAAOCEfGX+ws8UCaoySr96ai/p6zRISY23RgxAnPBsxkXB6qXXx4ajvzzX7LdEu81VnO3Q==","shasum":"efcf64e38d5a543c1418cc5471c9d2ee7e642f54","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.5.1-rc.13.tgz","fileCount":29,"unpackedSize":223671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFRQjCRA9TVsSAnZWagAAIyUP+QEtfIZzvApZ2lAPhUTT\nSZ4f6pM/qnH8KV4HZGT/+/cJP5r0roThVZROHowziL1VMU/ypRCgilmYJ0YD\nZjvUYaYaAMItmiVcI2KyNunCIooYkoP/ca/c+ZDBHIlZ6Hu8R7zz7vfP1jnP\nNoP5UGKR78QzG1K1n3V9xtX8gte7I0U8WE6Grs+wURJih5mcWEZumoAVUfO9\nnvTFp1HdUssLfsPMWvMCOOoypcmI3L16eVRbYCOl7N8So8LvLqR/u1EfhM3p\ncq0xpCCrq1WrS+qAa0cGjGtWcnWyuG5KWbrAQmyc+6nCdFjfriMDC8Om5TXh\n9OKqjZ4fl8q3kqaRrQEI5tdmewuGiSlXnFF5NxNNwuCzzN9/AC/Ox6jO6tNz\nZGXUNFWs5t5Hu8Pypjxs0w17D31iQWm/RkKHtq+9iIVupEH7vdb+4K5WA7vY\nH8xO/2+HRazpANQa+undOeBBpo7aGtR683COCMNW/DeNak401edkRBPImJMT\negpd3DCS1COp86+UicVrVYmvwax0rOU3s4sFzGihpb3TU8ATiwK+i0JjLnCk\n27U9gdahf1rtx8Nlt1xCLDhMhA7aHqOvgcwDnOAqGZ0BwI1d9XeRsGYApaqD\nKXNLlab1YJd/wxJveXL7BZ4gmvjJd6TUbE/E/Nr1rXLtfCJ9d1Sjx35BJbig\nRKYH\r\n=zrUp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDftfdnP6kJEkAKaVSW2h9IGnUp/CvtWEK4tUehmNS0+AiALTLT9dKbEne2zIQXD+0/DQ0nkNgnJLfhuaPFg/jAVKw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.5.1-rc.13_1611994147178_0.7681318759965032"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.0":{"name":"ipfs-message-port-server","version":"0.6.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","prepare":"aegir build --no-bundle","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.6.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^30.3.0","cids":"^1.1.5","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"gitHead":"91df29245562d5e9ff653e09b54cd2390538e64a","_id":"ipfs-message-port-server@0.6.0","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (darwin)","dist":{"integrity":"sha512-DGdCKX5Wnswod+29b0mVwEJrmarlPpFV9LEb4jd5q7BBQNuN+y4Owzu5Xjq0Y9+uWcFRo01buedd6uVRdXr5Bg==","shasum":"58d693e4a4888aea14e78d023d668dbcb124fbf1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.0.tgz","fileCount":27,"unpackedSize":89612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgF+fKCRA9TVsSAnZWagAASiAQAJ16fLUtPu09Ko74swXz\nU2GRrIa7Gca3yOWSj/t7G570/Hmke59h4xzrluBpcQvhaY3JuNOjMUk1E5VF\nRf46iFn6oYl093Sr6hxRikmeoOpZ3Z+/Q18WrQmnVyNMOgZpZHzyCFWmYmc6\n1rdtgD9YHpHN1PLfVWxGwD103NfWT+aVcT33T/bSCtX8TyEQsjGQ5vliIetl\nKw21S+IqG+1pKUQGRcowpE60Ef+79/nzHAM/xhpCfR5icb6KtKFQnZ8NLM4i\nSZ0ANpQZOSZ7GtHo36ecJPO10T/Hl6/g3cHCm3aIzNLGL2hNF57kOKG/xa2X\nbXK/Vo9tTzSxT3GBXDKnfEZEugHnfJDzEiR5Q/WkRdaEYSuYyBrn41M0wRBQ\nOoGK5s2lewpYmu9YRctAj3PEaRFISMxmkoSWA9qQM6KIdLqCB/UB3bhiNbh5\nte66XW5oBfnxUb+tb8m83g0sIJsAA/N4B7p9Rcja4+Lib4B12joZ+adNEqCV\nPaZ1OEP8qNuFVb9GN1U5Jiq6yc+fvt+fRBQFKz0HjLIfTUyiWhO4gpr7r5gw\nmmMj0DcrEr08ZBiVI+ijm2XrNWTHAg1aa4Rqvso5JmUj4f3xv+BPMKGma77U\nrcC8pePWm1Fde14PD4DB/cKfYORaRUpERJvg5Ol8C71qdnzx7CjJgZ5qcDE3\nw+e9\r\n=FXB/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFO4Thhw9CiqTttamzhrd0mxk8vlvVClcEMaW/AzdJEiAiEA6uCg+YDGwsNdpZgQL0wWJHYoU2XDiO62AasOmitvW8A="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.0_1612179401588_0.11168469071101583"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.1":{"name":"ipfs-message-port-server","version":"0.6.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","prepare":"aegir build --no-bundle","prepublishOnly":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.6.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^30.3.0","cids":"^1.1.5","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"gitHead":"10fc290deca311263a4db95ec6b9e9ce132d6eb7","_id":"ipfs-message-port-server@0.6.1","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (darwin)","dist":{"integrity":"sha512-pwABq+t/jo54lqvDGiErbSFoRZGRnsrUGyRQbMYk1Bb99HAUj8w3eXC4TGFq5jGhewBdwTdR47jGHokBHE14bg==","shasum":"055530f68876b8153cf09b2d532595598a1d496c","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.1.tgz","fileCount":28,"unpackedSize":136176,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGRYdCRA9TVsSAnZWagAAeYgQAI9GJFfgoLM3twvggFKu\nb+wbxf94wOwQOvXZt2KzGMCPEYpq3mRra+cSl/hziXNaqDmhdP0W/cMP6fLB\nbFJfy0KxvtJrfWVx/6ZIAbZ2rFsqoFmFfP4+LR2mnsGmnh6BTskjVGF921Kb\nSy+/zWaQb6wzqFZfe5kiRNGjLcwq0EcxJ3eOT3cU5r5N0xwmYh/+0dWV5dMT\nu6UAGl2nmXYDR4HktdOSqvc9UgyZi+FyXJ1RxfSaPWMXhxUMORQuCgGy2dOT\n6VN9AQCLWrsVuu0zZJd2FZxVOdEfILxuI2JFD7ZdpGEXAJkAluFQzvoDgF7e\nfIFRETXoCoLJQgm728LWPsjMC9NMbAhiBub5WpWrYoi2+RKF3yicmErbrQ3Y\nLaYIeHWXRcSaBdsSQsF3g4exF01Zwaie73CnvizFyLM/Aqsc36v7O7gKx2lV\nArNHnszjywPK6JO1CqgA/4JrCYW/MzapiMHkeExIi8I0Y1ZBEHS+fqW+fkMm\n3KNik+LAe817Df9Mh0RBzEKsv3WOYbWyunee0snrgUjj6vb8fLib7VSMTSXh\nLKwpVngMsjvmYINw9RZhNn+MJ14N1lU0kdKhhxWy8dEl8cHdr4REzsPenT5Y\nIDG2zf7nJ6Mx19GfKy/cKzqye1y8aO0U6Yp2Y5vPGDPVG2+/Crq8KkYKxcXP\no0yD\r\n=FN9M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRNsJDEQkjFs+Nv5OGww9LHKXMdH3yGQVKhTDVGzMsDgIhAM2aalUVC5eQKEhs4kNnx/Ij2owk1mcglV34DP/n9APb"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.1_1612256797290_0.6040217785495454"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.2-rc.8":{"name":"ipfs-message-port-server","version":"0.6.2-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","prepare":"aegir build --no-bundle","prepublishOnly":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.6.1-rc.13+be0c613c","it-all":"^1.0.4"},"devDependencies":{"aegir":"^30.3.0","cids":"^1.1.5","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"gitHead":"be0c613c0e413077bfccfde0345b1ff2471193c1","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.2-rc.8","_nodeVersion":"14.15.5","_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","dist":{"integrity":"sha512-5G/trKupupp78XvLp1s9CC8wvKmSODFm2jO8Crty45Gga2Sqiky5UmEeLXyrcjqSJ8QknZc3ze5+C+00/mdS7g==","shasum":"bc38aee3404d87332978bb29d01586b1ec3d1d9e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.2-rc.8.tgz","fileCount":28,"unpackedSize":136191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMiTzCRA9TVsSAnZWagAA3ysP/0PXyENgY1e5x0jCzPmz\nnpmYJznxABfrMc0FC2mrN62O4brXblu5eOztqSjziCTv9DbBtp1bhbsCN3pf\nmehYkmoOaV6jlq8BnaRUazJ/JS1EwhT33DUcgWwuF/AkEvSQ5oRgUFFx7qV7\nY/37SKiX/0ios3Wwk5vHB6nXYRrWG1E4h9J7NEfUK3Ug04fu8TerhOoMc1uJ\nDrdMaBnkzzJS/Z23FP5Px2KBMOXb8mqzXcvU4ccw3y3w2sE6XSHFoUm3ZyqX\nap0CzCsakGQR/z5bsY2bx6csAhJYaPBRw78hWovrjbq2qQkjiWyYmQMawLYu\nvcvEEKQbAVzkMhrgaSBor+xeIM4jtYCcqi2+Zin2l8C2EU8j4d3ob7YyIyL3\nSQzPZrQQyc2EdXjIBQLvs93HMLcK+w1XXDvdQWpgrNNRRnODoOE9QF733k71\nTJaqoQ+K4RxH7+erp3DQ/3z+X4wt8YipBvuhqdCNk0m1zllk+HUXh5c3bc4W\nZvNAQkQ9Uqvm4IkNPzBRcESNdewGuLVri+1NQw5mF5uMrqWqnaG2MpUzmjOh\nGPC6woECaBMp712JKhpCorsw7mOWwxNqK9A9GnhRpGujMt7o1hP3E8twPq2R\nrbk/DdrLYd5e2ytUKjo3t8D+p4ZnEPSlvMibC8CSZUN174timndCuu/TVEXN\nmZrU\r\n=ehQU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCS5h3ZYWKFkvLgJjnKC6orwzowWuhhzWmS1dyqlO7JHwIhAM4NjICvpfQjF3hkdSzCpCN600aPAaxmlNGSe3MDEdde"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.2-rc.8_1613898995290_0.6351818001359926"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.2-rc.9":{"name":"ipfs-message-port-server","version":"0.6.2-rc.9","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","prepare":"aegir build --no-bundle","prepublishOnly":"aegir build","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.6.1-rc.14+b7659d45","it-all":"^1.0.4"},"devDependencies":{"aegir":"^30.3.0","cids":"^1.1.5","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"gitHead":"b7659d4544fbf335eb5dcd3b71fc1b81f436088c","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.2-rc.9","_nodeVersion":"14.15.5","_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","dist":{"integrity":"sha512-F6idMcdmAXJONjKvUMGD0ml4SSGEG2joDcpQ8frWZW1uqni1XMHJWCiYLZBkN6tuCsFPnqKCwwsyYwgfJXqFJg==","shasum":"aad7d69b46821dbbe291b60593eb4c5f088c0d54","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.2-rc.9.tgz","fileCount":28,"unpackedSize":136191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM97PCRA9TVsSAnZWagAA7gcP/jrxSOv0smOKUakNbd9v\nL9VU4uoRlMFphapYgM26AwF2z/8vVDlcSY3K4h6DA+qCJDFkZZhUKPhGbEKg\nwRLnH2PyLLNmJa5pMP8bHahkN3Kfl9DkTyZCQVzPpeIlt74Gmv9RdK3f9SUJ\nJ+lE4lt+1Z8uOr0SOyX89tAxmOpOdtlwBOn88nIqzruTZhxQRavR+ZiQv7YO\nb3einkd7Vg17z4oGuZHKJd794tL9M3xvO7sez4da8nk2/sIh4Z8rMnIWW8pV\nyhLJTRTlYc2u0D2AGagu2r9v9RTHKxs7/sT38xa0wnOSjUxvv3bwEQF2h3bx\noHtecIPleajEagKvZD8PvtthVbp5nhKqDZLc6rBf8QpG4SS9Xt7m4i1WLG/i\nKrFCCblHfztLV8/9KeGLJC1xrXnVH2Y4AzhC4IjaTHg1wL8EmoclmGCqF1uR\ntZKCyQPTd6uWQ/+ez5FAurmxTaJV52dfn2y5SXpF337qkQrGrQ0QrXnODXi/\ntQ9eCG5zHuDv/Wy1OAoZJ1HngzxVB+y/AePIGUQTP+KRaVXsmvEtSXgHqCOx\nBVdTbGWF7h5lW8rP9wAk5IAQWP9UTGA695CO4esW97z/QdjZeB2t6Ca1l7Qm\nzVPQ9aVcAc25s+AcgLoMo0SNsGVgD0PgwVgzC7jBpsX0LdItXsJy6StgKJ8p\nuqXH\r\n=pDvj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAMe7vb4tuPqEaxHof1F1yopkVmin2uN41Ev0BxEe2HjAiBzmyf/4eqcKLNxRhkJg/YKRZxq7pQ/inAXDsUhjvwkpg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.2-rc.9_1614012110649_0.34471207604282417"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.2":{"name":"ipfs-message-port-server","version":"0.6.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{"worker_threads":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"prepare":"aegir build --no-bundle","build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.6.1","it-all":"^1.0.4"},"devDependencies":{"aegir":"^31.0.0","cids":"^1.1.5","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"gitHead":"0af3b76115fce61d64f0f8be90cf13263d2a12fc","_id":"ipfs-message-port-server@0.6.2","_nodeVersion":"15.11.0","_npmVersion":"lerna/3.22.1/node@v15.11.0+x64 (darwin)","dist":{"integrity":"sha512-zTNebQNkQj7lOTP++TUZDIKPjw5xsykz2LjftHBkCreBpQRbJ8pyOhlI8dZXEQdm6AP8rR/CFSbxMbxknMvddA==","shasum":"f2c420ea9b2219bd59f961780789d751dfcc6dad","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.2.tgz","fileCount":27,"unpackedSize":90131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR1I+CRA9TVsSAnZWagAAiG0P/1pY6XZUutbpaLdwAepW\nDIaMbVFGz5+rH9jlfT/gHi5gDQAA/Lgj3nNWuGyWa2aOU3CEgKiSnZA8fHFl\nNHXArMmhiQYKEgWs6do/SHUURD9hyKaPPfC3WCkiq3NZceB2JF5ZiLqw869X\nnPiA3ptETeDQmtF9ir+/vd6O3nBpFhWbWgbVLvHwOIiTV2PRv0wFsM5kB0OR\n8PfY7ZNNlMfBvV+OrfBj7dVf37YgOTLYxBQrNmY7ROpa66I2Y2etpm/FycQA\nyN+nYi1fNotv5BLnaVh4VhaLfjQ6ms7u34ADhB79/5k288okPll4tyhw4a01\nJBNqtCdaa8i91Fb9VAFtCdRNXzgkN5zlnoUf2OY8cKEP1gdL1f61WtSYHcCn\nH/A6rBQ+XO0GMfUUeHP1a098tqypglW586oJKRECVNx4dBuFtru6+VBF4ZDT\nC5aO2yRhtTUK5Xx9A5asKIdusqLRjk7WLh0Fwy0P5RM2mWyU9DWox1AeE60e\nkWJBMffQmPddiUAgwuUl5PkIYjxOuT4DRBrJ0xGtFkI/0AYPmGfJi+HemV7P\nKSeZ5Gl5D5vHw8KBRZgxlyOMj4iJYfHTwtj4d/ZJLVNd/zs7Ce8yH1Te7P7+\n8kAcCLQeLzY3Q4OtrMc824HIaaU31fu1HpHB9Da45NWfnc/I2gPWF/db7Fux\nDX+O\r\n=BWd7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF63iaV6xLKfndPI/JJ16vQNa4NxXEMohtJGe8p3CfuWAiEAmRzTBEeO8WMokC7vdTnMCrwo23TZz8+wZmnlA/lAJM8="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.2_1615286846229_0.2909010605390099"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.3":{"name":"ipfs-message-port-server","version":"0.6.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","browser":{"worker_threads":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"prepare":"npm run build","build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf"},"dependencies":{"ipfs-message-port-protocol":"^0.6.1","it-all":"^1.0.4"},"devDependencies":{"aegir":"^31.0.0","cids":"^1.1.5","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"gitHead":"511147bedd51be3151de44a90fefe9425bfbcd50","_id":"ipfs-message-port-server@0.6.3","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (darwin)","dist":{"integrity":"sha512-0dtG3G/nD2w49dgiukSPr0r76Nahxt7i4TDsPsAlSXTUHgD99J7hYXF5ICypOeD1UpQfjbt4KnnpKBSbZZKIZA==","shasum":"222c00dc11ea9dabe97d3c376ae9a05316458afd","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.3.tgz","fileCount":28,"unpackedSize":136042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSKnGCRA9TVsSAnZWagAAYS0P/jSRzZK/juU6pkpl18oY\nwBTbBPVBj5vOkgfs+n6LL0v/QI/Td8jWekVPbCVWn8PJnrsMXv8BQF6t5BqM\ngvbVjFf3iyZMbukUcP16jQ4vbtM1ALHc+hRLyJzekeQGHDP/HWZ0TS1YIcO9\nWio0VXKgtvOI/i4xS18qyiX/qr3Xj1Alis7FqvEiQD7iRTtZk/pk04S+nTol\noyR26I/ClndcosLAQ+DCDU7G7t+UJXJLj4J3MtaMRB5rPoskuyP5/ZgUUirD\nX2RB257Rbz6HUzdnCUlJNe/HRJQnDMK6v5ZuIU/ZBJoK1IWVHzHfkaN1s3vi\n6hH0v/IKshfW3+5Z60ekN80aswupje/5a7FB5L7Ntvbo5TLEgCrL6btvT0mw\n+1UnbwuBhi2HMlLXm2NJlMDVHqsWg1CaPMFwFOuwKUSiyy7+tspgXmZHkjCJ\nXn/Y2NW6LfGdQkQHb6vwR3nrrqJ4WSMi3fNxLZWg3RO1Oy+ClHsAumAPp1br\nz7CY3wE+TorcXWUdkIpZKnlUe6dgJyvJdsIFSV83QyEwrG9bPhQCVu8Blx76\nyCwQN3BQEinkpjnUwyrNy+/hnyfVPaelMl6Wxsja/2xYvNyXuFYvOeiky6v6\nZUn4LsrKaJSXofJq+wDZhVwIBYLk+RiJO3pCgdej32sxttns5FNDNWyOHzWY\nrPz0\r\n=9Yql\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkEwzt51LCTOTsA60PdIh3YCOBp/YvtN3o2DWue6TzmwIhAJsmKnDPWWYLii+/lyiDk6ZuzC6QHxSNnaVp3FqkeXSa"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.3_1615374789914_0.1491149272917882"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.3":{"name":"ipfs-message-port-server","version":"0.6.4-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.6+1823375a","ipfs-message-port-protocol":"^0.6.2-rc.6+1823375a","it-all":"^1.0.4"},"devDependencies":{"aegir":"^32.1.0","cids":"^1.1.5","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"gitHead":"1823375a17ee2562f06accdd605eeefebf7a3922","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.3","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","dist":{"integrity":"sha512-MiWcTyGQJcBxOAxHpUL8SAi2ICCGerr3ABO0dxF7URluXO5w/XPGFH5Vkk5+taCk/LQaHKYeyHLVtjlezX5lUQ==","shasum":"53dbea5cf2775c14271a49f7d064e8ef3214e21a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.3.tgz","fileCount":25,"unpackedSize":135458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZJJLCRA9TVsSAnZWagAA6cUP/iwTvEfktqzdloIqkIf7\nfwqEyf3wlpL90yQjzzsQCft8+n80Es9puOyjCPRF0KO3zYgSx+VJXZhNhoqQ\nCOiMqYC6sCPUYpRUn5/XekZ6AEeKHMRVDZ3K6GbmxBFLsmA2DO4gJYQQIvTA\nA6z1/qaMxIOt1g5FvaD9azqNhGKa8S3uGZV5EKn7cnvryeLaV7mzePu+nHq2\n3+5BZB4XflfQiOwmqW9GmrS8/eg5xRzpTr3EXfmAWr/eNLIcgPKhp182Br0J\nXPL4rKTm75I7RBcZ2NaeEqoPdEr+PuUHqTGB/bfYEZKyT/RLWKNlJlJGHTip\nhBH2fU1sFv7O5isogmWm7/PFXSo8ZqCioSmtG29d6XVyGlvHlKXD9KcrEMiK\nlhTHNaFjqpxsFoEVVd09eVKRoXKtXG4c0vM73h3D+WSH3mQxz85SWbTuiU7k\nDCjpY/mshvnyxlxj/Yc21cJKns05gxJqaOJaZkDCKz+9cEepGqr1P9JxkNKX\nH0CzyZeIF+fleWkCDroGixVQ3zRNknlaUJb7abDvga5oYqEpvG9FV2etOGw8\n1ZMci9PBs8itRpg1p9ZMMLKPfMbpTwySpQ2MqIHup2MzllzXW9o0wlUsXK2D\nblo6DWLdnlkmYnbrU7i9ytOwqUaIPyX4pzw2zbsd29BJgVgriHvft2DAynIo\n8D7a\r\n=PwIg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0eYuk14CPoFdKYPSobdK46uKk1y8OkYXYhmRwpYm1xgIgKnVA2zWmtBQskDmwVfZYq43qt+SjuJLc6/AEp7XBwGk="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.3_1617203787076_0.9899004664727038"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.11":{"name":"ipfs-message-port-server","version":"0.6.4-rc.11","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.14+e7de593c","ipfs-message-port-protocol":"^0.6.2-rc.14+e7de593c","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"e7de593c9fb74bbb82731c9ed41ec5204b18b1f4","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.11","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-Xd9/A8Lu/l7EBihTWVofzi7PAoUDvqDQkedXzIqKFLoatzGfot7FYwQj2C9bVJ7TmRl7jidRjCyvM0/safAmug==","shasum":"37a3bd9ce3a9304dc1742156cbd8294d43244754","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.11.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiVIhCRA9TVsSAnZWagAAK7MP/2nRSQh4sULbJ66+MOds\n3nt6k+mNtlmg6gsjBgONCu7mGK0rwFcQ/t3uhYv4S1Q17TAFl0JzWpvnrTlp\nWg5sl8wfTN1YgEYcOs2YHU8gnwNEIDjFZ7SX3iGXzQwGfS7haMHoo4Bh9KKn\nUPZVOAIkIdyJ+aAke0XkFh/Put3OV9Ck63SSeDQz6mxTQc2lq2rlHrjjRYTh\nDB2jv4+5OSXgRPKRZJ/G/Vz97PvH5cGuvipVacSbodbma6xlb03v4PZsrmlC\ntSAP+dopEw1PJjAXbDrPFtxzHEcmTlGVtDI3Dk6BYT3Z8mVyGrx19UDeVGIn\nUIfvdvYogJAJaOwAZ/IIgM6lCCyO9sNm7Q2b0QlDcUFea7GMV7/yJw18ORuf\n2w7E4ChzRhmDOxDGc0yfXC05yzanpnMo9wNoJe1KVbz3l0T6XXQu4SjEelPj\nwc+JYWZ8bIvUb1i6K33FC1eMWiuCZ25QckEf0MIuQMS52KzRvcIyoIPUGvtr\n/mJgUDieZhYML97vw3eskdTz6GORtygXUdkRWvaDoqhrssNDx2mmgcwfEUcP\nv84B1BmvuGLaZhNpH58ySZGLp1Y0kQwvGYHJrBWkq9rJxP4HFm1K5bBafLUh\nt4kaXr3da60W8qTC4NjEdBgVOFz4w1T+mEFgNqpExDjJJgTbQo+yccCctNzn\nlIFZ\r\n=rLLM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTRqUiD6r6eWwtsDMMOpQ2xB7rbD8KxQwCs2MEqmUKiQIgE9TaLxNLgV84Fi08UEBRHNg0E87Wx0mqL6HvBR1KXOU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.11_1619612192989_0.27300849647911374"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.14":{"name":"ipfs-message-port-server","version":"0.6.4-rc.14","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.17+12915f70","ipfs-message-port-protocol":"^0.6.2-rc.17+12915f70","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"12915f708057c54a08ed0b1f6c417eee8d65ad44","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.14","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-l5R3jwtr4YJ1n4UVq1ZgVjr/8nH3NQh5f7iaAJLOOXUNPkfYxe+74/ccvCoc1rk43x1VWbuB6zE6IT6vJuWmPw==","shasum":"b9a57280f87c06c7e8caff72277fd1d9d6200a34","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.14.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiZenCRA9TVsSAnZWagAACDoQAIb6Z4ymQTaOEk8tD41K\nhi0kHul6SCGoaDshYxbiPBHD9QG5mywswFrQJ1OSmccgBOetDSPnsPc5Ksji\nwUbrc9ZaK6nJL0yv4axQR/k19c/BVCEsMXGbUpFiAvXfwVOR+nMWmt+dSo2J\nMXYGi/AyyeNF1n/JM7WbCIZibiGWjSrqf9QWhqiEUUldxi+hdiFywytK2aCt\nqccS7Kf9/szwr+4h9r7Pwraqug86yZDx/D9Gx3UMzgD2nULlahasTuCILp9B\nkrfPBbUkX+Aa5QLrjGRiL4fo202EujABf61qb//VqFLTnjL0N+XpmJzJc0oy\nJkcHTEFnDKFu1+C1nCYeeFWZ2TEnZ2J41Np5i7tP9TAIUMqI51/j0LbduWWN\nvxGNWpeckhM5jWCm8zOpnenwM3F/pU1hPk9cPoxff5rMlPLH+ziym9+QWo1N\nPcxu7WeihUpfIcbz+mFNVqnjfKlHg4dSicvv2+x8xAwQY2kocvzP1SlFrYpM\nsRBZFAuoJqcwvbvzfP2SDvbw47GFkAjmUrB32f+xVXmZtAFWoDL9yAdNV1Yq\n1eAo5oCrd1mItYkOMBd2LDxT5nx/4JV1WMd7YXssgZ5EZ3We+hreMn096/CD\nXbo5DcHHqZk+8T+ZflZD1+7a3C9J6Csrdao7m1rRlfgxRNr3xfHW4luEb0WP\nI4Ri\r\n=YIqJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQzquyf7nqVDo4qjhhT+l4ZTKRbWpvnQjM9miqm2UkZQIgAyMzLlB7HUnY0Rv0tJHuty5OfysaocIQzUWsse6bGnE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.14_1619629991142_0.23792589202932257"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.17":{"name":"ipfs-message-port-server","version":"0.6.4-rc.17","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.20+99bde7a1","ipfs-message-port-protocol":"^0.6.2-rc.20+99bde7a1","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"99bde7a194e5918933e589d685dec222b083ac42","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.17","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-CMbzDnts/923pFNjH4Yg8z/oqUy+5MWqQguvr8qwfVCh7463lRxuNJsKzqeh1Ba4npVlxfIYN+tLIQs4HSLs8g==","shasum":"1aa38c6d3ba1d60ca2169844c9101a8af2f1048b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.17.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiuVOCRA9TVsSAnZWagAArhMQAJFoRB8aDQpDI08ABMhg\nDToBRjDpFtJzt+hVcaaJeV//RF8LBLr5LJY0XrPOhU0ToNB9sKnPyzx2K8Uj\nh7j+/V27OmpzJF5F9dzcLQe3W8ig5ChoOrYNPSflWm7aKy/Guu7EikuWBL6r\n3+f0GL5DMrHMvd6qp3gnRFF2AoqBWqlXEKnAcQat46sbD0hdR4kkbR+wc/uU\nfJMoW72xuVmRRC8S1TrBBpVzFMD9Bo3nHj8ew3ZyQRdrv3c7pdhnjP7XK1Uo\nrT1aFOALPdv84MQ5RuHthXCBGRJ3seapGtH3vxLbmvfSh8EK5BIukWucXGCD\ngvQQjeeuQtaKmCttahJm8Imwrs8rdgGiV9yUrIdA18NYoMSRtvK3yKVRr/Py\neMq/xFpkszo3S8+RGOJq98p+MVjuq2rphdqAhqNpVY1jQidAW7t49cKm+OWS\n/BXYkk020qJfYLVNTJIvjsoyZpeguxJvS2+BPwObYMcqVfRtfHx9l1rXLKdq\nC7O5el3tlokisyCC1R/jhxWJepRf6MQcRywoWUTOuJywXe3qGel9Yu9fJACW\nqKlwVtviMPNLAosunLKX9mZhSeck0OKauD/Q7OajtNJ2VRWGoyn4+/+DwtP/\nXAZjtXYRIA8vI3jPZuKHqpGDIKg/+ciGnHbIJ6S5x67xFPFvlEYqAO/4G6bC\nU9Tc\r\n=dATS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxocxo5XY/MQNhM2DLfA4NuqCjwl8wx8GBcU3cXQiGFgIhAN3620GQPf/xBiKXJ27uv/odCE3tB4vT70DzE1IiGWRY"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.17_1619715406336_0.40600631386588226"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.18":{"name":"ipfs-message-port-server","version":"0.6.4-rc.18","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.21+2ec15c08","ipfs-message-port-protocol":"^0.6.2-rc.21+2ec15c08","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"2ec15c083eef923096b30dd927801331e97b4f5a","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.18","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-pCpMXTwd4awnNzDhjtD+t8TKPoQAdLoTqUkoFRvnvHo/Ha/qPVNrheNBs0fOOWpr6malinhJV0lqQFvKVbf2gw==","shasum":"5976d48a4f368d303fe7056f5846012dcd19ad2a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.18.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi8zeCRA9TVsSAnZWagAAepUQAJaeiefGDCLc3AKBZheU\nUCaAnlZjrkIUjG+hHhK99oT+U5sv8As5JBh1jTe159kDcdYXkonAV3sUD8r8\nlm91YatmrYL9C/ETUwhnNm0aTKJbh9FzRKlMz6cs3Hssp5dQRhm+Ug1SGsqp\ntst4Oq7hoTHk0JLZqcx+bgZmXDIlTXTBaylsURuowdQgFfHebRXMpIkDvGhy\nPsnsqcaUP0BMLjuRE7qybOdvPVCCtNDjqKqmcmQiyENxg0tBdzhEAdjuhh/S\nJqbAATkdFyDUcNfcM/+3lN0NMMygzpiXCsmSikgq3DkJ4m5qjdDHopeF4a0m\nilj04B7QN39khwq12VXL2LOi99KPgin0E8lGOgGrEF5mRK8xTvaNrdRIlXRz\no5e8vNNr7j8bkeAR3PIwljLr3BAcm/gnMUrLpZvipbOABUlsgnJb9E5ZUuOB\n2gLGyil+MdYT49gSus7Pq82zt+t0zxrLM21995jYyU94w81algA87vFGa6VB\n9V4FKNhbcGVJUGr8l+Z3WG+/T4zuJfUZCQk1DGiwnT8vT0s069DJ/4lVzn5J\n7qDV+EsEB3fnm41k3MSpm0ZxZuICXb9HevBeJhRHM7FwKnZ/svJqDCsbA5A9\ngtpFl+a9tnN6uc3t+zFvBgl01YxwQpQrH+MabL9kC82RlM0cMHHLBsZGydxv\npW0l\r\n=o5UK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICyBjbTQnw1KG1w9OB9pBBaG5P6VH0Z2zKKp4SNgGx3TAiEAoTWswQ9eIyjZvOFObdva+R4mWUBJExc6DH9g9XB5VLU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.18_1619774686253_0.7104933192650862"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.19":{"name":"ipfs-message-port-server","version":"0.6.4-rc.19","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.22+188f1f39","ipfs-message-port-protocol":"^0.6.2-rc.22+188f1f39","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"188f1f3930ce2dcea5a4fd6b6b1cf413ca04a736","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.19","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-m8skPRvsVnz2KnzNc9CqiH6nftgMNHrMrSqWQSE4+4s1WHeuwXRos8OzRKEPnmMi3QeO1jPbKOHf5lykcjygUQ==","shasum":"6c87aa4845bd89591f4453e577b961e46d80b9f2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.19.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjDjCCRA9TVsSAnZWagAAdAsP/j0seul5Z3FJbu7eE7sk\nOUU3F4BpUqsmQYslzmAlCKseqcO7rQROJ2u+V2jRAklhdePV4vC9eqyCzLs+\nZRerX1G3u1OnC2C/OPCCZ1LsvkWEWuSGbqYPhVtyqL+biLudoaigiyMVUdm9\nWR/ULLe855ed3RDslRSos+ZQns2VhM6X84HfDfRJE3g2oDbm50/YE9CYDZYc\nveqzxhr6nbZaIfcV3luJXZ4h74HVISfmWWdrfikPyPARObZom2+c42+UU1i0\ng9SzWBcOXIrP1rh37mr1FfXfHVaxe0RCeHoS6Ro4StdwmIUL+r6NTnnF8DDQ\ni2Z+eP8GVdFz4nCir5ElIxyeQS8HlnBxmBW+dddIajNhtiJ6gBSjRUGAVQTu\nqypoQKxz4y8Zroe3D4/2reei5lou75l3K/5W2mlDQ5EEOV87TGIbPFbmLqWr\neSnChYHh3DlTAilmOveeksABQyv1HBNFCR3tO8asq2enckS7HHwB1r2/vwBf\nOOvnm+6tWA7rfEatcK/Vbc3T4wRSH3aHyG4cI6Q/6+4JMuk/ZbwojxP36RLF\nhNSdfbi87P92HeqxxIKOcoum00oFFa/JQeVMbioHf45aNJutLnvB6L5PjN4L\nS5Va+MHxWJtmZxs6sQdUJZ8Vfn43jT7SlA+MTyejAKdH1Y+L1FyJC2VMRl5Z\n7bPu\r\n=vlyh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGEsskW6r6sIU+MbIHlPbPVseiv+laVg6gPCBAKS1z7DAiAYb4uv92b0pd/bqIHFOZzg6OerFsj/zCs06slwkT7RmA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.19_1619802305806_0.7257983933723455"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.20":{"name":"ipfs-message-port-server","version":"0.6.4-rc.20","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.23+1a447f89","ipfs-message-port-protocol":"^0.6.2-rc.23+1a447f89","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"1a447f893072d482d5a7ad148f9232dd43f64cad","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.20","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-9zL6U/Gqyt+MsuVHHCXq8YX7/Fsi+oeVIocYub/kTNVBmrOvAH+NN2+AXLRxw5kHydOv2eNVruM1g6016urfNg==","shasum":"a3ac905d19318ee239496ce6dbdec0d7e3393fb0","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.20.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjZWCCRA9TVsSAnZWagAAPnIP/2R6wjxeOTy3KdvOfj7o\nJd9xYwb1KUuM5Xuh2R4FU+gK3rdcaSELtK/asy4vz/csE1wEypW0ppffsiXB\nRAEVlZicfpCqT4nwOGKp4Vs0dSHIyJVQTY6g8GROqpQyKDCxWeVDnTvm6Y//\nOxDaWu0ZI2j2Mpca5t23H3DsXg/tmDmr3pdp3AhYC7OZxqvokulayNOwqMxw\nEzTdbK7+9uA4FTGZkKtp3GlaUtIa1yicYY4o/MHRfXrQMwOz4euRbvvqyxMw\n8JjpbWuOSFfeUaCxa/LKs7oMnK5Ahhwu+WXv0Pc9JbKp2X+le4Kdt+3vuuAg\nOrmD/e6ir+ACAu3CSBh0NpbICWHZlSDYpxZUOoAhF10KP6e4yP5qhIILzSQB\n1p6k0hLqAh3WE0EDIcOLAevxrKZ/AKCwr0fKVSZoOy1lteU6y3KNzgaaNI9c\nXJLkyy5eb+NdBSresX8SMEAgLC6sKGvw1rmnxfGUmMyTFqBi7aS+lEhG4J5+\nysGbhhPs3gSMyjZLPpvxzkW0TgcYMUIikT7xBy5h935tGN9PXZredN4Yf+8y\ndwcOQX/Wv4iYB+6oY2cTnDA5OqMKTJYnBeq2Kv1k7qKCMaA1glnNza00ZEA0\nyv5Xl2P7laqVxngBePOnA99xlrvqLRqr+QcRuTXGHIY/oOShO7oK4OcqWpo3\nwvSF\r\n=bQEj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6GbxLk1E5Q+cwHuDcnHr8QrIetULonwMz59l2iiZ6swIhAPv/cmp/HwMOe+wHxHC3gjk4rHfKvvov3TU7BODSlIR0"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.20_1619891585726_0.9143822379764508"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.21":{"name":"ipfs-message-port-server","version":"0.6.4-rc.21","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.24+21b70a1a","ipfs-message-port-protocol":"^0.6.2-rc.24+21b70a1a","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"21b70a1ac38d53265daa52d8c0eef12d4e3255f8","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.21","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-9vzvubLw4psRQo004dl/RW5PNl9P6403SH2CcNDtyWZWUVfUehDDoYz81W5Bs3Mzn4zceyk2qucAqyJbCqej6g==","shasum":"f88f4b62bdd358455407f1db7240c06216681e0d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.21.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjmo/CRA9TVsSAnZWagAAQloP/jmpQfgiGgBWOsiVAFjD\nFLS9huGywPbSRQHuCgGa9EWMgkvIOew7Mam4fdAH3dN/Hf5boam2/HVW+Gt4\nbhsB233vM/jyArHKb0M75YJDb2R75qPsvJFizQua4ET83Zu0IUSc1nGGg2tI\nKgxXtkc8+pRx8geSqy6ocXCZ3jh5ylH9Bm/557fiudzGkxCU3L7i0gAKbtLB\nvx1ALyNKsZ471jpz/GmuzTC+ST1NmU4dNh3TE6FG3om5rEfvstbsGRtlLNfb\nb3gVZuZ6V2B5yugMIEEge4CQqgsmtd9uvqLo+vHKlf5xxkA+Xn/PFR95VPEe\nI+laiM+M9scjvD5i2rEphvQSqUSxVIShf1730zp5z80sOCzbAzzrfLJsceof\nanKzSA9+kTjeKFb2kqma0Prcx+9JSX8stHX/QmdRoakI6tiGil5tIdhKEP1E\nElG66EZdmBg/wrlcF1CDJnsLovLPaaFHJgVNQH+te+vsakiL4rnCYFNqVOM1\nVnsl+eW4F7Qwh4bDcHoa6hP3q1YOcAieXUTR8lDYDgHIDgi13KRWcyrkPwCy\n5/lK7mDuTJOarFvJcTOhNW8BeNpi2sw0FEJPmrThGl4TFYNoq9TlmUq/Y9Y+\nTa7629HrmhmVmXoRQERuxM4Ap8soWuy2UKACrjGNx/hXy/E0nkh7HiUJk5sh\nt/EW\r\n=pyVZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfqoYZ3lgM88cukI0rhwNRGuLgVIgK156ySbCT0meSfwIgf0C5Vr45BrYtF9OpmzKAqi3K45RgJpujN3QsVHz4AEo="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.21_1619946046862_0.08340872710630487"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.22":{"name":"ipfs-message-port-server","version":"0.6.4-rc.22","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.25+0a4fbb4f","ipfs-message-port-protocol":"^0.6.2-rc.25+0a4fbb4f","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"0a4fbb4fa20b17d80b75fc57be49fc8cd7c14877","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.22","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-iQOxX1gkPN6N4dtbkVJLtTJyV+WPiJnXSIzUC9EDjLfc5ro8Ylmqth+hzzkIwnOxPNQcCXupEHcUJwyHhXXo+w==","shasum":"b40748f3b278d03c4c35b472936a716f3db2f6b2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.22.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkPuSCRA9TVsSAnZWagAAYpsP/3UmMjp1HZJu/H2cQNQe\nMGapQP2PpG6mNqa4NciRDKUQ4TnVb9m9noxwDMbvmcyqPFWlnuWyCkqIFQYx\nYGdipupubP+oYibfrTsWRDYFvpABp5MQdIL3PC+zccGKRwlKnqMUcBiE0mq9\nUrfppYi/6+1SBZH4osTBFCTnyGbk8u0zJD/BoDeFhctjHxGu/a/53bPhhPYK\nBRo2GLfTK3cG0jg+lX1wypC60vCx/Pg35ZLRVS/ori3sgQmHh6lULdjw+6aL\n7yS4bywzXC3Fo9prOyx2/fYQJ8Cj6DZCXAe+61gptg3yzrIGz5zwOH5j/wd4\n6p3jp67xAL1vCOYnkv+RhB073f16+9pspkYoh4fZjlup+AO05QW3uX1id4Rf\nEF3gNY3Jjmqbby1ffjEm7ijEE7RX758prii+IhP10CIBJyrhmcfgHAc2w1Nl\nCgAqOHAt/HAxQCPmV1ZdQbqS8Ll/Scih/Jup/jid9waXMqnpYbsy0EXOjl4y\nYZrmNaN1H2DFebQuPBaNGlxnW8DYoK3A/VATHWvjD9cm10xVR7fVdO65Fuhm\nQSpyZFoT/h9A4C9C1LthZXrNoVbNwgobiz1+8udQvvk9bBk4W/nvw/TkW/fM\nsAvAmkD8z2ywmToIzeqW1E3ogdN8YdQmxnUUhWJPek4CqWSe2VHvJVobOZyD\nNG+Y\r\n=zpkU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOiF+670gpY7J2bSg+DlGDTBl+7fetUnA6eBtT7mj95QIhAPjNr5IOrFUAt/XkDP9MCrz6+1uDxikdx/YgLUs02th3"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.22_1620114322069_0.4996224626447068"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.24":{"name":"ipfs-message-port-server","version":"0.6.4-rc.24","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.27+a297e8e4","ipfs-message-port-protocol":"^0.6.2-rc.27+a297e8e4","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"a297e8e4770f0b8e88e065a604acd5928e561419","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.24","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-jxcoR31PbEr2UDl8S83bjuD9YmGJ2U1gwPfNsif6Oc12cY3D1iiROXB4MlYaZhaZmyqkTEknzZ/78WxcN90s0g==","shasum":"646d373c606d41df5ae4616870b8585f3f3aa0e9","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.24.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkSiJCRA9TVsSAnZWagAA7EAP/i6fk8ZRwv54e7Rvp1sD\nXUL70YuTplnyTz1IwrjtSgvumOhXr6hNjU4V5o8YCP6gzySNJoYVZo1EE3KQ\nUirehvup4U/TpRDNeY3fzhuEivDwMSiO2bQnfZnf3fjLYtK8p3R1NLsVmUzR\nORqldoXNbtolyJYOSFCBsahvzFxh6aCsQIQp5H3DmCEElPG6c+iclsVcv8IS\nqYp+uqumEb2G0g9yBb37LMNJjIP2KcPwX977HBF5XYKVBzmJ7UtiD89MVuxu\n48ODjDEBm/SHuK4n/DygjmUzhaiIhxSK6QRq3ePuMHZ+mh42KPGO2To6U1dP\nKuxzBYdBZuiRklrMg3yVumUDtOu+gpUP2/YRP/MKr5E9SB9BGXN97AKVhoMS\nfkRC2WvI/hzDlM/CBDki/lwaJ8ttH5x2J7iSmZojpx6YosL0pTQ0Dq1E7/oa\n/IIOb5CE9q+zw8aL5nOwBXfLyP680kA1ipD6nhIHiVxu6zQiZY7pHw72o/Bc\nIJXsUlfvxY+UBgVhYCE/+fMVuIZHt9InkkLi+z5z7djohENLBbj5Z8jmOUF8\nKSglY2QMaRy8Gvc7nIqKQocSJyAkl+CdvzIqmRPJcIQaF/pYhCKSRSwsMywZ\ng0bBcjdzlajp/d4fNKlZgQ66EX5oDAG6pzPNkCiJI5luuUCOfOO9jY/HpgS1\nirmZ\r\n=siNg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOIeFQATnI0H7NIX1NPpDDU44GT96P/3nfsdRJ0sSaKwIhALbS+kow9rO2AzPnWho13SjPrFa/hTPg3vUK55+PUko1"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.24_1620125833187_0.9828704749039481"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.25":{"name":"ipfs-message-port-server","version":"0.6.4-rc.25","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.28+09a65ff2","ipfs-message-port-protocol":"^0.6.2-rc.28+09a65ff2","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"09a65ff238770978bc9a91449c9d76896f9db8ce","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.25","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-0uMRAsNDhbg38wZ/KYqLbZIckjFH3ZvniD0/Ppmo8Ukp3A/pxMrzh4alT9skd+oMcaAMEjNH8Ue0Q5pZzQo4pg==","shasum":"fb077d3ebf9dbada5ec4ffa9615c8431b84307bc","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.25.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkS3BCRA9TVsSAnZWagAApOwP/3m1x0ZkmEdy2rjvcThM\nwzwme6uxfOZxcScWyczMiXIc5wWHc/mYtik2nD0Tuwg9lV7GIqcvs1oxlOCR\nZiwnhARnzU2teMkPbWBwmtKTcrXa6fwYYjFSMK5vuHWR/YicvHQ3LoAOTVFg\nwNrz0IUX4IH4SHYoFKyzts0U40ImdDBe8vsga8iL8BCS5JBQBm7rDwj+Kxqb\nS3ygLpdzasYz5llfIO2WOF1e2XGsY/Y1YJ0qYUSoRE1DOsd8sbDdz+gByFtm\nWDvYAw+kpdDBA4o8fZdwFi5ZoJSvNI6PaqnRDFfrjHNQiHmTC03Y4nKRCi83\nCchmXE6cxOBUiDp4cc+CrRe2rh93ZWOpGiVUg6WLvl1J+8K1BlusaqqX8bgc\nEi7aZuHlyBuqYkWkvjLz8v1RHEkI1PaofppFas+iqOL9SYsoJd3bCnbaEGK3\nUuq/pTcqD2ua/IV+bauZJAEsX1BSHez7w8k+ZSYJEKe9GSBUo81alptjRA5Z\n2YFAG836EVXiQABumyTnitkhLDV0z4N8UXwbhz+Wyv67VBlOXX5rS0fWKK0U\nOAdt8mfgR7sjtPj3qptfdTTVC6/AECXcU6f+6NvArIE/bi40/fJwT4UqK0D9\nCuHfzgmqtKIs28eeZ2oYHD6hHCmdogRGSTbUGvKnHuf5EgDSiREu8fWMb2Ha\n1tZI\r\n=nBDS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6AyfjjLYHqGMKdGf8Q2gzB4HD4+Ug3TCJvJNCARsm9wIhAPp8CHinKjQ9v6XfkGfCj9nLUbSxz4wo7YvmRhgUWc0t"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.25_1620127169508_0.3640254145513919"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.26":{"name":"ipfs-message-port-server","version":"0.6.4-rc.26","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.29+1173edeb","ipfs-message-port-protocol":"^0.6.2-rc.29+1173edeb","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"1173edeb04e6497a8e4d2336c83fa8c450fc9a24","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.26","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-t/qOnzZv+XmXk7yGIGDpgzdbGQFxSpx0AgQmUL92RSPT4K9Dd5W1cpRqQaZJsDortJWqEHbSiGINL/VsVW/RNw==","shasum":"cdb345e72e51c0341c945424a9a7b1c6fb53fffd","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.26.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkVJzCRA9TVsSAnZWagAAom4P/3DIsSWK5hI8DUdCyPp8\n6SbPyF0CIuPv5vREkE3bdD/amYBURgJMkH47IZdlZsIwJMX8Dixsewt61Yim\nfI7yPnuPHp69zkm4nBtAirh6CgR8JZN5HnmJKRsZj5BSeRpUWUwa3AMirqN0\n0hi05LLJJ6PsxI9laLxLEexge1xCjJgVliVOvdgGAqSqtZZcms52fqE6k+OU\n5LpdIPBGckQr6CT9hi1gdoiMcWzo7lUyfbvALHYCcSogk/Y7o2h1vOFuxzgq\n+Xghe++15Qt5YLJ6qlkj7NcxuwS2ldPipQrOI7Y6lVUnI9l/CUXIbMcZAIC3\nFSzUEh6mQWdYu22xn8C4Fb7PrRxJKo9bVLMR+wRUI8TJZaUcTvGGLz81g8YC\noZLkrs34M4EI9b6G7gVnGfV/R2aUW7/mYlQaLjImtdNwMynPlnA83rI3bok0\nOXWXMHYzjYvTFO84Vwt4CdjpYtuyW0HlYNe8EM9gV8Z21DGaSzk+NzC6sC5b\n6yXrsAWd8LWanp2hgrUqe2k7J09WyrT1/IgTu2wPP9FKbjuDsjsxZycs+ReA\nlYu2orciqZJteHI/VeuIEVen49fYsUkj7HTEUugmpxIRHLCWxchrCvc7P+6t\nZ1Qx7XpTHuLLj9lQz71yh+L/dF58uu2T248o11jeyqjy36E3xElDnzGj2oBt\nAhQL\r\n=8ZtI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP/1hdI55kYinWDJJjtddVDhgP0ZG1D23YowiZDYXOewIgNS5epST1yQqU8KMHo6TL7mIgEW5KOtzyrISZmi5YoBI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.26_1620136563129_0.294351027435245"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.27":{"name":"ipfs-message-port-server","version":"0.6.4-rc.27","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.30+3ff26938","ipfs-message-port-protocol":"^0.6.2-rc.30+3ff26938","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"3ff269385bcf0432e94aed545f74ab370d664557","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.27","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-ImWJfLa6X3pMKPBRwpUM6jDAV9RZMEN4PWvH+CDBFu7w1XlgEbp+H0qCBOT1XtOAQdAg2IyqUztWGhV84Wf/XA==","shasum":"b63ddade476ca5a213cadc59d0e453af89920669","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.27.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgk9ZWCRA9TVsSAnZWagAA+qUP/jFej8f8KD0Vc5P4oj9N\nc6GAhKTDGZduCQDJUkW20egiFYOuVJotcdlTkU9bQdtmsRbhlM2oVy4UpHq2\nw0lwIuP4CRR4lHGvu978WNpA9KmhYuxXMiHoFzLE2w8Qc+OesVvpMzAvvvhv\n2Yk0AltgIYHsxOjgzsGCHy1FA3hLydNEt9U8VRwxUm648iPM3nJlU2sr9W8z\ns2EL5p4wtYXKqeK+DYh7FoAsS8aIhTw1fPiE7cS3xPXsrqMesd9DqQKV3XxL\n5QDIYbOgIzPtFRQ1NsYvDNHxY7KizPjVZC2jV1D6X1TRsoAKHBc3IiisUu4+\nOtFg3qYus79bH4khrAO6cfS1KK1N3bfzWB1ZA4p36GorYQRvSfGfWPIGXA/u\n2jPDM8scDP0hNm+Bc4zBWzhKX1dotzlgVqDsO21sU8vOlHM26G1q+Y46QS7o\nbRPR2N5t8Vict4fFh0qU3alTjF1i5I1gF/Ebwb8JnpTlzHhm6Ne0Zmfg9Uao\nvxwzHVLRcIHPEZKWpzGsRBUoivaGZLemaw5wFNwP22Lfq4jLdDCZFdYaMGtj\nLnpU+FROAQfDk960w7EKLMfvgT4YVvaF2xDQNPqq4eTod5T3X3GbpPv/yNJI\nWyzB859cxipEcjexEM9HRkM0MvysJ6dFw7BECPGIC1i0iMKmVGOgKEZnHCrE\n25do\r\n=pXYO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKebE974AfMB0JlrfheBc1YV7kjvkeHWGk3eApB5IXsQIgc4OXXeDqJBX9l2HHXEpo60D9F5EYyXQZQn3vD3ihihI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.27_1620301397913_0.9186354857029526"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.28":{"name":"ipfs-message-port-server","version":"0.6.4-rc.28","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.31+d5897854","ipfs-message-port-protocol":"^0.6.2-rc.31+d5897854","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"d5897854419e83a146dc8cc01de04e73b250d07f","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.28","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-xNey7jPKjx2ejW9jd5WnqQyWJy0kq2rXdSkZo3y7Phm1eHb3ABoRvXQd90HB8TVvMnWvv7ejeNhLthPOUaa/Dw==","shasum":"9f9cb40af1f3e2b3ac4d4bb038715a7ede54f86b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.28.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgk/qcCRA9TVsSAnZWagAALSoQAI9mzhJqsNGTyr9CVuX6\n7h5dAYuvUESJ5klBhu1L02400QNSOWz/28eZf/BzPu4bP5t2TvNLgI/9RGfw\nluiAjVFKagq4pfmFx4V0OMAz1zQxh1Y0et0qfl5rKpqdhNE2Tq5qQH/aDdxh\nKsCfVoM6gu6A8s+1Lo8Zwybudt0CvcXe4spAnztIOtCH9HwSQHV99gH4GuMe\nBj2gneo4529s8S4OJ6fdtnUxaNVNsXbC79RAYWIRfF0nq2/4QDSH0e94cqfg\nYqH+bhDdtH4SZCxCq8OB3TNjRyU0kx2J5iC11bExhP5d0PgwwFUosI2bFY8D\n1TttUnoAqDvpZB/m1ptmT1J+1iww+0gxmMKqf8v7JXliJs7zt3XUPDqcKX8g\nLsxgqjKwXfsFwQASOTxnf4qgSYOQK4vb11jRNOq0EbfIMTYVJLKIuA62579q\nOu+RVX6oCsoN6+fPY3l4FBk3q8DYv6+rXMX/rS0btQFLMsPeGQ7E5i9WseCM\nQr1rZ0J5ru9VMv9UtA4UqnKID0+JTyuqztF/8kVNY7ccVzFXmPJKwbJS7R74\npgDn30fXZthSNABtvBzjS9tLkwReJS8UprGI3xL6UpAmTCocn0vy6KkofxrK\ndzXLtxD1qFyoqyS4TIj1WzTqrpbcQOWohYzkI11d8Ap7FwYalMwVb47q8B0i\n8tDN\r\n=uIIV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQi951dRV4dIazgrRiyFav3zpjVYJ1R9/zddhuoILfzAiEAyCAt71dZpcKS2jnUPJYL2a3BZJJPAgcqS7cH4oLdqFs="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.28_1620310684235_0.31365340415293796"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.29":{"name":"ipfs-message-port-server","version":"0.6.4-rc.29","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.32+3923133d","ipfs-message-port-protocol":"^0.6.2-rc.32+3923133d","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"3923133de800ffd5a5550da86b7bca254206104e","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.29","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-Y3yHAaSXQ3tu45fgsckiJZDlmHNpqXgRbhhh6TqGO+fVTlXT2YDY/9CSXgU/a9Q4dSo7jvlayU3wHTjsNmiqyg==","shasum":"4b92f19d87cbb21a631126eeb446f7573f9c2759","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.29.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglSugCRA9TVsSAnZWagAA5p0P/1Ffzn1s4xJ7vAUlGSMJ\nsG0nNstrZ47kCMVmzhTVs+dIyredvdAt/aM9QKx256igq8QDdr9KmMRWiy04\nA2OU7B2ySPAkwK1kCZuFr71U9Al9fNayii4HdECg64BfSpvEjvTUibrqwSYo\ngbmH3KcP4AMx5GCanY9ursFcFe9MWzD9IZCC+ryyzhm5DGOGyEYdgEJUgz35\n4sQfn5m97gQ6heSQTHCV4YnMnMDXNF4c0DDUAM8bywf+v6uAscQMGmPTuDOh\n8n8fsv5Hz00VwP/XcNlCrAXor1qVSc4SbqT8pmythVDqkXaW6+6h/ywZQAa9\n7EV2+vR8lGZAgARJIypK45L5b0uZP0G/ZpURf3tV9Nhj+aWnAqcnTEN0N0a4\nWLZitWgYRZBTw1JT2YFdZS+42sJzOgJbE1K6FeVU7W/YVsfctmLiQmkakYqA\n9rfsR2ffqKR6Q0YvADLOSRNpFhHlcfC7X09SEM6PKSYVNOsixqeukRS4r3S1\nbRh+Ld0fQ3J0vC4VB3kRKOHzhs+5lb+21y6lKpIqWuL9jZZzKvqL3HhOdvFS\nDlcdU2BW5MERc7Y7baWhPwjlVb71M5f84hSq5zGhLiyrcGrKYH2zbWWf/2+H\nuRrkpD00MuXJtiqZm+BjvBMK7Ih2L+wi7dq0a4LLvJS3T+37P4fEYx7wB536\nPmjP\r\n=DemC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD93JGgg+yILNm6NIT09lKqDuIFI352CryU6WvDmbAitgIgUvrT9s76NZ1hDYuv/tCZwz1A1OG+RV7YG66JmltAn+A="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.29_1620388768033_0.8397453984218979"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.30":{"name":"ipfs-message-port-server","version":"0.6.4-rc.30","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.33+cf78a190","ipfs-message-port-protocol":"^0.6.2-rc.33+cf78a190","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"cf78a1900dca2d466b3694dcf677eabba5ea3b17","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.30","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-X4qTXu45UvD8/T27aKMyo/AK1OsJItWAeRrUF72mU3d36Xl83sNpCoiR8IfTzmtnnezZxShCcuKaPBI20OW2lA==","shasum":"6d32720712292f76434eaeb30e892ff567e06c03","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.30.tgz","fileCount":25,"unpackedSize":103167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglUMwCRA9TVsSAnZWagAAosgP/0izIl04GqXF6zCd1cIN\nCwSaI+TB+o45PssJWdPjzBjeo4+ts8KusctA6L8iKbCtOHryXDKwsIMZ1EDW\nYArDOfQzpOrmFky381rM03Pa72C3aDZOwocBwVNhPavRDXWGOf6XDl/TXCwm\n13hRV16x1baaubFfVPfvFprHH7ixKl8Riul/7tHQRrN0odt1mBZevI43g3sD\nKnLZ9Rj7XIYzP7yTz5B/DSnMvoWp693xxS/hbQQki6Fd0oiEGiCsIYsdiOMZ\nBKS4RLmXUGueWSdRf5wXMzH7Zi86s+9mWGnSomHKJv0rxo9G3ER3PspYbiBP\nuCyVu7W29RMp6V6hISOY19edjzc9bK+0hNc37FsC7OUKGrdAhJrZuUFezabN\nzA3gQKPGT/x+p5sgyUdnhb7E+cuYb0FuT2UpNAg5RN5mpyTiHMoncy5F9gxe\n+gZczbz7a9j7qwjKVB93Rs41VapiUqGoGc2uah42EX3nSoeHLII8YzzKUbCt\nBKm0Q+oP4EX9NoVGMRAHHbczvT9TL/TngrDb4/4z1ZKPJCPpZIa9t0IhxbbP\nv/ZvP8hkolUuKN7Ib3WFSnlKN7j1l5zBy9kDX6/9DvjaQNCqyoAkqYZWS6yq\nLpneAQlEytHb1b5mztok3ohgrJFXihw8pcaaQs06DaAOaiMQzl1vre1sLVkP\nGyA6\r\n=1rj2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcmgFbrn/pv9Y76RY0ZMSq7U5VY3bMVEg94L1o+ZodJwIhAJnYuinXFO3tZn8qSb62WFDFmtyes3i/0Mrmx/5zDWM5"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.30_1620394800190_0.5969430824629463"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.31":{"name":"ipfs-message-port-server","version":"0.6.4-rc.31","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.34+fe6024ce","ipfs-message-port-protocol":"^0.6.2-rc.34+fe6024ce","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"fe6024ce70fe83da84bfd938d725f3e6814d0e9d","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.31","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-LM4FrrE0oqSui5olvdfG3Y5Bb4XgQUmctDwFuQdIODSsBEYVCnmZ66/wiJ1gtGle7rcFxFxo65mh24EonuvfBw==","shasum":"8b5bcf0790c907d66777b3bb0fc099976a7304e2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.31.tgz","fileCount":25,"unpackedSize":103246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmR/HCRA9TVsSAnZWagAAg5kQAJG5H/r7CIi72q2DMU3O\nde1l7MTZpusRLOf0QTsVkXgiIwQN6igVgW/HhMzHBqYuVn+9khpJjNhgqEN2\ntWEDkDWAk5RwDnSWqN2IR3Douhza4dVdqAyxBCJYL5z+uYRd+7osSug05gXA\nhDg3lHm4vNwrq/MLYNrZtaWqLBo0N3LvYad6qBzE0M3xetTbSvRVhVTUFFxb\nw0PYq7sqzOQw1zz4yjiDIVd6xsdU6nhAtfQVhUb7nCvlULmrjsCYMrtHgDa9\neCikJvf5SyBafOLgQCYZYMVFTGoNFVAgMhvZ2PecuGK3DGGVq6wZQI10t8nY\nhzwCFnhJHTHEC1YMjWui5PZrHmwpgLnFPjJOInXrs39Cx/TbSNAHHX4/Lv2d\nP/RWPWW8jEnHXDqJhIvgO9NCkn2ba4vtSvpAOCJ6uF51uH8UB/QMHa0FikHK\nSNj871uAYt1MJ6Tfn8Iqgo+JziZnmFgNXAIR8qzY3d2vhh2GIZirtwENMEQX\n6XbxhGheK+FVMW/6XdYaevSb0Dvz+REbuTJpb74lgAsUv6GAB4eJpvGOkdP+\nsaeaEznyD3LAafJPiBn/lkCeVNshis3XWjFCN1BNbmK4NA1cKP9eXEhzBE7B\nU3CsQ0/h5cVCf6bNJdkBeW6cBNomgT/hbMIbzmajpjiXBRS5/aBDkDgp+Ppy\nyGif\r\n=I+3/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBdMU3eqdzyL15H3DEdpsD4DZmHe/oTVKDIwu8QN4Ea7AiEAhlA0BEHIMTevbVVdhMvtIhGxh+waLdCPeuYOaq5KQW0="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.31_1620647878902_0.38802964838115006"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.6.4-rc.32":{"name":"ipfs-message-port-server","version":"0.6.4-rc.32","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.3.2-rc.35+bda04d10","ipfs-message-port-protocol":"^0.6.2-rc.35+bda04d10","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"bda04d105587606ab2d7efba04b232bc89b1edc3","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.6.4-rc.32","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-GfzC+62pAFeG8L1N6zqpEpk2tbF7NMQ13yNTJI5Okep4B3ZVjULhoTIwNywPGOcEuNknx/2G7ZkkxK+f7R6tMg==","shasum":"156da62823a926f1c00c72c2b2ed46e75acbd63b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.6.4-rc.32.tgz","fileCount":25,"unpackedSize":103246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmSVCCRA9TVsSAnZWagAAr/EP/i8a90pzGx5xABqduetD\n8SMJuKjpV+o+X2Ml31zzs7c38Fjr0LfK2BfNPUN5mqnz/vFjNk365ypuIwnQ\n0COjclZ1gIrgZbi1bl6UyzFiKi3UQ5mUhFeOfzZvfu0ZzaIFs3XeesXf7PZV\nM1WPqU8RoT2RD5WivD5HtLIFfuM32N3T5dZKh0J6RNgbAwY0eJkMaBbAOOYS\nrQJxZEempCy5giF+j/tBYslTMlmcm0z5Xrb26fLKn90+a4U6ppBorjhbSv/s\nhAoniBb2FnkfIFSfIa9iZO0oIOrxMFTCTnzzGhcSH8rTwkNc0gFQIut59icL\n8HtT7G2C63v9aH10uZ727Fhis9sIj837crnqYgzkd1jkeyllRcdm5vd1b6Hy\ngF4kaB+niB3GLQm0Y/tIOqz5IwrO+cLB0SdqzCZpNRy2LUC8X/q1T29++hZB\nzXzeepoiXmyYXj+B9usp63q8FVZfQg+JVtcWDEz/Ks6YJzaibL1vyy69X8Ts\nMhvyscQF55lSI+KCRkQxkfORPlu8wQb1aidcpA7D0bYPtjaRUTdyfGR3WD9r\nsCCaCKzW540PK6idGrfE1rpj981wsiI9SP9WJmQ1tHR4wkjpgIh2/mC94zob\nKsfTdufmVhUpCNQNMsPmwWmo5ruaqJ9Qn/oh6sdlO0cbcXb4EFDHGH8/M6is\nKbUr\r\n=kqQy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDR9ykAyELO7dyNuHRzLfiOWAkX36DvvQSTppyPEAuRXQIhAK/FuZUIKCht9yA5m1XcaycBV8+bqR2H1D0dV0wsH+VB"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.6.4-rc.32_1620649282078_0.9564347688640114"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.0":{"name":"ipfs-message-port-server","version":"0.7.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.4.0","ipfs-message-port-protocol":"^0.7.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"99053f721305d1905f36a16631f036e883cb02d0","_id":"ipfs-message-port-server@0.7.0","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-FfTtBRfsS6eSXQnBfbQpomVEoOX87fqnpbONu5UTm68pEJwgRuj7I5nrQLPA5mDQbTei9a1e6DcbRP7A//POuw==","shasum":"ed813effb81645e547497b7a52138284c18497ea","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.0.tgz","fileCount":25,"unpackedSize":103936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmUjTCRA9TVsSAnZWagAA1CYP+wSx7Mv4fmkJS2Qfb7qw\nHu56p7DbTLS6Db+9l/pLABh6EULEu6SsUC16MndZW9yedQJau3izSvCe0N5t\n/gRvGmDyzNqZz10j9R3vQvaETYl3LkfxcfhB/pbP+IycXlOi1BOZSf4cnaF8\nQXnibeB+JQl4BU+1KfVJqGYqrPdt/Jl0GIBE2D++qfUo5ahyt16Ui9XSy0Zt\nyMj8wrLfAEqbJvLkLUDDg1eOakHXMDAVx22Ffp0a7wDJJV/cvaUntbUxkrWt\ne9r4lNvkrsA4cuqnoajr12f6Q1CvhyAKBKNQ5Pqszfhp1paptWcrImNBs3nb\nqeaJ/Deko4jgpforcnSwBjlbmTSM9/xX54p7BNXSvLyD/z7qWrYBAHKbVnpm\nhM60+/Xiu9XsieYGyvzJ8mIhVZcC2QXYeoGpuVkLctkuh509GogE3qmy8z87\nBPtceR/eozvk9DFBvz8V0+OODMXb8uAbpff+MYHFBCGjJCMD1qY7nUDhkuDz\njLKY6lEGI/RsOi0GMNLJESO290hruhBZGOmt+kk4N7KvNnX2ywst3jUp1lHo\nuvs7sIBI8EWxXLGGZRbG7NgNjWhvhcUEq5BVz8SYZlS2XGy9bUOJydhzGbOv\nkv+h+hAdLQ7D48imcK97yykXqcY/UQuJErwWSCaf+vZ9mXB/lx2n/JoEnCJF\nFcV9\r\n=oQu2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHym3GLqTuoL1J4GWupMS1zWorVY5QbuCF/BIIpudTGqAiEAoftQytt3MeY584+XIu+435+atjn36t0Kn+McNQug600="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.0_1620658387509_0.3848287306056586"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.1-rc.1":{"name":"ipfs-message-port-server","version":"0.7.1-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.4.1-rc.1+7f6faa76","ipfs-message-port-protocol":"^0.7.1-rc.1+7f6faa76","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"7f6faa76a8b1903242f941837e2c717cd8095d10","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.1-rc.1","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-s0Q6Rptj/vaS2fh9JaGB7rQ+ewZJaS5/ItJefDmA+Z1u3LDixCzCObS3btq4rIeCq8HopCFGb9aTdiCFFdXSYA==","shasum":"1b2ac0c7ff79f6087db69ea571bb7b380b231a57","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.1-rc.1.tgz","fileCount":25,"unpackedSize":103964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmh+1CRA9TVsSAnZWagAAEvIP/ixTVGIEtkgYdHfovRfY\ns+O0w+lDbJxUppYH1YKuv8DDuXY0MUTagqEgrOirV3udyNE2jvLdZnO0jEIV\nuUa4gORTBh6W4n1Cjh0wHp4BqpCqltgTQITvNcmupOrZNM6ZGrLQQ8gpYplM\ni0IWNOgyboB8E3uYtM9GID7DGfdvL3c7S0e7xG9OAw0prWeiJZjnMVOxjo42\n8NSmu88QtSGvPk9xYKWzoWK3s18Eg08dlKw+0VAMw/SfPHHty70LcLsvvRJk\n+vegJ+MF/XGlBBA2ZGLrlyZIg/Hc3EhnLkE/+X1egOIcmxWZNBBwCbAVXSCL\nzLqgT6ZiU7vBGHsjzn2NLiJ1SDC/K0vgoYmCLbyQawKjFdEyLSSIrvUgKLBN\n/XYxNVljfC5mapku5nd/KAUCSWbkQPX6Yng30sGaItTO8NPw976Gt31KMG1/\nNqlE4h8tVNji/VYKxHUbNCEzmZGuUHtivnTgKwCZDxEDb7ms+SEfG420UhOi\nC3rgPXK35DgkbA5VOB84JGzrAZD8wA1np/UCsqk6csAP+W/rne7G982TMOzS\nYjFDWYd53dK1SWZMHwPEuU8+6ABMiexP3C4aABUtN2q53iVjz98tNAy0f43S\njEmAwFEdVogyIKCf+MF8iGW/Ef3bxhB1zBJGRhraBIAl90/Y8iQEnc2aH5RE\nqCIG\r\n=Tucj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTX8PudDE0eLW3gwOtSbpyJtQrP3GEkAT2lskKsrWIcAiAlZ5l6PckpyDhRzZDMHWryQtvklMkruqcWOtg350kiBQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.1-rc.1_1620713397155_0.3635610427388076"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.1-rc.5":{"name":"ipfs-message-port-server","version":"0.7.1-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.4.1-rc.5+18faefe8","ipfs-message-port-protocol":"^0.7.1-rc.5+18faefe8","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"18faefe8bd4ee1f671919672917b848436247138","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.1-rc.5","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-8zTj/wXu+oKtI6WTstqIDxGoeMElnXJPxEcxpA1DjQ7FOhVagRgSMUZgCdTxlQcRIcnWosN+SFZ2auhhd0w1CQ==","shasum":"7063e916d0d669f5b1bcff4bed84ffbaaac9e179","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.1-rc.5.tgz","fileCount":25,"unpackedSize":103964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmui1CRA9TVsSAnZWagAAJ14P/1r/jZcYfMc7OeH4pbaJ\nyMa9CG85pmYFKxP44t7sh5lgXjgb3jh2kaCeZr/oAB1R9bIzMY9/V0I/KqWk\ncOK2xaDTq24+a4aSokkWJUlsnH5G4MGJpQBY2JVjGehi9rECvN1IZifuDWan\nYxjKqmw+3kQQVTocQFl5oNKBRsmUXLlPpnNYDFGwfjpfS2ewaPfGoDo8Fe0J\nOJYPjL076Z1/MqmV1grTo+hARiH0D23ZG7Vy+kQ6tWW/ZPe9KJQwlQUqQr65\nMubiO5ZMlYkAE4k4CgSdvC7XE+yG638N89mSdlSsSSVkwnDIDyrs7bhY/sUs\nBXMj/p0WwRZ0TWuMkjc0yVIZISV26ybdkzJF2LokfUBzA6Itjk3iujqwiEpz\nONuNSX+h74oc76DcJJh2+xmRgBIDOQsBpC/p6SPRtmjOdmxv5iTr/4vUtF4P\nNiuqM36JffVR++Q9D3Naaz+u3ooGVG+gbVRo+DBMveqnMl6xTWenqa49TG/Y\nytSPdyM4JdFIFtIAxqu9/vdQe6tz76aJs0nctiqXoZ40vHEtroFdcpzH7s1R\nV9NM3i1nzoFiERVs+f3BD2BugvVbkVINQBF0Geu1t7mcV/9iAVW4DK0Va1WQ\nLnLGagddqJeisxoHyVmkMLMofIBgl61rlIvyE1FrK/DpWMFaOeTilGD2nKTQ\nGNdE\r\n=fX72\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG0a8RL3Skq++dnich1YhnmZmZzlsNnha3kqdbpXXuTiAiEA+6h/GKjg28r165VKe4D6fac3Obi0Gy+rmbuf4nIeHkI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.1-rc.5_1620764853247_0.5472216733567326"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.1-rc.6":{"name":"ipfs-message-port-server","version":"0.7.1-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.4.1-rc.6+311ff504","ipfs-message-port-protocol":"^0.7.1-rc.6+311ff504","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"311ff504a98ca562e738eb3bb60fddbdcb5eebf2","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.1-rc.6","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-4L1el7US1d3ztsgFi5ENRotWrtIpwLfDMPVm9bdxtE0qdtE37oc39iMPQWIX1B9nuh9IENkezXiKQYIU3q0CLg==","shasum":"dcab77da138124c39967ad4c7fbbe2f98849867f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.1-rc.6.tgz","fileCount":25,"unpackedSize":103964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnWrJCRA9TVsSAnZWagAAF7oP/0AdGBhkEHastqWl3eY8\nZllKeD6pLkeLKoRxvoBLxyaIWpNAndykyFTJ1aNDjv/LGGlG8IyMNJfQNCtw\nkr69R9aXmKrH/x8FoGy0E0WY5zm6NzNmLI4Y5Gd6HJJ/y3eHtSKYID+o0CpN\nBP6v2W8cPMWrST/XaAyBnOwpafwQwuqumouE2LXColRtLQojoGIkHs7HLuBD\nNnO94qg6bFekc2AmszZOej8b2oUna0fBhea80zSwHZT0ppW2ddngUlTaYbLH\nz5GMoV+SrP4pFUuKeaNLzBxwZvrVabBMRGHYPznDTqYF8tM5/dSZDuEVs3DG\n42S4qbYjVNGbM3HEnmOhUKPIVOpYpa6o5wYL3LZ0wLlDbmsupKzoi1cxP4z2\nOdfaFIENgLH9hKlDJ8zKKDgXZn0V2Thpn532LHvZXe6v/1ngKJVF86Ly3f8J\npfLcZzV1hEq+4iGLyEnG+99dqQjsNnFhclvjp5n1Nl2EHtjzWiU+BaUFYZvV\nDaKjNgqy60B5a+iBiSdnkV65jV5XnnUAWFSmEW6HQZ2EMlyOTfkDzXqe6YWL\nMwrZpSK9qtb2k8UTN0pGK8tRAoM3/2t1kS5F6L+qIHjeqR5f8xn2BzpNfiz4\n7Tb3SSo8T+62PquIvWljpeL8XPrmdLOftD0hZa7OrJf33c/PXGb4lXGrOAfy\n6Jn7\r\n=b6Lk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+z2gw0A2ySuWybhbiICxN2c+wA5X511/jaq6Yx7gFkAiEA9q8zHDoK1TH/ZcH7dRBPjd+skL5gKJXFonlgAiv63Ic="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.1-rc.6_1620929225034_0.9738816365043028"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.1-rc.7":{"name":"ipfs-message-port-server","version":"0.7.1-rc.7","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.4.1-rc.7+1926f990","ipfs-message-port-protocol":"^0.7.1-rc.7+1926f990","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"1926f9906bcff5bdc8d417a7212a9db52ace7e3a","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.1-rc.7","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-jiKCF4lIrEE4nCrX6JkZ2Bxh+vZDf/eOSAlfNLDytUua4FRA9zHtwn5N6102n+PSsZgwPDxFvSNgR+lQcO/Axw==","shasum":"5ad17fe52233fae5c9bc339efe2d669110c212b0","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.1-rc.7.tgz","fileCount":25,"unpackedSize":103964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrQxaCRA9TVsSAnZWagAA4CQQAJ+0J0rW6JXTzJggwV06\nn6y77hYx0Gd7m6Ls5s2R3CVJe6tz1nGq2eAMitFm0WruX6lH+ipuhDeW2e2w\ny+T7PYQHOmL+yjH5U4oChXKmzKYuwspBI8K7vJOzNHKwXUiuSZYfqZ1BDyil\nDx+d95NN5ZNWAehAslPp+0a5vMgMVRhWSyokq9bb6uWDy5LH8oei/3+Ei9fM\nfYZ21Wio6tJt0wdxcMPgYI+ZAVzBiCUHqBg9ulbN8xECYbIxnNwgM0BL9oMD\nBKKFfGkB42Gd60Soo4jP+2ViQnV5c7eRzDCgkCPvHXlpd/d4rNJjoM3JJG5A\n+dj2ulbTimXaElgTzw+ZPG9CTXvkDLIJKyLUGDJuq8R3nAAq3QyiTGmzVkZz\nmQS4Ef//TbE58L0xIbl+QwrFU0bfD2InltCt/4oIaUGEtYXYjPm37WARHH7B\nNm+APLCAm4X4njMvamefbsKw5PVXEAEJW5kVCy0jZiEG0TWA2Ov/8pr98N1x\nbp8deNGpOXbVOPAgGfLLk88r1FQRpFWN+AKGJdxM+zR4jeArulNQFJEebd5k\ndcNwhVbpzFcZzPW6zRdg13N/bQEXbc1yyJM7aIaEPp8CBMe217ZiXHu6sP9a\nQXx5FFrkr31kqxKyv4wDl2GoUKaBHAqUehCr30QvjAyr8H7w0l+MyiLfX2Vw\niZy+\r\n=q+uJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICIq9crMES14wVe5Z9QScv5gScgGNXQC6SUH6T/PjVWeAiEAxGlkBk00gtbGNcOaokCAiJRf39cygaoULOE6DSOqV4A="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.1-rc.7_1621953626221_0.3422227447248891"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.1-rc.11":{"name":"ipfs-message-port-server","version":"0.7.1-rc.11","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.4.1-rc.11+e91a1e52","ipfs-message-port-protocol":"^0.7.1-rc.11+e91a1e52","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"e91a1e52b86fcc9ce5ca5881e8721863b58d5d9b","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.1-rc.11","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-A4SWmOkaWAcxH7V6lmBk2ajAwLV/p/K8fid9iY+gknBvERVGUaXTQ2rj2EEf6qU2kOSDWvNXEvvegM8sAXdkDA==","shasum":"0138acc295fbf5227e646aebdec1c898a9543a6c","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.1-rc.11.tgz","fileCount":25,"unpackedSize":103967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrSCPCRA9TVsSAnZWagAAN/sP/0aH4BgaQzoHosM/hYr/\nHg9Ar8+lAYFpQ0Sf06iKnmsedNLcghw8oN3FQmI3U5L4ZmYqa3r4t0wo7SX8\nK2kkLcaH8MWZ5bnAgshXNR4uUwjo352uDAjR/36b/Cn/OS2PgDyqm6eXw7BU\n/uzmegO01Efz4pwn60O+Bv1T32zOfBReya8EmYxuH3C34hp5YBl/8GFB6GuB\nutwzEjPf15wFm58178w6EUutjuYpYYqGSdkm9U6m3YsQQApKfNjG1AxD6sGl\n89HWFQSNG8Tc04xXgheJNz5v/BfAU2Xq9ROwTmvwP8nIUVOGfZg10rnOQrRS\nQA1NUK6LI1nzw8hX3n9hf+lD3HT8phTbxhwKME/tDWt3fZ6NamOMDniAJNuh\nFMTJR7NLEYGZkukdQdobLsR2YDCrFw8+apGEGpI7DAZ+DDFFd7SMeY4EhImm\nohaE7q9AsHqKhzcugDLuC2prcglEc4aByyMjmZFcgxWV3Bq/8NKmlthUMejN\n1NP0BjjuDBO4EwlCaYPbzfj99M8nNOar5QR2jOCvOfnXfjJ4bSF5iL3G0a6x\nrCa6VmOC7bUatlx9CvEvFvbEx2JUlMuMKKhxvDpPFEj60I0ENmC2s+oGVcSd\n6QrjYVm1EtH9/U7bdX8oq9jbDV1FcAKv9J/JBGp8nP5zkfmDGnClFF41WDVf\nmQf0\r\n=u8xh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4H0Qg/AVW4XZkHGEb5xUc7F1b8Dssu1sy+04aLK6X5AiEAmleaPeTOqlqLMs6IA48T3/V8HUFd+PMlyMq9vIkZx2E="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.1-rc.11_1621958799475_0.8404464021911193"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.1":{"name":"ipfs-message-port-server","version":"0.7.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.0","ipfs-message-port-protocol":"^0.7.1","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"c40960358550b920d3291b8030715537a63c63e4","_id":"ipfs-message-port-server@0.7.1","_nodeVersion":"15.11.0","_npmVersion":"lerna/3.22.1/node@v15.11.0+x64 (darwin)","dist":{"integrity":"sha512-T3xHgVmPfHHnYHsJzKcVoLEJL3FbB3Omz79Cjr8hBto1POEjGef28MktLOVGL5UV/KOAK7Gvn8yo8v+WWjU/nQ==","shasum":"cc0734562f536f3b58e438bd7e9983ab04363f69","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.1.tgz","fileCount":25,"unpackedSize":104129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrhXMCRA9TVsSAnZWagAAj8oP/jZyBsmDU1DjHJryCldX\nOZQrYUYhSNBFwUeBrs/oKtfqJH4Sf/S590cektRQwxikA4kQTyMJJ+hRpAxz\nqEZaMp+CCgUrazEMiLNfic1BfIItvEg2huwcQegwmfX/isHo6lHzYynhSomt\nsM+ms4D6rTcOmk/npxeYnRwOs8PbNYxMIoQldiaspSjfxrTcdsRTfKVK5YQM\nONi0SlV94D0dpmmCZMSLfCkp8iZRmlqmGqt3i4xoWNLt3nDB2/FNhPAzs6tr\nIL97rkXW+L6dPPQhu0reLpRbASTO2Vzr0yUxutPucJxfhPuPJe/4QcG+RFt9\n0e1uWQJYBP1to7WphtPYAOSO7v8Z7nSKv+/Tl1y63D5By+amncCoXClQlr46\nRFlU8ZU5zKH373V9YQtjzD9JysPDoJ5TPOKbBLmq3AwzOOvgoFGglWedgIKN\nS9Et5P/87VNcy/W64FvpClE4FnHbpbRgspIBSkQYW+rk0o6icKNl9nMCT+dB\nOpSBno0DYLKOHJnOyOPdJtkkQO6JDAlpsAuCGSprxV1kWFNQ+UO92TxEnoZr\nYMypfrqOf3u2aINKzMU8L8/H2KFrDtGBG177nFqvidfbZB9aVxLphutwuCbF\nLxa56vOVd54fJBWvMnynMSyIRW4Nmqtmf2TtHRiN6Dt2zq3ya4Isouvv19zQ\n31gc\r\n=wOlS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGfQxR0SSLJb42QeqxR3WnlJ8DipRp4kuJ9i1XOFAE/nAiEAphQU2lQrLkRYT1Z3Jep/w+r0VWtwHMUNfo4hj0OpYi8="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.1_1622021580387_0.06235019354575"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.2-rc.1":{"name":"ipfs-message-port-server","version":"0.7.2-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.1-rc.1+48c4a952","ipfs-message-port-protocol":"^0.7.2-rc.1+48c4a952","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"48c4a9520e4ed668f4eca2fccd67f9849e967286","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.2-rc.1","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-4yXeTFQkypfuh1ggblRj7OyxJqWf0NqmaSXRzdjuQL74vo80BONRfCtxMNLdiltFgFQjnjxAMHUCyhvFDf4LOQ==","shasum":"fa99563cd6c6989aa57d46eb1ffe65aa5328c402","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.2-rc.1.tgz","fileCount":25,"unpackedSize":104164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrj4sCRA9TVsSAnZWagAAb18P/0PbtiJNtkvNrD13AeeM\npOy6NOuRjHfyALmtgvXZGVvSW7WD7GiXpM8FcFjVtuxACIcnFW5GiAer6ehR\nUkJrK4MLyeOtnt6PsiVGbl3S6lY3zJ/UsKpr+PjUsxjTpzLwrQSKF2do47nc\nyBO3sR5a1VhMJYWdzRCmm8L3Fjj7cHuW2NASx7E2XzhuvVyOakx+hDCN2ZUc\ntZ/g+W6vIgQSAX+VSoDLERVCQZf5JFbIg/LT+LfqDUAGe5DZBacieloINXhK\nj4jD7Q/VMNJNBCWwHXgqsYQXq930qy7X0wXgUMc45bk4XwYjRq/11IYKQdGc\ndYMpTvm2Q1u5c2ex45X9X5Kq1OV+sa/MmyXOMYPCl1wdyCwhhvrN8SaUKMiQ\nVCQJxK1ILNUoxvW0OPR/mxkhnxbLtAUBfLBtYLQDCgT67Vyj3BYjQzqONgry\nAhGjGrm9KVGLZxMqFxXYRmrDiGNrGaNF7B0CzmBcS4gqsJ+wRrKZl0kvHHQC\nCjzk2msJ+T3Bwt2Ql8/L4cn2BHktIcAaw/bCNexc/cI1KGYN2uwHLf5UxAyx\n8//OvZ6KwhYImr4IHWNlBjThCFn5PxllqMw1vyAVvhkcwYkrRCFzt+UCgYB2\nHcCyx0++PNU6HC0zMmjLKQVmzURyWTd2yV5byrXeYrCp9zP3vBTQzB+ygG4T\nDXPU\r\n=RaV2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF4zTeq4QlYtyGJfii4YjTGGRoG39U5fAynUNPikF/aLAiANnrdcglC4SXWcKdXNYyJE9302pBxZFBkxSE1lDm5IuA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.2-rc.1_1622031916033_0.3448525355721286"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.2-rc.3":{"name":"ipfs-message-port-server","version":"0.7.2-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.1-rc.3+ff56373f","ipfs-message-port-protocol":"^0.7.2-rc.3+ff56373f","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"ff56373f0606ef2c59a61916f02e42ff524f16ac","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.2-rc.3","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-1MvrXaRgA88xitjPTbdQq7hLSI0XXhOe7gcrbpNjlUdLc2H4mrw+Ror5WY1y8Nbw2KihPjRRRzfvVJ1nGLLHbw==","shasum":"35786715d953b6b577c8661cb6d673d4f9b84a45","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.2-rc.3.tgz","fileCount":25,"unpackedSize":104164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtpsECRA9TVsSAnZWagAAEykP/icnifb0STTZRwCiAA6+\npu/Nf8t8S5m3lYTxKg+TpZ/6rwtiG0ZL5ZSDDiiYfinC3HO5n24UQ1GhB8Bh\nXc3pmIK9Eh5Vrx1e5wlIudrDvt/ewHUunQQvNfjN/XZTbVpAsajlrhT+beFO\n4shrW2HmjB+yzRUaGthxMYaizhIFKJuNZj86wT0Cc/eVhG28U+eJ49frnAEU\nTmwlmpxRbzfEKfHuPUNUMCGoK8BQxbzvvgeGVat8n2A9wF1VIxNmFnS4fnXB\n2/jinfwJkMX/kPqo6zL2vHGBsRfW47RJSl+AqxnvUteTkL+TsxmScR4BzbLv\nXXHi9NoK5RoaDazT4DH3GYauSp5KMOtUG4Q08sdPTCTcMMkwibcdHiN+IeiU\nR8GTQSIwo6mesgfzSCNH7UWrp/zsWpikfouO72pDQvlDTm36gyRiaG97LEm7\n+2+NKcnVRnRqjwJW0SxJk66JDkX0S4+x1jep1HE7dEPhq+hfrN4u6vPVEEEx\nV94K8aw78CNWQIFZSIRBw4ECfvADh+j4KwHlYapm6woiwXtqL8psx/UQpYzy\nKBW1PHGhAZYZYMwK0U5nfWp9t7BNkOaAcU4Ndht7c5S8iWhZw1kvKz/mS3Qp\niSPJgbAWm3lajqukQW8Kw10ZA+3seYRE8LT5MNA2hQOHpzCGp9N6D56wQ+LL\n02qj\r\n=Vd3L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0VJXX5un9vVDKegsWQy+i3CVu39PDdI+h3JK2xkuH1AIgIYrYMOVjoaEazVt8GfGifQaSzuIorAHLrEx4HIUyv/8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.2-rc.3_1622579971899_0.5548827603082904"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.2-rc.4":{"name":"ipfs-message-port-server","version":"0.7.2-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.1-rc.4+c4a1aea5","ipfs-message-port-protocol":"^0.7.2-rc.4+c4a1aea5","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"c4a1aea5addf902506e34d3d9821285ff0423710","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.2-rc.4","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-MWjerTyB2wRGFs/rFg9NTIuDzXM3n3izYoBxx3P2idVNz2hbUqpH+i5pFaApby8fxYI1miIwJGjwekypjcRa4g==","shasum":"8a0a8617c8e1ef3b80118a1aaceb7969ead1db08","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.2-rc.4.tgz","fileCount":25,"unpackedSize":104164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguxb+CRA9TVsSAnZWagAAZsgP/1KQAbPSEKH23fr25PpG\nO5F/oS+/u3Dn0yR3FMsAseuz4g6lGTRmf8j7cSyp/SIAxz7mM9cHPYef2fMh\nshVL7kKvRm5qcjZ9eX+d6t2l5uw9S0utF4RZb5F0o9cfx6p2QggG76vENgcA\n8Hy2dglw+hkMPSPXhZBnN9oKu4pJvxcpjUwt0CGqdzcFobozUAY4h3XLHoXK\n94kc6SoeibBhqEmD6te98tTEihjBHs1edW6LjEzvg/L7sSLLgM1ew3y1Q3Uk\nh8jqFBMx6wCd9M6L330UmWLMCZIhVtvf7aImtNbFkUbfS8il3bbMIXpBCYEN\n+hOXIzmnZ3bLRpecn9IJUTqjgFQiCLJr8pGsSRmQhddYJD3OqWjGevG19NDK\nIOL98iB0cCJVXDDwBqlIkLpwHT6L4VMuzAXAdyJ1FLFhDL4hNklQNb9TgkZU\ngTIoWPxWVAnw95Cj8yWIRiQ0R+zeuRYdby9RQBsae9tCMGmyTcMAs46Ydyva\nOjmiitOnojjim5dFMpA2AMGunbOSQUtRMR8TN5g5ErE74gRii7icHk32/2sC\nBIdSaydKclTnlmmKYF6gQ3Ndx7fRB4FVxozenXLh4n5NJwY3t4IsIf5SzmEl\nuUzUUhQqehgP2283kW4ht9v9JQV9MlsehznCTjZJD2opRCx1HVK4WYcI2RTL\niti2\r\n=i65r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEETEEVsafNhNeorfpjPm698RU6BPrwRT6WSlMqq5wSDAiEA73aZjsmMdw92TGv3h1lvmpFtNIPyrO2Gz1BihpWvrWI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.2-rc.4_1622873854824_0.8818622880220228"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.2":{"name":"ipfs-message-port-server","version":"0.7.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.1","ipfs-message-port-protocol":"^0.7.2","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"08be8beb2168f39252affc8e840ff3e185c69a44","_id":"ipfs-message-port-server@0.7.2","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-P+/SbT95AKCh8F2+2LVr4D3rTqtC4UxffVDj2DdT5NHwDkm3oXAn/LW96OjUYFLaJh1YjQhRtyESte1jZA1Pbw==","shasum":"07fd43150e990072c4e96804f288a0e41dbe1a3f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.2.tgz","fileCount":25,"unpackedSize":105161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguxqUCRA9TVsSAnZWagAApSUP/iIx5DJYxaoTTlhq91tz\n4axb6CUrXY/+hMRxpP00hlgjcFVYoGgcBTwRoZtie+h8ii2oeNoLmkoI+6SL\nbx1PKGLOy+MqxPxhPojwS1eJD314fdFUkxKERdkBfZWdhdeZCW42LbMxe0LP\n09hFXM1OLiKB8M8D+dvWMt2oUysz4j2iEbvOSbSRTolT2HFTG4W6h4y6PCLE\nt/vhfrmS7oq7uRe4qCJgH0rBIQhpL4mTEmLghlQVnfbDQUuDvZD28Puyg76S\nUv41ma4aK7+9ouydn/MJMvbjMXDmIqkbUObvXOfueKVaRM/BkpPxos0udSrp\ncGTzNA2PRg/2+iAtuPShdvoxlBumpBVUUUB/m4b4uqy8CiaHhfHYdzJdIMCb\nMEYsUOSK2KjntJ4Nul7rB69Q5OKT1pGWTE0rTWnBcstxtPxlZzDdXP4kMH6a\nr08F6Vh4EhyNIUOlvIondQBtJqzYWhgNfgThjWB6yLPDnERZV6MXKMUB3QOP\nMxF3FQxp2hDTqIaXaTuLcWm2joEiZMFTpYSi1fz/NRKExMLisIe8S6WsD7IN\nClgZQNIYHfzPUTdt3xKPivwmPkGLzIZcG5rdLUlUVx2xBJXmLRWj/PhK5A5+\nu8ymyMEKtJiautk+Wi4P+dDFSMgBR2eLrE8vfg6JEAlwe1dp7aPXj/Dg4FSe\n9U2e\r\n=Sz3F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfxI8V/sQ9x2kxBqTdb3ykYSmfIpeSsn+4RPu4VdlXNgIgSuSOLDokLNQTpfBPwCjRPV6yVsZoRhcKndAOluD0PoY="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.2_1622874772676_0.6634898104823663"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.3-rc.1":{"name":"ipfs-message-port-server","version":"0.7.3-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.2-rc.1+714c3de1","ipfs-message-port-protocol":"^0.7.3-rc.1+714c3de1","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"714c3de17f4833b8dcb7c0ff51536661a22cd6e9","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.3-rc.1","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-G8TQrhcbp+oVRc9W8PyrFrqchmhNTqJ/zXqjRBv/cdybt2nLaKrwtJQQT+zDMNJjJ0n0+kDdUlUT+P9iBTZk9A==","shasum":"5d4c614a81ec64af75d3291c75252c72d591956f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.3-rc.1.tgz","fileCount":25,"unpackedSize":104364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwdrfCRA9TVsSAnZWagAAL+sP/09TeWpHlVaTSKHsUWN9\n1Qj/ZCIOcovQskiO3G1XNNWI2l21qGupWJjB7Xh2R4ZP+1gaI4suD+Q0zTVB\nrk/UlkS0MXtLQhtmnDgwngGZcrg9II8Bb5AYTJLT5klH+22CciKgF2Ci8RZK\nsPo3UG4DMityWH2ImPUkR08d/DaLVNkPiRkApCkjd+X2zQ9d3C7TugkCHyjm\nAhbfupojG9y3C7IsAKBmoMg9wquDBRdEFMjSAfViGBHjI3wthR6ec9f3z1yo\nKM65+l/9gpspbCFgY1/Wc33BF60XAjcoKY3UMTXm4cTiW37/BeFBnvF1gPF6\n8NT1CJF5NnPuj9tnt/VBcW5V7RM/0cpQugV/+JKJnQSVZQU/DOnliIa6gAn8\nwx+Epxx9mDfMfae2WAN5+ZGnwQHWvCDIJApd/senwsJiGMM+cFNWg90s0O3n\nqi3Yn8YAZdxQHC+v3U7z5D7Cm32bH6RRKVj11jnmtZ6AHNLh8G41XndOyEB3\n0J4Fra9TWIsRlfI7DkC+yujoEGjJ23SYDhhG+Gz8y+L1X8q6t+JtuQSFHJNa\np4Fo2qGfeGPsIhVwN0IH870ABgXF8fQAHmMJwPEChO1FM/ivunHEURFuD0Tl\nGg6F57w4EUW+9ZCp2ALaKf30PTLTBq99vJQifUA5r5o8kqKzc0fTK2svoYtW\nTd1c\r\n=5013\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDralDzRRQ1H+nAL9zx+g9/alRqoGxpyT1ULLsCvHmQ8QIhAKaxkXqboOwd1BqT/BPHLewBeZo0gXoaiXiVr7cwfLLf"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.3-rc.1_1623317215023_0.3711959949895445"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.3-rc.2":{"name":"ipfs-message-port-server","version":"0.7.3-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.2-rc.2+bf44a037","ipfs-message-port-protocol":"^0.7.3-rc.2+bf44a037","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"bf44a0371a53325a8ed10c93ffd3514b995185d4","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.3-rc.2","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-PKHvpV5tRfxTVMff54/1pT4zEqPTJzeDnFZywUQIvhZCyzu71EHKlVkvrwfkxGGJbaAkfMhu0RxeQmYsDX2i3Q==","shasum":"399e508611e7cf0a7f79a7fc76992b2e2f8c9d70","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.3-rc.2.tgz","fileCount":25,"unpackedSize":104383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyNoPCRA9TVsSAnZWagAAsNkQAKFHkk6jFDSmIQrflKoz\nELwR5XU9lscIW9TYKhBcDHxLLAPyTJFOkgWKDbXqiZbyezMKirMJM6/6PWuE\nqfzi6CyvlwULeMMBHSIwbQ8Ed5MNco79KcbXt1noeAjGcG7MnqBMd7LCWqZv\ne1GA8S1BuJ3Rzir1+hEcwTOinx/3omoaGhKbNqIQRe782ap5rvxiST2Eg8Mm\nudWxbpi6ZZ21GfPJZSYj0BoeZKxaip8ZV6bpLjreGG5DVD6HJd3ozLjhnD2i\nh9Pl8H50ByBXAUQarqfXLIjMUs6pAMfeT8XGE/VIFwKXe+7NI5JTblMOQ6D0\n+UHJ6GkYuGGjB3oWB42sDn5ycfEudGsL02q0blJOzatSPXbRmL5UOUyonn8l\nHcG6I/WSdASY9MMoxnj7oLfi/bN0q8eNzNtQym/J8Y6KggvMhnUOtBpfnVxU\nL7ssf/+AdszFZI8kFaapzAxi1IWPHIvyIIO5zQoin1f/PQG0mw+5rfRJtbmD\n6NBsRsY+dEp3nHb4MYVKvcXFwwCeN188xt1tQPLoPZyiQxZBnmvVBaFu58N4\nAAGaOx1DPt1uW0nUay2xZjinZSOOUMfYA8YTOiAhE7/wdw1tRmQ5dPbCmfUn\n1qvuyMNf0J0kRIB9hVXflY3xtHeUSdYCocnj3sY8N6phhYSfDsTVvM0aFuE0\nAgLv\r\n=MAw5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyhDB7o2mvbBAScP55gx0SZdj0N02St5lOhGFt+h57AAIhANytr57JAlpRjX2k+2brsD97/ZVzQ5cP95gTlvS35Us1"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.3-rc.2_1623775759574_0.024670772795432283"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.3-rc.3":{"name":"ipfs-message-port-server","version":"0.7.3-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.2-rc.3+b1bbf5f0","ipfs-message-port-protocol":"^0.7.3-rc.3+b1bbf5f0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"b1bbf5f004fde7a26f8cbf6e0bd7356f07dddc94","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.3-rc.3","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-cwlw3jdOFBgqAu9GRZn87C0AbbSyj8N1k8WVYGd6SBl5Zg4Wh19GFmgTvb/v+KDU2BlZSwAsdOstgtu3CCusuA==","shasum":"37ab7f9491121ad5d08a50a7739b8bbab845df8a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.3-rc.3.tgz","fileCount":25,"unpackedSize":104383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzFU7CRA9TVsSAnZWagAALFgP/iiPWE5F3RqeiHbkDLWb\nFnPzXZrbLIabHLLhJD9nZCcD1NTbeB/pLURtfv164fidDB1MNz9HxRyChl9p\noZWpETYzoda6zsRTdn40CNgka8QRYhLdcflI/NyQBgWUUeniB5PRReqRLEfk\nr1jhJQVYV4lVRBudI67UtM4zCREeRAWyEZDZRfFXY1taGBsTPTCp1WiM26iU\nwGDS9O3Mv2QbNIkLZ7wiUHHHzxFMu8DNHv6pgcnX1kVHN1x0GeJpJEGREQ+r\nnKj+vw1Ma9+ELg9fDrHqSGRcsGaJO+AmZzaXOVojc/jZs7W15hpbsnyqxbOZ\n1EvMNSoT7qQtzQVoRBA9zNsdONpsaDbpe35BdyAr+9P8RhzdBUBUKOx9KUxX\neviG+6EWoUPOfJslvyR75KCGxYJolukflyNpsNmve6VgF1IrcCXXW2PleAft\nB/umbEo35U3/YJoji30kaFKhiYq5wksj1Hrly1QacrqQhHNsjqFv1e+8vTyH\n2YKHrIydBpjgiXmbJKtjNaqOkR09he548Ipi+hQAZtAXj3O5gjhjo7wbo+uX\nbzCYpdlUgl6y0sgMlcsXyN0Q0KpuQG+OKahTFgye3cdTehWB/Nro1b6V3HkS\ncJbVsGTfF4uJrViBtK0V0W3JhJoaKgO6vPvo4jzqJBIgIcRSI5r3Jd23YbD1\nzqG0\r\n=DZ9t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgygc6LdouCZ8tAhzHCYyR+icmstGarp7cHweE+DMG8gIhALNvkCqUNoxDLTHxih8rek2UA54e3azd2E8PaNrAgVEH"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.3-rc.3_1624003898522_0.8994228208885802"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.3-rc.4":{"name":"ipfs-message-port-server","version":"0.7.3-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.2-rc.4+7c1afbdf","ipfs-message-port-protocol":"^0.7.3-rc.4+7c1afbdf","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"7c1afbdfafcfb81f698cea35cfa0e392711d40a8","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.3-rc.4","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-YRlt4Ef28kOpCxfivHzLvFBMMMM8MIPF0pY9R6Z60dKjK/ZcJtMmYx7C5O1opMRZLqzAGpDoFI9bOQi9YgUSRQ==","shasum":"32c3977d9ecfa474ba21c6cf917dc627386bc726","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.3-rc.4.tgz","fileCount":25,"unpackedSize":104383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzGWOCRA9TVsSAnZWagAAqAkP/1vVltfG5SV2am1zTWZ9\n1pLoW1QNoVkz0u0/MXD/IgOJYetvIWJf7QQPS3KjQXea5iENvsuixwqydO9n\nnobcXnUs0z1RfB9lfJoDtC48Y9Wc1wRUnmAP++lIShugsh5o8ZVPqQfuE/rg\nVB33pIrViMRykPeUTN4rM7SuM4xxXZUHjzueK44QahX6lECrxOBgj21t0cDw\nYfbVjgs9N4r119TMRkkWU0sco2QGSoPUQsWCNeERzUBUOn5JcMOyukvYOY2g\nLvVcRIi2Auexhod3Le/uD5WDzxB85NtzHM7TDjm9VnZr7Ucv8y/8GRzuf/r/\nNHum+LK5Qc4fPFA7Pal+8yiNTnd2XdBg9+4DDT72lYwy6HHTb2eZoIF1fypM\nqrfzRelgelIKFDA/FmCFIMsxwRRPE08b64SZOHguqXTVc2lwBRihNKkgYJ9m\nLAdTKVVJtEQLl0O3uuDDijPLSyr4E1p6K/kyAxjXpQw2vpJGeBZ4xVsD9myR\ngrv2XNHPW+/HSZ/ybMEvABz3zkA+F4zueWGmlSYC7hrsUUTq3MBdf+3M5sTB\nMf7ouvT/V4INXhd2pURWz0NIjp9fVxUwiDaXGAZcPgyw1fpHdNfsshUGfqlM\nGhUmZFQRYXWZ12c8RfA99s+r0wPjZ0I5Uhz5kT94buFZwhe2C+faoVfGjYld\nTHHP\r\n=C5Hf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5ieXCmy6ui2B7RO//nfXyiSKpFpweg5vomHhggGQ9WwIgCzkB0YkhvTQTuCN9nOmFJNPSOmN7e6CQT8EFZLuSEQU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.3-rc.4_1624008078323_0.2451567921997797"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.3":{"name":"ipfs-message-port-server","version":"0.7.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.2","ipfs-message-port-protocol":"^0.7.3","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"81f944163f5a78ef15fdc23b2c488ba7f44af0be","_id":"ipfs-message-port-server@0.7.3","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-ucZ5beadsrm8EhR1sSa+sly1XphEm8BJPqbsB4sVdhOFAAJDHqxTlPhkG340bki7izfKC1646HaUb3d3hYqrMg==","shasum":"943de338a6b5ba887e0477fdace60526731e8eb1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.3.tgz","fileCount":25,"unpackedSize":104555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzIBwCRA9TVsSAnZWagAAtKcP/i2ZS+HowP8d3thY+mBz\nG/gQOGNP747gi2fQsrFdAlhK6V3PJrA3vjfFz/vv+LSYDwl9AeP4VdJigVfg\nqHucB/vAcCz5TQFBBx6bH+FTdOesdlBVuyW2euijSBd5OtnR7OIsRuGqEc8q\nkoAT1xx7BDudF0jnmvC8X09zQUShayfP+Y4yLrUZYnllhUrwxzZh0zA1Gd0D\nh6D9cpeYy8eiHTj0BJzSftCa6gqZeQdPvfT/+LyT5B4VU7QybFkip31Olz+X\ntjSqjN943SSnKDXA3DmznNprmZGvE/GXIfZw07GDF+ctwJ6A+XB+VOSPDf6z\n5e+Zd6EDnPUepq3C0NWf4Q1+B0eNZJ9GenbWBEVc/MCG/N9fB2X8gjkInuZn\nFSl9rMQlL8XH/+RHScht2+o9QUAZ3ClVbB7YZXrE98n4+M3rdGQS5bqf39Be\nUl9pj+pIunNDFWlGEfKL244daO2RlsJoMG1xoqEech8wiWjE887zY4SwnPLJ\ncvPw/nbbrk6oL13VmqNtM9cB7gtaTTS7IDCODXvIpuAxohUn1mFNVLfGyx+2\nF2qDNgG/37DTrSD2AFdPWQsMpqE3OGGuSeHAlNys4sVzozrl+AX1KwwhOexo\n/iXkyhSUrOG4XkceIEcEurQ1zoL/FsQTgeUQblW7zmIQcfDjDY9SWUSms8+N\negIR\r\n=OW30\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWMyS7My9MBYkE7kKrpVA979+XrI6dJE6ybvvQltBHPQIgSxDZeQ9h3NEDCJuqXZFvXxVb9Jua3Yu36fQ68F5U19w="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.3_1624014960280_0.1632379136662836"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.4-rc.1":{"name":"ipfs-message-port-server","version":"0.7.4-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.3-rc.1+f4b2a8c2","ipfs-message-port-protocol":"^0.7.4-rc.1+f4b2a8c2","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"f4b2a8c204271922ea34ef8c060592eb56a2a1bd","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.4-rc.1","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-ebIoi+jwerQReKASHFoCY0E47DQ+LuwLYyPBMF5XF5TcRnl1zOJGgtM46f1ZuAUps4Mf06UxGWxjs453Lk2RJA==","shasum":"432e325f88c3f108ba4de2b74092db2cf484520f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.4-rc.1.tgz","fileCount":25,"unpackedSize":104583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzMKaCRA9TVsSAnZWagAA6fUP/3vAWTuvXFwPRTEUyGZZ\nB6y3y+p0ipmXlug9Z4VC/SfjuxV39YGSgHKscqBqn7rfutGf3+8zscZGUCSa\n9rWDrTpXsQfLZa9zd/HOkD1RtJLvXCxWpDgs6CtB+qvPGMU8wiEkJsA1NJE1\nfmPdUaEZcEoGpslYOlz7rMsVKy9XsesWCSrEnFQi5IxxwjxUh1YSPh7QZ+RM\ndSjIzTHcmN/VLUEdGCmbIgx1ZmannluB+4rKsHoOoB32KEWBD8W+2VvIZMNE\n9r3piiqdOcJonkci704jOQd/fBg5C9vcBoeumAllIzaWVcGwHGidmqCN5eFr\nsCfNYUcTEQj1gFmRVzLOQ5AG+wwPZu10mXU684tmArkApF0MDcdcUqf9DAs6\nCn5pLC0Mtnddbs5zI+Q6g4ZFzNPy4/AS9DT26jECi9nLKRPHO2GOP/9mE42b\nZFV3MkWKKqxtlJsjLVgYlN+4rZ0Y3eAvYTCNBn2ZESLWJCEhk5SbornnWz7S\nY5XqHZRtCZ/NRDk1h9y+jOYW9zjbLorh91fcsYepnMQlmVwkyux/2yRg9pDv\nZrL/y0NRQJ4LIJ2cXsf+aTo4i4hvTqDKNWF8PhwkjbIkmFvmnyMp6FZpgpYJ\nORdftvOZT7oAPauOsgQJqLlQttvB9KNzDYLZP86PCZXMmelghN94UB6+4LT5\nQWmG\r\n=EHW3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGawVESlh+xzgIuD+uhFPXbmdi8LyBk0a6Au/mFPAyylAiAteyEIgNTRIS7KD6WpxAOqqN/y1xpyYENKsNTNw/1Ifw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.4-rc.1_1624031898135_0.9747539775702359"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.4-rc.2":{"name":"ipfs-message-port-server","version":"0.7.4-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.3-rc.2+4a4a360f","ipfs-message-port-protocol":"^0.7.4-rc.2+4a4a360f","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"4a4a360fbd368b8b27653a81c9301820c93d91bb","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.4-rc.2","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-EpRNfhsXMvs7a5Zoetlv/sbXdO4l2blC8WrZTogxTpJlR5DwdU6liDKygRRvD+i7TI8As2F+GoTY7byLbsI5kg==","shasum":"c16ea6d1a975ef321ca2a71255fed8c2d8071815","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.4-rc.2.tgz","fileCount":25,"unpackedSize":105550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1fLBCRA9TVsSAnZWagAADQcP/3muoRSjDkw2NYiDAfay\nUVoxqutwI8ySnKJCNfef5PYx1NNoCBxla8VlSnz/YyhBRbWHAvffWHFAvKmg\nH3YODXUkpIJlQYEePwNB23QfDUCfJTHuz43bC7Lawb82RS+1npVTATGBIDip\n8i/GRztnfaAkH7GhXgqPiJ8nqTGSyorU7PACbIyRCY6G6vLVU9fyMLkz8GlM\nMfxznc1fiXK8ozff4ByrEypCrMvKwXXnB2nBmdNGxScSTesjwBWWDfTnq69P\nVpxvddwj8nG1UnymC97Qo7BkSoaeTRJ+hNV7lSwKBT7k3Yy1SBQsqTyyZFQU\nzN4XlNWjj/Oshx1PoiS+SpADDPWYJnEXJBxXboOrJHRx1EPkDpurGe+A3DF1\npGl4oMTKa9wQwV9y2IYv8T364k88BqKVnHmOFnr2tpInwU8MLt1Xn6KS5T6S\nbp2kD6/dDfJP4mRfx4MCszz09G2yqJNa5OjZbkYkHS93xdt1WDMReGNvewcY\nnacRLBUWemLui1wK8IDf0RcisOYo2vI/z4+1TfYDwgF1+STTKRTukqV2T1dO\njc8jS/0iLRSX+mzl90L5jV73UzGdF1GEHzX1TjnKABAgDKOrM+8L2KCr4yf5\nORyzBEdPrDYYeaRjjy4oazOLRT1Fa5YdqQ2U2zFnFIZG8e0CUcfNxUpjaQWO\nbwO/\r\n=6gjA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCm1DVQ2WTZbn8aAPrAxX6z7n0hEeEEWyu38gZGUx0LtQIhAIVht8OYZQCNi7m6MWrFCRUsvklM0veGlZmlbMcFUfRK"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.4-rc.2_1624634048708_0.46315564543931065"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.4-rc.3":{"name":"ipfs-message-port-server","version":"0.7.4-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.3-rc.3+88dee13a","ipfs-message-port-protocol":"^0.7.4-rc.3+88dee13a","it-all":"^1.0.4"},"devDependencies":{"aegir":"^33.0.0","cids":"^1.1.6","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"88dee13a9246d841648d31edf0db62e4a4f859fc","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.4-rc.3","_nodeVersion":"14.17.2","_npmVersion":"lerna/3.22.1/node@v14.17.2+x64 (linux)","dist":{"integrity":"sha512-7uZ7qUXOX/IabWSd0doPtdqT1AB7vGJCrn/UdfqEWbsbasjaBfUbj1+XHBMqA2uuiyBxC3P7wrj809tKvlaAow==","shasum":"8ba3a72c3f1f12362905f76cea07bdaa0f0042c6","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.4-rc.3.tgz","fileCount":25,"unpackedSize":105550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3eftCRA9TVsSAnZWagAA5YAP/0xyqxKtirvep4Lh3IA6\ne6uV/bkysr+6TohvjkE7OlQd+4ucYODIKKMKnjgB9I5zNo9WMt82DIHYnZ+p\n9g0xBPni4z3+nEN0pdlFB/CDmODaPtwBad7JNXcW5Gt1BDJvgthejzuQt+i5\n6GMG/+SToKuWXBnY82sjNyS+RK78xCdNJrH2ldscin2Ogwt5QshaMf3yDQDd\nIfRXs+XLtfFQCZwblnZhBL4cIdsoWUJGXz6Ah73rnemBTEhldYNI4inH0SAy\notqvsSiraZaRG/cAzmKpnUysuiJXjg/HZAW/La3gDFhJh5K3QzPjHK8FJD1z\nIF+TLlvVIyjihAtwXhjfZrj7Q5tcZffGOrRsft2qIpJSd9TiFbOCN7NsJX+S\nGlJItkVcN+5P4Jb1Z5AzkCFZF7IJaxoE8w2iZN5F394ZqzGxrDiJdxXAkK3X\nBRbpqwF3i6HmJZzGAZCLrF5lprTGewHJChikAb5AvLR5lMklzLZQAGrznwR7\niIg9+JnCwjrxefw/d0VfO9kWa4Lo6kEL0a3JeAerHr71b8/bRR3wONs2lO2Z\nSsW4Jj23sWrRxFsc0PoDoOUceo8E18+/oGyDeS3RmqpRyP3Mr8SAVcI5fQGZ\nUFDg+QTqbbBUJJt71qxcwFFkwyutz0+KorOZLIxiy3ueV1Z8zx792oUV+Sir\n4dJh\r\n=n8xJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+6UFC69SRjFW0ZdB18f2vvF594J9kEP0NE88qUYaObwIhANJ5TCoalsjmMHAY0ZFP2dDwYsOjUyJU3kaLFD5kp6KO"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.4-rc.3_1625155564576_0.6511215029931587"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.4-rc.6":{"name":"ipfs-message-port-server","version":"0.7.4-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.3-rc.6+4155de5f","ipfs-message-port-protocol":"^0.7.4-rc.6+4155de5f","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"4155de5f78134a6cbbaa4551d1b35e8e44b580e8","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.4-rc.6","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-3gYSD8SBkU12MNUhPWNFa+n973BC7HMEFHPMXZTjyI+P/lPQmofEY3SPj2lQia2y/a+6TGfFTJ3OxyvvKueqGw==","shasum":"2e16a6294219739eba9f8b746147cb6b4f490f3a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.4-rc.6.tgz","fileCount":25,"unpackedSize":78687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9ZrlCRA9TVsSAnZWagAA0pIP/RYpl20dg2GnuVZlAQvE\nk0yESpLDMlG1OCWS7dFmIu7SuHsc3rL9jlcVR/DJKnjadG1Vyned4a8QwWFe\nECit9lD0sDvA0lbMwyn842NvAc7OZNHQBIX8gTfkXjxdY4sdvt6THB2cszAc\nMA6OkmAVoKzR8E0h8OmekHJBf56gdxuVRDXwEgo4HiB9PqQZZcczdZlK5RkE\n2JJvXe0sFmBm+vvRnRVoJtRbyX/kz2u1o7tor2bv5n612oR3AjqnqfNDfP0T\nP5pNq5Mcy04wHEFB6UruCndYDiY+VXnrnDirJT4DGHPDkBiXkphCH6iDIj4m\n6QNXH3egz+5+YbACaSgyoxvA2JKZwNP0eL7yyNVn0YnIvYx/DWN0vWa/lu09\n3/CETxfexYuxIAjenvQYFr9BQjkvKcW2Z15448RF7d/nqv7FpBikHcgbOHTg\noU03AJFHbsn5BzavEwt5K+Lc5qZoMSKUEU7y+xxOEWpsn2XjkC+PFcC3SL23\nXfnS4dRSfZDV3bmKRGvvFf8Pmqi2d8x8bUFtKp9ksCEMiWdNz7m61jr8HZ8q\nNaV4sCr2sn6VydHelX/ibBYH6efu0zTqW2E2vowBMzOmj7hg+bh9qtwVrClT\nR8Xe3rXXEh/SKQ+qOY1o+4Z046dquGDmysR4cnEaRnVmQuwhF+fBYpQp1H62\n2WVv\r\n=YBdF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBducJn4PGe3yfTBOgzaKUpJy59wJDRmNU92qoTaEAjKAiAFKvAyr9cfGDIulX3zmEl2jd+Oxl3K23QoO+sA+VcTUg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.4-rc.6_1626708708991_0.799877891722701"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.4-rc.8":{"name":"ipfs-message-port-server","version":"0.7.4-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.3-rc.8+50361a7c","ipfs-message-port-protocol":"^0.7.4-rc.8+50361a7c","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"50361a7c0ea69489bb24f6922319601e3fd919ff","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.4-rc.8","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-bGi4EKJQX8YxubyYBVy/18E/qPzgxJ1+th3op957MUtylzZGYoHQsIUr9X5IVMq40CPbdyZ3iuQ56R6eu8D1jw==","shasum":"355246f0f65288079bcc157d7e35a3756a969835","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.4-rc.8.tgz","fileCount":25,"unpackedSize":78687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/9H0CRA9TVsSAnZWagAAUtEP/iT2GrNn1fCcL9M0BZO7\nexF4yTv7il6HllxpStuEpyxt6PQKeoQgVJi82kJV/buJSGqV7Dd0jzb4sZO0\nDJk6ooeobaQ0zPZX2CjT2bzvp5TXxBOH2EazIxBO8tXzP54NnRkmCwm/M4n9\npLB9YOFnltAYN35kqD/NuaRTqb8/lnwQ2QssyugMDpcZBBwif7vTp8HwHNGj\n2n6l0v+7vpa2iclkWbd8ZdkzwhBgIQVHNsFvl87uuat6IuSy/6EmdfLcJma3\ng4VemTitRZrupbWC7csnD+9Hd7n6T07kcDVetyy5+vK8R0qYZMTg/BwJxM6z\na1JEAIkyARbqdJda0YAIPPB9dQPRD3nMBPl/JVAJXGIIiTZlGiUtdOap8BMV\nB8yXAEN6fySxbExsevvz/mugHD73ZzmSwQKaQNL+exVTpiot6y2Ozd1+k/4W\ne2AxRoRIolof1JPt8KTm7LCjNCnIuMV0dp1BEyweANPa1jweYXl1jRDzbwRm\nrZk9No7vma0q/hcwuu51WFeavX0vYwLs+5AYja/TnOasXdfSxaxOwm3XvzXK\nd6kw6pHrd7ZWVrEe2U8pHowRVg3HAi5Huw1VQlMzlr6zI3o2zpAbx/e4nAd2\nvWrwXkUM6VWqKzeSFQ3xzH3A4s5B80wyiMy+YfFtpnkUzTKFj0jYg/+SSkvQ\nSJij\r\n=0VKi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAq1BdIlhIBkYh376vCwEoLE+QIic9CS0mrgIhdLG5iuAiEA8c1PSwjFIKu2Y8tD9S4FvM02sEfzhWuU/RwWDCcC7VI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.4-rc.8_1627378164386_0.2689143236843745"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.4-rc.9":{"name":"ipfs-message-port-server","version":"0.7.4-rc.9","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.3-rc.9+09dd763d","ipfs-message-port-protocol":"^0.7.4-rc.9+09dd763d","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"09dd763dcedbdbc52c590150bf9788c3f17074e5","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.4-rc.9","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-U96WQ1u6G5U7gq+/q1dMgvOT2timQE8say0B2xWazLCpBwTQOkh3OA8xl2Mi6vVu1BV3b7CmDEr1wYpkz6jDnA==","shasum":"27e18611f638d9fdb54d2a6715f6368fbc180f24","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.4-rc.9.tgz","fileCount":25,"unpackedSize":78687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/9l6CRA9TVsSAnZWagAANqoP/R5UjNtHyclkpeM12aSx\nHVpOKBHqYXVVFz3A6L52L81zdaYCCD5WnyuW84TiHYBjkKZlxIa40Z/R3e37\nu1jNF0nduTWOqPOU7C8tGxaH1IjBMl0nfiJpOFQHJ+Tlyu9UMe+vd4U0mLdq\nGaTP73LgxbgSOarRXT1Wl7PunaHLZDmDV98dUFRTyN0aMtQPQy6q9CQW6w2e\njwfO1sCdeB19WEft7E9IZRbwFoMUBqIS8RF5h8LHdioE4IHl/Ld86P3BLNGR\n96YxO1nTWDsT9hYBZIdATcKP4/js4Mk1aA0+q4G/Yg3YDg09hd+a3oO4SHJP\n01VoGycsMqkGrNrEpr6CHPy37STtpRI+4i4CX5e88XrCEPcRY1Bhz7o3jFMY\nZkRcpLekD5RWSVhMIVZhNTXe7HYkotbaa+13ggpXNeyMF6X2+aQFuB6agI7B\n+ScUeABAQ/1cHijf2UffTn+mHLHQ4zeRMGw/qjmJxQuSgtBOczXQUrNova5T\n1sgDNHcf4+i2qJM5ma8qa8/bA1C8g7MTE2+JiivdYazRvzUea1DwVIphHDrd\n2Ry4DcQM05MsnNyRJB5s9z/L+X5O9X+jev0R70o+FPNK+yr06XFdwLJNtn0K\n7dzLg3F3UOk4kPRqyH7memuLMG9hv9pWMYH7xWVnyRedc21BaXXTwdE5nlKF\nWzKl\r\n=OOv9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEDa+NjR2v2pg1/spWwTd/w4uTtQ8cpZewXN2xcQXBanAiEA3NxK/j8X6QDJRqzVBLga89qx44KDyLJHv8BazMP1q/I="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.4-rc.9_1627380090345_0.77319855888877"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.4-rc.11":{"name":"ipfs-message-port-server","version":"0.7.4-rc.11","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.3-rc.11+32f3424f","ipfs-message-port-protocol":"^0.7.4-rc.11+32f3424f","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"32f3424f86c9c7bc28155dbacb12edd97d9b84e5","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.4-rc.11","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-OhvlSo2K99ETj09qdT2LK7T5sEItwuqwsOVEgdW5o/YYSwReoWCSOTfprBscH+Znrc7khTJCmGraNVFUxL5A0A==","shasum":"faf4e8b4236252812c995cedfad96a8eb733769a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.4-rc.11.tgz","fileCount":25,"unpackedSize":78690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/+JPCRA9TVsSAnZWagAAuJkP/3MoZhyoi4ZQwYdzebn+\nYB9Gyz/5fqA6AESIy+Jb2pePG9mOVKOCFpDXmI95FX9hQEm93IcAdWlO5etN\n0QUMRh5CWSqmKc6rYjLuh9WbTVSrYQSgM03KRu6oFYfCo3283yiC99wjeXO1\nuxk99cNEV6OTJq3ynNrk8XbnS2dA1nwyfk/ckoF0+zVSiP5fqdYT4ErVCbpm\nonEdkMoFRaEHfM42biUNmcGVM68xj/UVqAueTKllvbB9q8AGcUqJnxMyLjvu\nQKgx2PNLFG+iR3qjsz5cy+rjKhOo6Vwl3DFHLq7z1cHxqXcHXQhGBLfmtfX3\n1tWDQlcugKtJzgKm3vrAGm7TxBt/qE2GLDDiZYeRe93EBc1HUeaGcvUpH7Bp\npNKvbWytJV8TVqjmNotcQ9Hv/uXGDRwnY7DFm12rC3zAQlm7q8fyvW9yEipn\nSFCKyb/0X/OiTpFtxL7TTpBm4+tydhDSb5YVexlEsSZ36jagYT+BLwhmwB7T\nclOszSxrdnvqJuOqckS1/vdsnkvr72jmxoohm7QoxXxITxVtx/bxNpcf38MV\naco8ba2GMd3kEXZPfNmPHwuz+d0ANkBYYEr0FVXMEBPrpP9gzUiV0j0tRmhL\nLm5UyJnBEDZIgwQx+kLCIBI6nYH1sOqem4eFUNZ9DiFf7GW/slmVqtVXkPS6\nlt5s\r\n=dOKW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBob3aPZqnd42QeR/Fw66vS1O0xuBek72qAyEVQAK2JsAiADUTcJuglL4HqquD9zZYhS7TEVAewSDcuwEIqRIv8DFg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.4-rc.11_1627382351432_0.5601591032275453"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.4-rc.14":{"name":"ipfs-message-port-server","version":"0.7.4-rc.14","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.3-rc.14+71bb03c0","ipfs-message-port-protocol":"^0.7.4-rc.14+71bb03c0","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"71bb03c0a3d5e64a1ba617341cd706c83a7346fd","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.4-rc.14","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-gqVwepRhrVcZupbmfvbUfyEEZ9sbMHQ+r8L23LAuDwh/DAxV3Nc11svWUwQZbpcl88SVLWqC08WVwgFAYZQezA==","shasum":"230173cfae154b78869c753cc4b82ba15f803665","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.4-rc.14.tgz","fileCount":25,"unpackedSize":78690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg//oICRA9TVsSAnZWagAAHrgP/2bwqQkuIHjfkfNsaNtb\nLpxF4GBj0BNedRGzWOWDaGQVxM0MD5V2agpr7+iQ9g6w/EhYCuLFR66/MTXU\nP52aJF4W7CdjYxB4+VupbFMjnNOByStkk2mEjLgDiFaVQ+7B4tadLiVVfXJO\nuKziehchO29ZtljESUrpvfm11x6oAw/kReVHcnnXEUZYDI/PmokSS3241lV2\nBhUxCxWwp/LiznmIVk9BpM1p2RTfrCAR3CzYCwRnKz0b4lR0WusmGW4el9p5\nK7HxQxNDU/1nCFTBXiXpHkXBYnmbd7IXvO7eu44QqytA5mU1yKlL4tWj/Kd3\nkYRifWPghNe8ULiYuIeInqfEmqkdua94iaeLn/mx/wjogTCfuaXux8PvnPUR\nDc5CvW1ieKB5auv25l/8n8Gt4E7bR9IoHNPgW+VVfpRBNVe9fwbeZvzMPLPg\nLr2hoSeHzRa8JUVLLsGXuV0gRJpOukXVWj5td0joqNZS57biXd6C4TD/0vbx\nKOt+LRZk8AeviqkJOtR1zAj+CeYwZv6gU6otGipdMTgC2bmMPBUnJqfXhFMb\nxirl03MqY/IVM6lZzyi8wrIOYzFcEwMtzbc9KjHujXm7s5sGK/ydOJFQjDfi\nY7EX/WDMYEKH1KARWYZuuNXVkVfoO+JmrLu5OLNrI2Q71atI0RUZm/GMqIVT\n9wnu\r\n=AIro\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyfvqCWpP4ItX7yC9awWOhE1FbBO0eGQ6l+4aaWymTOwIhANTSKatkGfP2SlUfJ1vzaO+W7Ot/EqY96T0XdEjTh8lk"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.4-rc.14_1627388423877_0.3621146590284696"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.7.4-rc.17":{"name":"ipfs-message-port-server","version":"0.7.4-rc.17","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.5.3-rc.17+3aa4afb3","ipfs-message-port-protocol":"^0.7.4-rc.17+3aa4afb3","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"3aa4afb30b2dc88a8b3cc2442336fd2583e2b867","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.7.4-rc.17","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-h32b7SL0oT5C9nE7SKTSaawOEx3HPmVqk9A9R/nTS3RXEu//bvnmDliYy3JeOW9kD+S1eVvfbnrnnsP1/y8acA==","shasum":"811d6ead331f3074008f0270ff4095ac1a3f658c","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.7.4-rc.17.tgz","fileCount":25,"unpackedSize":78710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhABb9CRA9TVsSAnZWagAA6D8P/jowX6W8djg39vYxeH/f\nBheY9uGhRVYfvmpFFmbBEWuhF5Q1fP2rgUgUCV2k7UuG+u19ZJDm5gj3OVab\nAZnOPoyhMsf5UjjAso4pAr2w2jz7q8060bu479lKZgwjLHDYGvKEgtdTuJME\nsrWbHtwgX9SGf/NODRJJ3dYWLEWqwKMBAHdwHyckI0Nt4zVBKotLFxJv7rZb\nF8aXBrKK/P3Vpn/4oRl1yW4GCDnQ3aE+kyY0ElHEmNANKgwA4hrmNrS9868n\nzipqAyqlLZHE9z+e+B2gQIOceWHI1a3GfCpYLC/Dq4yHMVx6oVO21qofetCC\neTHXSYjxDoSoo8LFzX+DOEQjQqiJ0Q6u29B6zJC8tKQ4R2cOA41X/0QeCz9i\np2KqjFcp5Mb4NBTr3lZKFuv5xOOfhsHekFtmKr7uvIPGvqHC0ItcIT2QWXlq\nabC9b5DGaID2DhTG6ASKP0gXVX2fv/BpfAWxUBOFM4Fa8dcGr+flpFzUgQM8\nY80w1GFJXwegi2BivERgqCRsTl1ZgUzWIz4GHVd0LgrRTFLSTFF36tRwKSSL\nbG9woq7CwbYkXKv0Ic1n5S0Tsp3EHE7xhVEqVlI+feASZ8CVfD6EEPT4Mkdp\nrtc1/D9QIZ83XtgHoQHqswgWAUpoNL04qQ+110JrpTatyE9r7fYU8+yOFugg\nm727\r\n=bqh9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGbjBeE/ivN/mQj3aQxsDdWcoR2S7MhCgwf7dCzBB6baAiEAxoC+bJgQ6wIOOxjL5fVU7pEAtu7/mNjs00Jhg/HeTJU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.7.4-rc.17_1627395837389_0.7033872380796069"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.0":{"name":"ipfs-message-port-server","version":"0.8.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.0","ipfs-message-port-protocol":"^0.8.0","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"ef41f924e415fc2acd30032e2b484bc32f042790","_id":"ipfs-message-port-server@0.8.0","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-uQw3P1wn+prbOF/mPGbwFBauNLLOR4iBSJIOKgcJ6ONN8rvB9qutz/WskqsIdYt0dsIEYUGM2JFt6+gWO9NH7Q==","shasum":"e0918baf9500b2ce8f32fe076b80aac98af41334","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.0.tgz","fileCount":25,"unpackedSize":79184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhACFNCRA9TVsSAnZWagAAYecP/ieCEbXBLyHnLyvfu3Uv\n6vQ6x2LVK9UtTHBod6Br+cTDMXS5g66rVF2eNoeY33aOW6p4cIDtTfUFW+Z2\nhXMqpDUZyF8s7+CWFNEy9LWXRxdEW9/Hgst/9nbER+kuF7oLh4OOc1CAuNiU\ndtyAFH4aH0W1r/7+tQfARMQWS4q6ulJqJGwGkDnGN3ry9Je3M65sWjr14Fqi\nO2x2x4fjG7vJkMalm46AbxfL6C1/ESG9mzKIPP8c2X8cvBVTlz3kBDOooLhD\n5wwLBGw6ENdEt20s/2wV/SIcT3WQuzyr6hUX6L8KI5fPE/ZjNMY7L4DwWDya\njGAOtxP8uE1bHU/m5ILb/SGRLd8FQNqFPC4M7G0Hwmm6tKFiLiRAmkmlBnwD\n5078OomjjCdK5LmsHXkcwgNlRdGyp42nxOlh2MohOd87QrLXXVg7qjROGklt\ne77467pGlHyEW1bH+8ldNeihMzslfha408RVAvYjlNglDEkNDB/zrpOdtPlX\nT11VLlj+PIHkCFZO7qZ/PqS6wJZ4nR63+Ltuxn5ApTAr4eIzf/bb7Z8aaUW9\nrTW4gZ/Xj6q9LXwu37m/Af4w/VU3vXNgEE4nBGhMQpVC/Uy26BeBskHqBTBw\nj4eYuO0shW5DeEUZlbE/6uW6xCh4zhBtaBh9l9g5iK4vLukTKlPdlInoFB16\nxb0A\r\n=QPM9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTetE+RfKzoUERA7EIQoeQbgro4o4Qiq7ZDxhWfW4A0AiEAvgQhEBMBuQ2n8GQuwazPTbHKWfH7LWZ3zfm+MoJwcPw="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.0_1627398477866_0.08020850875772956"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.1-rc.1":{"name":"ipfs-message-port-server","version":"0.8.1-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.1-rc.1+5c43562d","ipfs-message-port-protocol":"^0.8.1-rc.1+5c43562d","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"5c43562dd3ba2d2325e297e0a42ef441f9fd2615","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.1-rc.1","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-tX8Px9NkFFeunPmW6g0onyQEuxsRmFjsAi/FMdnE5KWs/e0SdY0Rw/TTYiMcF27skBSBvpjE6JzWGXumNUcUGg==","shasum":"98b5067fffab4fda10d86793b6b21dd334f459d5","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.1-rc.1.tgz","fileCount":25,"unpackedSize":79226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAT/PCRA9TVsSAnZWagAAYwcP/RSbZ9/wxnXhRIcFNY5l\nwjjnjN/xN6h0Nyg2OFSmqma7oUumpqQikyUkUdFyRMuz410aChIEaTrd3tO+\nsS7hj0s9pad6uWwjww1FP1fKqno03ofzQdsE7kofGz+qy40bA8tTlRsJpZcS\neHXvA+fWO8abgnMle6tGkHBSGT3vM4PDD63pkyysgXU83wjNK7T6bucKOaKY\nglPEiRMkaqRvMVJLOkxay6Jjvu3gP2gT5EiZ+2+D6GDVd8Qds9GW5C++pvNM\nF7BYPnUzCz/9r/+WQvhVEW3WtX92Z7Ge0cpQ8pmrjAn5qaVLdn9v7qY7I9Kf\nN8sNBxOeSoFgfuM5kZlX89lb+bYlNm0tmmu66FKQ5Sb2xCVclSnL7aoXd9jX\naVvINID9qhijeVRXmRN7cqYLP73sRuk2Dpb5NLy3EPYJySTQZesb690VBu9O\nUiO+FwwJBJ4BPvLQlmBnDpFO0ipnDNZBCSnPx5L1QmwKEy3L6/fB1DpkqiNE\nrVQU25jfYjk4GmObmSDAEjKKFPeubmVchq+cO254DQtvUbqjUG/ZoM6dshhM\nz/a0JYpibXocz+Jlar06WH70U7gv2s0M57vfWXK6ql7O9vGncJVjfxfajo/q\nImGaguD+fwm0h4EptjIXwuWXDp0iEQDCwKzRqurVRaIjJQAsE7czveFw3dSW\njPQV\r\n=B8Oy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZVPNXJUk64vIyNN3CLKkBFRQsGS8fg6i6FgCpcxHvYgIgQMqSWPtvIylJZMLb+iq4OU9CilN8WawzoTU88ynKPQ8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.1-rc.1_1627471823072_0.667719943568325"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.1-rc.2":{"name":"ipfs-message-port-server","version":"0.8.1-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.1-rc.2+fa015c9b","ipfs-message-port-protocol":"^0.8.1-rc.2+fa015c9b","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"fa015c9b2291c375a5ecd86337831eb1071932e8","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.1-rc.2","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-BEHIMqmFSVFA+ABgrNyc3X4CIEFU5IvMTQEycGSlCIsxQhbk89WnPp6ObcsABIKvD9dRR36sY/rCMzvD09yS1g==","shasum":"d8b20ccb70d398833a46f38349c15f48bf2bc66f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.1-rc.2.tgz","fileCount":25,"unpackedSize":79226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAUzGCRA9TVsSAnZWagAAdHYP+weRUSfcVLG9GZTOlFbG\n1fGKTU/cgHaNqoXQsFtLXukSlV7FRyS0K095rjt5Eiiqwgv8g844op1YP+dM\nvZlYlSWik+cgrI6PTmyHYtH0gOD2E3EVFQEmcNtVb0qW5v4JkZ5U/UuprCse\n8C3QkMJK+RoguBjx8aVPEoQBZ7m0TeT7kECZU9wxOiYSy2hNb9FWpcXD07fp\nmvqSi3ebKf1cmkgH1FYTiVsYDTLHVYxqNyY1jgubUS4JXRgrvEfy80J+Exrp\nwNGWiyHWj+ZE6OgRfUp0DQXEu9J9px0sau0fj9iNrjECbf5iiuUzGetCJiAc\n5wSImKvmZBoeXZ1vqNn4wC866tq6wXJRhbFWINJBkEsanAqZFJqSpm18AEW1\nnkkwBEEtedZS9cEg9+90/faDems7YVqZ9Zp8HIPXjcdvEl/40cODDOJjoyZd\nXMOWzqTnt3e/GjjVLQLuzn20vt2JCwwk1WwGJemXD431e+4wDZF08XQHmXmh\nb3ZM0LNXAMEt4DxsJbx+JusIHA9OIRlbjN79DgUX7hQRc0qlG+l+F679q4OO\n1WAp2T//KnQbvknWRFfzV9XdJ+VVL/An0Ehhlc87HtViYLBqIjdqkG9cxPdm\n9RU6z2lh0J8hbWnR+JFz1FKxr7uo1obH7QCAOSYAI3ysI0VOdgKxIEc00Km8\n8HVW\r\n=JiPP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiQ6aQYsfmvYC6IUW0igBQG48QqYnQvSuU3B4TqHfvkgIhAOGbESrNPivmLEWo2BUoIYFzNdlLSu+oy4aiRWlDeFCp"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.1-rc.2_1627475142132_0.8118760607031155"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.1-rc.5":{"name":"ipfs-message-port-server","version":"0.8.1-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.1-rc.5+43db72b8","ipfs-message-port-protocol":"^0.8.1-rc.5+43db72b8","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"43db72b87f0153ae4e9c46aada750fbb85d0bac9","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.1-rc.5","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-k5mWKduyjgjg0WQKPfug/1v3HYyjH8izZzlLpBTCL63jj2W7+nVZLmdtMtfTF5FUu5SDrBwxnOwVOOmkxQosAg==","shasum":"a3a6fde4c0b275630930cf712900ea22202362ed","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.1-rc.5.tgz","fileCount":25,"unpackedSize":79226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAYxWCRA9TVsSAnZWagAA5ykQAKEBwb5dKbIHUd/XGVNN\njoAg1mLgHOEXU+pq4lgtsR036SnR6g+ti7i6flSMaVXNRJt+ZX6S98Gxt97x\ny0oRi6U2mIRSLiQMn38yM1gIsB2wPLH/4bEyP3xgpp8XQhpVi+7lHrnsGK7F\nPwHGX5wOzY9OiHXQf/akKlOtyQJae3QXzMw5/dAZrYVuA8XkjIZiRP0A3z8o\nJHnpyNJZnp29ElHHn3cWOl5OcwsOCyoswep2OQuoBPVM65OiKxaLKKm7iZ3G\nLBkfFwaBuFC9JYMh/aT+SgpsTY3GT3NMs2uz/TOzIiIWghiUtchWtt8UaNdb\nX5Ho1aj2GHA7TXvCOaYTpAREW4syxY/q/D4TJMKr247M6HFA6AeCSgbSOnNs\nL2R0iIpMMj8KQBA/TMwh3oGcKcIREJhcrqQpdIOMjCTb7rxErhQMTsxbVWw5\ncgvUrFsBnoIGMzXN6JwzKTnC4Jn25GtbbjGi0jdA0Vz6RXSjpeXX979pVAJo\n6s5sWiJGuEmqz3IPTsUTuxcr0hG6OmaP9jYaB400im3MuXjM5BUhIqmKN38r\nejSXwxVGgVusbxl9xXV+Q+B1AcOIUmtYXRXZir5J8I7cpva2rOlpB7oHNTiV\nRyotaolSc6LLaRtSFsT0tupv0jJdWi7j4tnTbTUSDGUggT9Ptcq8xtu/Mf2O\nNkwx\r\n=Uss8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHLanVWJZSlyyH+ZykBMavqmc6muhrwR+Foo2N3sTWvUAiBR7tyJWQ0VbVmQ9aBY5PPuNaUJxAX28jbnff4J5Isv8w=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.1-rc.5_1627491414614_0.7497932240508309"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.1":{"name":"ipfs-message-port-server","version":"0.8.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.1","ipfs-message-port-protocol":"^0.8.1","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"dde3d28b4a0d0f74d73c0c0b38eda2e01874a2ed","_id":"ipfs-message-port-server@0.8.1","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-d7vjgtydyv0s8U/Mzu219dlAlqjbYW/0iExzsxEiS5FVGu7jIrSKDdTCB19GY8N0mY+WRM44WMiPXpHuy7X8UA==","shasum":"c919c2c49f0788138dd46ac45b1182a1a9ab8ddd","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.1.tgz","fileCount":25,"unpackedSize":79384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBDIPCRA9TVsSAnZWagAA94IP/1RYwlU6gLpOfP224+tn\nH52Pu/2CMGlOb9fx9P7/ZRw/NK4MkyjFAFMYoIHn94og3OaLij4tNhignMGL\nFpYAhDa7rEe60N1Qajai7yy9xGFkhJuhuBOFHlfMYZgX4yymWS8VAXgnKyj0\nalxNfswtlt9I01nMH6crRZtfFyxLwVbzmxNIrJcSIXRqz+nZFKQb51oE7w2B\nYpJlnDjK3ViY2NooqbioirzllDGB+IXojLCWsnQfv9ONcleDysxT8MyBweRF\nUsD9w4k+B5br6MQ2v4x8VU8gj7ES03ulBsDVtUmc83HNhxMB+OZU96k8vwVQ\nJYbKkCcLXurnDiBP2rIKucSR1Dfo4VwNI8YzahQUKyDpGnojkuOlAm+bcFL4\nGSzQ+LVJmnmo70/+Qd1dqcbdVSc0C3ID5w3ZjVFix+4I8gEDHOXdgJumBNlB\ngDa6TG0I9BsHqVh5KwFZPYCHd1PaFxIJ1bv798ZLVet5iQpRd4mLL7ocY+oa\nuPA7LrnGAa9B88qtv5j6xS54MsRZU2Hcg8w2YMHh521d90wAzyU2WENsbf4Y\nyzGtmZU6ZpOWRnCHV9XfvhuysU74WH0F2kpKjxQG1B1pL+pn1OSjlKyDDPuY\n/XNduUa5ySS8Obb+ZL5TvTEulhFVT0ZYoJAhXEiJUAZ7ZUImJiy51IFFWRJk\ncIWg\r\n=pmot\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICK8S3IIyAMLMnvz9FCfgb833ht2WBdAPb/OAokOydB9AiEA92RDIO7R7/2oq8f3pCRrzkXpj1bAWlU71lxltTBWbbM="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.1_1627664911133_0.7741785891734616"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.1-rc.7":{"name":"ipfs-message-port-server","version":"0.8.1-rc.7","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.1-rc.7+fa78b4fe","ipfs-message-port-protocol":"^0.8.1-rc.7+fa78b4fe","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"fa78b4fe1386a151422bbccf33818f3b15fa36de","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.1-rc.7","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-DclN8HDLOh4/S5MuKtr+0ARUCol1p2L1A2fy7hBsxQhQ0VLTTUhVc4/ww3qnR/3N24miochpM+iyNxiLKnb8Yw==","shasum":"e2991d58344541195567bf3a265f0616027917b3","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.1-rc.7.tgz","fileCount":25,"unpackedSize":79226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBDdcCRA9TVsSAnZWagAARtgP/1TmFZnfw2m7EXIFX9zK\nbn/BBaYcs65GnGGtDVL9KN3v6gsaQdHIAS6vohqZ2v2ezPDC+A1u5/WTuNME\nDnbDv/BZ8Wvwaehmw1/3txpWXagtr6fGYg51xurZ5DS9S1YiSDVw9BRB79/S\noyTR8doPyAKi1O14tXsyFB2pksTs2Ye6pJJUczeNL0f6omMPiLg40t5zyX1L\n6tl6UDKNNCJT2vABSoqu+flg1L/ZShtDGQsgpmsjsxOzfZYPUux6XafLpneM\nQzWwpZNnTBMWINSwc93m2LV1gJ8Sqm2KUysE517v6bpeashUvgDB0GHuaoPF\nFhJIE8kmlVA5eXdAvcbW48HqSC4kMGEkSkmGOdSTBZU8Ryz352Clp3sxWjru\nqk3ZxiK7IttlLWvxb5rfvG65jegeWQP2VF6SWDufRW2ESkq8dJUrlxu7SbNX\nlavDqkGfXmXuURkea/pw3H54rSpQz6zPSWQGnG7QI7RtTUo0TzRd/pGV/3eh\ndbFA2OWReVAYRyK4SarJ8Lgz13RveqWqhoNSe+AeVRNQaLjDRDGRU4v3Zwpp\nDwD43xZQAtj+bKFNH7uDLF0DMMDJZHxjOOx+oPdGaRTyeA+XHNi4g8omlFgg\nStrYCmLeUSKfgT0/Zx5qPoDPlfbt6zTXPURF5P/ZHZmGWqqw8BtjxNHRUdsG\neKIT\r\n=XQnO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3dJ37C3y2bWHmTciCRYqsll+vu2pcWcFyUx9ySa2EKwIgWFoQoRtVe/T5cPmE2H3rSufZy34aTs+P+wFRxNKh1fI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.1-rc.7_1627666268101_0.9933641747242556"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.2-rc.1":{"name":"ipfs-message-port-server","version":"0.8.2-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.2-rc.1+48f655ad","ipfs-message-port-protocol":"^0.8.2-rc.1+48f655ad","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"48f655ad4a2ec96f84c4f73082919a753523408b","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.2-rc.1","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-Fh1pqsGHEAsCEgRh3jU4NYfCCviDjvHnPYRfCeSMV2CmzAxiXHpSmjXlxpOFqEbaeucfPVDZe6ztEwzLkf4Cbw==","shasum":"c8413bb5ae64d7c9402850d2cbb7c640dff8a120","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.2-rc.1.tgz","fileCount":25,"unpackedSize":79426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBEuZCRA9TVsSAnZWagAAkNYP/iUAt6MJMUKBo9DriIdl\n03oIeQwbmqs2xln7IpFThfM9B1UsnqCsncqiws/IvXbK3z686D7FZMCXpn6l\nDtBo0vSSotgQr8+I14ATHbNlBTWxQKiMZR/LkvCBImGY647jGu9bAlE3ob7n\nCWjzgmLKOAfXOYe2vci9QOmKGQ+XOkNUT7kYMdLpLt6NUAvaMtVDk/YID45O\n4K2Wxss62I7fyEwKWTk4sAi3NChcFq+oYezTWtv+u2t9oCT6p34iXQffU/Oa\n5poB9/ZwbcODPiKSpRWDZddprZc6HpvRnakal51BumAEH6IGYLGLldr7DpsH\naBpM9zSXg9u7UqDmGDKupyD2S/JYnzsAwLmDHXOsjeIuq8O2576fStCMD5q3\nJR2FZqyBKa2lWwJ2mHSquYF/fER9zmBnrVSH/R3FoFV/moLhn8vNrFrc9ux+\nuMD/8IUZGrKw+5fTa9NEZyOYk+EFB7V7PIdzV/l/6BFXUYa/yJXtVQXi2Taj\nbv5tQtlbMZUzKLyCblQ0uho/8n7Alh+/BddrrNKazF1gwBqv3UlGhSG+phQg\n7jw0g/gxSIldrw3ZlWElKRz0xrlJmMX34DyGMBBsep28zzQbet0buHag7c4k\n5PQoa59/uwDjwuQrj/3Wg78EsEFiqzdIV6HIRF2Z9Aad8yI+enpOlA/TUxsT\nVyar\r\n=PJdU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5FLn5uuyHp2qbGBTQCuThTP0cM70up2nHQE3Vf8f2vAIgVjxCqOqMs2Cl+MoFdwO/FN3inR25QJa04q9rBosAKT8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.2-rc.1_1627671449677_0.530750312978777"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.2-rc.2":{"name":"ipfs-message-port-server","version":"0.8.2-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.2-rc.2+1db6b88a","ipfs-message-port-protocol":"^0.8.2-rc.2+1db6b88a","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"1db6b88afc5647d3a187e0ca4199d8ab2082c629","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.2-rc.2","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-bl1xvUoBx5/OQkthYHAs6RxV4mOPfe0UmLkUIIgBk5RmyuUADqYArhUtOV6AuebJkLni6LdSzfRwRqfKR8nLiQ==","shasum":"0de634d337de5753be0c98e241f9a070360e077b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.2-rc.2.tgz","fileCount":25,"unpackedSize":79426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCpu7CRA9TVsSAnZWagAAyhsQAIdy/IQc1g23uI49goee\nH1aC8DwB7RtE0va931t3dMFtKF7+MOVgcE+2lcFvPCxH8knoCE27JXFbhD2e\nEe6ilBkYMRrPPM58Wku82OMP/GULJeGoh1tjk+FwTL7pIT1ZZQkZmYkBEqC4\nGhr3URY9tJL0j2lwAXd2STREbBx8XbKiL9nnb6EK4nNAET/Uu/7TBZQQzdMt\ndfnxjvs1IJ5JWIO1+0VDo0E1dHmVipxiB0bnN8ESqbOD5hIxud+KN8HpCZ1z\nOqgg0eIwcvaNHqvlV5GbBjIorwBXIj/QyTp6p0UnwIlsbxiATcb+XcT1lNLd\nyxavOu0aP6v7TyW8FdbX0iz8KSM0Y2uvX78geZrijVV04604OfRa6pCNuwJ7\nyte6aavOjO5yeTs7SNo/zZlS2hhfZgWpIknx1LRnBXaqUFQK6A3ExkLSW1te\n7MFmum3Jxir2I34t7r30dss7WTvmtLCdBby5j9fdbTl4v5nLULoJuByBpjAY\nJojIPWo5GQO8ANZuy1HjSHnJep4nfUYkDSODKUBHtJ2FEDUrtYh70XYk9WeH\n5I6KlvRHfStQn18v8BjBcSqPUEGHkG7fuQ9puQI9SR0zhfUMg+GNlWZvLluf\nZUMWLpK1xGn+G8MbFR9lNhLQfbJYE0gUhNzTsqKK+AL+gTyKwWhbY50tds3n\nMj9T\r\n=WkwR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIkqxNNR7eSmFBmf4oREuChtnWS22HIFDbs0myLqsorgIhAIDl/hg0YZzaYNldgzyLe6gKcsuQBI5Usoz325wInxjO"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.2-rc.2_1628085179510_0.39957136494227696"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.2-rc.3":{"name":"ipfs-message-port-server","version":"0.8.2-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.2-rc.3+6adc3fa1","ipfs-message-port-protocol":"^0.8.2-rc.3+6adc3fa1","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"6adc3fa18f1dedea22babce41d24d7435e497ecc","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.2-rc.3","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-Z1nIHX1oYFABJWSQ2R3SX9FI8N3P4GQwpbJyYeOet8rxBgBtkfKO+GZPLOI7OlOw2Y4l9SsQiCvIeVWqIapVYg==","shasum":"097fe2e1e1fde26cff5179c3a5d083d0eb23c58f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.2-rc.3.tgz","fileCount":25,"unpackedSize":79426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhC9AJCRA9TVsSAnZWagAAgtkP/26R1F4HL5g9iMFsAmzv\nOL7sCjguXg41H4Ggt3K/+imNDP77XNa9lLIm2NIlDAqq9VFyeNmx0sMH1/fb\n0UYex9tokFqZOnadw9ga5gQFtBFGEeS5Hc1aAg1oVlgn4Uii0k1D53wUtZvI\nue5VPIcJXHH++jFkyNlVaz9dwBKbox4RHY9WlFFVpeYt8hckMRWaVfiUdXd6\n43rB+KB8ogxIt0l+5ELh4knb5qHcaxR0vKGcYI9Zy1dbMxWsqx8FTAu09U6W\n4bpCxNsdlXnKFtsfimaithKThVtgR44lBTZWre0Cv3ylg1KSEXTuRyk+rvpN\n7dwj0PeBabP93SqT1w7rsGKu7cQJsBofgOM5Esa8uHw/XRWPROwtm8pvkBmn\nmhYWoSxtu24fIf3OAfWArilxrpcHdW6VztErBhtrO5fD6iS/x7NSmO8V3uRF\nsIuYi+DeDM80px1L0DjSey5IluH5yZOxAGthXFgQdzXcTKGhERlaR2KouXna\noUEbO91VpCkCE6gj1qrj6nggsz0O+oT9fF+sQpKS89WrK+rsbrZSXSD7nI9V\nqS0+SI/0vcqw83pC+XIV7HLorefoJLqq2T5Z7grLa+Nd+7rItGm9wXc6T1uw\nFu2j0yM663cL47ujPtGqDaMV567d/6sfifT30kluKDSRGyUKyhbJ55/ijoBg\nfp+x\r\n=phhR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzLJdr/b2q9S8pr//ocmYbhhQAzFYE9idUH0a5ilRu8AIhANZessV0FPTihkV6ekUvhvzVTpSl3ZDZGyuYeyLZCFX7"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.2-rc.3_1628164105686_0.770336517174961"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.2-rc.6":{"name":"ipfs-message-port-server","version":"0.8.2-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.2-rc.6+a6c68803","ipfs-message-port-protocol":"^0.8.2-rc.6+a6c68803","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"a6c68803ca19536c022c72554af2311962b2a063","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.2-rc.6","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-9k5Bq3R6lw99VvrUdXzfELzA9gD1YijAM9S6DpeZoN8/b/vQQzNE1wsQgUi3NtRUkIw7Aw5GIlLsRMTxaIh2dA==","shasum":"6a5505593a1c8467633e8047e6c64a191dd359e4","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.2-rc.6.tgz","fileCount":25,"unpackedSize":79387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEViqCRA9TVsSAnZWagAA0kQP+wQxwRhm9iP6PxnZSLmD\nQZwYSHtBklx9GcMBWcrKLhItZXaHc/i48TnH8+R6Yvp433k07EuiqcoE9yp3\nATavaPDv12rU98/SA837bI1174dm5dYPkt65AFnYWlzqY0kEhP+O2T0MquXX\nqdNlmWs0LrZQZdQkIeCyMIYVR9lUPlE2q02m3gCN6JQDRPOnrkj1eWiM6UM9\nu1JxihQgkEngz7z2Gcl1KVwOSs4zxV8ULmDmoRjOYSNxi2+yfHXhJK96oH48\nmAsfXP7LDwSRZblcvS/BYMYWWWI3i7elUN8UFK31quXHDYKwn3k3E0i9Zj/K\nzYpkucgBRUKjCYqNpwAJA8Rt0oZOOFPQPu2bgZkJ3raoXCyyoKTV+laVCZwG\naNO8NYJ65AYnJtoHraW97N5W66vQW/q3sN8Dg10Yq9rvdZwNBZ7A1wNHk2nb\nOkkBMS/13itLZoqyMbibTOdxfAJhdBg+2ZBcDDuyXyhhwJ7fzZqEBfdA/XFf\nRILvh+agDO9rVyMIcn3XZukD4QZHN4g5vYQVyimOfjNq7G57fghf9UL7gb+n\nylD2QJk2hLPM1mTWDIYc2vDnq2PYAcfECKRdEvuWFDv2E9IXcShR6o5dNRs3\nAL5Z/jNETqTHe6aor85HMyxbwLWovOArobr8D8R63MTWPRPh016Vs5fi54kL\n4Edz\r\n=PuvW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFkeT36JtgBeQiD4odjFXIcFz+OJJy9tEKIljDeU0oP1AiAdtnsFDerOEbed43ZWLPEHzmqF4ykqANI28rtYEV94zQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.2-rc.6_1628526761997_0.2670645348912777"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.2-rc.8":{"name":"ipfs-message-port-server","version":"0.8.2-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.2-rc.8+213f0b2d","ipfs-message-port-protocol":"^0.8.2-rc.8+213f0b2d","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"213f0b2df0e407dbb97ac2de9b82830da234fbb0","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.2-rc.8","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-LScXxGH1qvt6rEC98Gj+ulI0Rj0QU0yoV1A2/mSeuY5jIcj9EXoY4QhMTigrEt5biYFbFJ9qskRR9tTflP0aQg==","shasum":"ca0d921191b0bc1e76186f83775f25d8b980c8c6","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.2-rc.8.tgz","fileCount":25,"unpackedSize":79387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEiiKCRA9TVsSAnZWagAA0DoP+wc1sVuOf5aTA7SLVocb\nTmiI5d6tF/4CSU+gGlvuICMOJlTAWZtXA+HJlbArEyV7clLomU/Jh9PijCfG\nBZ9+GXvQKf0Zqa1cLOgU/jLRaFLAw8t3yAmxOac2sQ0ESCp/Gm6bpNuUn2lA\n+HvwHwCQCaNYgnesIH8nCmPnJ7E+HNgaSx+hFclNbTGxf2h2m1L9qBKeIwl8\ntciO9KvE7he0b+kVxcHU0cy5mJZfe5nNHoiEsQIQ/+VGBmo4NSQ4bBmDuc8x\n7EFYa0km5bG7p/BkW6DfGzJCuqmoS2nJr5ybcLfI7rcIHvASF9UJ+1a0iidS\ndwFlTeUmfOxUFPP4KpUkIxA3GM1/VwyGTyaKOWOyZWuGrKr3LNta1Flmx1hz\nXGhA87M+Im36hreQ1YbaKsK9as1CUO4s0DY4aktkJkiY02w21tC0E/At3PQH\ncNg3t/6C/XYa5jjF7uIOqYzZJ8Qgfy2SzNvw5dkeEY6Cj4HKbX3bgE0pzJkH\nkEpnKvlrwK5jHrBtAVHXspZjamv210oTpIp722awdAsm9P1uNMKZXhRE9w26\nAkix6n3CT4RtWVJSu+3NQ3X3o7SWuiiKcsEr0iujO0m5WVQz80UNPYJw+ypL\ngBXUhy6zOzcgrVEbboH04BRfKx9NqfyoRzyf8CYUsfjii1q+3ohitunOYXik\nPw0w\r\n=y+ki\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHFc7jOQ9LB5w9f0FRBNiAKHexGAAjdxA1Zb6UQJLZURAiA+SYUtVf1y6uvogEqiLnTEPdGyS8rLDzAoDjYeVUGTtA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.2-rc.8_1628579977878_0.09039177392820208"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.2-rc.10":{"name":"ipfs-message-port-server","version":"0.8.2-rc.10","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.2-rc.10+4150d1e7","ipfs-message-port-protocol":"^0.8.2-rc.10+4150d1e7","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"4150d1e736c15863ae7e354fd1f7d6d4e34e4452","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.2-rc.10","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-9EpvT392h8m49AIZLD/C9FENXrhFvj+RSVtG+7tHZ7kSDmv+KFA1QafuhWlmVlqLwZ+i1duOMin3irZVBXb9rQ==","shasum":"9cb349dee71670668a29f03f109181fcbf4e2d0e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.2-rc.10.tgz","fileCount":25,"unpackedSize":79390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEkJpCRA9TVsSAnZWagAAucUP/1zEGZENxa+S06jT9nr1\ndNMlREgxLmWnlpTp0pAzvqrJnvAdcSYzVuDOZZeNTrg2ejA3FH8Of2iFcNPg\np2RU5ZRkwh2mHOdVG+c3cy7ccLPJtWM9o3w/059KKHt8CZhEp35AYh/28OdK\naUxh6APQc3bnlJ/J3UMxgq89wAfM6SQcanALh5/ckkpLGq8dzLe5H07xRbSt\nJDJtSDwcAK7eLB+AdF0QL+YcXDEZP1YrjAw/fwpKZwc1hYHUnq3x16VSHG/G\n03p+ykesukSyBIZVNZbwxlkwz7afsvNGzY4K+/VSHXJ3VQjBqVU0mgutdyug\nwxWJrxt7ss+tb6ZaDozPfImNNLBaHAnHdbyzRS6zBo3dcR/DBpPap/06ityi\n7MJaTVVfl3cc/OOXK/sqBCc8kFrzrcxaRHmpMHQKNKPHLswK1s/4QI9HRhgz\nAfDb7LhXfWHtxfDXtcrORN3+weqCXA2lkNHeVW6SktdRRaF9MjVDxb7iF9+f\nS3pTtGuABExqVIzkm/Sr4u+5zq9IQGRliouFrYrtZo5XZu/Eqk6oMct58EtE\n0272Y1TvuoXtSCdsgUEyL4k+FSybxDPjbAHCj7Y6heJ86l8SD0VsF7EtJsgs\nUMWm3Ak04592xplRJ/WaWRHqN7afoSuKQSvqpQxT+F3X93HpeRiSwTOT1UqA\nrpNZ\r\n=o4p3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkbBu7toGq/xS/4D/DxKOyb1VjQcps+aaSKGmXe+kVJwIgbNv0/uG1vS8tC1HZNewtJNPcXMTZ2JIopQDj4EjprVM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.2-rc.10_1628586601236_0.04551167895951069"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.8.2-rc.11":{"name":"ipfs-message-port-server","version":"0.8.2-rc.11","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.6.2-rc.11+fae59868","ipfs-message-port-protocol":"^0.8.2-rc.11+fae59868","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"fae598689a0b9a3bdcf80ac71c19b709294f2932","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.8.2-rc.11","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-Pk91D7ZAx4jwH6yWKEWbsKSaG9zlsywHCAcrxJxYoN4mXP78mLrNeH9z/MywFsbBriH+1PlWx4zVkujXrP7JYg==","shasum":"422bd1944eddf50b692a355af911fb6ef49e90a7","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.8.2-rc.11.tgz","fileCount":25,"unpackedSize":79390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE5b1CRA9TVsSAnZWagAA5n0P/1TCY7cNq39Q4IHSSX3t\neKFYYUkVaiUw+sBIBPrV2kpabBYrj+WF4nj5kEFQM+7CwQXW+fkOB+AMCKDe\nGdIjcaf/qkPtxQjLuAFXGYtbfgZV6xtYSKR0S7kib+3wiUPv6WZp1DFO/cI8\n8T2jlnLNt/a9XJHnV2JSIodHt6o8LatpguqPXMU+QP0cDRSBgh23i2EWYoFU\ndno38GGfv0U+p3jcOQ9QOztiCMwaIaE752hk3YYbb2xFjUc2i5ac5sYRr8eA\n2CCvy07e/8eIhapRY5egzqEFKeaI0dy4yzyS3V35VCS4yk1DqT1tJJe9/fVf\nDGbZcP0Z7e8FQSBzbpQlz8ciLKIgFjY3nG/3G2bWJS2NCHRzMfi87ANSAXYT\nFAJlOk4Z1OlMyAVEYhlXHPMiVSO5y4iVsOe+xb+CXEYoD7lY6+XA3yIURyE7\nHmwg/D9gJ66v1tV3alb3uu99SRo0W6CSyfgXIIl0754JXfuSO0F185GTU68U\nIi/G99UQCHm1+I8KipHdERn82PZCmJnidNmBxfmwhCoaDAEiC5TcdAWan9Wa\nfFB1x4a1TM4bT/mfRJv8U7e3MIUbVR6Fuvx5kwRQ17NpQegEL98HQSjh8VAh\nxId3XrPh4CIZKGv6DMpv3bMSJrDdcJ1w513zTJcXNx0kpQg9ZC78xn6cVRx4\nuXrI\r\n=W0Y7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFOCbWlHLK8HXv4pf/SQ7FCfB0HnGGb6dwaysmRheJE4AiEAuJE3BdBBwUD/G+ZbZuq8ovEoNJVpo4559nXL5Pj6em0="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.8.2-rc.11_1628673781801_0.04775556807423098"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.0":{"name":"ipfs-message-port-server","version":"0.9.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.0","ipfs-message-port-protocol":"^0.9.0","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"7f241319856719f2d9f2c1fc4a6b1062ed1ad398","_id":"ipfs-message-port-server@0.9.0","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-CbkpI4KBZ7QLQVT/D7tKKiTIuZrSK4UbsBL9g8aMuVJALctzP7hogbwj9f4EsnApvF3WNtUzigPEc3SLRPUpOA==","shasum":"191cd31fcc60714e711d02caabc5635a44a0801f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.0.tgz","fileCount":25,"unpackedSize":79839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE+i2CRA9TVsSAnZWagAA16YP/1/+e2OYKRbXLY1twzQt\na3LKXZn30QpVuwk0yk7DKqwHfWlE7WMdNLSU5a+pM/MGqF2Nnu4PczRBX5QI\ndngY+QKVA8913SdKC9xPoAMSbHOySrylLfEX1ugNgbnjcSvaIGeUxID5XWAE\nKu8kF3zlKcOrMpGUcCXzif3cLr/mCe3stVo7hja39Vsb5AmLg/H4jxZsHWKz\nK0CmtaGbqGUCos6LiinEBDgLZ3+cw4pgu25nMYzGY5UKw43VTrEXiUVwpa0o\nBS8bSoa01GuA8m6576wgNxmbM49doLAxZJrvOZkuCAXj3hBfT6siZtb0Q+5I\nragxTZLGOwYmdTSKF2h9RCDHZGpumSW8UQ1UjXAGfKMwyRSfEQW8cbTiRl3C\nJQYf8sbDnw6eG90cT/ZN6mvHHMJIZqrxNnkzD7qMFmyD5IvHsMMVMpyhV6wM\nrl9Z3Jgk+E0wyiGbJ7TP0LTEbvKbs+qwug3B+Jqnlms37i6TddD/+EePdogE\nmZIdGCW/x6P3RbDI4rqFw2Ehb3CyNlS03Cvn98DiX0/cSZPtrFGVnjQMqhrr\nugr2ifliQVyM/3ILYyqL9lHk+J4aF7o0KiQgw4gRVLv0ydUj5eAqRTSewIAn\n/9Ip9VX1Dij2f7rKULzUc5Q/A57z5wsaYTFNBNVrWeYa42XlpnnbuqqvIbr5\nTixh\r\n=h/Dh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvWS0gtkOfbeqC0vOmN47jVhYKYZwnuYz4i5JFAa60yQIhAICnH2rtSVSJiFSNI0w3btfdbTfPYfi2fe/LIPgOPMY/"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.0_1628694709879_0.6346287451383417"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.4":{"name":"ipfs-message-port-server","version":"0.9.1-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.4+b7735674","ipfs-message-port-protocol":"^0.9.1-rc.4+b7735674","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"b77356741ac597f57e0b9ed57cddcf0ce3fe7806","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.4","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-+pQYhQ+cFE4cIOPsaOd2dJoxKpp0aFAjsXEK/IGz7WYBFw3wr2FQ089r247sa2tWpTR5NcwNF6c1d56mfq8BVw==","shasum":"f794e96775bec39779d1a3fb74f0271340a4d39f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.4.tgz","fileCount":25,"unpackedSize":79881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFP0iCRA9TVsSAnZWagAA9fkP/RJy2JKwWPbDmaIvbEZk\nbVSphMIlqStAtufstsTPOEmoYKo6LEXRAkfWF64UKNX/MRKux8BIHCepjNZO\nMktx56eaDO5nkgRondx5vngv9A3SbteIRA6ZjRMuYIEABH9x6RFQIeNWjej/\nI4sXRdFir1au7FcOlO8pntIFxC8fjI4JJd/eZuv/hKo6aL+R7Q06StzhL6ba\n4r4CJBR6E8Rbr4QLrCKnQyOrQ1ISSt4oVnlWFHKMPrkNLVxiUvmsYGB3QWHu\n4rD4BspuxP24iw5u+Vl7IBFZOibME2mdf11j0tW2ryF8Y0E2Ufp4SgfGrZfs\n/CtEOAlJncelYGDQ54Gze8UaWYRWerfmMDhKF4P+HsCre9KjSei2DwhyfrKD\n3POQwv7OU1gm6rGUq/FTzg7HQ/mPWlMgKNMJoNgTnrHnuB5Donul9eFxfWkv\ny9MLgMhNG8ZIdV3PIeIaMPDuWBpNBvyUnayNtkjeEMEVKJ5BB0ULu0ew8IC8\nBV2DPgOwJBTiseolbV8VFTYmDTMhBmWXCp5cz8TtitkBNFJEo6ARFxaSmARo\nT2V+Y1fDEpuqBfLS7m2D9iDVQ150F9xE85Yi/c84VbU7Iw/amMJDZ0vbEYEY\n5bstneoORT7kQ87fm0u6YVaNqzUsAe3qrXYymNM+eMkY+sUdpdxe+uvepkdJ\n48dJ\r\n=vwC6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUcIjm/EnnyghfBtIr1ZKCG4eWS5h6pNTRR1F3lKXDxwIgMB14x+oaXZdsNJEItbwqn6dIPLm3jA7Jeoe3F5MpK6w="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.4_1628765474799_0.11791195719290415"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.5":{"name":"ipfs-message-port-server","version":"0.9.1-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.5+55dfd937","ipfs-message-port-protocol":"^0.9.1-rc.5+55dfd937","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"55dfd937e4175e049287b9093ed9a52bcf085711","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.5","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-Y4zzGupLIH7wHEZPoLdL/yvVFcDl4eEWvy8hy7x+FsZDzwpXcwOG7PwMcWTFG5lTRtPyCK7sSQ31smFfcwQ1tg==","shasum":"0ab3e6c994d81b735948d60189c64ef1298b4058","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.5.tgz","fileCount":25,"unpackedSize":79881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFQDtCRA9TVsSAnZWagAAYrUQAJUXcQFvrY2B0Lp0Egf0\nIV5zyZ6V1F0ET60F7pF8QQ/KcNVyvxnCdLcQWQ98Tl027sUGKzMvyL/gUjZ6\nTTY+zck1KhXN1bRckUB3qO2t1zQSaIjKVrpWJc7IjdrRywA7R+0BvvRv3CNN\nO9ft6SZo5vbm45hgvhiDu4cZYiuyxZ3K2hVUINVJPCAACvr7RwJXM3KNccco\nmgii4qjBpXN/uwx/de/lfgcD9ADthCrm5ts6X3g1hrRBXHTAS4HImLSUXhj/\n74psVu5w8lg3EzxHH7GDoZ8NbvpKoin4r1cfczPbuIKw8mjtS2WtKCLTyt70\nAafJDTuZ3JnS03Bm6TlF0H9EdDRgZ9fAbzLS5v5TEf0sgENNVpInXbhLMNMt\nwv6YtSjhpWhk3vWF+W62LjUG02fMgDn8zSFKEgL7VzNTQI+ubCzjYSG3Fy5h\nm8gmhY2dnKBlfSW28hSRih7vaYUSck5V8+HEFEc0BZ+hKE0M/Orzlyq5S3L8\ns3dkhSzZOwD0Rm1R/a5axZiHUqJR1VhHk8a9XfRnuNBfYpIrrWJy8PKPFmDs\nKce47EzKsmQKxyGQqPnVh56LIFpGQXXwDlskzgSWtLMZGQO7q4qwEQigALSy\niCL7FU/Vu1XMtG78bCIAqTO+6pzCIA7uy1hs90NK7V36erUYeUl8jo9IQqzR\neD4k\r\n=aq1v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBW03TrdqzgvdbIqd5640wlWxwwr3tHuzyN8AiA5i5gKAiEAsJTFJ0fEM9A0LYiGpV1KVvRE15wkFuwc9j0yGdVBui4="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.5_1628766445612_0.9736663060469666"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.6":{"name":"ipfs-message-port-server","version":"0.9.1-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.6+9eb29106","ipfs-message-port-protocol":"^0.9.1-rc.6+9eb29106","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"9eb29106c07253d50121a5be1aaceaf62b022742","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.6","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-pgn4H6JQAxOH3vN2HXSzXM+ldj6B4EX9ppZ77QLHq2dURB1mBfx2iqR3NuyjdIIaUmefinlCskrRhZEMAmUFNg==","shasum":"4b5d7e5668b38517dcdefa9655675f9b5f5f606d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.6.tgz","fileCount":25,"unpackedSize":79881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFSv3CRA9TVsSAnZWagAA44UP/AkEQF95mCSWMUOeIxBH\nYoCfNgG2B06utvxdil/YB8KzwYGR2oCq9P+bbfe2MPSTfYi174ohaSM2Q95i\nXubcZ2Hh56/t8S5F/8kJ/hQiRwJ/L7lIGsuZ1C9bwpSGlSfFokoqquct3ZGM\nDsZ+CsyedWFA3/EH5yQGgJ6eHuLY2LTFLeqQM9hukqaIoDnV0/H6stnVFC+h\nk6PCbyZkCi5Fl9c8iATKZ/H3rTyNvOAIk2R8is5kD+XwN3KPV4EHpws0h3nI\nBR2WKJiwWvo0EiG9Y1O8gIdWKm/yuyAWp7j9WsN9pFakaAoLmi8NpowGOlUg\nDvN16Rq7W2vTM4Wvk1Aj1xhGnI6pAjlpgJH7K2smDVQQx1I3XccI98/SqWE+\n5Mfuej4tbH7HGns2TNLiLFXfBjBIJVeyvLbtbjFwyAzcVD7hR4UZMCnEGAoe\nA0cvwrYuRLYWD+hNK2T+w7+vwUI4ReVVI/oMPYu04WvReZx1GPZzWiTAHhxE\ngciP1rlFhY3S54BjjsJ1dTQdeCXj+FZwupUxCMgSYWCMR1bCMIZVAuXnlVHm\nUMJ75Jgke4tThN8K8eOdXymsYLSoOM4tyeckoNFTvVzWMqMlZeB+6gzQ03qU\nZa/nmAe/AG36lBxqhdya6wOQQYT70KXNyfEgZcbzYxc10ljj5bl0ZarvX11z\niOXi\r\n=L2Ow\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAiq/9wwtcTqBcM3pYLem2sXgv/ZCkhBnQGg2OsHyz09AiAbUnmbLYvxhe+dR2qmaC3Wa/QWrSG4CXp957XeBfKu5w=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.6_1628777463677_0.04586190043347971"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.7":{"name":"ipfs-message-port-server","version":"0.9.1-rc.7","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.7+1fa4e8d3","ipfs-message-port-protocol":"^0.9.1-rc.7+1fa4e8d3","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"1fa4e8d34f47d1d6273b6d82801d324dcbc6cb61","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.7","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-EeP+42YRCiULtgz5gYCh5CBdJ9+3GemdqToTdLqA2f344kePZNeMxt1eO1BzONJw3R3NvRMwTtGMoCGXcDoWHA==","shasum":"d0c4f423064839b0e19000bf59e249a995927676","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.7.tgz","fileCount":25,"unpackedSize":79881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGoiSCRA9TVsSAnZWagAAfZIP/AgAgjZRssQlA+sA7og9\nppK/LJkaDAO6KgCdSNJ1POVS2VRGWoBuJyecyohHvjt/XLHoFZv+Ro2bAmPI\nUUnfAoQKsEX2phhIAtaMw5JXMT6Lo5YRnXq95RtHOx1HBdcdmhJtBaJ365y6\ncmwUejb8fnUP+C6dGGRWdIoEUw3TeRef2Gop/Ki7b9ZSN1B8LhnQxvQ+7pP0\nZxtKsrSSuwoBs569YSEoXqmfZ1x4hKDvwmthVhDlTduh/ptwa002knQtFXIj\n/wzz2BrwmgJBGflqKPIW7Eq/0uD0tBj0s58J1QFdLmMI9jKmxWDdfl9yb7ty\nxwibc1dkSq5uDwk/knAk47Fiur4R++6q+DOta4f8W6pk/YjTQyPAPVoVEj+t\nzj42dZj235GI+crdTfN3f97punMM3pnMMFuA4q0+ApqOpFHrPfqnatpnYR/9\n11YeR9qMy9SVwp+YxbWy4y8HgEM2kfUmviEcFKKh/N34QXdZjL7NmtmzIXld\nLK1GNIG6lLXunD1UuqYpf8MQMoj1VfXUBOaSS5Bo5wj1QFeaqziJJzg3mt6q\nQ+IBzUvQfB3m6MkWQkP5e7kqJ/++uUJY+vphHGfeyNpLH6dVlvWLpnWwlTRL\nQEfkyQ52abHGKUPBy+9In3+xHKwLRs/juCSCDjUqYlAvk1rbyFlyRa6CwMFZ\nkqo4\r\n=/qOA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBVIK+mvYegkf9QtjanqyKjXztECBO6m+SFB2Rl5bgPEAiEAupomhmE2JUL1zMHK5a+k5VH/wkToo4qgiMd60AqNRss="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.7_1629128850513_0.0016838961442815492"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.9":{"name":"ipfs-message-port-server","version":"0.9.1-rc.9","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.9+c1375617","ipfs-message-port-protocol":"^0.9.1-rc.9+c1375617","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"c1375617b6d7137e098375134097d61edf316ffa","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.9","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-doa04IwTgoWHPFF7NxV3ZVQeoJSmBnkqBqaxfS/qf6KkufPmbu2b6o8gzZ5OTGvJtVhbx5iCBpySZckaNLX4gA==","shasum":"d1c01437c9161ac3e8210fc2c24d11b52d93fdf3","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.9.tgz","fileCount":25,"unpackedSize":79881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG5TmCRA9TVsSAnZWagAA8B0P/AtyrWur+mshl2eLxRVy\nDLm8po5p0NxWc0wOQ+pgg8aAR2CW3W2lsvX76MkSUOlv6XZKOJ/4uZwg92lw\n7w7pslaSsWX+GT4bOTit143ZPrpLPzgjmXFgPQAbCjcnue2DgHxOssGOuxQC\npfb6eyNxhqIb+8+u3tdop/6MHGyqLVyZ/MqmxKp21L7omhV62HelkGCGu/KP\nT8qYft3wNNXnCWg7/pQu1XRl3WZFEEgbejsRqzLE2F9PKvvOZH5NAQPLwt4W\nAldZ5zm+zBgFFkzuHtwijO3kEvY459/TamhYrwOJ5OgL12sHSfTxYA8UlDME\nvyH6dkPjA1gLNAdRpMZkz5yZod0tR6PTNmxkTkczHNEtEad5c3YvzUXU224v\nYh+GzmoCFZMV/u825b4KUWGmyGthRJ9hIQX9OYfx+IJcFu36YmKPHz8qPqSM\n7V3L69Qm/brkRQOjw8H5xKZuKyoIm3AWewhtdJQ9yH8xgmqdtop15nZ9Ud57\nMNYMzc2VM7B211M17byU8sRnrX+1bcxJDttr+ck0DSFb14F/wz0yaUYTy2br\nDCga9KKIjedFzRXM2IaUyWaUz42s7m1mD2wFGbqSGLG7uu8ADC8N+g+CjnNV\ndj+aI3LGYLJ8Clcs2V9g5IW654LQ53KIb7oHie/QAdXHSxyGIlZ6O2i2k5Tw\nzbDT\r\n=y38i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYvwKOkYmQQAF9DadjpD1U/rPNu4ALl/qxNh5yJe5x3QIhAPzeHpplsoTWIpSGS9XwcsgZmtIBsgoxgvq+J7wbFlFU"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.9_1629197542836_0.02389676278227504"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.10":{"name":"ipfs-message-port-server","version":"0.9.1-rc.10","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.10+2c1a23af","ipfs-message-port-protocol":"^0.9.1-rc.10+2c1a23af","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"2c1a23af193a23c4a710a9007c7c22b4b729c7b3","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.10","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-xNVZ8lkrt58l2AqNGwGi4bzqVUuis/joSeCtg/UkjqkOpW9xRJZTqhmfzVYYmhe6ey6QfVF+3+W7YgHyCJZuVg==","shasum":"3325d3dba328fa4dc0fdf591492c60cf53301b11","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.10.tgz","fileCount":25,"unpackedSize":79884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG5j7CRA9TVsSAnZWagAA+TwP+wb/svA03PAjINXzIpXh\nkit+8fqbhXX9oXeymFIR3rRQ+VP9cY9I3YaRKXbk63hnJ7J4KROurXnz/qVN\nPBeVm0mP6MITBG9FawMGjjqC7w57LxRzJrcVHyWt/CPRa8VNturaZc429613\nXanwPM7P7aNxlpTmu3R5iA/aFyNt9Ry4vIaKn1G2yIqJjpHn7/FTCy5SiCbI\n3dcK5wFH8mTSOb4GlRWD5Cxhh5LyPML+5g2anEfvVx7G/BuKiwCUP/sTX6lG\npEpi1qSi70PbIL7x+ouF5qBoOg35bahmcTlsHFanN4wb4L5T2zFnJ9Czkx9q\nIdCwOdS0cAUp7h7IuM/RDS5fnFj5ccQgHYV8Kw2nCSDtIFZNM2MuwBplTM1v\nWTw8+xkxDrPrvsNPyJS1/NZGIt90eINvK46AE0eBUhYi0rEzfutExi43e5vp\nym0FNhFPZfIm08JxRUalgGn/KrOGDEZBctLQIOQI4uXkYfDYTo+bgB1DHKd5\n1fZaxMSsY5T0gABcIlAVe4hSP4dU4hFKWkhkI3wIY77TOpFuHPo+Wt1pxJdB\nbvktX5HAUiNF/CPSxhZf0Lf4tcYIThEkKVGm8xUGDpMSRdPGCAUoXtL1Wx8+\nmIkLPcbgfKTh/bRreM4L05r5p7fl9tXGxw9QD8psECLYcRa7UU9nZlIUPU9A\npL9K\r\n=ggC6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoWdGT2pByLDYQE8uY9uj4Wtbc05mekAuxqCsG6qxQHAiEAuvLL36fE85Cg/pOK7nP8LcfmDIBKrnaHJaooI9dQKi4="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.10_1629198587758_0.6133166488928556"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.12":{"name":"ipfs-message-port-server","version":"0.9.1-rc.12","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.12+438110ca","ipfs-message-port-protocol":"^0.9.1-rc.12+438110ca","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"438110ca4bce91dc771eafd9d6589573801b16aa","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.12","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-LEzHa2Ja6l5sI6MY6BHevV5P1Ghj4IAQV177CHcyd1VL7Hd/i6o2rGhv6pa7xU6lOVvrztp5RmoN2uxa2Kt3NA==","shasum":"445e74d2afb0ae9aec0e9a820de0dc828a16f7f6","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.12.tgz","fileCount":25,"unpackedSize":79884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG7HuCRA9TVsSAnZWagAA0/wP/05L6mHsvtDyFAXxgbV3\niNhucgvFdWRB3923NJ3mmWCkqtgiXD+lvTVRctYpGab8uRSaiFVo9XbAZrkv\n9PlDecoWXWpC95uv9QotGXs3kEuOeuvG8+N2D+lGisPeSnUvzO46nwwKBrtW\nGnXFhyc0RH9vXVwPZOMnxtJzvh6cOvcqo5tprtdRy41hJ4rhpbTN38XdWjxS\niR1mmMK7r4Us2MUSPuNzZbT6sgg3DMbFntD8LoQy2nqaTt7xagb41R0g3ZRO\nreyzfEVaHxlH0Yxdn/EEvIMslsLleF2/lAji26/3I+xIxzLfFV6FFF+ntkU9\n9MJilWjYj0a1+j+e07YEaOckEEg6F20qrzgvoRX+pM9Q708k7ge+WujuF/Jv\nPCw3l3/npP4S/IRxUVxG214V38IayxZH8uc7SuMv+kfLiE6iimOFVFvuPCCo\nLuXd22QpW+2Dt7uRDs08Yyuq6B/49UTFCifC7DUwzbHKXag4QwKm4AMdRl5s\nCcWdIEM6g/J/KwNZoEhZ3yD/KT+nU9mn68wDLXckpoZ46TVA5lkZAO4/TuCW\nxucXMFsrlhnSCRx4NJxSsEGUiOfzEr/g2u4LBljGvucEnYSMe/5AeskFRwBe\nXtI5Pl+Z1YZpOPTJ68kPwJb6lwj3FwXMjS0kEgIgMid4H7+vZ0XANJLa5rCK\nyC1m\r\n=bZQi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICGZWIvQNxpQv1o4cWEH08TsY0Z/SQr5rM7vcnPIfKKAAiAKBoMhTWW0Xh+Oi6VsQamZByvwSy5rvGZkOd59YmIqYQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.12_1629204973919_0.021847524882173897"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.15":{"name":"ipfs-message-port-server","version":"0.9.1-rc.15","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.15+abcca045","ipfs-message-port-protocol":"^0.9.1-rc.15+abcca045","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"abcca0453a2b769464a46b23d1f45319d62d0aec","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.15","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-A1OVMEPuZo1v3Uq88ZxDVs03in9Q0RAQ88MFJClFGRIcZXrPV5UP1MQh6bS9pQ5hsufYXYUIfTVK2jgCSn46fA==","shasum":"94bc1fb49a4c2341959d860583b6025aa5de27d6","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.15.tgz","fileCount":25,"unpackedSize":79884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHDB4CRA9TVsSAnZWagAA5yEP/2RRBMaGp+ywCC69GwbS\njqyuCpuVbhlSj7ealQfe8ekOy6S+HZJMcLp8ywPoGTCLTFyTGMzdF/ul4nMX\n4IF+8t9vQy1VbbGHl2GB8SZYsLBxyKM1fgHiLFz+XnjWj7qY+aRD+cBI28TR\njukPScF29yfdQuLgqp5OYiXLJsB5184J6OP5n+dfL7anyFxec/4tRS7MOIox\nnsurdlR5hrj6huvUhJ8r5f22t4uz0EvcPphFn4CTR3u6b04peWs+IwbXNoOT\nSoOQ3GaEQXByu5I3x8H4R6/QHjw7szwEFT9hCV2Q5+HHVaWhq5i6XA8egJjk\nN4sbbdfg8KfkfOMTlvCW9liXPj0Vq4w6YFZqphNGv86cnyov798JC2B5v1Ft\nVj+QGlhDYTW0D0HRHk7TVpjNIyrFhp5qG5aOX4IB7uXp+H0vfNcuTlRuKUXA\nnL5ilD7OcjFqns7kWixoFG6mDcc8U5geicUQXJpXkn3Z8N7mNyCkEKeGyN+e\n1CZUr1qU5Qb6OfokHWn7Jgw5uw1I30YF18oSIfp6nlmwG1Eeiu1HWo8Mbay9\n+mXwaTb/2N2exdNYzTt7cd2RRnBZzf/TuiCha396r/s+bZRJrw6EJ5aWUb89\nsVY6KubC7JggSVCs/4EmariLHhgYzC0hR7nIm//9Wrf+8WKniIQECWvqIOmW\nDDcY\r\n=gLb4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeTiAJP8YcntUdU7nKmhZp86sb+l5pHrbhwrLfCk4KbQIgO3UrEF4GM84bo0jH9Jz1g8S3mTgZJlofcNnRtOBR9yQ="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.15_1629237368222_0.5731203129364681"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.17":{"name":"ipfs-message-port-server","version":"0.9.1-rc.17","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.17+beeeff01","ipfs-message-port-protocol":"^0.9.1-rc.17+beeeff01","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"beeeff017ba49c3a171d8990389a67eb5c3103ae","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.17","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-ftwvf52c8InS3ArGkySW+bacn8vyU1VTPOr54P54Gs4r6GriKHBprLHizjP2EQTI83RbXWi5KuvdsL3svrR4ew==","shasum":"cbe77e63a1a375a4cd58eab4e0a56eb318440279","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.17.tgz","fileCount":25,"unpackedSize":79888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJfIZCRA9TVsSAnZWagAA1bIP/25hyQisvmHMgLV4/N2h\nSe7dfotqNM2x3TkZffy9OcwBGjLMq7rUBFTAWYodNaAQeSoX85pexWe5H0Z4\nDmXWMxoN+2LQSPc4wiNEzgqoknMSU4B06XEZeoYg7c+YIRxJFzdvsVm9uJ6r\nbqx25+VKTH16LuRESpc603ys9q4G/1fsoLvxQo5WVKWdbN9y+ZQDLc7CryFT\n+/FfvipyhzOuaH52b+5fIhi6eoyFYq3FfjbeQgNGxXpuHFbAdCGkgmrMNtjZ\ncEMlVJtsVVY6B96e3o2Uc3DtRshcfe6fdI5pCPgbBGwvKxMqDxBVnLNyvCHt\nf7drKDLlcvUy5edNX0tHA0XDPuuTNNQpmW6zPk2BdtnFVzjWcu1ZmBifBrDL\n3RBihf4KP2SRDOFWmRA7HXF2krgf34IxfyCkn8EmcTttTeukhv5whp6TPzsi\nxWOp8xQ8hJpUu9Q36+ipB+ezDCxg/T1TDmzwqOeS5DY1ioR9pwrV9agdU1/T\nFZ5E3MNQcYXpQFQnrUUo23TATMHcMxdgpE1vxnJOhcsMrthX5NVZPZk975PI\nY6Fbwjiw6wcexO23T0EihPMjq1h63cYfnoHfpb+LNHHu5h4sMsM11X9KQ5Qi\nptmZztiRhE+U2OeJs19vXlJj+dmj31/2Hdtmtr4joUht2T2bo/Jdl1BrP7yK\nfAKF\r\n=Wmm4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHgBUZSUdfb7b6SlU8P1zuGxdLf+MsegAmUCD17cM/zDAiEAmNuYovkM6F0nmHZvb51uytHPygiw2nl50MRiw9Q7zLY="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.17_1629876761078_0.3437698108299996"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1-rc.18":{"name":"ipfs-message-port-server","version":"0.9.1-rc.18","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.18+aded7dcd","ipfs-message-port-protocol":"^0.9.1-rc.18+aded7dcd","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"aded7dcd65896586bd46024bdb562c9646056b7a","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.1-rc.18","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-NGchg7ym9OmtVD+g2RcgQpHL0dAWf7FE+3A1Z1uiT+Nd1qTRKY3uHqfR/qQ1XhNve/IV4CGpT8gZDf3hVPs1OA==","shasum":"4f13fd3fb2200c05e248845e6ada27b64fdcca3f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1-rc.18.tgz","fileCount":25,"unpackedSize":79888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJgT1CRA9TVsSAnZWagAARYMQAJVNoJUK3Spu6yXC/den\nMw3tWgGKSP5mUdpEWb2TX+JJfcKRsiYb2eS4XE6YrIAUfwRVMcQ/NI4jD9mj\nD7QSskVY5Pt1o2zaVL4RUzREAQsi6CoTy75pNc4wWv5YO6yKwzNMAFV5RfSL\na2J+nuTs5rhaUZyk9qMVWpQIP/imI10vR7TxaTeNhr1MBeex1wsV1thf0vYT\nVwUeX1pqDs3uKyc9JXQ+S6T0A0MZG62uXl2qE4/i5N40D8uG0gob70Bb0cAQ\nDNCzy8u6lHhl0nzA4uZuYfm1lNcBG0d29opmf/tqh7BxRRt5QXp0bRlQhHDl\n5DCLM0BJhQHsXjGC5bCa0ntlNvaK5KxnHaNpeQemzsdPTZKUdZxBEiwvlD0m\n51KRqcsMEcttKLVsUNkZm5t/Rle9hxPrsjxdoUrstROyrPqyXwIk9cG630g6\nn9ngU5WWBvZH3vmO7rwl4n715jkiRGpq8XjZw2eHhbvxUSTptgEY6JbBIXwE\ndvuPdZcgNdHt7TITQCAa+F5eYxSKP8VOVTLmAco4Qyv6UiEabxRkX10p/3Fm\nk6/YWOO2PUHvq38gaKdyqSvjfDUrGBrKSb8Hp5b7iSM/6ga2BHPj+mrqTQN8\n51LAS8hXT0XDTHzE0o8bqHj6oORTyiGkQ82Z/RNxJA/A95OLagoaCAqaVyKR\n69JY\r\n=HlYk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTLmVkfE0H8vZD10e0Ni4VclhbZYv+uPD+YMX+XYFTjAIhAIaiXHyK7Bb3g9bnQt4G2qZwse+7m1YytD/4yL+yfgGa"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1-rc.18_1629881589803_0.5138197890489826"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.1":{"name":"ipfs-message-port-server","version":"0.9.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.0","ipfs-message-port-protocol":"^0.9.1","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"6ad2b40be914098981a2dbd370396599a918d0ee","_id":"ipfs-message-port-server@0.9.1","_nodeVersion":"16.7.0","_npmVersion":"lerna/3.22.1/node@v16.7.0+x64 (darwin)","dist":{"integrity":"sha512-blLoLChbibaFFiq5s9Of9xd102CrKlzicEpaXVfDaFCHBDHAiF3G7XYexwn2rT25h1AJbDwz1GhzbQqqz/FPRw==","shasum":"46f1fa3368c716bceeb40bc04319401cb9eed9f5","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.1.tgz","fileCount":25,"unpackedSize":80043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJmggCRA9TVsSAnZWagAAjQMP/2iyAjXkVgfRYHlV82VU\nKRl+fr6dVnRwcgqJXAQ1SFqZPHE494Kq4LvTcpTAMrIzlKdIo/VDU3pT5QuQ\nKsgsXUMlRTmNDfdYA5J0Ia8pHpU6X/jndAKgD+nr6Ch3cCbgCwtrz66G9fuh\nSQ0F4VikWuvYnOr6OkapLBxzF0acILEiO6cf3P7hZatZKCrBFC3PYS9GzKHq\nqpYkDhOA6qkPpUcMw3ZIq1nrP2rb9KhSbLXylln25/ZkFUNtsxuGYYqkrH7+\n6CRcBTl23UIp+kvYUVfEaCDpMbtL52QQfP8sKPbKSHffnYVFBU7jR/Ifa/BA\niFvcFMkg68frBVx4XNSbwZ6AmduhA4/CVB7z7fcBNNFiYWBtA/ncqp7BxTNt\noyomnW83Dec5Kh2DJZ9UU5yGxS+pvmQB/FVhNk8SNfzXehLimoACbKvTT8e6\nUwpBzLiR6COi9uewFA+d/cdmLcG4lZ5eiI2n2xDxSda4zS0CML4DyvWbSr0t\nG4QobGtw4B7tU/Hguoj9jQdyRri0bcr1hzcu96GhEXwnJLrfejI5+51uzusE\nU37CQ9HT6GklPKWseea1m0tmBWsXA6bgvEaV4iug+rUW90f51iupc/v8ae9Q\ny+ZSQIt1xViD4ObMjrMzW2iY+UqdA0hXy6AHSbUovfbFgE2sRSswEUdjNAab\nd5Rn\r\n=HIuj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCY3o2W6p5Y2/TOra8m09T4yOANgwTvvqiiukyppnu7AwIgL/owSsIzfM46A9WTMaSjwIh50Z4viOVAUbzlUgrbMeo="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.1_1629906976041_0.6282668211602396"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.2-rc.2":{"name":"ipfs-message-port-server","version":"0.9.2-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.25+ebb6c552","ipfs-message-port-protocol":"^0.9.2-rc.2+ebb6c552","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"ebb6c5528eee66d07ee64c4ce105e9b1228cf857","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.2-rc.2","_nodeVersion":"16.8.0","_npmVersion":"lerna/3.22.1/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-6q7hyfywcdTku6UHdXzkRz6NSo6cV84y336TBcHhSjHcaTlH2mOD88mKbL5rbuSgKQZzw+dDD5hxrYTHnP2poQ==","shasum":"474680037372319842ac96060a4c3eaa715e9488","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.2-rc.2.tgz","fileCount":25,"unpackedSize":80086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ2NuCRA9TVsSAnZWagAAmWAP/jTrDPwdjtxMQ5Vz/MUP\nGhrr9rqVuJ3msnibTiaDlJjhlcB3BhiB01trgyZo9U/1HWTfKy4qysOEQfLi\niHz/o3+Vk1MVPwX43mb787RRg5N7ve7J487cXPD9OYElA8ZBa6xZ7di5oU7z\nbRbx1V6LMFDCPF1DemmtvEAgSaaQ3/eaVLN71nWWHaeYQwI7HlnJVBSvhp0z\nHsW67e6oWSuRbhaFAXuTMNOUkmCdZg7R4X7nfb24HTI5LkT2HHC8O2fMX5bo\ntjC/WF4aOtJMoWwYQeMubLxsjqwGFxNx2qZCh5pm2s12x5objum8FcrTSc9D\nq4v0qODnMnwsldARXtGuz9jOdC9eAIBXsKqPzwqkdsPrQymvGHtdCgag0QLV\nFMZOi8ETISSVFQH/dDW1rqo1oaZoicqJX59Bn47wt9V8rU+wWnewOe7Qa0xu\nqOf5mcwsNpGjYNuEjXJRGbzrxg+WhrgWERCvYdI8z0EoYoreHFoUU7infhnu\nN2FOcDpn7RTXgFJ8KX8hjgdEzYF/0xObX8uUkMlzSaoS23cmX9rZ3qckzRl3\ncnRaT3rbLmx9TGiuU99ub87VPoXr5Pp61b0664/kGLSHK37++R/z54T4nrZ0\ndAkuAC3PqW2aWkTTF5AcuUN1GiorclGpSg2u2n6Ms99YiZGCf9cyCE2nb+Ab\n1nUn\r\n=9j9k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBjOO+JYG3KAwLMWfjmlHceY6l4l3rfRJ1syYVfOOGgEAiA1dj6bjr9uac5hc2RBq1oW/qevhLDQsu7c3XB65m/yPA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.2-rc.2_1629971309782_0.22701543038420646"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.2-rc.3":{"name":"ipfs-message-port-server","version":"0.9.2-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.26+6c46a3cd","ipfs-message-port-protocol":"^0.9.2-rc.3+6c46a3cd","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^34.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"6c46a3cdaf6e9f8756632e501019923a01503282","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.2-rc.3","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-CEtHWUt4uoR7yA0WlMWfZV3Fr3lJ+ZzV/fSGj1pYtdJgW3IRp8o/Ui7K6LunCE1ifYOV6nK9Jy0CJJTrmVsjDg==","shasum":"52719ebec5ef0eb2cfefa20377535932523edf5d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.2-rc.3.tgz","fileCount":24,"unpackedSize":71741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ3acCRA9TVsSAnZWagAAcB0QAJgqrqnj0GP1y0CfD9VD\n4x6QUotgQyXWAAs/w7p5S+3MBag9nnNL8XhDrn9takl5fkDjIAcxhYzD2mqj\nw6NGoP/VldFXn+YA5AY9RmfH/FF0SxXDHBWeBEtkFdiGma4FCfja0AQlEPwJ\nzRoW+YhuAKgYj2MAlegfliByKiIwAE/KbY+QxSK+uiNxc7svWFzyHPy7iQsz\n7bxgGfMBbaKe6X0hvIm0nS0QsMdsYa4JrTYqyyRN+bkS6n35ovWwt0CelYwC\nVOZenqItG1LD6ICK1OyGGQVlgTJ3jDWnHsVVAvwK1h9YaG/nSMozyopiJzta\nWeOq5kQlc/UBAuhmr9qpHtjJvxC0sWwrDuGDX5uyPiYC1l4pAAgixjQK9j+j\n+I5f9Otuo52ckaJ3B2p9qoX1va9gEv/EjfWnkhWYroSTCOGBhXJRq0F2yaO0\nGH+DAkx3FrAqdTACE73qGPUYwTOXwYVFwuTVtI7EvK8vmr66zyYhdi5dOhXm\nyTqvSboIh7Zs3oG2IPSlONPO84Yxn+er5svVlw4MHvUeCTVkCowM1HqEsr+u\nd+ShPZkzTHZXP43J/1iqLEjMSHH2SJIfFytA/6gUNNxK2NKI7BjjC1FqOb5e\nvRR+t2JIPGthUTPRZAB5NoPdk1U5EVEPUAHDjt/Q/p+o55CoEEyMCQmDCkrs\nTuFF\r\n=r5dW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDT1oJ3GjcvGaU0nmKOLFm/cDOhjdCziRFBhfxmqFbD4AIhAIP8wQ4/8awC6MXMOewSdSz1yiocXEqgjcWxkWYhnQwI"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.2-rc.3_1629976220799_0.34564604254252185"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.2-rc.4":{"name":"ipfs-message-port-server","version":"0.9.2-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.27+1ae25d01","ipfs-message-port-protocol":"^0.9.2-rc.4+1ae25d01","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"1ae25d01d93d192d8242c7ee48ba338064ac9e03","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.2-rc.4","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-42txXB7ejIoDdkxPf8oFwxwdvjDb/NAjdvLJPG5SmBJug1cOo++dBDreBDuoFt6J6CZ5gSKm/WV9+8HHD3QiSw==","shasum":"120c9038842b915fc0baa8db7a64504082793413","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.2-rc.4.tgz","fileCount":24,"unpackedSize":71741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ54FCRA9TVsSAnZWagAA6psP/RfvTw2QrY7uC0zuACdS\nbsC8SkSC1auumkmgGmFZqpW/jClZ55ss4UrUO5P6tNOjXulNZFN2aVPDDe17\nblEsTrne8fehrhwmZ629geKszZRmem+tiCGPlRvQ9u2ILSuXN1vvicUQduJj\n/a2x/usNrvHfFJwxom4YvPe31WxuPkcTWHJWkQD/k3+bSicD0nGCc5SlK6cD\nK7/m4FnfB/3wqLQVly1N1bFoN0U0yGwdRUSWXQEeCSogSItOcL2JqxeNtlKr\naM6QQGj6A2PE0Y/Mgige7aVLL+gNmeqrllNmynT+FWTaNfrqie8s9k+S93Bt\nymC6sMFxJsqsJ8DDv0ZzU3++HuY+Gskv/9IFfxZ/glfPzsbkOh0cvbCMYkRz\nHNpDq9iWZ//UeaIR/cwrgbQdnIDRvTwBIW9bGwxo8015E0jQvUhBgdEkcONn\nkFwWq5SBaB/dVeGfZG49oBpxDWTOHNP1GABpnDbUjr3A7i1d/h+LH0VfUzVw\nWI6yi/up94i4jZuJg82Vi5ekZuBVQY1+fJ3QDOLO2tnwLF+ZrhnqPjjt/iCQ\n/57nXuNogtcRQrsVPv6vJGrpQWDc9hYqc7Ir6E/gzU1DFf6Cjbd2d+vqPa+T\n4PmG09xz5JWicPyGdTXILVouOv6HuiLPZcXL/P1RgJstY3gFsn6GXRViPj3r\nYrhm\r\n=Up5N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDciuJO5Qra55gLWKxpDK5kfiIlCYHkffTXsPjdLfjSSQIhAPho8pbr0IlvbL7xbKAzWXtvlaD0BVf23n4ow9TROPs/"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.2-rc.4_1629986309263_0.8237891142017915"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.2-rc.5":{"name":"ipfs-message-port-server","version":"0.9.2-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.28+6737f38a","ipfs-message-port-protocol":"^0.9.2-rc.5+6737f38a","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"6737f38a27cfd7a7fc44afeedb1a7465cb17a3c9","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.2-rc.5","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-k0HYemUUNWQ/BeJ8Lexgg1CCG8NrL6RXkusPh142XVkA7xctj7xbZ7ymSDU63L0kWEn0v7WqKEieTw2zoQ2VWw==","shasum":"89b5432403b9ed92ad76213947f1c5a248a93a5d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.2-rc.5.tgz","fileCount":24,"unpackedSize":71741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ7acCRA9TVsSAnZWagAACdsP/1bZAL9AYA04/Fr1aKBd\nyLL/PSpeRSCVgK7e+p+ZWItTckXWzGZp8ohFX/dq3bv6JvS+2anO61iXdxXy\ncIfZeQc96jCPovUINvF7rhSUO20H8cOWie3qEu4PAr4u3nd0iBWmczw9Dr+E\ne8lcsUShkC6Q74Tu9heQ+bXS1PctrFmN3VrnpMr1yV5T7ady+/FW1XrW6KLG\n04jtNK0hLV+QbnwW/xq8Pd/HoMzq4IiCteCHyHqlX9YsDVPnOKlD0v+TgWhz\nBBopNkx91xoeoIaAWYt1TAQ1KXCbf1OxfpjwiV6OnqJXdCBvRUZdCKtAQ0ux\nSRvgLXX/zaMMgNFuCnwCCxngZ8GPns7waysdZSHh5usdG9aY8t22DcgQXL37\nmDQxV4OmFBWXSj8fnW81nYBYJzaawNgO9S2cXvjGDBEsBq4sCm4sSsKlxxc7\nZTrGjNXH871X6ihrfRxfk8Z06/hZfChASmfFCF9EpTLyiFI55hb9oJj4hv1D\nAZQUHbCE9RMDOpnV0u0aqxuPMHO8uF/oGxnWOj63bSKVILimQx+1ItBtwsdT\nQrEkUf7LZryZG+o90BszIYKV0gt+3WApuom817rk7PPTuO3vgaCdADhVZUWA\n/rE0Jl0D3Qhk/CvEHlZX/9zLQvyU3BgC+e0l1ZGBNAgildKy0hjC1JM6jG0u\nJ3EQ\r\n=3MrV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOMnwT2/9xQL85jlqnUGUyZiYi5x+8BqT5bs2HSBI52gIhAL9MMJbqZKv1f0MkNH4GXDKX9TzlOing/Mzvm4Rg0BxJ"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.2-rc.5_1629992603867_0.9134127761923319"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.2-rc.6":{"name":"ipfs-message-port-server","version":"0.9.2-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.29+100f54f5","ipfs-message-port-protocol":"^0.9.2-rc.6+100f54f5","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"100f54f5b6e29ff64d9afb9c2c326707c5097cb5","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.2-rc.6","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-R7Q0z1p/c3NbTouwtcMBmkr+7Kdrp0BE/B9DKEoVRbujsZe42F4FCI4bYaiLWhKDC83OI9vPuNqFisnMTylifQ==","shasum":"7a3b9f52ed7aa1a7941d8d16b7f19eea310d30c8","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.2-rc.6.tgz","fileCount":24,"unpackedSize":71741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLjAOCRA9TVsSAnZWagAAwvYP/ioSIgW2Zkj0w1vyJQ1J\nBiBMX787KrH+gN/YVAWOehR4liXIPU3aFsxcypLCyZnj1HtBsuXvAsRpcHus\noGGJtOwNMtU1ILI2TIS3nAx1g3DTFdyeODyI8kKHdkMkcE5xv9okfnu+l4ys\n/h98eaWzl0DGRhCp8DdUp7zT/4H7MWpvsQJHZmhKUCcjdZtZpmRzSZhWj9yn\njjWZIabFr5qy5mtRk5kyww+hYS78vu96fvObfVpoVWQwArm7qlUAK0RrN9az\nX5Vtr1/DZLM23nzsfghj+gZEq2Kk6UAPJBXevyJUgP27cYBhCihGnVcGwNRL\nzJZobkTZQiBueZYieQVHbXaqKpDY3MmZF30YaoT/e2vMrn3AfDo9Z6kWEVx7\ntlmaSkJO4ikznUA6jvGIaC3dM651tEvjbQqwtCDh02mZxRhw79adjJ8ggZxK\nAMw021YP75btEpLbKbCnkGsbFnEir2TH6kvKdzlCBcuGlWeES8SEmbIPf7UL\nmZLdBz15aXgD9+t9CASG6r1bvx6iv/k9XGsDVlqmZA7+rkoRjDPWtl3gmqcf\nmobTgQH3TGqqtQm3ITVKw1oHQWuTJyfbnMV4V8flcJY9/Gx5Ir98/Tz6hem+\ndgOpc+spQwCMhVX12YvTq1OyMXROSqqwWvnwnoL4vr7eUZdkVpLkPmBe+Amg\n+X2c\r\n=QSJ6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFQJgCO0UHaTViPIbgtkys9x61CNHvBBzlIHW+a2V6R1AiEAslKF+qayVGSHdLI+7ng8oGY7cLxuRQ5BktGVKnOnQoM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.2-rc.6_1630416910110_0.7268202108480983"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.2-rc.7":{"name":"ipfs-message-port-server","version":"0.9.2-rc.7","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.30+be900895","ipfs-message-port-protocol":"^0.9.2-rc.7+be900895","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"be90089554b3ff3d7adb02e76076e5cfa1d82572","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.2-rc.7","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-ByrjM7nkeGhNvU65CpdIeQI28JT/YmEKwwPzB1kT7hn6jxGvRYYpY0QqFemHS36wBYc+3To1e2odt/Go9yQOBg==","shasum":"ea342f61b93b6a402c3765677ed1f3084e81ef86","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.2-rc.7.tgz","fileCount":24,"unpackedSize":71741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMOb7CRA9TVsSAnZWagAAQgUP+wQT+LwmacNYvIwdCUpf\nBnIyZyuLBWk2UWR36wQhjXkXBp/693jWWBZJeSJneqlDGRKc530S2/PcLJr1\n9VL5G2C3MsBXZm0KHVmlMUYbgzacOkd2GCOqF5Wsp4Csh2CUNX6C/RvBt4HM\nPxSdy2jvlVJnV3QLw1SfmSuyMtavGMOzbVHRbdIQ6QV+gwQ6UjIw/sLYvj7k\n2smrS8yKWvOQgbbRhy+hvqNknu7QaL8WfvI1ssF7tbRcFYJnhEjofPUv+7Vv\ndMBpEj/sZee53E61BvgcF+qe0eoT01QzLSlQQvw/1xOF891aOOQnlIquCSVv\nG0lXKXeb1hFgWKwSEVnm3P/RG6n9OKANHhdH1IsCnnOX3GOU6lbO5CQXIJcd\n7NoireGROFUY1lL5z4K0/jKNg/IfNcJupUQ/G+o1XaLP0orcUHuBc4u+Yj2t\nvASChBO9MzxYJIorkdPJaKCgWI73SrV+YkzzXCzVSNld5SRMJmFVpm/Jv+BD\nROQrdknh2BHsm8LVuSTvjAQ+ZqahOCz9vInPXKjDXtItUkqNx7MXoQ4GxPVG\nFNmslE3xBR/xTe6n0H+dCjan9isxVvU1pqOPzawjYO9KgWqHPpXjpv27HeEV\np7sIudC8aaiXhLlUscnHhU1PNFBDjj6+TiVbwSFrLQADplmnjjK+AABJ57mR\nCSqV\r\n=/ZhH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCO2NR0ViPhNy1j62MaLY+sW2mfzsH2MxjdZKESQohcQwIgVEwJjekNGjAmmU2r/PKA+u+P0nZcjWaWTMLXHzuO2B0="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.2-rc.7_1630594811349_0.8214479934040624"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.2-rc.8":{"name":"ipfs-message-port-server","version":"0.9.2-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1-rc.31+c4f96fac","ipfs-message-port-protocol":"^0.9.2-rc.8+c4f96fac","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"c4f96faca331a2e0db2d6de35a804bf2b9457c80","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.2-rc.8","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-j09HFLRoBbCYDJkS/dYJ/aCDio9Jgdjq6LWVYQGsj36Qs4lGtYmI2XMjI4qOBJHaFPSIv089MuVAmxngElzWQQ==","shasum":"5c71aabd54e6e3418164d40b6ef9177ea85c0b2a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.2-rc.8.tgz","fileCount":24,"unpackedSize":71741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMQw+CRA9TVsSAnZWagAAv6MP/2/wysh3KDTtJwCQWjrC\nEYcD+BIJzGl1ANbWwnFz+QzzXlKkuSC1QXFWZpBAkxdGCOUcbgVJkdKgONOJ\nlkDA5U383KS8EY1Upt25UvGPiL7zsZ0ur59XjwZLPcgKf7UY9W2RRWBfuafL\nj8dOhKjwNhpalnZ3xQ5v26P3516JLajGOu0xULO4sBbMifmOo8o/paXRluEj\ngnnWidzH1aJxsLjbyIkLU3fArTcPBgIjeIEGvQgJSBuj+jVkQJYlxevYfQoD\nmKxCMGLV0nhGvkyk40VgsfnvZa+KMYTdzK80bIIpfJ4+M/by27E0nzuwFyRQ\ndn0ZD6onFTtJ2EW59a0ABL+MvGrdIv1Gnj8ZV7WDW2BTRy94mSvOBbKUiLdH\n1/1UEdk9eBZFRzRYumoYNAJphu0/eBTIW1R3BKN+rJ16/ph6V/C2z0kbpJOU\n0Kc74q9OnlLBdyHry16MJydqen86Owz7fV3WX3Bp5TbDzy/7qTRD1Acnp2G8\nLySvbKap7yACOSyBxzskpi/ggLoF9MrRQ7Jj1FHho28YB1eYoShKYpb/tP7u\nIzAEJkr3nqyRM1tz+owDca/wK+8qWVQ/9yNnbJ6Z6yz27IDy3+nDBTY213a/\nuF0kRv7eHjp4iWqCUtge+VbUxyzpJDlaxypkBn8jg1Rm5NHaTNoTCoauV1h4\nOoCI\r\n=c89E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDULBIia3KrTU2RhvacsQI1EPuacBp9MdvvzHsvHRv1sQIgTTOIPWFu57LXvXMJZYYYSjuq1LRnLPRKd3kyyntZdcU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.2-rc.8_1630604349913_0.22201909694823962"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.2":{"name":"ipfs-message-port-server","version":"0.9.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.1","ipfs-message-port-protocol":"^0.9.2","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"9d92e8079694dfbc7be262021cb9d41e6c5e2c07","_id":"ipfs-message-port-server@0.9.2","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-Y7kLmfETfSo8vFq6VzQwTN/c6YJcUVfBqTlTRrAKWOw0eZCKW6zHmTGGGazLtS4aZSLE8mSdC5FTl8PQIDnsoQ==","shasum":"f8c5a3b32b94dc09a99dac07ee6d2d6275c600aa","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.2.tgz","fileCount":24,"unpackedSize":71704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMRWYCRA9TVsSAnZWagAADP4P/3QSYDSDTG2TStulsRPA\nEpgKePW6EGr9Jb6EeqhAdiLCHR/pksT0Bi7Vddgzd1A3gsnwFKW9erURvgUW\nbbUuzbIbypAiEjHIi87uVn+upGfXFka/jxn+VOrHJ4R0hWfXLZ7FhX0blQDV\ndMOdg0OdyOTZ6LFZS/y8q5U1fpeVjUA2uLVe8rormSW2jkIfYqUEECUCK0VL\n5OOOMrBRgUCedWpsdpUJm5FYhxD6GRgkUUuq34tNCKl0jsfirvaolf+UL03n\nfRe2NX69KqXSOSmvcWZLaKd/rl0xRkBFlcCkOD0+oL5N794DwMnavuvAVgZ5\nbtErmuZxPs+CER7F93F6DTJnrLWX8OV32cMpfqWj0ALUlFwcGQoLTDVyXHbF\nBDTAwzkMo3oYqDPfwqNgAjOXHjjVn+P9QWp0XBxGG6MSfu96lomr6HsO74gz\n5olscmo9S+hcLhhU9wxUgkd0X9+qvR1LFgwh6J7ixFhk/6xQf8goebzVA7LS\nFVvs1CMaXgebri+q9sGk2GXVT5faMxptR6otWaCLoTBTFkxN4OvtyHZA81ic\nNcXXYssNW6QmwzUPHrQ7u3Hk18zWaHK1sehXLJgdl6rL24QmRZCAcnpzI6GL\nJARi9OC4bTyq9GN5ZWakc2atqBY3Q9+MLyv4XdtURU0UqxtsMCLIgUU9Xa16\nyaZE\r\n=vid9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbNjBnaAN+TRj4CC6ksZEd6NVBTKTSPVuxK2rlH+E8uwIhAPQcwIQ/NKReBEStoibP3aOqpuqTV5tVuxWTntIe2Br+"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.2_1630606744565_0.7308830326839513"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.3-rc.1":{"name":"ipfs-message-port-server","version":"0.9.3-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.2-rc.1+5cd78e56","ipfs-message-port-protocol":"^0.9.3-rc.1+5cd78e56","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"5cd78e56b8344b3f71fc7c578c4a50d92c25f0e8","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.3-rc.1","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-GWbeP+fYk+QwQUGc5hLRjfX/U8kP4OkmW3Qg2F/wVO9Yo5vHCBcDe4qRAo1mJtQLRQyMOgx8SiclWu2gtfERPQ==","shasum":"c2e4a37fdefffb4e1ca61e39da38d698330a1ab7","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.3-rc.1.tgz","fileCount":24,"unpackedSize":71746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNfkuCRA9TVsSAnZWagAAfewP/0CWHqy0JLlmtDXEsRrz\nbzGxqlG0ZZXyhDAt9Umuw9A5SukwAYdd2GoktZq5IU+QDfXJ0i/Py0NWWauK\nZpqzU4UsR3Ariy+Kb7N6oga/JL6hKZc6S9WTzwmigFrjUdYLJqvyWGzWGfWC\nGQepdKg8iHsCltTpTbHDDeNyGvLd2Wvcqll6mmsPRb+RaGaXXs/TTi8+xBj1\nQrC6pn7sRmRGPqGsW08MrDhvCKgxeqBW/d0EIaSA0tydM+77RBXpXUMz/eDw\n34XAbz04RDIdGIWtosbSyhB3bA/+H+SU5Zo4OKaCLgrkUcWucCbmj/8Rtd8h\nrJzHQdKCzrM8zADpgbvtw0gOqbLn71YEG6dDczetCBcN2xiF7dOA12Spn1ou\nO/dVnbcsihycsjemJL4zoL36fQYAKD8+DjBiKE3cjEspfY+I4dP3tSd7jJ/g\n81rJtQ662DM4ogpqCVG7QfQz3NVoAnRl2TGfFMt5CKj9kKqbwplC2FygwgzK\nBj20je4r6eB5eDt76T9dKZuQd0M+13/7ONasINpN+RIirPCbWWFKp/8sAizH\nvvryciXGhLJjZtR7b+z127775mvg9MaGtoltJbRQp6XVusxmghb/oaLrMRrr\nQYDNO4ds3gINJAwc6VONrTWdvoq6EJhibb9GpKHBP7EZHioyRlTYWZoZPwgF\nbSkU\r\n=bPNW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHq4NTQxjTL7bx3crW/52Bq7R1lnrStAGncnR+8yB1w5AiBs6y2XDBEec5U5y96X6HDc3vH+MCtONJedCBO1GovnFQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.3-rc.1_1630927150748_0.9928055699197467"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.3-rc.2":{"name":"ipfs-message-port-server","version":"0.9.3-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.2-rc.2+2be33543","ipfs-message-port-protocol":"^0.9.3-rc.2+2be33543","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"2be33543a07c14a604fd484a481032dd75fd8235","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.3-rc.2","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-HKNgy2rYOcaBaIkCUJZ3dWsX6I+7wPm3bAeTw4XRZLgIyE7K4KGGvZzpEQd4stQ9Df0XALc1Mi2u/G5UNKKeFg==","shasum":"52d62ff4bd43b991353224c585e27f48121318ac","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.3-rc.2.tgz","fileCount":24,"unpackedSize":71746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNi15CRA9TVsSAnZWagAAQecQAJSlDjwc7Si0/H30RjpZ\n/L2ssps4iAtHH8FAkbE4oplYD1gFTRE2j8A9xC9oY3GAdlbJ3IcXYyBaJ3he\nD6b7ZIfvntwJegpFgODdcAJk5bdoQpbJelT/uxdaBdl7+ZOPwwo57AbW2cVi\nT/NcN/Or5SS09sQyjyTh2bVV1NKYqpz6cbRRwjERs+LX0okY6JEl0yRMc/Nr\nBbNHtYmUkh7VabfWlUB+PF8NTwb+OQAQNY4AgRXOVDwA1/F+vnnK5vUn7QXc\npLM0Pn5iK1PLH7zguskc29aZnOBYppznAtrUr1ADS9WQL4tAYPeKJtoaI00l\nW/ezZjXeX5i5x7IWMZDKDe4nQSzoCsntsHh1lEviO+7jf7Lg9A8eLTlsuB73\nsDov2F40v7EwV5Jp6WS3/dgDBjkmaiJO3syLA8iQrpkZv6KXjiv3cwl6eVg6\nsX8CqAdzdr8+GQjbyfAoqaPtJKD/iY9NuOWZIeMEEgA1CDTzBtauR3KIUeSg\nHKI353ZSVB4kzBdZeJ9clSPVVofg9Vf56aCTXHqW8cwH4QSc3YSbL4tj54d8\n+TOU7NuEFXq3R/0AcNEibuqEhSaYlz+bSFlueNiY61JnMQJPM5OhTI2bpEfw\nCf0nRaQ96isS2HkLMbAjFIOfPbAGBe619F6e+nuKJKugOi5ZoV1DPccDstX0\ngw1u\r\n=DQ23\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTvRAfK4Y4lSxn+u90UeepyyPRO7dG8pvdNqCtmpVbUAiEAnHTwm8jA9Od5bISMEHLFglsior5Os/QXh69dYsgGtTw="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.3-rc.2_1630940537535_0.4449896518702403"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.3-rc.4":{"name":"ipfs-message-port-server","version":"0.9.3-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.2-rc.4+84c772ce","ipfs-message-port-protocol":"^0.9.3-rc.4+84c772ce","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"84c772cecffaf4deaf967c0c4e9d49c3dda73237","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.3-rc.4","_nodeVersion":"16.9.0","_npmVersion":"lerna/4.0.0/node@v16.9.0+x64 (linux)","dist":{"integrity":"sha512-ayLy+8AqqcquPkCVG9pVzfrjidbaDc4eNKEe9zd0m4VupNtqqfi+PcRxvySpHqHw3MTFma6zrMJAMvi/l1JQ1Q==","shasum":"a907f9b5e9189d1cde5e7e64e059f800ec7816a5","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.3-rc.4.tgz","fileCount":24,"unpackedSize":71746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhN5uACRA9TVsSAnZWagAAXBwP/2liSS6ggnR8Q9CgranA\nc2RKCI3Y3hJ8Z1DibAYnnzn5PnjJWTFDmb3ANJgB0VIbgOeHguu0OURDA+7M\nLw5vMKt58X/1dg59sofpQMp5KVo7RDFZjfZY7Pppnj/Kf7o8nwzbRN6V2uQH\ngGfPmB05JyQqsD6TDFz4zWQlf3EvKA+qce7t8YOF8aIyXWLpfTqeS2Go9Gzz\nP7BdgldD92iLS00o72Mz/5mdcf4hrkNFIYPD/z3tcP2UH+Ba0TPCGF3l2Wxz\nhNe2vBqjnAiHahqmHdqHgOGxdBoBhQqo96aQ7wwXV/fVhMwY7Hh0a1kLk6Hy\nbA+0QQbGenL2zePQMTH4CXLwRTpwAvRDWvBEeeIVcxjyO1T8XEbeuMJJfBJs\nUO/HywetP3ae1G4k+llLY+FA2y+Vo2Vv9Ekb693dcxCLBz76zqvr0fJwEarI\nsmYPKKhsNPvskhZwSJqT1/qkUUjAOYjLVThtZW6pDX2c3xrS8398Y686YCo4\n1mxM+hWqTd+uu1lk7yBWMiWAYLw13/nX+EF1or790Y7i+tOXCg0UQpcbZRU4\nOh0hHur8L3VC2/nJMNVNHBXJtFKGi6/7f3YUgp3+Z0zD3tJ00OxWdV3/Ci85\nRTyRGG6p5Bny4Q2ie5gNbJreX3O/uXaUKgyByeYZoNjyvi50fk9NaDZOY9sE\n/R4O\r\n=FxfQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCVptQ6SlPLJtoFWkOUstEoXt0EVyAJ7UshOX68Dz8kAIgcwPRusYbMfjRffIHhn/YiEcdgArMhWTWGspvrj+VUnQ="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.3-rc.4_1631034240253_0.6169872534371812"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.3-rc.5":{"name":"ipfs-message-port-server","version":"0.9.3-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.2-rc.5+b072ef16","ipfs-message-port-protocol":"^0.9.3-rc.5+b072ef16","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"b072ef1635759a3d64e02afd7a6d853a94cc06a5","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.3-rc.5","_nodeVersion":"16.9.0","_npmVersion":"lerna/4.0.0/node@v16.9.0+x64 (linux)","dist":{"integrity":"sha512-5QGy/jRvYzGe7t2N7t+N5K2IJ2mLkA6IzOygpNDvBfwjh080E9/x3YQ58FOgEGjQe+M2/l15x2okS5LHejwPuQ==","shasum":"fd3c3065b83c072c1e91947573ad747b8b5af1d4","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.3-rc.5.tgz","fileCount":24,"unpackedSize":71746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOINwCRA9TVsSAnZWagAArXEP/34umgdLzuBm9xWkYgXM\nVGJfbuUsWUb8t6ZBUPtdc/dIUWp7+f2Dn7xnO4Hdq2mOcixGixXQawlSEbn8\ntIFtq/4ByeMW3Xq/wnhfVye5GvVtxn9mzyeRm0Jck9qTBTVM3SUPBCRrlIKL\nOw+udm1aYTicQ+p/ootessLqUmcTah+qplMqLNyastiP05QPtc3NM9/G4zjS\nUzI3+AH2ER6V0gxEkUug4i4AxbQA3VzZnlIIFi8htQNeOWzohHA36rb7U3Vp\nmgFshmjDYPO3UbhGAh8YS7VLsgOa7dILYTsmUQh5IwqmquRaao5C36gfHsQX\n+LU/85pBRlHAeOpX2h5XkRyeAHMPj28BfwTTvznPSBCOAgU/gl0sbsOTbR+b\n0MpsH8UpA9wDikC7cwxb7K1tywwri+vChZ16uPPU5zt2ZgnDD/ZuFSmgeJVg\nMK7R39Iv51rb9CRLUmInQDUc45MZ2gvW6OmrHQDAxwyvW1Ui22mZSSF3L/Fm\nXFDOGi9ZG3AApFIcskgSoQzpruzVX6L1K7KCRVTWXaPruW4QqJODK4fa1oa4\n30OkOjhF5fZMXAJlPBRWmnYt+xiCBRSdjb+tHfw4YCq2z63Xre3yCQ5F47zU\n4nGtIhcdXXJr+uGrxAJZSrjA3+Dd3uf94+AspS6f3GmiNB9Qpnm7V2YmTDEr\nTIGR\r\n=/GN4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEpCKETmBckkla14SWfkmQOYPlvwiNsUI+K19BPSUXwiAiEA9NtSWJSmFzKkr+mIvpMYbqpfDGjx56Ecui/2h6KEsPo="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.3-rc.5_1631093616567_0.04649920336511637"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.3-rc.8":{"name":"ipfs-message-port-server","version":"0.9.3-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:chrome":"aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.2-rc.8+3a8f1fb7","ipfs-message-port-protocol":"^0.9.3-rc.8+3a8f1fb7","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"3a8f1fb75cd49c882d013ebc1ff600a9815f997c","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.3-rc.8","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-V1lYzivATSwWo8n8bj7Y3UI/lKIrIkh2Fa3aZsDxfXj6hMaQvOakiBau2A8qsA0rmKk1fkPrNGFRD7yh1HJaZA==","shasum":"c76fc02b17b276050ebb274f39ea1f14bc38f0b1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.3-rc.8.tgz","fileCount":24,"unpackedSize":71857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQKZMCRA9TVsSAnZWagAAAowQAIwftdQm2A1mLeUL5QmW\n3jadkE2PbmEN7bzPXxRMPr0HSwvesMh1WrNdy2rKMXChd5or7N7/NpA4niHf\nYcX2cx9314BkxD/g72xnAeN7+jKKrGksbwLPWbBUvtx/TelCwx6zaJIp1UvT\nuri2618I2iXqBFxtx5dpFNhoW7K24c5iUAxEtW5efO9V7aWIGugf3SmOdVbj\nxi2Vq25aptzJaf0QKLQGytNbdkIm/WKSImFqJ54lKbw9eDk1egZt3h1ocdF6\nnyCrp9k5Eg+N+1CeVAzDWskQBetINsEeD8tiV/jyZWiIdGNAuad8+pOfN5mw\nTsBgFv2CGcsE5o2r3SDvqg4OVVLmvpDvTthX+mzV6PcXyj9dZQYKAnA2J5L/\n7C5Ao/S23oJ8yJSpGzipFurieq4DS0tdn/3cH/+BwwvhBnCvpsP0kTTzHv1e\nlfPJi8DkFdVybPUqAmTb2JrHwIqP2uP29mf73zyl98nEZH6QcNDX+QI+xiab\nETyRdb30m086Yj3RkY/kK++6y2q5PEWZjwp9Zxcu+Bm1ONSyUQlAHXQzWmtO\n3RtQ2AZat0Bn2cXH1knfCIXYdlunZbxtuxfbHeMZ3AOtDu+WxqGvdljVqbUF\nmwWNKppdXtlzhuXHzrqNOpp9spCpeWn0r1j9T++IBbm8byDIZEzEHZkuhX37\nO/1g\r\n=mIcV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC8t1v8Q4Yh0h6Bdboh0u+aIgv8RHk4ye/hGehYGvrB1AiEAjVEjFnlcjo3+PX5C4Y5N6qT67ITE5oUzKU4zIL32+Ck="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.3-rc.8_1631626828253_0.058111047092828105"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.3-rc.11":{"name":"ipfs-message-port-server","version":"0.9.3-rc.11","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.2-rc.11+d4b4fd24","ipfs-message-port-protocol":"^0.9.3-rc.11+d4b4fd24","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"d4b4fd24ccb37ba7bf7d587308929bc4843398ba","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.3-rc.11","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-PYknmQydOYNlA/4HJWodBcDWwpw4C1irvJnLjyp/j7z1mGHr+UpC6sn5fqFcwrahwhnqbNkSUehBPjYTQE3VSA==","shasum":"2cbc08cfc0bf50f22be2f55c673c4b59b439db23","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.3-rc.11.tgz","fileCount":24,"unpackedSize":71623,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDGguDtqpvuYdLv9yLgVl4vxHsKUy/CTtCXiTstBKEaqAiA+6yhcqb3gTHCOCf+jMiADGJ81fQzuuQLsUMib3Si5Lw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.3-rc.11_1631883058431_0.15963768867932449"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.3":{"name":"ipfs-message-port-server","version":"0.9.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.2","ipfs-message-port-protocol":"^0.9.3","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"88c9921362ea5d71f7a3af67d30765c175783b5a","_id":"ipfs-message-port-server@0.9.3","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-ZS5oPDD0MvUphSf76ddKQGj2xDtmK5nJAPEeCw3flUll2LDfeyc3kZsvZTqV9rHKJ67F7BMuS9azYQJEc5E/ng==","shasum":"50583f242eb5b29abc20bd0e00b68129e81b522a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.3.tgz","fileCount":24,"unpackedSize":71578,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDs1ZTZFLA7T+twRbDCzFCrjw7l5l0xmmQRTOtwUyKP0AIhALA6tBlHD+BXeOveRl8Mx680bYY0inMWkSpS2mJOozBR"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.3_1631885047586_0.12524745265109116"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.4-rc.0":{"name":"ipfs-message-port-server","version":"0.9.4-rc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.3-rc.0+88c99213","ipfs-message-port-protocol":"^0.9.4-rc.0+88c99213","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"88c9921362ea5d71f7a3af67d30765c175783b5a","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.4-rc.0","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-y73WTZdvPnGcis50sWAwzsVZxjY2p+hqnSFWBZwxvcO38pchvlh5vJczBzWqexBE9xll+KffhtbUMMTLclTTgQ==","shasum":"dc9bb6d111444e061060504313289dab5b229e0f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.4-rc.0.tgz","fileCount":24,"unpackedSize":71620,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAsS+iXYJN+dyxEM7SSLIfqA4QCQ9+AS4mEHp6gDwrTyAiA1d+MJMY3lSTfZ3c2PjXljT/BROCoGMs5UYTSZwkoCpg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.4-rc.0_1631885419076_0.9867198305812834"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.5-rc.0":{"name":"ipfs-message-port-server","version":"0.9.5-rc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.4-rc.0+a49a89dc","ipfs-message-port-protocol":"^0.9.5-rc.0+a49a89dc","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"a49a89dca7d9b81d390af0833bcee2133959d1de","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.5-rc.0","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-wgwnIH0rnL7/1nxNzm/erFE/UoDteM/FzHQg32wbS4iZeHpoHMOKy28Ip8y8N4MXJp33DCTZpIJKXk745TMjnw==","shasum":"3f8d381ab746be791795c2bb50adf6bf19da171a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.5-rc.0.tgz","fileCount":24,"unpackedSize":71620,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnTlzO9G+zOSRNoLSt50JFIzeq7kB52b6ftTcpbTov1gIgJXbfTI16nDRxxqXIjymgdaVuO0SnIcwMsHwJVoLVJLk="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.5-rc.0_1631895937849_0.76811774327547"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.4":{"name":"ipfs-message-port-server","version":"0.9.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.3","ipfs-message-port-protocol":"^0.9.4","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"b5488cb3ef5ab7ea24b8b2275ffa8cfa4b7b7ed1","_id":"ipfs-message-port-server@0.9.4","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-iSxo2bOqxgC0yMzRsPwiewLb5yTDG8wta8CHa4/i+3w1CzYEfJIdCAyxVs6uyJrK6sVmMZVwKXWCZk8qJ6oljg==","shasum":"ab7e619e5228ac198f293c47109322474ff9f8ab","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.4.tgz","fileCount":24,"unpackedSize":71578,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHhx7Bi0fBE4y7Zq3lkdCTx45hgCHC+ST1hcZsME4K+gAiBWfBpLZSxy0h+FUJhiEnLS8zDe4YxnlGSnld6Ca8MjdA=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.4_1631896567019_0.5218819944687434"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.5-rc.1":{"name":"ipfs-message-port-server","version":"0.9.5-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"src/index.js","types":"dist/src/index.d.ts","browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.4-rc.1+4126a5a3","ipfs-message-port-protocol":"^0.9.5-rc.1+4126a5a3","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.0.3","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"4126a5a38bd7b42e96171b67e9cbcbf4efb94476","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nconst IPFS = require('ipfs')\nconst { IPFSService, Server } = require('ipfs-message-port-server')\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await IPFS.create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.5-rc.1","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-H0NBQ4mRclHHp8OGN3ZHt5t+P69f7TFuJurEQVPLOAdmrg1SttxU1KHgY5268oTnfo441YfiNvraoA5DGV1Pbw==","shasum":"aa233057dcf0d4a6f99530d31e5a1dbb62d59ebe","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.5-rc.1.tgz","fileCount":24,"unpackedSize":71620,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHDvrGtmEMIy+ij9vpEZ+SPccF45DYeuzfvluxmLD5XOAiEAo6ParlkiKh9xUSatNgu1/tZbufEEcUOuge3TA1+0gqY="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.5-rc.1_1632240651967_0.8236283919942766"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.5-rc.12":{"name":"ipfs-message-port-server","version":"0.9.5-rc.12","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.4-rc.12+98e3c7213","ipfs-message-port-protocol":"^0.9.5-rc.12+98e3c7213","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"98e3c72136abd56bb6e3a8ee1421f7dcc8c8533c","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.5-rc.12","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-vwXa41Ws4ZDocyJ2QYm83JBWxsQ/vyR6s+vsHVnnroo1Qfj2Q31L6RC7N6c2wxhYY7KNF4R/k6XJQU758H+6ww==","shasum":"f05b67c4a9de525bf990081e91bacc93d03678a4","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.5-rc.12.tgz","fileCount":41,"unpackedSize":76102,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVvDSr2Bcba6ckpWHwal9mZebGAd3kuzdAXyUoAYxvVAiEA14GRrMoax17kWSgNRJPgPH/E3WeDaTQlWOgpDAE8flU="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.5-rc.12_1632377776521_0.3456264683726318"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.5-rc.14":{"name":"ipfs-message-port-server","version":"0.9.5-rc.14","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.4-rc.14+498d9b0f","ipfs-message-port-protocol":"^0.9.5-rc.14+498d9b0f","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"498d9b0f3c5325af2d2f93ce1538c65f7c1eb2dd","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.5-rc.14","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-RA1qR/tSPVGQ9xxm2A3c6e0ciqYjvJ7/zS4uIe5JqKpdkRgBDBvRqXhV6auLcjO3LwyW8E0zvkphwjKN93kpjw==","shasum":"82cd6058274cf0732a082e30aeb409705835c88d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.5-rc.14.tgz","fileCount":41,"unpackedSize":75988,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdoNgdZ/7sgZr2c3MjmNqztF9/ugrG/rLHaKIDeqotsgIhAOsOtTkgzkaEnYKFvKJbeupLpqf7DMxalViGANb99Tmy"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.5-rc.14_1632394078268_0.35306352221565507"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.5-rc.15":{"name":"ipfs-message-port-server","version":"0.9.5-rc.15","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.4-rc.15+5de1b13b","ipfs-message-port-protocol":"^0.9.5-rc.15+5de1b13b","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"5de1b13bb685405ae081a824dd76e34228724451","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.5-rc.15","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-WquHRMhpvo7S8r/GGUhNzTFDmDUrtiXG1rNW/bU3Hn8MzFZj82xNIK2gefPKXmSe/GeZFg6rWcD/p3xheCgVDQ==","shasum":"896c250f72618dcb5bf384a0d892586b8455ca03","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.5-rc.15.tgz","fileCount":41,"unpackedSize":75988,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCO6WhHABT0T8Kboo9iLpFNljslca1iYyaCdAJONG1n9AIgJ1OrRPN/G5AJd68eNwHeuH6OBn8dIQ1oBDae+1fzTOw="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.5-rc.15_1632401815324_0.8650978163354583"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.5-rc.16":{"name":"ipfs-message-port-server","version":"0.9.5-rc.16","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.4-rc.16+be4a5428","ipfs-message-port-protocol":"^0.9.5-rc.16+be4a5428","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"be4a5428ebc4b05a2edd9a91bf9df6416c1a8c2b","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.5-rc.16","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-FSMue9G2Af7Rxndbhe5YJWlf1kb0lFu3sI1mKAS5ZB+RUlTlHtMwA2V6QpPV+OK897/ejUW5C0pAwrDlIcO4EA==","shasum":"98325b49ab7a05c05616c5732108a909be2ba54d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.5-rc.16.tgz","fileCount":41,"unpackedSize":75988,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL51MgecdCqkP7eAxaN2v3S7E/Kj5n4f1IFAcjqejCcwIhAItZ7a2bnX+OMWk/t50nBJxhfdOt/Ph+Q47G1Fr0rVs1"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.5-rc.16_1632421998360_0.30080662003395253"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.5-rc.17":{"name":"ipfs-message-port-server","version":"0.9.5-rc.17","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.4-rc.17+b0f367d6","ipfs-message-port-protocol":"^0.9.5-rc.17+b0f367d6","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"b0f367d666aceb4ea8bdd532a9d8c3501f8cc78d","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.5-rc.17","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-7nIDqgqaWkRAlb16sz96nC+jcHKj48pXtZRrHbIntkwmKCAhSaLR1xyuFtU8cDn/MDdm+A3+XoeL83dA74jMXg==","shasum":"8ae396756d578e72ca9ffc735b4f8484dc147c3f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.5-rc.17.tgz","fileCount":41,"unpackedSize":75988,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCl+8g/ynoP5GFP1uJy1J4aZeBJcvj7GZY6wnyrm1tzrQIgeufFgugRClFQcezUJrz/3XwKxpOg2MuYLhGoEUBoQaw="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.5-rc.17_1632482449552_0.42782512997219513"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.9.5-rc.18":{"name":"ipfs-message-port-server","version":"0.9.5-rc.18","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.7.4-rc.18+938a7d72","ipfs-message-port-protocol":"^0.9.5-rc.18+938a7d72","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"938a7d72896bf5e5afb2ce6d472aec4fa4929a3d","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.9.5-rc.18","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-Bh7kEb8daF0K1nTotTQig5x+h54kapVV6FL1MJtIuwaFkGHPVbRpYEzODC17Dx3HdP/4Wa7A5XMpPg3AXr7CEQ==","shasum":"adfd5ea5e15d39440eb06a3c14963783e0591021","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.9.5-rc.18.tgz","fileCount":41,"unpackedSize":75988,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRb3huqFGH9VWaq6eWWDfVpiyLIX1DXnNPPEj5WLV28wIhAJcpckS8ab4lKscrSi/R12Xx2ZONaKqGED39NKLp3LGJ"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.9.5-rc.18_1632487538701_0.9330762380667181"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.0":{"name":"ipfs-message-port-server","version":"0.10.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.0","ipfs-message-port-protocol":"^0.10.0","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"cbd3e948deb5a6489cd69d1705a0261860c2ea22","_id":"ipfs-message-port-server@0.10.0","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-nR79r6xn6fm5bdDlSaWn1JSAlDBF6IJ6eWrQlI4W5ISPGd3S6b6aPO3EEuowKABlJ9tx7rKbM9+jisD+xNb+tQ==","shasum":"954805143e5e63f2c3c63e554bee35f28a4f3b29","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.0.tgz","fileCount":41,"unpackedSize":75945,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEsyvrgaxTVcWs8gpWC1R7cvLTIW/jeLeJQ8FAqT1hNHAiEA6H/ksJ8G5DXDx5DJ9ZSuVk84PRJgbM53fuaQ9nHlawY="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.0_1632487760422_0.8319534237341295"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.1-rc.0":{"name":"ipfs-message-port-server","version":"0.10.1-rc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.1-rc.0+cbd3e948","ipfs-message-port-protocol":"^0.10.1-rc.0+cbd3e948","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"cbd3e948deb5a6489cd69d1705a0261860c2ea22","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.1-rc.0","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-kVu74I8jv98MBEonznG7XByKpXxO89oPdGELxXoNw1+zZA5HJTnSBCQpmu3s9XNUrRGEsBigJ2hu7KdJzVP0KA==","shasum":"9ee212b00b8994bc455bda404e05761dd7ac841f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.1-rc.0.tgz","fileCount":41,"unpackedSize":75987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEHfGO7F4UkBCYFwo3cL986HQEVLWYzVY1MJMZ0hD1cQIhAPkUxTIjOLRXIWjGkh7rfkdDrw6+Je1QTGarzBTDXhkw"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.1-rc.0_1632488021769_0.7695693010652445"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.1-rc.1":{"name":"ipfs-message-port-server","version":"0.10.1-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.1-rc.1+a0e36f40","ipfs-message-port-protocol":"^0.10.1-rc.1+a0e36f40","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"a0e36f408135c963d4fe3a66ccbe94e60ae5d8c7","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.1-rc.1","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-LPuMPveSeiLNeXVZ/Qez/dikbsXnDzYcPAUHkioQSnjQ5N3S7kdJG7p8sjpbBah5mTagswIsyia9rZOjk1FfMg==","shasum":"2ca7e00525fa57b58e1092e28151cb89cc04b270","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.1-rc.1.tgz","fileCount":41,"unpackedSize":75987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSbnCH3En2XTlAkeHgdzepRdADd/9v23zqITLhlRC+9gIgL65GWUsl64zy3nF2rc2euzUD7u7BcdgfmMs941906kk="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.1-rc.1_1632590776890_0.5736480792912755"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.1-rc.2":{"name":"ipfs-message-port-server","version":"0.10.1-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.1-rc.2+78060914","ipfs-message-port-protocol":"^0.10.1-rc.2+78060914","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"78060914410f54f443aad4c5c0de39f899ec6f40","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.1-rc.2","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-f+IoKTkGV7YxDN41jmcGrhi8WiTc2UUdEcKUt/jZzHWm1lgN2psn8xtSrY2R/mQPZAqYDAjiaN9kW8lLkYzz6w==","shasum":"5459d5c5d7058b82190db56a5a3d2ccd4bb55cd2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.1-rc.2.tgz","fileCount":41,"unpackedSize":75987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEILcASr9tAiKGLOljIzS5oROaWsFUONjUEER5JKn15aAiAtSM20SK7nSIXA6vdoP4b+4C45bE2YJvi0MWsOT/0ROw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.1-rc.2_1632593473310_0.06406519354484641"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.1-rc.3":{"name":"ipfs-message-port-server","version":"0.10.1-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.1-rc.3+7cb98616","ipfs-message-port-protocol":"^0.10.1-rc.3+7cb98616","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"7cb986167d2e51ab0ce94104bac92ec63c0a7cff","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.1-rc.3","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-gEyD6X7TQoD/k+kK6kjDeupIGlVBZAsVZKLgIgUPWOdgjCk20HEEKYO6d0oPpkrnpTqCoZ3ukLtLujHk44nyzw==","shasum":"216d3dec6a786d7b78c53930f3d6f8164921f345","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.1-rc.3.tgz","fileCount":41,"unpackedSize":75987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9gu2YRascLkb6rVXIPsS1wAMyWLwjYwPSGTwir3TQhAIhAPGsFLLaeiKSzpMHF3cHlQ8NclVRWncHpr0f72Jw0gZB"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.1-rc.3_1632760653162_0.7948760174004952"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.1-rc.5":{"name":"ipfs-message-port-server","version":"0.10.1-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.1-rc.5+4dd8acf4","ipfs-message-port-protocol":"^0.10.1-rc.5+4dd8acf4","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"4dd8acf4d7df0ece0afa764d44dbdfbf788807e2","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.1-rc.5","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-1Tb88JAoSKUDEDbgN5mJJOtw9HZgXQd4s9GnIDLWuNdEOwvdM5AOEUIMqNaUt2SeTD8yY2Ob0bW8SFyRAbz0jw==","shasum":"1388a112f39ab234e756cbde77cbb5c0f0a5d3bb","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.1-rc.5.tgz","fileCount":41,"unpackedSize":75987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqE/mXzHWUmN9blgf9M2Xz5xOIrjHOd1hSH0YIq4W3ggIgflR0JNBoJ2ceM/qArfOQY/Rd0x6y5MDZzOqgEViQ1ds="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.1-rc.5_1632830416910_0.8153472501994017"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.1":{"name":"ipfs-message-port-server","version":"0.10.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.1","ipfs-message-port-protocol":"^0.10.1","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"5ddd0c555cc6577ee15667f4ef4e7f3a3b17d04c","_id":"ipfs-message-port-server@0.10.1","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-awhvYO9mWsFr34h4hwoZuDVQR1HW881RPcC2RFBP2kAispdu0EvdTVXmXWwKw0uAqDjcgmlE/3SwiixM9Pgmdw==","shasum":"00f212f5677073ad46c9ed751b8be8f49d68ae1b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.1.tgz","fileCount":41,"unpackedSize":76056,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4k2hz5BNZc0pca0pz3qyvuNADwfC2NqpU4vejE3aHRAiEAus7TAxQ/oOq399ZPBK7GqtdGFoj5Ge8TMos/ydjgTjs="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.1_1632830583781_0.2206241408272962"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.2-rc.0":{"name":"ipfs-message-port-server","version":"0.10.2-rc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.2-rc.0+5ddd0c55","ipfs-message-port-protocol":"^0.10.2-rc.0+5ddd0c55","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"5ddd0c555cc6577ee15667f4ef4e7f3a3b17d04c","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.2-rc.0","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-Wo4MjLOfVtO0rlkHevtpIzN/S3pEluUDLt8HuxOrHJCo0HnBaxJPUKXvCr97794vhA081eRT3diX2zI7K3Sqyg==","shasum":"49ad8ae690b2501ccf86fb29aebefe4c67352f72","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.2-rc.0.tgz","fileCount":41,"unpackedSize":75987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4tG6hpF0HWHlpRTm5ZqU80rGRoFMoAM0fk2wbS7e22AIhALV4UC9mMwTs8snPc9zbUr1g8wWXYrZb29SLh+EJEwZb"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.2-rc.0_1632830863298_0.7494258295280678"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.2-rc.1":{"name":"ipfs-message-port-server","version":"0.10.2-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.2-rc.1+3ce2f769","ipfs-message-port-protocol":"^0.10.2-rc.1+3ce2f769","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"3ce2f7693b59ad4176e245c4c7e75a91dd1bf94f","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.2-rc.1","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-DahpDpXSCj1okqKoPks+awWev/Fb12fIzM7NF+JGFljZbXsXU6f7GnP13v1TyOacMBnDp5Vmk6e3wfzB/Vz9vw==","shasum":"304d8446f82043fcdd0f3914f8b37457b93746a3","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.2-rc.1.tgz","fileCount":41,"unpackedSize":75987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHX0wlPoBgVyA64Wd1VZvMU/cGRDb9e+oHm/dG3uZs1iAiEA4giNSU6Vg6sxeJLO2pbvXXD924cHZBWOdTZZKSrmKCg="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.2-rc.1_1633016935930_0.11171649409054907"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.2-rc.2":{"name":"ipfs-message-port-server","version":"0.10.2-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.2-rc.2+b09a18cd","ipfs-message-port-protocol":"^0.10.2-rc.2+b09a18cd","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"b09a18cd98883662353d116a8ff25a3ddaa48fc2","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.2-rc.2","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-jxF6dOUnL2cqvhIvz1ou2mKRp3FpMLK2KvYMSm6kMyZV1tBGcS+D+ZV9GZ9orDaf808zKPeiPTPDR1cieJSSmA==","shasum":"3d8c6688706f7e6b35e5cb59395017dba415d577","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.2-rc.2.tgz","fileCount":41,"unpackedSize":76954,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4FB0aQevFfum1SLLyYjo3KL88dzgMEON760j993iV4wIhAJsjtgQotBHlQ8Zy7UnTh8vzM7JXzhEl0KwMsbFYlt3n"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.2-rc.2_1633023556427_0.8466239801959108"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.2-rc.3":{"name":"ipfs-message-port-server","version":"0.10.2-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.2-rc.3+bb0dd96b","ipfs-message-port-protocol":"^0.10.2-rc.3+bb0dd96b","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"bb0dd96be3e570f5a43a4f31f43d1c97e8322605","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.2-rc.3","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-fU43BOIabqhRJAu1uWr3mwvrpV/Z3cjy0iacE6PYBpORpzprK6MEUcqMNGgdVT9r73CgGvv0QTrrRYlTFbjYJw==","shasum":"8cea4a7b6ebdc05dc69a6bac4bbf66298d25af04","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.2-rc.3.tgz","fileCount":41,"unpackedSize":76954,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICn+EwyLxz2V0RyYDtXS+b/9P/2qFOZnEwnrPPvdpMEgAiEA/VZiqaMPJTnqqlkfnta+CiK0H0YHVoMwKpFOxKtQH8o="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.2-rc.3_1633179498125_0.9546522166327287"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.2-rc.4":{"name":"ipfs-message-port-server","version":"0.10.2-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.2-rc.4+09c7bf7b","ipfs-message-port-protocol":"^0.10.2-rc.4+09c7bf7b","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"09c7bf7b63620f84d50c8a3983a5d4c28410cd82","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.2-rc.4","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-BneF2JmYPswAQOLc4Z51tz/i8DkRtxvaPdADeXHaV//jXiCsSfds/3LDi4hC4v2gV45P3qQo1oqVDg7JrzLGag==","shasum":"c70af893b6574af99dc9e3ebeedbf6999ddcac01","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.2-rc.4.tgz","fileCount":41,"unpackedSize":76954,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHZZshDvIYmq9+NtBLg9GOE6nZ/DBGaF0vCK+r9bzqNZAiEAwSsOXy6OU82qSf+ENCL0Gq0EqDNG9sIoMsCVPPHyHRI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.2-rc.4_1633703585007_0.3072924649676507"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.2-rc.5":{"name":"ipfs-message-port-server","version":"0.10.2-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.2-rc.5+15184bf1","ipfs-message-port-protocol":"^0.10.2-rc.5+15184bf1","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"15184bf1838956a44c079660a4d82c24166407db","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.2-rc.5","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-/71QeegLFynggLUHmIXTNmS8D3k4jbxhhjk5BO+pUCVKN41r3oiz/QR0P5GaTTAlvP5Mea5uaH1tr5VIbfkYgQ==","shasum":"8012343ddf5707843337154a478d90ad20baf9ba","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.2-rc.5.tgz","fileCount":41,"unpackedSize":76954,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB/sb7Jb5ROXBKTaqHTfNsymHWzmSBqaJy0cqKjcgxHYAiB9G/Q7DC3YihOqXeBMMK4EeVzoFHIq5gujTflcRW7dzw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.2-rc.5_1636010781655_0.2981216823979975"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.2-rc.6":{"name":"ipfs-message-port-server","version":"0.10.2-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.2-rc.6+8a3ed195","ipfs-message-port-protocol":"^0.10.2-rc.6+8a3ed195","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"8a3ed19575beaafe5dfd3bce310a548950c148d0","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.2-rc.6","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-4tfHihtHgsnMAa8JKpDmrQ//0p6H5PmrvJBmae2g2nlf9Tgc9/LR/I0Lr9tYVu5baEa5xuvHryJ3gfyFjP5hFw==","shasum":"3a073319ff976ec959c128512fe649a3231ae0d3","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.2-rc.6.tgz","fileCount":41,"unpackedSize":76954,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDy1UHLntjMnREzidCMPVAq5Qub6x26cnoaquZVLp3v6AiEA4+mTOydLZF6cp9j95bgbptF2F2pGZEWzgXUyo7t1CtU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.2-rc.6_1636716675930_0.1737669343329502"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.2":{"name":"ipfs-message-port-server","version":"0.10.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.2","ipfs-message-port-protocol":"^0.10.2","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"568aeadd8f308cc230de06a956c1a9e6102094b6","_id":"ipfs-message-port-server@0.10.2","_nodeVersion":"16.11.1","_npmVersion":"lerna/4.0.0/node@v16.11.1+x64 (darwin)","dist":{"integrity":"sha512-hJt9N63BEAXw342CnTmjoR/uw/VJZ1Fo/c3oZVJUISPBAI2bkKrw47+eCxVkFG9VyCrRsqzAlJN42IQKkbz+Mw==","shasum":"d4d465b4481a338bee06ca5dfdd7715184feab8e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.2.tgz","fileCount":41,"unpackedSize":76912,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuFHCZTct+OE/1DdP+IPKClgYevrIc+zcXmE/BB+sjbwIgVCU4Vy8LuoIuGHHC/ZrUZTt5yfMLnx5TkR5c0KQn2Gs="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.2_1636718061511_0.8366118732822143"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.3-rc.0":{"name":"ipfs-message-port-server","version":"0.10.3-rc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.3-rc.0+568aeadd","ipfs-message-port-protocol":"^0.10.3-rc.0+568aeadd","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"568aeadd8f308cc230de06a956c1a9e6102094b6","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.3-rc.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-ubWEKsgks2v/N0djpJN1hupXRY+FJ4EoIy0cuc6nFmECAjsiUhZTiT2j3HMwCbTVfE59319piPzcs4SioJ8HJg==","shasum":"ba4232089efb53334a4bc26553178c211d330be5","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.3-rc.0.tgz","fileCount":41,"unpackedSize":76954,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGerz4X/n/eciXzZYCsDc/jS8o1HtmHslx/YD8nZDZF9AiBfC6ttv6yZU95plikMKlqlsx8+hvOv7ZZAmwK9+QRWMw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.3-rc.0_1636718170293_0.334559450359047"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.3-rc.1":{"name":"ipfs-message-port-server","version":"0.10.3-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.3-rc.1+f419553b","ipfs-message-port-protocol":"^0.10.3-rc.1+f419553b","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"f419553b9dccc0a1172f399c41b766a754a3ac56","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.3-rc.1","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-zr3xISl8pvsFkC8yLPAGeE1SN+o3bMDV1mRy3pawyrxjMnz3ifSOQH5Y9XAgXNJTRFoo/IYPcTRxiqYeOSORiA==","shasum":"5440b6ee2de2c0415d5383b4caf976c99daccc1b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.3-rc.1.tgz","fileCount":41,"unpackedSize":76954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl8XcCRA9TVsSAnZWagAAUwsQAIBau8CRmSsqsQJ3TuMR\nL2wDrk2u2BJIAY9Tdvlrmp6AicrxEqpC2JtWqKYTZ6AzfZVxY3MI7l+fqM3w\nam1o+LoS8gXGa/Q24fsyhhWR33s3nAN9i9l241Mq353MbANvpP4c5cCukzkV\ncZEx8x3M9F5xeFyPTBpFWNOmn1i49e7wMwGlyX5Po8gidkvBKq8vdCnIWyTt\nJ+Iec7KG+OyCZAu5OwS9tPR4gVs/C0+ArK/cVDLE3K0pgsFDMBHrlE/RhpeE\nBi0ZOaSip7NBcTrNz7sX5xf3CstADoadyBPgmyWgW/BZFkRroTOsnHu7feij\nHn4niH88rUUxYOKJNbYm4RKUsgfelUNhK1L3o4tsoWW743W6fla8kBedG/o8\nP8FZEhbAEyuggik43hG9/6zEQ2GFg8Rxuo5NBsBOVuzs3G85cS/jVdiHdPoS\niMcRt5e1halJykjSRZl7a6I7B41FPolp6+EuZyPQScEPplI5oFoUwS9Epnh0\nBMnmAhM0d5PU3RLjCyEush8pG6izZgjdTbDO0faONgD8ZD6BqGmgvwfW3y1I\nzzLiW7chUtSpqWXEZc6M7fbvXcC2+eqR4hSgy0LzC/QZMntWUh7MltLMRqi2\nJSFau0Ll6weMUbv4MwZ9C4xj2OmJamukkV8F/QuZzHvHCbI/v8vLeXdB1mw2\nsWia\r\n=E4nm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+WLWwOkWOGm4RycYm83hwDuWMH1QkpA/xrQTWf6TQugIhAKknwzwZh80AqmitKuK6iGpqqoPL7TRX1fmDpY5j0Ljf"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.3-rc.1_1637336540066_0.9358706233013636"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.3":{"name":"ipfs-message-port-server","version":"0.10.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.3","ipfs-message-port-protocol":"^0.10.3","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"fdc148b5c08c0be49eef77a18259d5baa895e3f9","_id":"ipfs-message-port-server@0.10.3","_nodeVersion":"16.11.1","_npmVersion":"lerna/4.0.0/node@v16.11.1+x64 (darwin)","dist":{"integrity":"sha512-3m1Y46qwZa9S0FP7uILCuYC18hCSCaIgGlqirSda4A1GPtKX0gaGvSWlFBJjSqdt6UYsYwGutHqUlF+7zgIYXA==","shasum":"a264b42a55d332b34c945e4d86e7ac8b318689e8","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.3.tgz","fileCount":41,"unpackedSize":76912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl8bBCRA9TVsSAnZWagAAWX0P/0CP6W9XlofKJmLZ11y6\n6qQjQDyLxc/AQtYU8pwoYPhs4PQ0LFciHVTrAaQl7CaGnuI1sTQLFGRgewKE\nwVY4rP68HVqgA/vEFx1tRek1A+RWfXZUclcWcpyew8zTRhCF9GGpEx4zj8fe\n0RaWlIub9WsjIFJ0CBjepaJyW+Wb9Jt2igEnZ+QUnUvhe9cZmqgUNiToTx3G\nGHJZK51XP91XTg5Qzs0wAPgdLRAG8XrNGGW8u6zf+RWJJqCO+nxMXe+qrngD\ndJzT68biGXosE1LQbRA1DjGjQIUHfddUpNrQNwBeB+RT5uKIgmYuzEQzr+8y\nLBP2Rld41lHLG7uC1J0eX/nxmV5UawRuhN39JXkty/UVtp5NgHr5FS1i1rVT\nKNqlAS/TEZIq2ot00KP6Umq6T3cojKQKkUapWqWigFxKlPZgzyQlmOBZ9KaT\nQMOFaNaTVl+SjujkqZ2oTNcrnywBQ6lYP5Fj91PHo0LycxqR3VIuhKXym01t\nTzWZRiHegqVintVqb1ml6fgA8/WiRs/EIS+SnHnUSZZ3bUgz6gepAowK9yW8\neVcokIZJG0ArFPTwGg2grr5Hck15tuO/7otgN09wueQ0ckxfWPaOsYz9QU8M\nnmDGrcMzqas2uwy5of4Bd4XfP6AdXeEmcRiD9B5N4BpsdxFQPyz+HhUA+2rf\nZOIp\r\n=+3FA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF85hWtxlGK5vUELTImAN53GC7vcI5juLyDlKfUx7kSzAiEAzOs9Okietk8kPfpssc5PbUeFjaIjcn6HWHiWC0R4yW8="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.3_1637336769156_0.7342076186070905"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.4-rc.0":{"name":"ipfs-message-port-server","version":"0.10.4-rc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.4-rc.0+fdc148b5","ipfs-message-port-protocol":"^0.10.4-rc.0+fdc148b5","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"fdc148b5c08c0be49eef77a18259d5baa895e3f9","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.4-rc.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-SU23Ff6Ni3OXDCnR8KAhxYvFhFNUOUmVUq/Dz/UVT1KwAfrNPQNUuYWTw4qC7gNjJAu4oOho2WrKlHnrsDQLWA==","shasum":"395aabf78d83ffb7084ad5ac249002ae0396ea50","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.4-rc.0.tgz","fileCount":41,"unpackedSize":76954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl8dYCRA9TVsSAnZWagAAc0gP/3a8fELLXCSGlNizxYrK\nvjvarY4iuL/IZfGTmH+cNGEkBrzOqLibNQCxGjnmLhBkLy3mQczSCbddzsYk\nzeJlXWUBz3VzBLMAS0M1FEPNI2rNgZ3fXGBQD2pYkq494HKVfIuTtVFHNDbA\nrtmWh+vtY/bMsA1zIMm19pSpW+ANsbx7Eysaeb2iVl52tHiINlMsq3cq0XSn\nB2uU5R2mqOXCHLRlVjvILZfIYV9xbxz/XtJ/6ktbAu0V00m8Uz/l2tnz4amI\n5WKYA6+AZw3CG/5RrF69jlYmDNnKeb9lwOfuHvkLhuJDyUFRskCtZ8R3GYu2\nB95kofFyL+2/usRT4PgAbvL283p85WtcP3M3uyWtp+6kh3JZd9aDm0f/uVBv\nx2aaZI3iV+g1qBDA9KiokHRhz5jaz343g4wGfx1zcXgG9L5sc45QJKzM9QFi\nybwVWTr02jo8bSQTz4KVh2EhbsGJByC4sdddJJivy2JgB5E89jdTSng4JnQW\n7f1bFdByMzkmI8I3FmpxgMNeabDPYSSTx8Fl5mn7JsdiAOhE0eEvqpYf/Xcd\n9kXY7cTTYV+eqHQT/A/3zTv6aoAuLp9etrmFhu6RNfAye48CbP6WvO07z+un\nirSdduppVGBZP5/Kku0BDktSNEo+qEqhe4PxpRM68AzLVi1a4jCqKG0YvgLs\ni2Gg\r\n=xuDB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzivgLJLzfaGgU5Y5+69BhQvku1efRpVFtISQTfAzU/QIhAOMqqzOwd2+4DeFCZWAeNhQmXxCQtwJc1CnUcIsFH3DZ"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.4-rc.0_1637336920162_0.18158938413590775"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.4-rc.1":{"name":"ipfs-message-port-server","version":"0.10.4-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.4-rc.1+041fc29d","ipfs-message-port-protocol":"^0.10.4-rc.1+041fc29d","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"041fc29d151e8727ce9aaafd2c46a4cd34baa8ce","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.4-rc.1","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-JcNADBI3rcy2Wg5dDrIFW+mr5KeFVhH0vv4EBG+sL4W289EDu6SNZIWgMGX89fK5Pg5ZaP68QMxmfqPDSGUhyQ==","shasum":"3f7f05b2dd5e02ce4a5693d69967cde457dd69df","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.4-rc.1.tgz","fileCount":41,"unpackedSize":76954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl92cCRA9TVsSAnZWagAAxl0QAIPySDhvO4pq67rGBO+M\nDsBscHJJaEaN+Irk9g8tr3iEldb47QRMCAnxuwRE1SySWHcrQtZeuy+9bUB0\nZK7llOc8bgu46IxOd/YwpGucR9JaWs43Cahmd53Z+fNUpLyx2Z9FvJAPVKiT\nFByPGM7er9+Lq6egwgeKiRyHepWz/pskBnLPA2mdlcMsmVPM/pUg3AYNssG5\nvAMn0uMWPfU03veAL2ZQh2CuFV8v52r9TWzIQekqHahSmOzwb6lXBLnNH4MN\ndSFs0PD9ghh/yDK6c7+gVlD+pFHix473IRqeAvTAF+MR3QIG2YZAG7CRye4x\nxqczsUyFIz8iWfT0yju6CFPE8JCbEfKhYzsnT+qBOP/NNccqbDUsxmpiT0Yy\nwaX0O/FIjs0hmxi/1nUwvWn8CaFw0zrPvwNsSPLlVY289t7EV3Cdkt+2v3I7\naDt8cAobIFfalgwMiw+eW4lS1iI5MNfmGq97S7QSd/5+FkwT3NWkYky3MqaY\nkQMvOyfUR8n7Z8yGZeIai/GAveacDFS+pBp6pDpm64t3XhREYfwCmNL3XP8B\n1GnZMZg4yrYJb1PJXsAOhVzBFiEP8lC39vtjdfFKkUEk8pg7CCrwA7oUScL1\noDN874aGhhAY+UDCKysIjD5HNpSVtvPO0EDTXHfn0wxq13hPCRmcisl2apfW\nC1nr\r\n=mvao\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxL2dk4olGijWH7XS2EUQUWi8eKqWEhiWlD5zTK3iiFQIgX24/clVvvS7ezPe1nyax0W41GVwNncwbMAj1AXWLqKc="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.4-rc.1_1637342619839_0.34472952528164824"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.4-rc.2":{"name":"ipfs-message-port-server","version":"0.10.4-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.4-rc.2+70c67e27","ipfs-message-port-protocol":"^0.10.4-rc.2+70c67e27","it-all":"^1.0.4","multiformats":"^9.4.1"},"devDependencies":{"aegir":"^35.1.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"70c67e27d0b82c7650a2a0d7a646afdcd24e73c2","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.4-rc.2","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-5u/V3MtT1+wukKh7Gk6omJckZIT8fuKds8gYPiJXhifT34uPV5unyIhuIQGWjQrvqU0Ib6hZKf/eDS/dFhK61g==","shasum":"62887d4e3c7a774e2c20e78382dd8da5806d1ce8","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.4-rc.2.tgz","fileCount":41,"unpackedSize":76954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm8KbCRA9TVsSAnZWagAAHE4QAJaJ+kt8GY6bu5tfHPHC\nrCpoZpySU1EVa5L+YDoxAJ/AAeljSmW/yU0xNs2CLJIlLIkInoAkDm/6EvWk\ndHOY2WEyDRHohEhG9gn9j45Yl+xcblBlTCuxyfrsIb7MYM5E7l1yw418pn9w\nbq10OZl+OrEZSv9ytUj2OCWd2AVQXL71+Qx84x/jT7sCiItLfBFPSpt9JNpI\nYEdCmBus4OrbIBYqRv0aCpGLnL/mY8oUUM4fOKxTTPxA271UdgxuL89eveLp\nSzgjfj7+lJyXUOgbjvt3+5TOgu0qG/ypwQEnhB/xVc7lpKynB5IRG7spuVE8\nDYKVH16McpZmydkSRrYC9wNz4sGxK4zMR7AHHaZM4wEjCFAZHXJwwkmsKFOR\ndNpgc3wng8PJyHJA6tcq3RA5TSMQT5KBXRaqScXU1VeTecuM3g5ok7u1z0Vv\nrxAQTUgpUYqXz7YZ57s7wuBZKtAp2JvCYAeLMINrLjfnbyV3g7V9pCU6rIIZ\nHV2wIhRAAhzDYYXN9tI6qXW3BXAhJLAFxiqfM+Bv700aYZfPf6262dUv8+G2\nUwTT43c8mWjwD6lu6I0V1Q+bxaQPkqSCPQLq2qbe40K9fpDru4zopWjHNktS\nwMuBFOXR5YcPywp3E5dlP88w7heVBWI/S4fuQwMRKAvFPzL/ZbSYx/y43Ww4\naPVi\r\n=raTY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBtTktBwO554x2Va4MG02xRiSLPNeqaN1da0bk8SgjcAiBC4EDgfQqgsY25p4BPeqijn7559DqiTjtztkkLjMg61g=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.4-rc.2_1637597851076_0.419884044767201"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.4-rc.3":{"name":"ipfs-message-port-server","version":"0.10.4-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.4-rc.3+484d2559","ipfs-message-port-protocol":"^0.10.4-rc.3+484d2559","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"484d2559cfe120f01eb9c5dc728d1f7cfbd89730","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.4-rc.3","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-3gMizI+F+IWTrR61e4uGCo7VVFlI+IgPI65pYRs5tNUzJ8KXGKJjK12ytoUBgAyWJJH2jGmO+Vl7CL/q7nnGFA==","shasum":"dfa07a95b146bed1b89fecf27a74173420bf1674","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.4-rc.3.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhngd7CRA9TVsSAnZWagAAF6YP/1y2TgHNSHHiHFjv43Ts\nXdYMxKrdWn7y1v4YTjZgCDBvqjucKj8pTkmDIKWaRqCaH2bL+kVE94Zj0DwI\n+pQdjbryvvipHBFEScU+YSYmPsNUBN89oy6tgfhZdjdgNj4c3poymKRRRqXx\n8fbZ0av5PCAiztNxSmZCAQqMnQN6rWPyfI3POslklxOQfC/9SpVHGTXRyZBz\n2sPwSo/XTn4igHBCE1nEIpoLYcq8nw6j4w4AE1XhBXgcylXQm3WSSBl1MTtA\nzsT3v7HLnTXOAE0kzh/qWvp5Hg7wB0/2ssQXYEpAUPGHeeRSSmyvLRJfZaBi\nYhSDarfjWQaQQxrPK6ADvjLCg2yb6xWOjfO/YSNC6WUKBM/+jVNzPtWVuDCL\nfVbAD4a1gqiZGWgIGPGa/LLwVY2xsX7oiGxMylPmbEg1Mp73+3YH+rq+eJM2\nos9bp3cr7r2W6CijseVTdECTzuQ0EgcFRzm7agDkYAvapGl1Wy5bWEi9pBcd\nBE+StwB7RKVvDkVj0hds7p5/NNzVnAN7bbX5h41rARTqORz14y7UYqIlxoLH\nkry2uTHQwhOApouejoTkoW1ixP+3u3DKmXs3rIq4zmjdHsoN9gtPn0gJePxh\nqswdwB77NBgpbky8NmzJdd5NiGZZhrYkmLR9B9SbrYyioEfYcgmuLnnrez9H\nENLr\r\n=Lbar\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgI+S0J6I/n8heQYm5UZln7UqilVq8V0ZSlDW3PB5QuAIgX5ht46NZKVA9tnopUHifXv8pM307vN0Iel73fKhJQDY="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.4-rc.3_1637746555773_0.9786111126671853"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.4":{"name":"ipfs-message-port-server","version":"0.10.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.4","ipfs-message-port-protocol":"^0.10.4","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"6178708aedf5ea86bf537862c08db49f5b8ea20b","_id":"ipfs-message-port-server@0.10.4","_nodeVersion":"16.11.1","_npmVersion":"lerna/4.0.0/node@v16.11.1+x64 (darwin)","dist":{"integrity":"sha512-80hP+/u4EQfyeHkp1/Mp1rk3Dyn/3w/VHg9pSfgVnFu8+L9sfTiLLYys/AymcYGjgQJAxEf9dl6zJ8+OvhUJFQ==","shasum":"bc026bf6142b6befd32213c6bf9a8432e8c11319","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.4.tgz","fileCount":41,"unpackedSize":76882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhngfxCRA9TVsSAnZWagAAv7UP/A5ApouMJa5wbxye0DVA\nmkM2RBPMhgwjf5gsg792tJxgYdOjIpNJJNARryj9ZI2TDrr0rP7EhfPBmbCc\nggESJxBTPL/sR/RPG23VH+sNJwKa7ebM4VKluncYpax6OcaibUoYn6E7p8MO\nNRm6scna35Y6m54YMjRNiJdWK/RucOKurYYnjmEAOroqUxZPOini0E6tvRbM\nBRRXVWxWP+5eT0wD85fpFCquVXCgSZylCy/9HiqRSc9gW+tOmsIHKbrIpm60\n1srb8DxdB5uSJ5qhDubckotyktRkHaDSGqBlvZWikmj3DG/+iSf0ATy1Qb1S\nR0qdYE4FicyNT7yRNOrLNPY2DtfR3Mo0mmd93sapLtWZDdCUmzvnTDpr8Ci5\nOCFwtrjIKsquuKEwaMWVpLTMsaJiwjN21piidzYba/XpWDSmVPOPvF+YxmQr\n0f0kHUPO2uBaA9pA4TqXrxDCXa4bb6tAYB+86Ec9Gih/lP/1J+i0fUmGqoOI\n+v8q5xsc+bFDHXAi6kWDtRhJ3wmLOV+oPx8u6qTYd+cgOtsoEI0c2eUC/cxS\nm/9CzB2d6vKisVrnbdtBCf+kSp9EuiGSxW7qZ8cU2wNogNDiHbhHHzX804bI\naH+KN/EYx4B0iJLmvej+7U0O1VvWpN8ETAXtDZG89srrpiuQ8nyeYMJhs68d\nee00\r\n=+2mu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDP7zpvGdkWItegQtN+FNh5iHBxKameDp82lc+iEjiEOQIhAMzILRoCxKz7AAOIVAfG9BzqXq5lA+JmYsr5cPf+p8jj"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.4_1637746673403_0.08443315821146924"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.0":{"name":"ipfs-message-port-server","version":"0.10.5-rc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.0+6178708a","ipfs-message-port-protocol":"^0.10.5-rc.0+6178708a","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"6178708aedf5ea86bf537862c08db49f5b8ea20b","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-QDG4sr6XaRwoy0tssyxh5B9NAjML7WdNOmXCB0pLtQA4SUPcZ0aLnMKeie9VGc0Qiubvz8gdF/oCuTDl5OLDZA==","shasum":"eef187b3e66d2df10ab1e7db758a1aa92f15033e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.0.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnghhCRA9TVsSAnZWagAA04AP/jbeB1VgTy0lNpxN6Mxi\nMLgPMj0EZ7iP8/onrwGDUYLdFmcv/TlRKBgr3R8lKkMEJCNLUPBSDMFegcEp\n7zAlO4Oc6LQYt45GiBZIG9HrQseUTr2ZZaqNGrXEJQmtxnqAnKxR0x57UGT6\nWq2JPjgFwysk4rxp8Y3eCFjDBeRr7pGeFW57fzrnUr6a0tVWsHgl3NQdybsZ\nbC7PT7su68KssxFVdVhddFVIfElED8Ud5mfe1PUXwEV/RgzwZ5gLisTzZFGF\nRD4Y+B0uNCdliWl4crwXl3kLUXK0RHdb7vEZbcj/JavTig2hyqqMXxDjj0HI\n+L2dsf5ygEr0NnBdVrwB1kKAEUL4evlQdRsz6+N6Cy9rJVYJxUuKD6+3Pdqb\nS7RKnNnbyZEqvYNh6N8oRP8Ksb5yISrbFQ+zwe887qz5t4/rfntl6uKt7fNM\n9KXPMgOvVQl1B8eLe0q1k+OsOZoZkFJ6lp1yaFivgHzJ7OAHBRAbulY2hfkK\nKrPCl7WXKdvx7Kdps82ND2rkA+tSaGoYrSavM1EyKkHCmeTxFi9AlY5gU8va\nmAiQjKvUnzj2ek/AnmjDzTnjoWPD0U3zaz8hdtjj+nnjMbVGn2n5RXClm/Tm\n0m//yKqBfsQnuS+dmN0aGq2VRhGLYarsQLvoGjzEaLoVt2k5+Dpl9E09FA3v\np97u\r\n=gCrd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRgLQwevv8UeI1XswGJHcb5NEL4/KaUkfgdAgCQCMWygIgGu0zVIMd/OxiRwixFznujNqYlxaHqXNmipmn5y9ZXMI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.0_1637746785329_0.6563219813282177"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.1":{"name":"ipfs-message-port-server","version":"0.10.5-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.1+62d8ecbc","ipfs-message-port-protocol":"^0.10.5-rc.1+62d8ecbc","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"62d8ecbc723e693a2544e69172d99c576d187c23","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.1","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-gqgL3FxBjI0nwjtG2gAdAzbILHWGEOu2e1kbZkfit8gv8DL7LKO8iiX4vGDbgKbAXS0/Xaaly/02JeTSnkDOxg==","shasum":"b0a545817fbd99e08bb982aab97c595ba3336297","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.1.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqfbYCRA9TVsSAnZWagAAGvAP/0pp9Tlc6VcKJN+AIZa6\n8L4TeM/sy8i5ND5csWJbWy9cYLrAPQsD7371B9zKdDLRf2/eCYg47tfZXVg7\nAx2LvYx2uS4U5/kaU4mcz3sO9kz9W1WMRVnT/Ebxk4pLDHgKQhE9pifTPtB4\nCqfVx9UhArdGFHgKBb6mIrKB8WLQDNm+xksrZoAjnedF7vUZ61OVNO9UEXt8\n75qwjt4Qrp4EuRrtsiylY1bSUXzSIgLTBOzFfZXz9gIQzMjK3pY9QQDM6/oM\ne6MSbCgXdQV99U/gW5KhxsnCli6JDzxAMU74FB0+BX4D94FtFlZeIfuleaWi\noPBBmg1G3Qy2Bd4EA/LmgoKx9kcgZ2tPG9tKvXLjOmaZ+Lt//9AKFTYQUYEW\nVcl+S/mTBg+jO81nuxiw6hPRV3XelWqLuZu51aOzDpn320yZUy3R+KeZV52v\nxjhMLiZbXWLIGWiS/6jp7FZ+gEHteW3PsSYWLCDAg/d+WpVqZR609hdtDKtG\nN/3ESfo3H9AAJ7gJwjpDiypZ4jEQTtQ1rAGiFviQJdaBofk7rsGm8WrpFvWd\ncn1AKHxuUwquMYIY75t9zF7XBqqL3UpmMx6FxT7dYSeq1ir9dzovBBym211Q\nwmRp0Zc+NPpuMtOran4WahHsYx/KTBUAiyDX6SP+fTkGoty8MYaCN08LZ01R\nx/OO\r\n=TmMW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1m7vTCAcou/6KbUG0t3fluT5Qp5v1s8rPbQe771DXkAIgVdt7Vk1FCuVJaRH5+cTl/bljjitk9xUD0ORtgJRqWYs="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.1_1638528728175_0.8442089790703164"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.2":{"name":"ipfs-message-port-server","version":"0.10.5-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.2+0c269cf6","ipfs-message-port-protocol":"^0.10.5-rc.2+0c269cf6","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"0c269cf67a8f6b48809472e83c4c1cff156afe0b","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.2","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-r2OvBd3S2fSuOths4AKIccLSm4IwI9ryuxubEsnnydjo1Lc9kVMoZnZkPqNBIk52u0mknuPg1E3fPHKsemRSMw==","shasum":"e2f26c6b7ced050e1950582e6ad32424299ed8f3","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.2.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqhsJCRA9TVsSAnZWagAAy1UQAJmwV2ZyDx6SGtKUONib\nndC3SdThGDzqVkxPNPj1AxspFgfYQaDY7PKf+dVooiDiTL/RjUsLnKKbizHv\no6kW8CfYmbA6KC/t2vRUiBrjUZYiOkHcSHDs/3o6Vuk8w+fbIHq6w43lbeLm\nY9ywoqtxNGhi/KckDocEM28d2ujZDL9b4SiCllbQx6vtllDxR6eJkIHeGRTo\np0N5z56j0EH7HXF6ZTH0/mVeWE8uM0lGycbX6nXi7OOMSaei2DwQLSK5O2u0\n68kxP7YtceSzybSJd+EErl1zSYV3Coe5xDv++kmx4WbmoXzRKACgBo796yg6\nSVSJCrLB9FnPLgRuEt+nwlwbN2eWBdpJMQblk8atlCezx5ffEHWENsk0OEV0\nT/J/HIvIGa3jhIVhq6uU3HCZKeB6HNXdLEGqMugl4W9gwLOEeEitY4lPJSjc\nHpfsqf8oZoScZgpRXK0HvFgdMMIzb+AvEy8AN4qYhVwPKg9aYoVI9FnH5zlP\n6qSN0EpUU2gVylwFWJRgsf0IbsN2ZVrMBgEFBR9wszf6Qc7ISBot58+pjJrz\nx/WqBMjb0AVQZEWxf0deAhVNBINX04aYODzJwCr32MUH68Zdj1m+lXj0197f\nDl9lWCstUIzBRHUOLb2dHoBJP997YI27lGYB11NkHcSrWxX9DqjqDY2MV0NF\nmyi/\r\n=9Fcz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEmPDMZ7UbmL96VowRJp6rd8pFky+E3opWH5iqVK4KQPAiBZan+54GpQ4+4lRBuk8n7wOqRCbsHWqvEqGR+BYXsb5Q=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.2_1638537993306_0.5097059444691856"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.3":{"name":"ipfs-message-port-server","version":"0.10.5-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.3+38c01be0","ipfs-message-port-protocol":"^0.10.5-rc.3+38c01be0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"38c01be03b4fd5f401cd9b698cfdb4237d835b01","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.3","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-BU7TlzK8vYHnEcBavG9y6L9BCgKRD0SUVB/8G8HHxFlnxcUgWCzD5lrHemQgEWKOSxmVZAlEnUopcLnJFTLaUQ==","shasum":"bb6bf55a6a89220ab3037e76c10b1686d61a71cc","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.3.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqiQ0CRA9TVsSAnZWagAAIswP/3CR1/lQfFSIWuqo76D4\nMct9W15fAle4zvrciVgBUe70AI1PwBSCPyzagCFuQ/l48Ih1knOb85loeJjv\ngXsGS84XaoVuGFL0fJKk9FShHnn8zgCiY3+3/LLB9UgxtsILmrDBXk+MvUMU\n8C2P7LctsCtxqdtiA9NzcZPW4dTMYDlnOPBuP4cyHMtRHTOGEFap1c5acv5d\np7kOSaWdouh00gGdx0nn9ev+XeNGZjTjGXGKA77LoeYGRpfXwKYzXsTLRyUp\nU3AaJazTMslGD9CaDGiUOPq3re176uzbCti9zq8jp4NF46G8pYsdge0Vr38f\nbXn2ow1OzejgnXPrmsJPM2zHywJhWMmK8+oij2VBLGh0HzUcAYgYAwufGyNm\nOWcRNxaLp4cFi18XO4J7DykRq4PJz2ylOXpy4UJSVMr2OHnv0GPrE4r5R9q6\nD3irpmakL11TQp7FhpBgSwulJKvf4UXHx1JwyuwZ8Lz1yS5WFf/0o1fuvePd\nm0z+gWBbgKPBCgvJ0sA6LaXmpDpykEpSeOekns8TI/pVgF4L7GGV6o5fMEgZ\nSo/9gh5JdXggEpADd/PBtbbBDl9SCLNlm6qttIMDPyfcPBP5mujB8bY4U6l1\nD+8Qst8NNvcIb5+gJxC83yzIQDsA71v8Yl7KT09coqoPHh6O9KHfefftShkH\neSMy\r\n=0NH3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFqSzqWR3ABpNHh9+ww8fDZnRnLlrta/Q3ss+BclbBjhAiATfVQ/FhohhAcIG5jOX5NoeUTvt4QksSVX2YItEPIPAQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.3_1638540340290_0.19177051921967125"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.4":{"name":"ipfs-message-port-server","version":"0.10.5-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.4+9018432d","ipfs-message-port-protocol":"^0.10.5-rc.4+9018432d","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"9018432d5dbea466b8332b0a917a166942e40d29","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.4","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-zkE18AfT8Apb7tDxjJHoWZFfUk8yANqXolk9wqsZtaKRVJIrXpSfT+QbV3O5jbGaI1xMafYVeg/j0M5b+iyoCw==","shasum":"9d3f5372a1c8daecc7787d1787cd980c39d4cfd5","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.4.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqjFaCRA9TVsSAnZWagAA4vsQAIaXnR8QEkbR+BChfuUn\neFahn9PJc2HsZZlcDNGFfx5vrjQHjVQGNHoS1ha2WRNdQuaNDIELFq5SnWvc\nRsL04vHH69eV8VYy+OoL92Qh48HBCcYGNXp2Hy2BS9MwXfwT17OBgDcvWR7H\ndVdJNwusB85UucMuJ3xIvKBtim7ZIPYNyb/F2LRZxe473vZlANizKQ3REHTV\nnFJpWT+VQSlZkgr06waWpeyHM7adZvdxLrcpXSSeKEFpkLGzLUrMNNzNx0zU\nn1S/1WGRxizG3pDA+P2RogFoC6yAwR2JJobUPhdml/G6CQQ0QrjXq+fc8m8G\niF3rPwtPBimdJwJ/JPHhuOOMNMwtTF6V7C1YTxsGNIlvpBlHuvBRcKo6XUUy\nhxqmmlnUGceRZKpD94ixcNQY/Hec3JsGLBADsAthv0lRYr5NuZWYh9KZWZRj\nm2qhM661wOX9auMxGoBel5HN+32FqAKFENGA2vScPZtqiii2sepUPHXyw7zq\np3zP2SmpriHFulEj8+qu4vtiHsP2dJvPkzm4qArKTFNlLMO/nzhRaZ4gTG5x\nYk92VDWDzA6/PB7YONbwtWxz9ANitQe24ayoKgbjUdVOtlN7fk14KkxqdhHZ\nl2mdj52VLWE/Gb+D3B79AJW9Kb0H6xtOVGg0ghofhk9arFw86n6hMpqc9rWT\nt0vn\r\n=2RgD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCosI7fyaPWQvPCCk6zzDutwI+wxm/PFRWAgoDg3TuPBQIgQPKovee0pAzWJMuv8er/gZutlNkjIL89sj0bAYednLM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.4_1638543706412_0.030211289612096515"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.5":{"name":"ipfs-message-port-server","version":"0.10.5-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.5+45ac9730","ipfs-message-port-protocol":"^0.10.5-rc.5+45ac9730","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"45ac9730d6484e8324acfbc3579fce052b8452d7","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.5","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-erUKWKPDo1w5oZ2EVQKetKSuZB0kCO57xvzFuKWWpVNpJfaX4bCNEyINQ64vp2Cg0D01GQmX/8+cYrWO8Dvb/Q==","shasum":"e863ec054ea349f33ab21ed2879fdaebdccf9a8c","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.5.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhregFCRA9TVsSAnZWagAAbh4P/2gO9ugEy+wle+/kASBz\nk2uxhFRn55ck8MwX2tm0e8edCzI7boknhkSC1TkHML61R9j+09Y9+1+F/pvA\nMFI+6mZjqnwsJ6iqAp4hjf7hVhjaYCEtCd4aI+37dYANcrCT+Nj3e+Bqtld+\nkhM0IuYJI5JDD8zfQLQtiVgAHpFhvnZD59dCFGq2Aq2TnCOH5BG/1/rlj3zg\nYkfvxpyt1C601l9GT8pRpDhI5HLw0UuRT6EgHJ21pfwrK5sfZZyt7Jxuk7T9\nDxtEKuGXBhkZXNOiGykLrzoK39Mv3T0xSo+OMI2b3Vlm1nhOfFoWoHQ8jG3Y\nyth/o3zwp28kwbT2H+4fy2JdL7Z+f+U/hwP8RFEj9cd53ZDAuCut9xio+SHJ\nhg73qJAW0fGDpz3aULnZM4h7vU3tHX+qb/HoxFgXGH4nkZ3oB/AUVdYIm/U6\npDa3ySey6fe0qk3uVOXJhN08VrZWFDA78BqWQvnBAJUacMWyibjJEZmmKjwK\nRuvl75BdqpzQBgzlhP/2rHMT0VBRd8//VX4s9UPsBBsirqEBEFUcVZ1Oaf8T\nnzMn9Zf/QbG2QcGQm2dyrmvi54om78iK/+uJQHu8Krj9L4kM2oOvZ6Ebhki0\nzjs2V4huquOPccVxx2cRyZb7Lvv8tOoX0nk5of2Dj5NK36xR/FMckpgak/T/\n/0sP\r\n=WfhC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB3fcTHqfKVQFW+pF7uzor7jphQ8jcs9INhsecgRrosSAiEA66KikIT+0MUydXj6w9ffLsHDkjq8U5Dlrq4mYVGoY9g="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.5_1638787077536_0.885994741470691"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.6":{"name":"ipfs-message-port-server","version":"0.10.5-rc.6","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.6+80ac58ca","ipfs-message-port-protocol":"^0.10.5-rc.6+80ac58ca","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"80ac58ca27cc9f21823a23d1e6357f738fdb6781","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.6","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-DCZ3KVUZ0C+kF01QNMJHbsvLY5XnFHKQxyVPbRPBvpwN2RNgjWLM3CFhB+x1d66yleTPyA+tTnfqlBE3n4Cw9w==","shasum":"2077e5969f2f6ee5c34177e860a0f9a62b7624b2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.6.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrjpRCRA9TVsSAnZWagAAaz0P/1hhEyM9ATJDnkrtFKTW\nb6HmxJzPO0NsHCsEwtq9ErktN0eSvX+J2atwFKhIeT2pEuzzjZybfTb8yCGT\nTTKEbhzHMZQAsaZUfOuuF0sV8XKLB095HnDZgBwP8gZ1uUB0tVId5wIHlgFA\nTDiMs784fRhi4HU1Dm87hmdUiwkjSH00giu8IobncYquI2ArEmfADZhxTBIh\n7EJcEmY0SliZ/LUv1PSKjwCrBHXqNSKC7gKZ5afVIOdKeKnLhFhOvQkMSGLr\nICJCGyHbQbIC6H/hFcyVi38uD2PRknLvIsv6G07RUy+oaXAYHnh50W9BIXNM\nF4QrwEedo4BuHfBR9VOIA5ChmNv2o1sf0UPZN3Cx8yMqTebCM/w9NpfIw1Ff\n33oNOijeKQbwv65DCnfobjrtWTc9U/cmfxfKZGiVTD365r8djaKafwv7/ela\n8PPBpugIbzbNLB0Iy/DDD0aC8VLVpS4k4fZacZ2lMjCZhe+KkSa4ky2aNnbM\n5ssP84tIpr3gLXg9mbGv4WY8egy/Xfz0oie0XSRG60oT9zI+Vw8gR6Ug/LKL\nPHSMb/FoII44QhRBSudTUwvwj9tZ2EwMylhMCp1CyHxRcBE6U7y082kKWXWi\nOZXg2loXeKA0vdW7oPDOW4xdZDUi9LGsrtJzR/TfsLjt2uwyTFGMJpcpg0Vp\n65mn\r\n=+BZ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWRof2cffKAIenvwr/LEIGJBDGvwAQPrZYU0VIJq/ocwIgb/YgSc6pX2EtMDHQePBnGH1YfMOApnQlOB6dWQ6uqhQ="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.6_1638808145042_0.6149152277324144"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.7":{"name":"ipfs-message-port-server","version":"0.10.5-rc.7","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.7+c083645e","ipfs-message-port-protocol":"^0.10.5-rc.7+c083645e","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"c083645ee68aee2fd40f0bd63fc5b4d1395b5b33","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.7","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-P1iPfgAE4qJTxlySlbT3UJ54vKAaI8aFA/33/PdKYr8O+qelw4wAh6ogPVXxZY7FGP9HyDGYe1sCO4Mye8Wr1Q==","shasum":"50511cc8cebda00b183a4984e20cd3df55ebac78","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.7.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhro10CRA9TVsSAnZWagAA60UQAIutXDuj9BgGq4oMMnoQ\nPvpWZl2MliXsZNag3wuzkCMMqEFYfUXHTsc+hRRahh7Vzpg+GJBI1/LnYPpL\nwGpCDM0H7V3vxJZvqNMfNQCWT6/S3NKKJSYIOypQjBjkOZ0YdkK77KE3ehOp\nRi/NTwuYYp1fp31deTd/OWZOXFfSOwebnKGIy1fqo0VFosQEhWGbR25yHEKZ\n7kX595IgGVbGMptUa9zc6DZP3dEc2i8GNOIgZdUcOhUs13Inun3x3U9Hbnqw\njbnGTkxrA0Y7Pzx5eDvTX0oENUwIFP+MqMY/Ak382FygqevKODXNloNyd+hX\n3g9JTszMKr2QsvLdcrD8JhPePxMfwT508G3Xyc7qJulJDvR4UgcAmv51u8Fo\nMQ3lj5JKD5JTNnMAwL5yIfFKlyArgNpH62w0oJUfKwWVi28aG6vou5D1KsYb\nhq8nK43wqyFnbRHiXG81hReBMqgVNvxEaT8wc0qoVe7fjhvG0i9O8zPOR9HO\ngIsabol2JNgyN12e7GqxWh2htNankflL88qrJAk106041YBh52f89U2VtbCO\n1BJ4nkyLdYbfcDdTQuYHaP8oPO+6IGMeXFUwzKMcZa1AWIZRkP5BSxuf/s1/\n4p9sM6XvRuIAxJzZV2hs26DYaYTBaMsNSP4kppbN7eAb0xpm+AfxE2Uu5LpR\nxOR+\r\n=QFDF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSSJ8OamZ59ckQWBZfqWCzD/v3LaWGrPBmgRLVVLlMoQIhAIX68AQiOfswew1QCfY6mD1L/LG3sOA6Y9RyKESXm+os"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.7_1638829428483_0.5460225160797261"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.8":{"name":"ipfs-message-port-server","version":"0.10.5-rc.8","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.8+dec9e4c8","ipfs-message-port-protocol":"^0.10.5-rc.8+dec9e4c8","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"dec9e4c87ca7829761ae6f63a4809783e53ae558","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.8","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-kh2IOkqjuJJPAuW+FWLL7v/UIevWL9ATvtZ9BMkfm6v+KUfC6qZYFtf1zITD7+0GL+W8/DSx3OAvQaWTUORVsw==","shasum":"fa4fb9ee43ad982eb9f2930a8860b9d90e39601e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.8.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhty/TCRA9TVsSAnZWagAAhAkQAKO/TiCjwpaPg7GpFJVu\nGXIRAXN299JO3zCFgD3d44ZlwI6COpo5sD9lGRj7auitc23veXcqnnrQ+Y3O\noBwgVFoBg4gMe6YiX09a0iz3sZsq97pIjRu3dQv0RS4F6fZNuOx0YKNgPHR0\n8tuCqyimLf49lDTTjgm0jwFDdMe3X72cXMZJv92VMgApHVy57+s2AyLeEvUg\noe7fbDs9mpozi9h1JyZ/2nh6sjJg38OyIdfzUkWKZSGfpntw3Fqcuq/KgIo+\nWVYJDxkRlyDba4DksBySUi3niTy8ikR1uQINU07DkDrENEQRcQ8PXgO0lNlN\n5Iol8s+hjppKjWt16ihra0SBUyI8IpfQ4/+l/uhgoipv4qHeVoWVjMKp3HWp\n+AQ4XfhtvcVf3SkbaorWSKhRToWMjD9gklKG4j9+cah1GRlHcrUeJWnGa4kB\nzELG25UVTwsLNpXUaocyPh9yCoBzR4qlfhAJeDWzbZLSVMQ7mhbX3npzISkU\nBSv3ViL/2Okb8NuwHECUBfZ78k25Bj4J/xDk20B+VJfeUP0n/O+/JEsXc/KB\nbcZ1HIrwODprIgMBuZCc0jVnjJDiiI9YfbcaFhtJcISjBdR9bqyNWR1Iochv\n+Gnn6zW21/khC+BvT1m8fTFD4Rw0vh3cO5KTHKgQM1j6QqWkUvtYE06Z6Ma1\nP38z\r\n=25P6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDs70opKbs2AnttA8g1jbvbmF6MO2P+tsP0WI+kzn/ZCAIhAKsd8HEp6AvmbQqGKPItTCBnpYRArGmGuD3uZYNtkyNz"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.8_1639395283113_0.5920376556230944"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.9":{"name":"ipfs-message-port-server","version":"0.10.5-rc.9","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.9+adde8c13","ipfs-message-port-protocol":"^0.10.5-rc.9+adde8c13","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"adde8c13ba433b81e76033c418607be389fb3d31","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.9","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-2HGq14B322JZc7EmpV25LF4W17ROZ7CAATVWZ9s7neKXQPsmbuZ7B9sqbYUvmXFfzjHVrjzBdSKoRMMoUhehpA==","shasum":"348419a7917fea7403be7f7e48d3b1e12018e8db","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.9.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtzgKCRA9TVsSAnZWagAAwgMQAIRNBrPF0XD/IeL8PvKU\nw5wOsnFp8OuDwbesa2WY/LJnuumhWgpy+w2b+6mej9Q1J13BRxwExsTq3N7/\nw9l4AC47i1JQ5YLu4NAq77TW420dEZicKARsV6LW1NGxXL3/Yd2VCjumKK1n\nQZhumRF5AHUcoLt4wM2CPr5KWqlH0v2sOBXgdpTJkEzMuqG0xlBr3FKao51D\nW/jDszKDf/Xg829P/4rEnKg4gvqv/jCmKpKDIc7vlnodlHxULl0oUl8ISaE9\n6qYjNOCPdby84LGqy4slsOPHy2Wye1/uzgc48hjn09qhAJLo9paFmFPQ4L8Y\ndyrQ+y1a+wur8mmKRZMOPB21bjZe42uaxdMnIWPK8jucG7CXYm6+z/QYcLJu\nY4gUyXtrfq4AHgJvNYRQwfnYQIfIEZPiKvYki3C6QqW3lqQXE5EyAyfxirAs\ne1GQ8gv2p5HfohHRkDkUmJkYcDdlxX87nvO7VPwpKpAEVOyThCch22YGLobc\nASDLgjXCylD1t3LeVlenUierIJrrMwDJAB9je3Wi4URK0AZ0tKegzLyqj8jL\nqxzm7LWWqjxp05zqBg8DVxPA6bXeMH3fA3jQ1VL+ZDcZG75o3iQ7PPgCl+N8\nwmnfqweUDXsMCFmZUfyEKEPEXi9P7qWDttPHQujXhq0FHkYXeMEHBxeJ1e07\nJysh\r\n=ZWVH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA/GIhD9ZdQjtlS+2dPoLbMp2iLt91ZbpSZcxMJNwhMjAiAiF2ylVef+lIMKfheA4iXhcUBdgLfjCYDoHT/NJHMGSg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.9_1639397385878_0.059561156404057014"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.11":{"name":"ipfs-message-port-server","version":"0.10.5-rc.11","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.11+33f1034a","ipfs-message-port-protocol":"^0.10.5-rc.11+33f1034a","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"33f1034a6fc257f1a87de7bb38d876925f61cb5f","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.11","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-eyAaGMHTaXwTMA3CtwSfzr/ujBMJhsOFIjyMFNI9Ho2uDhCnrJEyDdN7DAQr3Wvn24i4ER4O8MnKuQpKt5R0hQ==","shasum":"05fe82d1bfd35d5dac20828fd3657db0938901ae","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.11.tgz","fileCount":41,"unpackedSize":76927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhueScCRA9TVsSAnZWagAAqRIP/08ULQ+KakXCkLt2+Ujm\nS898yFiO/sWYk6pYCjEmKTliTRimtgGGlf4tEhpvwQRh5Mt7PbJXFRq81scQ\nWtBnxEkIwHBrEhmFhRJktDgqbWPC2SOjUULHF2Kc2x+7PiemTIMTOP9W9JZJ\nlgzpr6IBy8v7yz/FATFoDSQ7IbwCHnHXDtyP1+RbNXC6djzBFPNChdSsVNMg\nfvYjbbNQmF2dxlKg0LMrSWa3NcwTAZGHNZivvcuDqqgEfnBGeS66oqTT83A2\nZFscinCohXnvwZdIqgKzRt0cC/8NZ7LaK3V/wOgBX2y1l/rdGslJIvzYqHxi\n7PA/+mNi0SZk/bo14YMzW9ORRF7AocqkthDL0fobn7/VWcRfyvm1vJTCrxGu\nik+733PXEFKI8EKe+ylrNO5baDlWbkQMbwk6ALyakRKNsbiIXp8qTIWTj+pC\nlzAIVx0IZh9dQwrW4FMzTX58ERycYdjic2HNBeTorUL+OJkFe+nI5Oq1Q9Ed\nMoBj0Nvpu5a4ESihr65J2FVHXG0jHKh/vcOv5nb+gpmw1sJE8aSrYY/fjTQV\nICYJv3zubVVCzpgdps7UZRskTdn3iaSRe+k/BP8AXjBCQP/jGAdAVv+gAM4/\nCWNb5Aa8Xy/qbXrQVZ+DoXPoY5PWZCQFTslwgL+4zuwfuid65Tx2FLrRLoWk\nixaE\r\n=KnED\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDT1tujku1/fHL1ElnFYW4HJnUdioJZ0V9UZTWA5V5K0AIhAPEKnNjYnvnll+lYL1EjHk/hocsn05lOuFjOzG2U2ZtC"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.11_1639572636189_0.5743754171926707"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.10":{"name":"ipfs-message-port-server","version":"0.10.5-rc.10","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.10+73476f55","ipfs-message-port-protocol":"^0.10.5-rc.10+73476f55","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"73476f55e39ecfb01eb2b4880637aad658f51bc2","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.10","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-PtCU4E66LXkhxMVy8J8ynx1A+x7VdJlwVywKXo0VGiESdaRbj1zsN7ZWB8bzL3vxfT9ItJYGWVNSui1Y8ncn5A==","shasum":"7fb46a386702bc0944140aa6018e10bd69aa734f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.10.tgz","fileCount":41,"unpackedSize":76927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhueSoCRA9TVsSAnZWagAA04gP/1lLdLVbEUApoZ286EAR\nJZXuIRCocPpuv/e+Ho1hFF0yng94nz+uedVXDHdj+/cawWVgEMw4k1swNErY\nQhWWnfP1VhU9I90XKJOrAPElA2r2imR7ef0D36iIJ47F1ECnfdX95HqCv99e\n9UBTvFOAugpqmEwbVfxTvDYuf4zFh9kbtshnCMg054rTC6fF2fajmizYmDv6\n3U9RsaxTS5xYQk+v5nEXhlu5AIM9cFB1tPl2OsKfYmXOMjx7N/cZWRP4DJni\nycAPMO7eWET1nUhcqXxheV42l18phPlhkT3tlooqzZ8XqA3GpBHX/PYx+ljG\nK/pIBJldei/z0ekemM32KnECXEzBfsfLYGnCg5xS/7iumBjPWKdLncl/u6gk\nvzRPK5kSIjaUHtAX8xqxRXOW2Qq8o/k+Oc3AiB5Hey6pIka5UZGUIX7j9LVN\nBFgvcHn86u5Cmplf8ISxawRuOMByreDEsg0GJrmnEjIdDYwQNdZ57rTJhpIA\nh2UDjZhlj6n4oE/hzycQLv20XG0JfHr/fZUVq1+ytn9v59fn+fdqNqryqMJL\nLCSxhnYypI0nBZWpfy4FOLk2PmAvSxTT1g2j+pjd5ktqtmAXICd9rwoCORF1\nXb/xvrMDqQGmLDKB03byTNfxpCPV5UX4RylRlungYYojT3H3TtkcXj2eo2fJ\nn37H\r\n=A1zU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7SdWNHHLyGAKSI+7065xrGNARhjqNtxQmTtBeVccmCAIhAK9e/5PacW8xgRBf5OasfqPXYubmVtad98rzFkqaClnq"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.10_1639572648562_0.9373691405427407"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.12":{"name":"ipfs-message-port-server","version":"0.10.5-rc.12","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.12+6eeaca45","ipfs-message-port-protocol":"^0.10.5-rc.12+6eeaca45","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"6eeaca452c36fa13be42d704575c577e4ca938f1","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.12","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-wXEaUZpjYmV6qw3PKVDkHH3k8xxqQIy00QjXeSXQLhk/pZKLsp2bnA2/4EwjGtQZQgnsgo0Q0HxbEQDqlxmPRQ==","shasum":"bb804761387d217db633fc99408b0f43c6a5397e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.12.tgz","fileCount":41,"unpackedSize":76927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhueU2CRA9TVsSAnZWagAAYDUP/04FH93BByu7nJ4gBSiX\nia4RI15MdD2VJaQ5Vy28rKPm4bCUougxYUPqT9ubuJY1+sCrYjggsEhKkjCH\nY5h648LQNZ8GMTwFZqBL9dN1iXQoAyNVdB9blEpsQFMxkzoIZVANdlebphas\nY4llTamtpefKr1f8VBGYs9gjwF61U/fBS+csGbO9sUBD9rvHz1YK+GlHpuEb\n0EP6DlPHYoNMcrfq1oiIg/A1mwZpdtITQti7ZpY4SXyZH1W/p2da6nxZJhKE\n2eY01fKq9rQCxEg2VjLq4qJ8CNfIpHqZnBK+AI3m2EyQdscYNfZxLSjdahl3\nF49whHx+0pnStffmWs3iJRH2GSVW/q8DO3sB6fRSKQ8m5BBBMqI4wIL/C7Ks\nD5egVG4MdjeYOQ3CVuulKRpYP/FPxsV2xWSe9aHcjahxVuUy7CoVp+MQfNo2\nUIxv6b9rFf059VafDGsle9JQB1ltqmEyafQNJvA7zr5zhHTWcbcDYFfjdFM6\nXNuJepba+gppJYaMxycl7Ggv5nIDe3UBFnRcWghc7DVBszOGIc8oFMX1/Mno\nVW50zwQwzRP6/CKqqySXdP7Lne5F/XTp8aggLZQwkvIihyjJtPruY1TOYeNe\n2z+gGrizF7bKetWNQO9d2yobZhjhDCfsleJdBfmSskeT72G2J+ygtPvsktpJ\n3VQp\r\n=oFsO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNIknQsmyEAge7cfmk+0FdmYOqL5LF9UhTQfrcsK1H0QIgAYF+FCNWWmV3S/9sCth004/c4PITvPYUFmJ1rdI6IWM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.12_1639572790747_0.1637195839984591"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5-rc.13":{"name":"ipfs-message-port-server","version":"0.10.5-rc.13","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.8.5-rc.13+d147494f","ipfs-message-port-protocol":"^0.10.5-rc.13+d147494f","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"d147494f362d38244bbeafbd6e7d76789c7c5020","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.5-rc.13","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-eFNx1L7QjV4+0b83xP6BiFsR6mhAznlX31nxfYxoZaLz5Ug3vDvOuVcC/0QwkyQ6TWCo+hjJ+5sl8AlCcGIYZg==","shasum":"effecb1ad833826052305f542a0248461e03084d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5-rc.13.tgz","fileCount":41,"unpackedSize":76927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhujMPCRA9TVsSAnZWagAAAoIQAJC3Ua0xS3TAjqW/8oDo\ntyq5Rb0A2yjy34btGnhqkVErFDsWaM9hCK+y1btOs6kSP3G/2ttQwOWMk4qN\nm95prBTzj5xzH5U2vBEpZN4uEJuE1vsyUuS55+eO43ipjI4yXEDIvWGZxbWh\n4JDS29XMpcpDoZquqiua9pwWGiflyyjlB0eBtkXYUjGVYFVNKZp4OHC05o3p\nf7nmgtMBIx3cdg6b2haRG/Ncwwe+oOT9eJMotBJFbQRpOkbMJNifyVJ96Ddu\n9mP72qtxo2oB8fcHjPjNUvu7gpNYwgfrgOFjxF+ysGqz1somdDyV1F9yZCON\nJmajxPUZrPYsTacOMXQs5Q2ohv7bTJT7yUJYvwCVPJOzEyBfBGMjki+hwPKS\nLUcrrRQvhcyV5eYxpj8hDFXocTJGraEeumyJSGQHQyS4PEF4J7UbQvomGv3a\n3NVgKeWiMD/7ypi1yCOAxKPYX05ludPlkCeZ5KChH9ANnR7REXkLhMspZ1lv\nZyflz4qu9hab9Z9e+tKO7ZsMLHTPpFuyVg015JWy/vq71s7YlLk4xdVnSM+4\nhuOKJCaS+ToYFbdV8wKtmGW7kLxFTRRLVwHSmzmtVyCt7M5MuVwwik0w0vKS\nDYpf9DUvTyXmRBmGlU5tOQ1ptee1fxpqv72YWkybeX/hKDI7l4YFXS1wSKo6\nc7mN\r\n=xeQA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHikG4Zdtabpcj5YS+LDVOvvLnNvLXgtpypVXkzXfT2jAiEA5fS9MXND1jAPWX9VM3LUp9b8dfBGt2900pHyr+b2PLg="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5-rc.13_1639592719314_0.2884471421049015"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.5":{"name":"ipfs-message-port-server","version":"0.10.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.0","ipfs-message-port-protocol":"^0.10.5","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"7375caa8805298fc671ed4080e1023aafe756151","_id":"ipfs-message-port-server@0.10.5","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","dist":{"integrity":"sha512-vPCqfv8h29VWYGFEL4arbVp+Yp0uR/xmdvmSHpB0F8e8QUGsl4gowA7k8jefhQUMWc5J7q66g18NmFafhKhLaQ==","shasum":"83c0c7a663a5e5bef1934025c5b445016e7a04e3","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.5.tgz","fileCount":41,"unpackedSize":76882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuk+0CRA9TVsSAnZWagAA20UQAKEfTY3f7ajgHCpEUaD4\ncKmxxBKWRMWh4XfVD7v51uX/2GpnZgTQG7xoZG4/f6X+z1KVr20DkaMgyZ7r\nEsO/yI72HeRWBUbMPS3YGkzY905hIlIHDPIkc/M1XGSUB+/mB/7AUn1eVjQ0\nQjSGJcyQm6QzPD9FEsDBoVsUWnqq1+r15EQ7vWx5aFlSeCRC0y+1fdsRIXUn\n3uvwSK7hrJNj6v2vYM2vXQA6Jope59+2S0vfJ3ue6L9W5i4WtXICtYmoSZtp\nwxitFkx6NFsJZVyckuLCkhu08fbByl0eYBiEtKxti7Xw6CO/PQXpc1hi5lNg\n8OT9VSk/LlO0WIF9zARve7ec5wXmHU3CT0gvlhTds3IpIFNdzZ/22o/EdyJ8\n8q0l5WzuZB/PAKYFQWQO4a81bZc8BEu4sZQOpvxxOHcnVhl/o4XWTzh2ULmO\nm1r/vcuaWuMzjBRr3v40Evb+jsqibRHG2+YbKrKjGbmNs/jVC+/1PTnvW2ip\nORquR3P7ARQtrAJ8VaU5OIjCsx4hTixWyfvXmjjWcRIJykYkhlYt+uPY9ivp\nSrgBALGW/XdhIo1d7spl8yc9zmpxr6eZ6HlSGVp+bhgx3aKvzVf+YF54jlhM\nXQSuehhHn9KxccaeNPyR5nmSi7Lxy5YXsLGPr6IN4OFvfCAEq8YhfR47pgKl\nNjp8\r\n=Kqj0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA5kvUEXvZw7rws5KE7cbp+lj5abUPzS6Fdz2LZlc9I1AiEA3owjRNdX2/YSTQcAHO3oxYhyQI9gFQ6mIdlJbhMWg64="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.5_1639600051867_0.010375295326515932"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-rc.0":{"name":"ipfs-message-port-server","version":"0.10.6-rc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-rc.0+7375caa8","ipfs-message-port-protocol":"^0.10.6-rc.0+7375caa8","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"7375caa8805298fc671ed4080e1023aafe756151","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-rc.0","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-yQlI1QvqULiIjUI3ZQMA0DVZjOCgfCt19rhwtS78nub61hlthrpt86DskfnR1/qsF9LEAi42gW+exxFmNrMmwg==","shasum":"cf308d2a37a1d5a5d5d331a9e52916fa7ffcc942","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-rc.0.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhulBGCRA9TVsSAnZWagAAXS8P/3Jr3ovWKNwa9LLLyUVg\nEZVoqFwneHzIf8akc0KM+lyvQ8HYydtObSFKf4giWeXkOeeSj0LeB1KyRRtQ\nGzy9Ck2MyeA25ppPXdZa74Px79y+d7jL7kH1PyMcgo6eJz+QtkfyeMgRW/jl\nnzVEnxjjhL7lHiX832bRyayDr0/o4Sl8TXB7WmTW3Dn5jJwivZMdkdjAfKfl\n1J8gTjXoau2rEKSUbrfHNsIONcpqVzUxP0JSVuObJfJSYw1PyyrI/Auz/WE0\nCKkzoeeNffmXAXH/YiztTetAW8HVLlIFImN50B4U/07Xmqu459ipdtAM9puo\nq/uzd84Pf+xvC3sZUOBoJ9DUAmDpbNu4PZoZhAg6Xu8DyJMNoW2oS/3BuB6X\nRUAlixSX0KHNcD5jgDdVfTCyA4In6AS02LfNgn7VIPqrVXBtzjNHH/+5ikZk\nUo6ZOZB9IlEW9HrDbI88jZ9AMGSIVrNjTN/itIqwqLF8O2CxMSzEtbyzTo3+\nlENuUAxyABpsEr8MlThqgURrocRlt9QCriK7AHu/dypY4jKAmhcpqMsDfKrJ\nNUrgTPfPc2cXt9WxJ4xWwHC7dpTZIAkjYnAo759dVrcZr9S/AJ6E9UuSLw60\nON7h/ECZtfZ8yPPguc70Mk40WeEpdNGA9YSmTQx9/CNCykK9jMoLsu6VcNyk\n7R2k\r\n=Zilz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEz5h8AO6HtyYqXJzAysI4ACSP3UkFoZVcZkUdwWV8UgIgWGM/18cFWq5SQgqaRO9S0I+SnDA/eJPDiEPYjPmxff8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-rc.0_1639600198251_0.8136999694807516"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-rc.1":{"name":"ipfs-message-port-server","version":"0.10.6-rc.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-rc.1+880e47d9","ipfs-message-port-protocol":"^0.10.6-rc.1+880e47d9","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"880e47d98cd89d774d707d20bc4a3db8c0d3c5cc","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-rc.1","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-qbD//IXym6aV26b5kF3NDavEgInyTiEXTBlfnKKIirvg0bD2/pwKt92/j5Jb1sS1o1HRu0QviTXSHNXQ4rBAVQ==","shasum":"556427b97a33cad2d2f505c1bce47aff6b5dc679","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-rc.1.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuwG0CRA9TVsSAnZWagAAyU8QAJ61o/okXxuUdBLzvHTx\nJE8z8cv8CPWyX/x3QL7m6eKCyoB/erv9A5ch3ZUsTktuKqc3w0bZ0NvWpdTK\nJdua01FewDRQJk0cXtKPrB9dgRj9wej0cbuWnOl9yrFd63fJviW+NqrQHrEb\nKblBp6w1BBi5djLMykd0y31PF06FjbaCWe+GXMcVutdEQ1qpwIpMJCzUVucy\n3PWqwnn10HrP3jbqv5Ge6AgPFkgEs12AJ56zdNTNWczdGjn/DMvUTVF3H4XU\n0HS/yS0znoVtRBvXyULN6G4lxNVHZBYreL0+clEOw/hcr1X/LH5deBO0GpOI\nOvBWuyZ7660mOeu42Bua7H1ZecaO+pCqdz+8hrDpjhBuf/bHvaoRFDrhAqZS\nsj2fx9jvTHG8mf3SsWIl2ffq2F5EeLfBQrf7kvRPiRDDrKpTV4+Yge/MfmDM\n1T/1u9oIY4gf9S6ZBzjOk29gdA4UIgpN3pWZEJsoFujSSFIdFbRzO21hAZbI\nqu5S1zB2H8z/GGqhomQ7WuBq1TJAlN/shgHPZPh4QyklO7cNqk9H7Wqx4FjH\nyQ3xOySdQkkzfoT7MAypwsIogfNXsPFAKyx91vCgvKyfSh/7CNPmqqzIMOHl\nk7nn9GruqRqzVi7ftHeYjfXxvecO3+6x+JGFpXs6diqd64N2XP0re9aLGg1s\nZACm\r\n=cckU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAqH8owEqLHpzz/RM8+juQR9kQZhG/xuirwZJxTvX1dZAiEA14U7kZlw2JgNtkrRknt9rwxir2seE2NJZ43EKIb7uYU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-rc.1_1639645619987_0.8913517764858683"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-rc.2":{"name":"ipfs-message-port-server","version":"0.10.6-rc.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-rc.2+45d9baa7","ipfs-message-port-protocol":"^0.10.6-rc.2+45d9baa7","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"45d9baa7576a0ac924f3d01d49371bf1a4cf654c","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-rc.2","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-TNIKd6B2WRPT4yv8bhq7bYpL34CwiYhiEC1kl0TZn0owyb9TrcP4ofwj+tqVYkHg8yIp1KI2AHjGDOY8iPMgng==","shasum":"2d72acd346ba4ca0775261a8609354a72425a7df","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-rc.2.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvF8ACRA9TVsSAnZWagAAub4P/RS5AXSc5REUh/3FcvZY\nEAQ4cdP69yQuHPszaTX79VvHicycnfc9SWy9WihKSw6Rd3w1RScaZNHzX99i\nr5MHH7gpktNm1Cc/DIRjWrpEVv9F2IT+oOPB/NwKJP7sITUVnkJgG+4p3yno\nIOA8gSz0wzSxVLdB6Fi549+WeM4Uhpet8+KoOiOFq4HBh8NIC7l8HeqCn4Ag\nFCW+7a6Ojf6ijEmsXrGmV2hVf4wq/folLUn+VrzhDq8SHE5BGIGlSXDbXTZ8\nwx+7O6RbA6mD1mzQXHQ7c6AprN1jaJ6Ijyq+KDH3JWLckDW1HNvxl1IMFAU2\n8aDCA9e518tN65BjmeNDf8resRJfXIPDWp5dly6QSKJBSDws/dmIoenb/bEJ\njMIz0RiixqxxXZr3nW6I6f4aIuFFPhItXzp3V34fL9yiUDrlv4AFIpaoQJwl\nUfso+fwQtvSIVvca1vHj5T2D2kyVLuGavLMCq4Y0IVfIfdwLPS1p7qOkkh8N\nLJ4mqyogpueJcIq43loDoh32QmptjliGH0aTqNoqNiZM1jp/mOhEK9cYFbax\nV46tvFk3YP+mKF6d4wty8eqyUNYNjrY37MjeJ+SS8OIhQoB/M8TKs92i9ALo\n5JBufVN12A35l+t37qlSyzmcNqf+I0YeBIM3mr5DwdtUknH8rDZLdoWxKD3s\nue8J\r\n=FV5b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUEhUgZyKfP6dtWAJUO79yYEVZl0M0+XsOyBOdM9lS7AiEA4qhhn0rpIybxyBJKDAfdWlqIBCa/edzwa91XbU9aXP0="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-rc.2_1639735040273_0.41497473052134204"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-rc.3":{"name":"ipfs-message-port-server","version":"0.10.6-rc.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-rc.3+67a8c47f","ipfs-message-port-protocol":"^0.10.6-rc.3+67a8c47f","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"67a8c47f7eb4ca93ea16defc24b1ebdcf4267971","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-rc.3","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-NhZpZ9uXFvtWuyB6nRCSSIKBha4kd/afB00Jr72fIN/HQJwlHZ0enU9VHwjJ8ByOXtMWoLozpSEiz4dYmLzd7w==","shasum":"526fc0ced65a0b65215e9a4a01cfb62808bfdd95","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-rc.3.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4G/8CRA9TVsSAnZWagAA1qMP/jJa8CpwgURqfPAU28M9\nBtflIf0sYrzCHt5f1ZfRpCyDBRKD0GujTuYc46jTH9glVtNyEBes07/IacDg\njd5P6sG7rqmBg31YquFjhM17FaJvGFzrWJHg0buuLsovRaRfCznzTuOy7FLQ\n/ZuaSgXUxe78EQdURq6/WPvMFNpTrgLxsN6OttWDd0qqk8NQ2t/g59L6L37a\nqt9BAZzfm/H8KpwOoU4sR2gxS65J3e0T4EjdKgtc5CPWr1LaRMYXZhXnnFLQ\nB08bks8A/c2E3F1+cbh+hJEGrrRp7BFMkTBJKkZVxC65lX0Mt92Fuc49ctB4\nGRfH7jiyzqAqhUjJhnMosoBx56mJL661BUJGxLmWza74PekJVM3A+7t8CmKy\nMJfZ82OOlr8gdEI5dTlVjOV15I+73ogf9Gd8JXkieEKMv9fu83ybAbQPRc3F\nvufKytf3V1K0Dmjolaoe6uFSuNvBd+OC5aE36rNz9kwZtWxL+exU8DsP/Xqv\nYsEHqrS4R2YUQfpzG2n8uK6ymOet2lplzni4ZZRiJ9rzEdVVpqHtRd97wrv/\nbROl8/i/eKISlJS67WD6AoR61903u2evuuu04Tuscwu9s/7QaS0i45joaUym\njF1vCpKQTiZwbbD6hlRZpJ80D9QmEKMg30GKNj6xgvS1ZP8WNqK2EiKSHB/A\nMQG4\r\n=Zdfu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF7MmsB7GZ6bOTm3XoINiFXqFmA9XDFQJe00G7y/bkNnAiEA6Njb6RecyK4gPyl/BE8FxoxhgKAQ8tt4Y6j0Qi2Gae0="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-rc.3_1642098684277_0.2343104569735872"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-rc.4":{"name":"ipfs-message-port-server","version":"0.10.6-rc.4","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-rc.4+902e887e","ipfs-message-port-protocol":"^0.10.6-rc.4+902e887e","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"902e887e1acac87f607324fa7cb5ad4b14aefcf3","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-rc.4","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-uvM11bW7TEGVsf7BGNddxzGJf1tKRg4zijW3mYe9pJNMZZfp4+D3nc3jYnt6dVZM4GcdYcwjC5LR/HJp8o3qig==","shasum":"3347be4c35770dc65a9b2a466d944f614347feab","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-rc.4.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6XEkCRA9TVsSAnZWagAAo7MP/0xPM7xQoHZgYNvjXpor\nVKO2AZkmJTtSvDtVq6QL0rSxMLVFiHBz65/zv67g9gbxnJcb06XnjQyeEalH\nmUsV02rAAp/rmNwbgDsC9u0zjdNw74rownGG59BL7sye6hrxOhXEE4t4TIu2\nynYLRz5yrA3BabQFu77/jajEEgGmD5pBHw9G6fpy3kW2KwhcWNOI9iBi4VG4\nqH99mpQiQFBhOx4ZjFEKs+yMgDl+sTuqONrYwZsxa4pyJorLrFU0nkljwlwl\nDF3MoQuW9g7OngXwha/TVB8R0qntBMNNO6T6njOWMB4uhpmJp7R5iTDk8pFI\nvGrZr0GIHCLilBikOh3QkMJbGj8fVcCUw9UM/loX2rbXDuu9XPQHlMRNIPri\nnAK40/8iTzjdUkzwnxs3/HkHkQ0tOLoymkaGsBHmGQ8P/iqYCT0kCVIPFeqg\nwQyYoPOjSbtq/GfKCBu+27MRB+GtG+gqrEprTgHE0KJ59JDCaRb8kcxA5olZ\naQeSPzIUNjROWZibxmNwJWspLIt5q8qfMntWOxWvLKk5LhGtt6Su/79QYwGq\nf6/PCoLFQXdbQd6uO81zpJmed48+XmBQkWwMZLk3eguzOpBY2jIspTuIwI9L\nvWMrAryjdQBXx0su5lM4HfU2c86Hmb3JwMy9WUetP29Ej/Q5WAYeG861ssBQ\n8geY\r\n=dt9f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGnMttQcS6klKeJvk/cJvfzQie0unUaVPmejNvSCDUlzAiAQiZ2urdt7Y2BL88B4ecEOKSnVjXJpeTlEx14iAHIBAw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-rc.4_1642688804556_0.9797172615656455"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-rc.5":{"name":"ipfs-message-port-server","version":"0.10.6-rc.5","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-rc.5+b9382bc5","ipfs-message-port-protocol":"^0.10.6-rc.5+b9382bc5","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"gitHead":"b9382bc5bc7341a2771a69b2386e5473b507caf1","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-rc.5","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-nIqooSSL74cmRU6H96N8dxLO0IftCxuKIsk0y4PHDyO0U2ipxgnzXnvRyExoammLUdCQ8QYQbNH9NA4ZwRnXEA==","shasum":"ff06e6ff968cbe2728fa1cb976e13095eb271444","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-rc.5.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6tVLCRA9TVsSAnZWagAAd2YP/2oaiq20g7sKkU6GHTTG\nHyZ5L1oS9aTXABjkNZNt1A7iEalrZJ+OgrInKbxeetMEZJFLwQAe0n9x8Vc2\nIkxUoWhqMRKETtzhLrPUp8G7kxf+g2Jlg6Bcx6ikgoG4vmYHyyhHtYd/FcTR\n1aAdiKGHboFe3//Xuka3ck/cU2b/vyKk0v9bEo41AUsHBvJuaHlgxHIgQHBx\nMxhRblObki84F54j+p3tTWqAlzuh0fcmLHVkkOsA+321ZjL+QPkxyHR43NfJ\nW2H7S4OZSiz7JbxifPoSiZeuzy6Y+dYmf5wANK9J6Zj5yLS0Qafn9gjZIYsM\n3QmBLsKSC2wo6rNCXVGBkaZf/xiNw0s5qhWGfn3yAzTsEROgQ6iEKQpC0HTN\ntlWWC2hsTq8Zi1slgtPpGEm3OqNfXEzPq4lGIdgp0jvFI3SuLwRRYk4fgGbF\n3JoNhb56I/PtOodMvxPgyeKnUiIxhqGuIjguHddnjBptEJXAsr+1z2yaxMOP\nfeLPqfV+boY3P36EX1+ZsKNO3mh9OT+iEd62CYE9t8whe2ia2AtLg61sJfTZ\nZxNSCRvwKPWz/fSTucGnQGf6K/eNrCVu9h1C34Ykh6YrwZtzMotqjgEdIKgX\ncVhFUFXAJa8CuyxG1st9ZfYu8FP1P44OtZ0FQGIzqdmW1hmUqRX+NYWgqYuC\neTrG\r\n=2beK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA5UZLcb9KNQDMJPh12+aaMeRpD3wR0n8Fz2kqhZouPNAiEArk6espiGEN8TxklLj/bX+pr0huTjpIG0mmL2bZ4s9m0="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-rc.5_1642779979832_0.473739048995635"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-7fe0da57f.0":{"name":"ipfs-message-port-server","version":"0.10.6-7fe0da57f.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-7fe0da57f.0","ipfs-message-port-protocol":"^0.10.6-7fe0da57f.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-7fe0da57f.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","dist":{"integrity":"sha512-HtBQ379gr8peWeTkk/DPzGjid8T7SSFllizI0W0nDVVOXiAcTk3ZXldKMWq7TUFU0mMohmXDexePgJmwPgbjiw==","shasum":"1e3f555f79e4817977ae52186a535943271c00e4","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-7fe0da57f.0.tgz","fileCount":41,"unpackedSize":77017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8TsBCRA9TVsSAnZWagAA02kQAImVdIc2sZBCP8B5huqo\njTY1n2946UOa95Mwq5OXuWnvav/DUe8VKVdeM1EcziRmK0yMOzalnmU8p00+\nMITcjbMhIivtWztfdPqVGUqoT9IFH1E4QyuN/CzW3SpucNihJOSNYaiaeULx\nxUm2qgPvWk/ctyTTEiKn/JyrldsIszKp+8ejwBJ9r+g0xBm3eIpSIilvnBv5\ntjWiOvu2qraE7fj4W0s7JLpt1FTGLYU4uauNWfenr4m+ak98iVV9Js7T2+6l\nYms2/8sygWsVMvCQrub+w5GCpwb5uul/NSuw+pFemEX+C9Za8uNJyYZAFFhg\ncpu3eP2MvLdES338x0t0aIGpYT+gBSf1Ah4wQPr7VHnWfIA8lxxAwTTNitPG\nQHk/OcLzvqpWBQmx5yhcjNzbwz1Myg8VHMONL2UrhgLXzeQSPaVaLrrT5b5w\njWxCwjCH9xfKe5RcoY29Vsl4Vt/yPNgrLe+nP9tNITI94/jH7nH1enWcmXkP\nT0zM0zwIFPNzUHIamA2DglJDJdeqxy06TDIvlNIrePgHT7fpGqxf8lmoCd3g\nTnUbAX8zrVIcY6H6/8NPX9Lz9nrjv12OzJ/sYSwBTwL8hYy/y1USmYantuQi\njjAIE9V4s2JN2IrjFVYPQpF1ssFZQXylgUu4e2TonI9u1JdyMh2xPNXeAZDp\nhl1n\r\n=XMw3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDCCwmc1pjQUOrXX2x2o/auKyyF+rGDlLe4zopnWvFWAiEAkHeTqFpIDyFJnxgDbqNmwInc7TPVgwv03NykdyxHiIA="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-7fe0da57f.0_1643199233160_0.5848755262104608"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-5439a0e.0":{"name":"ipfs-message-port-server","version":"0.10.6-5439a0e.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-5439a0e.0","ipfs-message-port-protocol":"^0.10.6-5439a0e.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](https://github.com/achingbrain)\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-5439a0e.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-u60QxYr1VZNiyjwwj0MYE9UgnD5/cXoxj5AL83dOstsGIY3pDCSpuTq6RRVM7laJEDW5Gymk/7Jj4aOzAb0Esg==","shasum":"ee3961c2122bf9d9d16e3d20dca942c8d24ea550","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-5439a0e.0.tgz","fileCount":41,"unpackedSize":77011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8UecCRA9TVsSAnZWagAAtQkP/390nfWucs74S77ycETY\nB//P2kdxjh0ksSjz2/pvRRB0OM7B5KxdSszOy6WdQtepvyUyIaHYAuUF7XJN\nWOCeUJ1g2K04wBC1iDs1qN8wj3RiXGDOfIfzedMZ8vD5T2GpsPM0OkglctFm\n/rA8qSlD3FKbJvO61wE97K6jBDy+d2PeY5/6GuD0HfEOGu2o2wHYY1TPvW07\nbcEDSmDL65dFsakGV0nvlARo8XtRuOaJsnqyQQ8uF7SL+x5KC7rkkoX0pk4e\n86WPjVtN6UYpuN16MFUp5vaZi4Xh0ggpaeBZAKEtBDcpUIuVp1hDuPxDOfxa\n/hV79R0JNgXv0kF0Rb/WQOc5R6OVyMyNJgGSmEtMhh40FEUjekOJu6Zmd5jM\nXVA/oOaV/sx5p6IBRfVgenQbLlCJvz8w////TrKkdVVqxiIVuR3gNdqQM68U\n0gJ6oDwEjI6YSI8Pt2NMA30lc7PoE3XZ5GnfldsbESvq6vNrJLNW01364cQ4\nOi2hMTlrsh9Rz2IXV/nG4FOUXuX/BuxrwOIr/CqiGXquauIxONyso6X0t2Fx\nPFq4BvnPasLkoX+n3PrTKBdod5MrK7pgL25ytv55SOC5tft5Pg8VH2TOq7gk\nRzYpTd972nym1pOn2bnfM+9PYel2G7KTJrhdehrjzSKTTBd8wmSyaz6UtSQz\nLJ8Y\r\n=VT8t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNlFgK5SQrB+ARZcmzLigOmZhRYt7C8X+uMPA1EO0gKAiEAuoYK6bjLSsA0pTSgMF1IkkAzE7u4B/xE0cSfoW813pk="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-5439a0e.0_1643202460115_0.4105253742718542"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-a6b201af.0":{"name":"ipfs-message-port-server","version":"0.10.6-a6b201af.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-a6b201af.0","ipfs-message-port-protocol":"^0.10.6-a6b201af.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-a6b201af.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-DZXF/EB0Fa4EzzFeLOm3B0wFlfo4/oe2yBm0EpOZxYez3Gg4pY4Hbshw0z7P2dx+g2GevM9UhT5vcD+EC6oLDw==","shasum":"9c7988f38d6a3735f6b87a4b5140a4442d7a8c6f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-a6b201af.0.tgz","fileCount":41,"unpackedSize":76923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8rw7CRA9TVsSAnZWagAArxoP/2ISLUyPNT1PjPWzpYTn\nJ80O+o7B01o+JI4jJEt6uSaIOuPedDX/WRyRjzLxpH8C2RPwQJhRlTz/dT06\neSzwUR/E5YE+fVSj/m8YrK+XCWqHlogK6I7qj0d7NCKRqJQHrmmU/0Lry4Cz\nKVwZ1GegwJoVACH8voVc+Uakwzk1MMP4LKdGR53exfViGrTdhLi1aqXbVOwd\nqiMZsrNL+plABV7bhLcqOcKcxYjKO/36MtkIOh5cuyILvNpJx1Hloz+h7rzs\nCKBHerYw9NDZRMC9yyIX/LO9WBF45MOzPtK10II5/dxUf5sbTCN/Xkffpak1\nis4eyQ5p+wbKmZ5fOSe8E3JP/TIXk5q03iMtelyNbD547D344WBp3skZcO+g\nqOkyWT4m1MsoFkRlshL3FC80GNY233QkQcRwkz7OmO18O9xaTVqzjLgU/4Jd\nqxLekpzVToCzpb9l3t5n8RRvo+R1EwacgW1q9bWKJ6uznZIJCPOL8KdX0XeP\n43tjnqGnK0H2I9+50ZKnmYstJVScNacHQNmF5A/KMtPBuYZM4dTsJw9s5dG0\n36+Fh3JlHHKatupjUvQH9WrmC6VRXRUx03HQVIFa5SADeh1j4l4LYG6cMOZt\nCf4W2wasFEF19ktuJsiXIxjLCC5XlquvS0I+ss4zp7DFhwCZZc0q06+SN4+3\n4uAN\r\n=MMhd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEk54K2ZkEnRkiv0TBn1x3lHsB7ca/oIv3OwTeKkHRuwAiEA21nxu7FS4gbV9n3Pp51JHULiEOnG7Tr8pVBaGTFczbg="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-a6b201af.0_1643297851245_0.7266683281126152"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-fbe14923.0":{"name":"ipfs-message-port-server","version":"0.10.6-fbe14923.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-fbe14923.0","ipfs-message-port-protocol":"^0.10.6-fbe14923.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-fbe14923.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-dN/Wu/7JVHzMllUtZ8UCuaHVJnhn9XxSm9sDpS/Rm2hZysSPdW33wR+hwa2Zo1an9KnJO/av/rSQyDjAyVWNKw==","shasum":"a9a353bd281ee203d39580835ee363759214860a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-fbe14923.0.tgz","fileCount":41,"unpackedSize":76923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8uG/CRA9TVsSAnZWagAAIQkP/1ALFW/fozFBRDosvO/P\nTTs/mQ9EMdb/Ktuj/iAdg2PEVjVUdvhOxOBkqGbaHfHJSwnm/1cujHVBtLG0\n4bQzMPD2R4yYb6ViAWQ0M0QXpe5zrzG/wlBERpMRXvspvsD32tD7uqGvf8zH\nqh72skULMr6ziRbe4vGE2pRbHvbKNqMLiUS8GhNNCPJ1MLx61aYZePlXDGcl\nQQ9ZHDNEoCzrlTmJrpYQX259u/vi5oTm7b72Ujm365uLz/jyB0Xz4K+WnFwT\nbEWX18c61eT6nTDXrJMXHIx7Lw70RSnLsQkui9OzZ84+dVM8DWmgdqcNcCpO\n2l/9j+gdxylc1PHOqaLtS44sOY+Ez1moxsMInlAqDCNJ6KLlawrnbPLmXwl/\n7jFAPoDybb4NXYKZNBUf+QTbnf+1o62HLd9lpRP+dIBkkhfZ2/VZot9aaomN\nMI5WcjP2WYMjOVeIMIZe9UvcBtJr2fPBiD/As4alqGSv8yAF5//DI0fk5LEA\nIsR7hjLxMrcOCxlCaWDUtUtZni6Z0jf9yOw8NRR1lNLrNzwPNNSbluoc989w\ngQEjKeIU/mCOvFS+YXnKmxbjhPDtPomswfSnm4G94Fzx0RWxQhLenz48Jd/w\n63vM8Sdh5RYxhIPFgWnhe70VpPxOLNDX4i4hMOFGB2IuvWp7BIT0+MGRl6sY\nyiY4\r\n=dW0q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAkBUXKkwj7p6Mgbc9qqmW5gluumoqXY7IzET8CDcgbLAiEAthL1/z9we707x9m8fvmtrYQlX1SDtGGHMeMcQd2JWqQ="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-fbe14923.0_1643307455211_0.014245911577444259"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-6cb3a87e.0":{"name":"ipfs-message-port-server","version":"0.10.6-6cb3a87e.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-6cb3a87e.0","ipfs-message-port-protocol":"^0.10.6-6cb3a87e.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-6cb3a87e.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-KsvekmTY0ntJSgcaLTQwdkUI4hGLO4x7E3v4F9gtkGoC33+KqhMxniPBhSLnIRBulW08MieaAbpMOOvgN40uSQ==","shasum":"bf8ec29434d485ed88c2da06f758cd9919429cd7","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-6cb3a87e.0.tgz","fileCount":41,"unpackedSize":76923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8u6xCRA9TVsSAnZWagAARhsP/2RU073csh3I0GelI6Ap\ndbz/iKK+Cmm7t3xcEbZufkDmUvozU13GUPLzkfwPpbu7UpQNeWayYiaiMCUV\ntm73ZXFcqsJrLciNsnDBlaX+vpb07307Bi33wxE9Ac9zRyQJNdz+NrN7UgyF\n1D37+MRoroc1drNnAtVYWJjsx9++R55FbvNny4hA7uSNHqZ/ASEBN1iNkMg6\nY77YFg2/llpCP1bXhzJHBiAOdruig/GlC8SQRqCnKV+jfs0cifebZ+NF2i8C\n/nddzop876cTsfWICnHiC3tNDxhlna4I/9K5RU9HpjVLIQUcBYhg6pq4Rodt\nuIiuTsyYdzYQLHJx/d8psnWjzHxjlL8ASsn+VRnjgEykSBQxEO9fNfInlji9\n2eptsmtvkENWlpOy2CFMiOuIbqQ1e+8AqQR2JhikVW5PFXYQSeUFsuEogjP3\nADQj0Wk8SQ5kkdU/JnTsn3px4ZBvtSm5jmXhlKe58kORwAU42j/zJgXjgS6h\nrFHt/WQdzYPZdb6/oZ7OhVPgNoDF+Bffv/dQDlhT2uvK6Gul0Mlyi8M9s1vg\nlSlkQsZStKYzYASt8Q1D8K7xXrsetEq0k40mkU1wo7TC/j3sbqIcUK9HRHr8\n/XGeDMTyHztvBjfJG5BdpMEiWreu9YlmrtzdNLbhnI+p9VbqbBLgCvcVCuTc\nv5g+\r\n=Mqfz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMU5wkLYJ/BKiJxP/GBYMkB//OqhHpp2PsukWJ+1m7fQIhAI1EyfYyIbu8jQMwA7E32N36Zz5qDkzJnKDbcFuwrdR1"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-6cb3a87e.0_1643310769524_0.8664046599824118"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.1-2afef2eb.0":{"name":"ipfs-message-port-server","version":"0.11.1-2afef2eb.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alex Potsides <alex@achingbrain.net>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.1-2afef2eb.0","ipfs-message-port-protocol":"^0.11.1-2afef2eb.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.1-2afef2eb.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-0/W/aq6j82KeW5rZkHOJtcQ7g5sV3nnk+TYgwHSGz9DCnTwp0dJoLwnanUO8Ml2lda3YcYASSdnwPRRLsqAD2w==","shasum":"c55da8d72d13044d07a02e9d46c3471f66eea9a3","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.1-2afef2eb.0.tgz","fileCount":41,"unpackedSize":76924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8vvhCRA9TVsSAnZWagAAzuMP/0d7OZLtm2MzeOygyt3d\ngBiQA2kieozau5kHrg9onBEZiOq3wTzMOmEW6lPtKCFd4IiC72tClfFSt5BG\nqtCgYT9n2+CeLNcBHFez5/MPCu5O5Id9wOvS+0pbh7cNZXTBfOA3yp/s6Qro\nNowqlbfxTAd0Qb50SrvRgComZ16EGT4rvhMDN7jVsc2DfEjRdx8iAeorIjDi\n/zl3SfeD8Y8tBMFaOtNYjsl4L0254bkvxHKy/eUyGz/rmRfdKMyNL1Wii2uf\ncEKdXNvpgYpz/4HCuj3TftGQbnkkFgUDOG8vzuJhmwEfvRWwgOtD5nNYgk3s\nvIg1Tc/S8/0ikmU2PMtPXCVjINjw3rraVDDBsCSckk1k/5GFuYMdLc9oN3KL\nIXXJ5OZwPXgECc14qalGbQq9XEqt/QWn4tfYMi5DcvxUrDDGdtslvLLsVVSp\nV5r7XfddHX6Ue6tixgxpPKnzJzyyWIjPK+G+cdDEgK4MkSQxtIBTHgXPt5P+\nB/2962+bPeE8EolSrJaZQQEJXGH4GJ0Hfdb0e9+0KILurxFaejIDP7oZ5WzP\n7/+Su9pDR+QAkUMyiEuZBwK4imId9zJM1nY5xGPSpjRx1FuA6ew8xAz2jUMu\nBobr/NaVzdYJn9sLKD5jdvAJD0+Mx7QY1u2y11DkTnYShVkMPJc9RqwOeBPm\ne96A\r\n=7tMQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxSXIf4dAQDGDIxge49JEo3htw6UtNcQ13j6ouit0y0gIgX3inme/egX5UTGghbk8CZotz4rKOnPFGnW8FbcMgKZw="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.1-2afef2eb.0_1643314144875_0.7963155384082974"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.1-3a5d61d4.0":{"name":"ipfs-message-port-server","version":"0.11.1-3a5d61d4.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.1-3a5d61d4.0","ipfs-message-port-protocol":"^0.11.1-3a5d61d4.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.1-3a5d61d4.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-K8w3LjtfNmdDs0pV4Q3TJyALHpzDrsLThIWKR+0hZcL5P+idfBxCzQslVY1uV0nIvJRD7smSAoUtbitkDRjUdQ==","shasum":"6e87aabe388f28aee8ae2f07228dd50740ecb1de","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.1-3a5d61d4.0.tgz","fileCount":41,"unpackedSize":76864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8w+7CRA9TVsSAnZWagAAtUIQAIo3y0yzDzyrLXil7daR\ncVQTNjZ2fHsAGcJMHQqJ5CTXfytSPmORRs80L/hhsqRVBxq0jUJMuSkMVXYk\n3dNaA7u0JGDtSF1v1WtUA7wQA1fP8qX3IALqhSnncHXfhl/oEtuAVqGWK4Hc\nSFf1Y0A/arwUVHAu1BpQP9B3DYVE3UiVoK/Oo1hOjnZr1++egWCCsPHQKKvg\nWWaTVOTgqaIfD/Gku9FYwBiNxnF7ldUOt3hWjn6I2VSL7mbsuNh1PJiAHrZS\nJUX/hGKki0Jc9m9gWaHW+E8uQt5qvDX8Agz4/+sQmZrli6zyfHacYo1Jre2z\nsx5r7VJQofBkbxNDQ202jWK7U6gi7CCHEOdrBp192n0zDmwi96VCBSeZHQJe\n0t8LEBb65ShV3RFujM7Rcl+g79mCJLOJigYl8DteryE8El+s/2h/FrnSBnzD\n0zRh+264UkHAytrTF/RA+rk/psY5jkcbPuGLNjMRfwu1opS9x1y0IxMUUh4e\nOm86UyU4kURgcUQP5OOgwSGflZk8/HmOdSFz+F6DThBGkqKafbyvsoBNwzZ/\ntSF3g8PTWl6HY1ENKPGs8iInfMBCXISnhu9EZ0RRo4lRMLV7Zp4gLEs73iyl\nEqDUpSg8kx077To9jjYsnlZOKbxGOoFcMOGC1P9OdELtp5aUvAdfDGRWtnQa\n+HeG\r\n=YiPX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+Wu9V/eEl/u7Yi7t2A4rvprXtSuXcG6EXs5mOkkBfNwIhAO1u4ZmX+s1GXk3k/mmRP0b0crcAwtOh04DVEeg/W4MT"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.1-3a5d61d4.0_1643319226872_0.6846804340137838"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.10.6-cca6e321.0":{"name":"ipfs-message-port-server","version":"0.10.6-cca6e321.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.9.1-cca6e321.0","ipfs-message-port-protocol":"^0.10.6-cca6e321.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.10.6-cca6e321.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-NI045VdsjpWUqDD/+blY+Q+Mls4WlfYDg85X9g3OGBq7v1FAfQusgljU4cDaKLFYafBYQLgRY/l0jde+ps/rPg==","shasum":"05a24f84ba235f99dcbab66ee30c2932df146273","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.10.6-cca6e321.0.tgz","fileCount":41,"unpackedSize":76863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8yTZCRA9TVsSAnZWagAAf9YP/j6c6g8SguW8COqvnjU1\n5cd+WyAtrGvmzy955TF+U0hp8vopTpeyVSM9HPnkNGSSGJnjUy6B7qd7gsT8\nviy4U7u1BaA3jz19Xu/qtHwyINyEChLzUvYGmxo8Hu5XqGkDdys9mHMUOfMk\noGh+f5FdwuRKHwq3fppBNk2IHnsyKsAQ7kZmCvnua3sCGNTEPOjbrakefKvs\nFd18zoYiiaUQhjMjB4TNWeni8e3XG3ozOW+bfaXQaofGEdhyZFYEMKPP9axk\nqZhQ90CsnxHBEV/685Y+W75a5EgXzB1pnvWRX1gEVTAUFTYdHakjYqhN2P5w\nuQeBXIIF+krfAWHGXOwJLCdJyiB7QBmcufAhPqkZ41G0cAiL9sLaJZ3k77F5\nqBaSjQvujmADvL3YyA6Q3h31LmURcseOMF9k1PfAGIV1oTWsMxd2YDWN0Yd1\nLLLkYZ4utCik5VbzfCpFXfmvsy3/NTub/i20esPvcjhZETrPfuUwESkE530A\n9KVRmD9ZSMqbfSMWeSspOIuX4e1BV/oPYb2JnNyp1cK2osaB6dNZF/Hrj3Gx\neUqoORpG1+eA2dSALdGyQUFOxfi/5Ut6OD5PNoHX88Nd00PA1hAPnkP0Jj2N\n6BBbdrGt4Ua5jG9Or0l9Y8m2iqz/jtZVivAapyYencCVnvsGA/GkyDyQl7kq\nUKwp\r\n=L6hW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCf6EZh7LO+WkVszinGO4xIt4yOJ5oZZeykM1mXWslQ9wIgB3nDRzigEqJv1EBVyQlhLZ3ZcM4M5r3eByNdpt4Nt9M="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.10.6-cca6e321.0_1643324633394_0.2013851014866146"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.0":{"name":"ipfs-message-port-server","version":"0.11.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.0","ipfs-message-port-protocol":"^0.11.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"_id":"ipfs-message-port-server@0.11.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-fNoSXQPS24eX0wPswgs4fhcJVY589Li+GocKheztuAeAyDexdHGej6ukw7oP2sA8E3Hwep4FzPcYKm+hNYH0Ig==","shasum":"af9628510f73b3eb92b33e1ae3ac377c0603cf90","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.0.tgz","fileCount":41,"unpackedSize":76831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8ygtCRA9TVsSAnZWagAAfqgQAJbIhBPaL/zCyroP8UKH\n5xhcerfPybRtlq/hEA67tNb9BaH/bs37M9c8Z8k+xVYdCRmvucQ8cIT02d3W\nSgCFwHUfjvg5hpmH+nfUQuwnCM6wj2SIE2uOrQfz8/aQ7VZE4XyRaPday3U+\n0W2/SZc7vEGaazH4Z+JVXA+nBFAv7sYgMYJXBdDpPxMrCrIdIqqJsN+J76+C\nDVcXidHh4hE6AaJwapreKYzA74w3hxz+YSgq92LlF2NnwxkM+KTNIK8jIWdC\nBbgKsNSVmUbfc7UHIBaQX/qngRF6DS3REO6yfrmThwF9DXKQx19sxMyFszq0\nHEyHd+tgLuoNg91PWA7gtRg+pWOlLzW63vn7KJr0V5S/ejlSlDnHjDowxF3n\niG7YaO4YybvewuLhuN/AgC7kdG6sz2n69D/EGiPxPe0Q+oSBdIf1R9BJrCbG\nCUXnRBVI0Vx4EAtE277ZdqvZv2xk8qZiXtAp5M0R8DnglNvTjhIxAOIpCWk3\nlugsbHjk4QSkG6m88ApDrCjySl0wZge/8kmyD9m8Wh8FfdKPUrKYrpl7bH2T\nXeszMU32rDVu3Q0Cf7zuwDGoL9l01xjxVNDBAe+ABF6pH0KzK7waJIuqqWR7\nl0aLC9Zeh4zHcl/36Dv4qSYbgWJuP0m6YMdYtY3Ru040sKjIq7mHqo8sZhj2\nUzBr\r\n=jmzR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBRqVkqOY97mfUlZzRWIpOjyOkVVR2LDX1c9iKL2ZAMQIhAIOpsT0CWp2bG0BIsUtOFLlaMHkLSFW5JDFkUiH+iDSo"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.0_1643325484932_0.16021417008335703"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.1-8d260215.0":{"name":"ipfs-message-port-server","version":"0.11.1-8d260215.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.1-8d260215.0","ipfs-message-port-protocol":"^0.11.1-8d260215.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.1-8d260215.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-wWkMIL25MF3eW1UAw+xLfqms7vaTA6fXjMpJGpt5qTw17fAjsSP6PzHnbhxY5DWDIVKRKm8L6Ah6UjI60oX1tw==","shasum":"8d7833a790fed9a960f5756f9fa9fe6dde9e65e2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.1-8d260215.0.tgz","fileCount":41,"unpackedSize":76864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8zBjCRA9TVsSAnZWagAAF2QQAJ1zSZ2lrTILQbtvsAXf\nmwow81LPbL+o7wsvMhqcmMqV7FwpP5svdC8qFfNc/qB0pXWHQPFcIX63AHMQ\n9/ZjfUX2AtnZdJiNIHV32GMG4Ccrmo+HlgUwmdRQrZ+FvWyvZ3rMCAGlIM5+\nqWQTZgmut1EWDVEjDuHEkJ2k2O/joeQ+HJdEnlxYCK6yOP+20VhSuRAo4y81\nOseNxDeVvqe8rESxz25be6YP6xo80QXlGrgFlOH01b/s1l3BFGD4cCVcg7gd\n0t3e+vdp99uyh3Uz8dDAX2NC5d0w0GbCzmCVzJ2noFPlOqgH6+bTxYQ3mliv\n8PHX+jOAcaqvhDWhQvHrrO0h49C/tX+Y8JrcCStn1JXlL/zluf7PtdwcYbAe\nfBzrjm2ItlvOx7Or/l14t5AwkHKliUk6dMIynebN7Ncku4J+sPZU6H8jmKCM\noC853vFxHf3Eni9hUC4YIYj9PdmiM64nxc3+gjW3YwzTG0FTpl+4ZdHHv3le\nQUhffSxnHIkabY7q8bLtcsKhxZ0DnyKe94SGHSAfo2AEt9PCIRxXceu/IVmJ\nQNrkxtWFnoay9q3VVWQZg4KUPLLkzpg9bliJGQc36ayqwlAMNuF8GA0zI5z1\npLEPZYMbCIm2qxiguWiIcu+CQCIDpHYUodJUEmxWDUnvhN03tfdodpDlFVNU\nQpR6\r\n=9yer\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/D1DmYhxEttO/g1KzESUnYeQtRJq8k1bL97KnWfgiHQIgCTZph1x2Ba4ZvLQzg5jSOV7cUHRQyFZ8sH3YM3zofp4="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.1-8d260215.0_1643327587448_0.5510867135154556"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.1-2c8ec080.0":{"name":"ipfs-message-port-server","version":"0.11.1-2c8ec080.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.1-2c8ec080.0","ipfs-message-port-protocol":"^0.11.1-2c8ec080.0","it-all":"^1.0.4","multiformats":"^9.4.13"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.1-2c8ec080.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-7YsW7m8bT6+ouzWCCiyeLYdfwJlrPBDeJjI3y9S5YgMLys2ixoXzBku4ifqaB8tnJey5f7spzj5KnxVuBrm6MA==","shasum":"3b740471ae87084d499e9f130499f2631864f9af","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.1-2c8ec080.0.tgz","fileCount":41,"unpackedSize":76864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9AQeCRA9TVsSAnZWagAANkkP/iqYPY2I3SMJK0dvycJk\nzLIox0mY9aQWcn8gfXGfZ9Qm+GxtJ2w9OGqaQ0Edg6u8ZeHVgbC1dQLOCWHL\nJQARyEAVrV+VCJ3HLbskQHFPmNs2r3ICRZLQuconLFC6Svm2S0R7kJibx7cE\nzb/uzTMWeanvSINL2k/m29mtGX+1wSf+dt+d0nMYD8Szcm1IbWgh7ypLUhD9\ngBSEfuNZuSZj1ffbqiE/HpkAaWqxIuMzKpkmwZUNrFgAUVhedDMQ+c8tmSR4\nG5qa1OaXKWg0uNNHD3qDPD2Mz1zqdnBADtpuGYkMBzc/np4cWi1IIsq7BS80\nIFQg4Lr0iMIHq2EDlz6qtgx6e/WhFuxCa2jLDxjcgyWU9V/xBOfY0yKasBfH\noZeJpafwNe/MyGgM7xCTxm6qW3GOtuua8pG+4qnvVI3j13ta6pFPmpu9M7IU\nZd6yz/bENV0n6OtFnnwDmMgSV1Hg+Z8vzZcCE91z7rTQXsDbOCA7yzZjXNgo\nGtTGteKrumtyofnpzHT7vM5Xm5fHY1MVTEePO9nuGVtIfU2poKhKzSC/m1+9\nXqBG6Ef4i4mNKAXzKzS0fjYCOz16+VKoG9dTYwSwWwdN6ybNfzH/+8W5Y0d2\nnyRfAa2WoX/lca4qIVAwrMJ7Ph5mSUwfyRjtn6lRvruMU1twwOq2hRsTVhmA\ni0Iq\r\n=Phva\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGSmxL+jXOw4TUz+0eTn9OSglFupB6Rmnr1KP+kyqYtQAiEAiWggQlRT3jAocDj+AY46WA0NFS8GzhuC8mtDxNc5rHY="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.1-2c8ec080.0_1643381790536_0.06726587805212403"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.1-3a74c110.0":{"name":"ipfs-message-port-server","version":"0.11.1-3a74c110.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.1-3a74c110.0","ipfs-message-port-protocol":"^0.11.1-3a74c110.0","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.1-3a74c110.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-8s9wXCwRmFyzFJ7YalBXtgWZ3T5Vip6eNm8tQAE+KeuFLj3DpV+aK+c6cHpNyu7opAp89jC4G5cassrFhCfvug==","shasum":"f0513f7722aaa54720d7a97b21aabf50ee59dd16","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.1-3a74c110.0.tgz","fileCount":41,"unpackedSize":76863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/VGICRA9TVsSAnZWagAADO0P/AvDCRJlTotVfWfze85O\nTbmNKXArX5j3xYoxhudl4SyTmdDJbvtrB+MmkIbePE/8oPHv3/srJ/0W9KCf\n81sYcUXrJqVNTWgnMpqMx7othNdrdezJTX/52OLR2o2G9x4tFpusAkh0XESr\nuDqPRbSzpvjtfuX84hXP+xAGAWjocHu06XSa/Iw+TtFOOrO26mAKMISlN4bR\nY/dHh5sHFrl3ZqVts0gUSmcfYxPkxay7a7kW6ixpGp4lYFbprSwGdyrunGC3\nPM1O15NyRWzCCHlrB2etra3t/Hr93rV1QxHWdkG5jew2AtyQcPOMVR6otj0X\nK8twc3+CTR/NnvggIXZtrdx6FlB2MH1GK7EhgGmJl6ncM0lOrvBuljbQGxZ2\nI03YT/JExKl1y4ANrb+tCMKBihbsBwrXsvIPyYXcOPHLGfyPMDRKStE+G3cP\n1uHKrKi78oo0JwAKcpH7SeisFw93WIDXp0UnZPVmQ664jGH+9S6z04ICNkh0\nrwBOgL1xDabzjhN2c7BLMXkYcZCfqavhJQbHM563jwADuPaCD5mb9xv6kizg\nXKjvaLE6jv3kTPzh9gbC5c+RV1Qj1SUHBhroJM3jRwonM1mz5h19gC4DgywM\n1oD2eilUoV4wD2OGGpE/5COhDDMf5xd/zOeDdXbkFbzhzHMYcd+H5GIlZ5zI\nMKzR\r\n=vJDy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXKm+Rb00p+mX4Hq3Zqpx1/YoIGb9mIJFq2Rzf07+bAgIgWJUoWhaJ7vehRg23+mtDbl/Plu1r3XHiiL8NWEvgrlU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.1-3a74c110.0_1643991432146_0.4116058129470901"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.1-383dc07d.0":{"name":"ipfs-message-port-server","version":"0.11.1-383dc07d.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.1-383dc07d.0","ipfs-message-port-protocol":"^0.11.1-383dc07d.0","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.1-383dc07d.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-uavosUC3LOA3tT6o5BG9ArN/X8WEGU1lUDH/vsZ/iGCodoTTP/NcQCU3MQzp4cyaPkVOtKeVev7Kts/kR90Exw==","shasum":"ef8cb62944c8ebbf36daf07592f710f3f693f9b1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.1-383dc07d.0.tgz","fileCount":41,"unpackedSize":76863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/YUdCRA9TVsSAnZWagAA8LQP/Avkug5j/IwQehW3aO7D\n6sCbJNpcWgXlZQJnuNTy66E7pzS/oes0DNMaP429U1CR91aWPitvkKarj2Lm\nECsvdAupuMkO3QvH1KJhthwnyfwRymS79KfzqKU9w7yTf7s+oQPtooib7iz1\nJiZMt1XAE35LP6ERAdbZixlqvQpUAYdQLPeR9mfhreyOPTgY4x0NA1dtnFPl\nFgQATA0062h9Y6s3QI2TQO8czbwXZwIwSl2Oj9m+wYt7aFEgV1YA2eXQuErt\nzlc3Z2SCOtnFtHyYXL8CuaHZIyF0CuQvHRFaV+ej+fQfeeYZk07mW7CARsRg\nSFJh2j6jjo4rSvWLwcP/PYu6Bg8BjpNJtOQzTDuN8dsVesY025VL+PJyHFtv\nd8FjFWp4Lds+rVLpZa5t1k4Tbxy6xQ1ulErGKTIHsQey458vwTWPDSpL3Zl5\npxszAn17lF7hzUZ7NDIGkTP99OEaGQdiD2G9fx48vJeSfC3ARCeybTICM/bn\nt9M1Ow8m3XD3/2nFLtgL2KZC3O88nDhNww0q1ge4f52hJqnE8PiZF9npcIlp\nZKMcwJTOEUTOOgbJFQuk7+bRshDWGSjJ1MZurzEYR9FHgYsL/5PIpU8zDBlK\nNz/Q6z0RQB5izSByOuuO0GRudUoSsp1Sf+wCo6lTUQ7ur/Wctb4UpuTn6iUm\nesIR\r\n=HtAI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+BV5uNADmVE8ArGfRzeGgVR9C46SGIVm2He+htxOqTQIhANOIp3Cxt7iPX2RysNyqTxFbJ3H6KYNWEBSz8OERG2Jg"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.1-383dc07d.0_1644004637447_0.9492075661384178"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.1-709831f6.0":{"name":"ipfs-message-port-server","version":"0.11.1-709831f6.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.1-709831f6.0","ipfs-message-port-protocol":"^0.11.1-709831f6.0","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.1-709831f6.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-bsJcP1sTAF2cJHeggL6cWHWH6kDdTDoylNWnJwyrKO+0nCAh9vhDq9nV4xnIPc5fT4+Ucah8yjHUXz0WMR+bYA==","shasum":"082dc1ddb2d7a28e456929d9702adc7036dfaee4","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.1-709831f6.0.tgz","fileCount":41,"unpackedSize":76863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh//FTCRA9TVsSAnZWagAAJK0QAIT7lwK6MmnGghN/ggIU\nSzryhBL9zkIGbXCqkWasAra6twzYo313+v3EyoLSDIVFutPz+ya+5p4xqAHd\nfD2pERWXxYiCZEF1YHAN55vjWe4ZFA3eRcOlPYTewqkXpi+/eWdurai5wtjz\nw145dD70TLb0xVqhX5DfJq19TMHfsmAB6sEyFRcjgnSAuM2swtgzWp7yqwoG\n8CHKHqJQls1Ba2FC4HvRHu7BcuGFWgVGh2QDfkEn8g3Kp5S6p57RUSrZYGdV\nS2rTrsObaIrvy64PhYTtli+MrcxoMHGwAZ9Ma8FBA70QxJewBk0d7W+/P9Js\nLgk76rGXjntZTtnUFFHsuL4dILdY7LKjl33OuZ37fGWnLLOnlqzv4aBO5Di/\nfKpsq/g/y1mb5SfWEe60UVVcEl3xU3HbgvRy5+HLAOB45kutAaULYyboHQQV\nJghL6ItLB599nB+V/zmonHjvFl1A2lFAP1341NYNMmplho/GLETvscUQGRo2\nF73RDYERQzn7pU+sdyXtJ2rE4mrpa4wI7Vwm7JAefl3D3+Qv1wUefpa2BCbw\n/oHiXEEagA34J9pRk9fG3/x0W1k+UR59NU268WZ3TNaq4LZWaGM0CiOTe3vc\nGSxgzhnKs+w3hOuLtzic23FoC7w/tndQDrJSQiitTf3OUoyWflmOtN9VfbVS\nG0MV\r\n=dgnj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQtB+hLbYppKGVGaV6Y+SFSAMZ8PkSY/ic9zDYftobdAIgGhpNXZX75jz8GL0IOrriDTWSvGbXPsjsBjD+R9DQAco="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.1-709831f6.0_1644163410808_0.35400475730644465"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.1":{"name":"ipfs-message-port-server","version":"0.11.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.1","ipfs-message-port-protocol":"^0.11.1","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"_id":"ipfs-message-port-server@0.11.1","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-L2mjjCd3rkjI0rOCwYtFke4lTNVT1yBnunJzR9QAsUVVEzV6bvlKkiGxShT8IW6EOtKxA2eVxAez1vSxiBhjbg==","shasum":"2099aeae2a4538a9d992d55ab3fe6ac9b599f181","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.1.tgz","fileCount":42,"unpackedSize":77360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAU4aCRA9TVsSAnZWagAA08cP/0dSrm3lA8LshdKSoIBs\nbsxz0S3dZtL8mEG6/mdzzGf2fT05AB68s6Y7Z0co9uMwN3OBJ71IiNpyMmKs\nB9VKm/RQ8+xsc+MVAlc8Bs1HLUW/8t+yPpPCtUwK+6QMp6x/r5khptDSN6+H\nigRzMnd+cdU9f5Tf7rM20svioZI/M4foAmjFGTyy9w/PjO7XSBaTer8sQh/Z\n8qF+qsLWnHx112zIdvKXVzhCj3Ti748K81q6rx2XmE5UttdicvDMFErLkyjF\nZ9zJi4BWBhuhb6IEggTJdm/FQS/uxgow2JVcW/BZtixSfKVOggl2qszjQn63\nh0g3GwGuGK+AwlhyLU2GjlhpRWxFemQjt2k8XwokB1anASg4VJKgKV93Xk9X\nA+rs2m6kTb5a2GHbnRivRWETet02lpBLOFB0F3E+nBfSlT5cXKjkVBqDAJUO\nK0OMjFxfwebP39TNM6a+bSA3PobGvn0K4N54Gp9TSu66DWdEkqVtShqr2vtE\nGXyNqfzA0nlcQJ2E3eR5DyJ68fnO3NlwhDH3ns2hAxB3bB1dtXwB1YdweQfx\n5fpsQ97LeRlDtaofd6TdsjpqoTsI8Sib4UNYr5dDzBPLyIjJmjwfQ7UtT3lc\n6MS/npOMEtqF03wPfOQOjKcM6xnfP2KLCA5jbd5WsDrtcc6S3ThDp2QFDwC5\n+S08\r\n=D8wO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNOO+E9Vtx1BbP/UnKbjr3yiTvCcrOwsvB6Q+6e0bh/QIgSOhWxgz4MsMfhyyBbGFSMQqYVfiIC68h4QjhMryqblg="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.1_1644252698354_0.9476366691734448"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.2-1082fce9.0":{"name":"ipfs-message-port-server","version":"0.11.2-1082fce9.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.2-1082fce9.0","ipfs-message-port-protocol":"^0.11.2-1082fce9.0","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.2-1082fce9.0","_nodeVersion":"16.14.0","_npmVersion":"lerna/4.0.0/node@v16.14.0+x64 (linux)","dist":{"integrity":"sha512-KhPoe3jrY8lUe3Mxbz25u8bXmorei6g2OST5p2A6a4w7XShxGnDNDRsKUj5I0psFgLSkzX0NbGY1Gneh25HbGg==","shasum":"80d1fd8252483a0f0f667678d5971537e012b7b2","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.2-1082fce9.0.tgz","fileCount":41,"unpackedSize":76863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD8YJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1kQ//fTwi7B6xSP52eG+lQ1yZgHs7K47i4Yow/VDGc9ay2NA2YqMs\r\ntEWhrZgrVS65OXS4y2TAGjOyUAM+bvBVpWy36s+lxaP12VMnasSR4HkAWYY+\r\n+vN+Z1zS8PmmkAqPT1wR/D1c+fTY5HPxnfcpKMzKLIDGAqR5JfKIyJwFpSEW\r\naUiDzrxHOD/VE8YpRxILhUMwYVCO9Ur2fhk/evG//TCP+rW0EvA/WrTLcZ33\r\n8LgxCgbaMrbq1qCykMvz8BKcyEXrizbtjIT5wg/Dywzc3Xk19BnRU3x+AeLa\r\n/5SLR9pmIITwZ1tUCgbNH3ZCWJca52ejrkttJYT/r9L39Hnghh25Fyxu5IqH\r\nQUfgwqFok7pyIPxoIuwpExz1ik+RZoTdogFv8jMHy4xTI0wlvDb0zrwBcRP3\r\nZI6PEVNlLdnWkBjjW6/+vN1OaciMUwPLlisTpfbYtn/Osv98a2CWAlaZC8kX\r\nE0vbWtoNqG6DO2RW4unU9oO6eSEjYwTZOPXQFfrvMjm/obYbjFcq3xos6CXn\r\nOUeRU+Mv13vMSvt6R2vyN7R4sgvzzRVlpaJ3Pyuu0GgWDixIDDBbjO4KuEkG\r\nmci322vckhsSa0LzybKec5jHCp2E9Z7XEYDqCZvk183Ln67fKkSermETG4+U\r\nR13wiUpUerGBxDTLPWwCyEPrWESottwM7A0=\r\n=Xxbq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXdLInrGmHESn7cvi7cPMPq3e9liuiAORQKud/OpT2lQIgR+p8p2AZjkXtrsJJDpkWwLNvpqm+RrRPyNOe0iXlTEo="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.2-1082fce9.0_1645200904935_0.9360519964413896"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.2-125d42ba.0":{"name":"ipfs-message-port-server","version":"0.11.2-125d42ba.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.2-125d42ba.0","ipfs-message-port-protocol":"^0.11.2-125d42ba.0","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.2-125d42ba.0","_nodeVersion":"16.14.0","_npmVersion":"lerna/4.0.0/node@v16.14.0+x64 (linux)","dist":{"integrity":"sha512-eCOgxnsjWYT/XAzcbZInTcl/YLGLobNgyPUnh+k7k5ob+6eIuBv4qMLTRSnYITsGk5LsjapF7ryot1Be9Zkp4Q==","shasum":"1f8513d561cb0b398c833d2b896c1f349333633b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.2-125d42ba.0.tgz","fileCount":41,"unpackedSize":76863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHeuUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOCRAAgN2mm4Ya8QpU221Z/21QcyT/TFRSAFByKMf9+K5sA6HQWHjV\r\nCU4rLRAynB+IIHfZeBIeIf8wxeb2R9bnORbnGMIzuXzedpIG2V1h/2RYG5JW\r\neL+w2wTt4v3cSvzr8ED9lgGwxUJ6zOXqSH6uTj3Q1au3LlfbVVsNq/rSXqiw\r\nUvUSmYpedS9InbOBNSJjAmBpbyQNNKryJelRMHJjPHhI+yNGIvj3VwWNfltV\r\nCTfi0Le02r5LIxqGG8xOTqZ5+kCsqYROg1ccL9yIcyQKNpE7xZv9IT6TZVVX\r\n3ierg9PfPDKnjUSD/hrCzMUuMOV+t9skVR2eC1QGkWpN7ULjpDAN2liNknCW\r\nx5QeZLFufWQeTRj448EII+ISNc6KXitvHVH1o3eNZLkFmobuzs/4jRpcVOtx\r\nCAOIX3pMoAux17ddMokol75Slw9JNsTp9vTFJRNVBBla1uexlPOxZuuRLk9/\r\netMypwqa21jwvxN6IjuD/Q5DutXvS+RqiFOFY9fqOfhpAF7rZ86cXs5dA4dP\r\n+KYusrYstU/V59OcsKYVYHHbtZ2ADuf/1690MXpm0EE5Ill/4Y9RAiBr93E8\r\nRGYg7Y8vo3Uf6nyEjv4gMtz91J0s1Soxfpkm8aPyvRbr4mNa7VAP2uqe1Poz\r\n/kSQRBhr5H6KBgDlvEtxRwYaoAfGYIH1rvU=\r\n=OMtv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAvpfl4rX8rRTusU/CRJY/5NzjvhqQZZAQmwsFC2a+/ZAiBz+3jVyLDmovDRlW9Ows1amzNmQUntHHXDhe1jp7jrjA=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.2-125d42ba.0_1646128019985_0.04655425678526681"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.2-df1bd1bb.0":{"name":"ipfs-message-port-server","version":"0.11.2-df1bd1bb.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.2-df1bd1bb.0","ipfs-message-port-protocol":"^0.11.2-df1bd1bb.0","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.2-df1bd1bb.0","_nodeVersion":"16.14.0","_npmVersion":"lerna/4.0.0/node@v16.14.0+x64 (linux)","dist":{"integrity":"sha512-XEGR+52vUkvjQ8BItOM1zrrkngjBeiUbSmsLULOI3AmtHAxbZekWMjKTKH0x+SC/JAIfukfrWZM3zk9Iz/Sc7w==","shasum":"38de1301b6705b5d2839b52d268800e4282febad","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.2-df1bd1bb.0.tgz","fileCount":41,"unpackedSize":76863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHf9TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrO6g//U4DBlzcgyKqz+XrNe2NWc8JwzbR563mI6oNV0EO7zzwEXtDb\r\nmxIE9qoSf7ogoia7QH+i0WGgELl98hUcbgfPnFi0rzHmQZR6c3FKjFJ+qiZK\r\nWhD1qrm99SR8fnlhsf4CSTrMVqITMtpNTyyylP779bAV9nQcIldPnIaH6m1Q\r\njU9EADfdVtQW4tsIQxD+fHZ6F2VOx0DvIw+Otcbjyh67F6Pc/+0r9HGUl5dm\r\n6bwpSFbyZyybMn430PGGbEb+GY9ftOD4XK2azz05xzvhcJSIXR4Y+v7Q/BvY\r\nfcCiLZHbebBedQXuhsCf0pK23kc2oh4txrPhCeagc129gsdtpwBg/IbAMmFp\r\nbAGK8XPezP6jpG1uA/BnWMh+ra5ZqBLU9t2fVShRK027P8FYzz79q4tRJxJT\r\n0ldTvgOcVfevodJPbwueHF6HMbA14yDBlS0iVXlkZmqJ0UgDVr/n1pGUj/Fp\r\nShiaFlCGYcWK1xWOSIAK5vUqIIEDzgFDLUTSRgjfGWfTxAqTEZeCAPhmnc+S\r\nBsNNQMO6Go6bJas9oPN4OI3kxZTTysH1u/nC7IEGAe5nSUTYRetYMm4PeHBo\r\nRLZY1Tykw2ZniwWTtAK8uzUh23ghiH0xVynl6HJf1h9Q1SpGOZcwIy2Z8RNf\r\nLOM5TVhhPsFsqY3KkuWI0WmDAEQF+4SglE0=\r\n=WZFh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVjXjYpO9i0T1/a5wtPAGqc3d4X/wB5hTEHYhDJwXfagIhAKTjBK8SD6doUZoKYsHU5Q1p/ZIiu9WmCK3LpR6nLqkX"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.2-df1bd1bb.0_1646133075268_0.2519455040020582"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.2":{"name":"ipfs-message-port-server","version":"0.11.2","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.2","ipfs-message-port-protocol":"^0.11.2","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"_id":"ipfs-message-port-server@0.11.2","_nodeVersion":"16.14.2","_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (linux)","dist":{"integrity":"sha512-rLIhNLrSohy2dpcgC41G8YsBBAQm5HWPY1JYDiByWMBwJQxb/8nqvtojeQpwAXiPmjouRerOSrH/j+tY38CNsw==","shasum":"49a441b85c8759bbb12e901055ccd166b2c690e1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.2.tgz","fileCount":41,"unpackedSize":76830,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHfHUEMKOrSkq2BflAXbzyB/AehAQ/MzMUpjut5ZUuiEAiAlTCvvBGyvNXTjS4FNm1m8ROdKTlug+GqGhmKlIMpfZw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTFvcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTPg/+NEqv3Rjblx2ENDVSAqoOZEs8+8+GpNCK+/2HW+526u3l0cgC\r\nChHTHl2nsxNE8KJsaOmlfIMJ2zkQXRFN5OzQH1EyRqcLEGcbAPgLpPvzgIPx\r\n5BuZJiKyJEcWl3nqkpZPTS0H0rmOAcNR+4L4yPlujj0pBe/fjJjdy/E1SoNd\r\nZip5tsYbeDLedgkD5IVyd4xYmax7ywUF9Qpypz1DHGB3ucm/5QXviRa0FY+e\r\n480+geVJQOLhK2yNG8cnF0mZhtuUwUxLpvHjQWznl8IgIjAgiFCrMeYJziDK\r\nKceWQPbhWDTes2OhekwwXWbwk9BkXORzKrtgVmmTATCQ5JLTtx+/84SF4nMv\r\nZLCecr/s0Py5vnJ2TQsobG147rK8lIguui/j72jPsA32JL7Y0WVRnuLlZDTW\r\nbi+BOf/k+EW0mVkCHQ1HP6hnmqekWPA2BkcTHFZTPgMUAOqmPe1rMNT1JUej\r\ndzPJVnz6bPN06vRrC61aCtGs4mPdXrmZ9k8ble93CZ976w0FLJB9xBYbHoNy\r\nOBkPbirQrZ1+CAmzA4UFCKrwrNYzDNesMkOK/qWNl3GGtZEEwf6+EfkvlMUX\r\nFtEXYPp7U8dp73OUl8fOWaQKiWNG76ZvJYZE3ZB6Ny7rwh/EWyyH1RpkOhVE\r\nysJTeD9Kz87c7btkvgQCJ9SzBdXVD3KVGGE=\r\n=y+0g\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.2_1649171420424_0.38473617680777905"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.3-e90b8f13.0":{"name":"ipfs-message-port-server","version":"0.11.3-e90b8f13.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.3-e90b8f13.0","ipfs-message-port-protocol":"^0.11.3-e90b8f13.0","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.3-e90b8f13.0","_nodeVersion":"16.14.2","_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (linux)","dist":{"integrity":"sha512-Fio830n71iR0z2VoYW3BieCFvBOOvFCWy0DRLpkqaTiErDeqrVNsQUYbinyrq0D/LgoDgtJ4dAawVVNw65tA4g==","shasum":"388ef010276b4d4bd9bcb51cd785c576b654239d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.3-e90b8f13.0.tgz","fileCount":41,"unpackedSize":76863,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtPwX0tMFvJT7R1qNJW35zqWggAErS1MfkUJhN0PJ/PAIgFzIqS84n+7JQ0PfLaxFXVBeZcsWC8ocqghEV1g+2n4Y="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTGniACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp01Q/6A1tUKwATsuPCQNaL7pHeYXfZd/BGv8bv9kZARP2q2WxC3fJ1\r\nKd4NN9XvgK81QvZnVgYBoVVOsEBz5rsO8nBF0ZkzlBBMj1Dg2NRADHDdzpUP\r\nxadiILf+cZUVcOF8Msfiech4LzG3yw0aiMc1h4o6QypmPnlo7T++6EWbkGgO\r\nddWJIB/ilWkJU5pMkzRHmrtPYa1CuevlUca2FnW406YCrTkYkIFYprAkUlqt\r\nxFVomZEkyd4qNcUchHPDsFhR8Mr+JkbsnqdPooCiOMYEbn9MTz+aG+bTJ5Ju\r\ne9hflY1qhGRvbYMWhYL2fWwoB66Gre/tIUJzr9b9mgZ8BlYuEqVG7tEtqX7d\r\nfridLM95qklEX0ylAQOmRyUwz78TTNJQI8nNa643Y8ltOE27YSvwSZn2P2VS\r\nBl/DLLvqbLmcgxGh6iF0FxHTTE63uOnepkcuOXj6h4Y7MvXDS8xb18rCN6Yg\r\nW2RNRs8utFq73lLJrWTSZreh+RZRP+hzM97mD4NDwdxnguXgSQ8BsGXc2ysv\r\nX3asRt0Fbbqddjlp5sfEEaZ9u1GgHUZ/l2upeQJFvquydzCDEPPjd7M8i/yN\r\nTaOk9nYjrv9cjUYoapOchr0Og+zT38jtNwuorAb6pfC9RZx8/LEXTE+TVeXz\r\nOrPjCieq/iAr5LCD846PiexerQL/AElo8EQ=\r\n=vndt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.3-e90b8f13.0_1649175010453_0.38612908056446593"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.3-8f7ce23c.0":{"name":"ipfs-message-port-server","version":"0.11.3-8f7ce23c.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.3-8f7ce23c.0","ipfs-message-port-protocol":"^0.11.3-8f7ce23c.0","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.3-8f7ce23c.0","_nodeVersion":"16.14.2","_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (linux)","dist":{"integrity":"sha512-2JU0OCwmYsiV+Ye0D8UILksgIijbNAveJPtNut8vxrWmgc5n1oUzP8xsiXxMWUXEaDFY+4DciiuXmVtMTFFXgQ==","shasum":"19665ff0f135968a81c64d840e8a6387600833fa","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.3-8f7ce23c.0.tgz","fileCount":41,"unpackedSize":76863,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjrsYvS9h1+b4dkOBNbAABdYz3AHukXOTO/7JF/PLenAIgZuBg3VEtyipnX4BSQPv9V/TeXsiG0spFHiDk3tBo+0c="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiX/8xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpwrw//VR8NvVuTwtQgBMiceja15ajrk5HA/ecA8dcdbYAEf9U4pQDA\r\n6LCeEiutXuP3dkS4qg11GA2h+YQOizIwqG6PJu22p6hbppqtaNZ7074yr+ly\r\nCPyvM/KKFEiVfGvvDvkkb3U4hFoRGGgJYyv0/3yoBdT//5ccDLNF+GtQu+/z\r\nl1Yz1c/wp5pRUjbcq/BN7JNzPKsY+q+Q6sXhae5sapcP6nUhaJjyBTEDRQbU\r\nRoV9iU/GN7dcPmkzVjGZ4sQ8eHmhsWCmYwhqFEBGmRFyThbo6rkfdl4iNUlp\r\nCGgE0OjFIP81jUNc1aWhJ/+36Sx3b50OZaWayGMyzZTgoO6Kn8FVkR7kWHT6\r\njkSDgRZYLo0SdFRIYe+5IHMCbTe+wzephQ/MngqkxMWbdhplSSQKjChzc0t3\r\n7EKlWQWKu/SghPjNzRePirNFZXkI+8r60h6FbS9enevRd4IqVzmRsr7OgwhM\r\nb5NMH4lOXuViQs8X+4GPkrS+qSI3jfd0oZRHgpt3WAmrHklfAWD/8T3TBpl3\r\nGE4YSO4KT1F8dpoEEHrLwCZD1XaAayJudQPx5a4U2cpX4gL1WqtWx5w0+Rxw\r\n9o4r+2nPPXAluttg11Vn2aCqquyki7cG0Osks3rc+XhPEB9Pb1Sqmoc7qRuQ\r\np4+8MiYO1NwoCEW5ThvIBlzYg/ooSkgLAWE=\r\n=yVtW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.3-8f7ce23c.0_1650458417002_0.41015615703031916"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.3":{"name":"ipfs-message-port-server","version":"0.11.3","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{".":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./block":{"browser":"./esm/src/block.js","require":"./cjs/src/block.js","import":"./esm/src/block.js"},"./core":{"browser":"./esm/src/core.js","require":"./cjs/src/core.js","import":"./esm/src/core.js"},"./dag":{"browser":"./esm/src/dag.js","require":"./cjs/src/dag.js","import":"./esm/src/dag.js"},"./files":{"browser":"./esm/src/files.js","require":"./cjs/src/files.js","import":"./esm/src/files.js"},"./server":{"browser":"./esm/src/server.js","require":"./cjs/src/server.js","import":"./esm/src/server.js"},"./service":{"browser":"./esm/src/service.js","require":"./cjs/src/service.js","import":"./esm/src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js","./block":"./cjs/src/block.js","./core":"./cjs/src/core.js","./dag":"./cjs/src/dag.js","./files":"./cjs/src/files.js","./server":"./cjs/src/server.js","./service":"./cjs/src/service.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i rimraf -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.3","ipfs-message-port-protocol":"^0.11.3","it-all":"^1.0.4","multiformats":"^9.5.1"},"devDependencies":{"aegir":"^36.0.1","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"_id":"ipfs-message-port-server@0.11.3","_nodeVersion":"16.14.2","_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (linux)","dist":{"integrity":"sha512-jRdRLZRaM+jXpTxpzKlkr9tzwFxFNkXiHg+Cx0byZzk2pdcwbNtbv9L1jG5M6iN/4UktrOl5QUqPA/TSzZmE0A==","shasum":"3f1bfc098ef36c93dc6b2c6c19ad104ef314adac","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.3.tgz","fileCount":41,"unpackedSize":76830,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQlPba+AdPf3BujGRtVeRY3/YnvBpkOxYsu5ajpf1UaQIgQhwi90gPH5VN4tnSU9PsEDivoWFnQkV9i/M/IOyZ600="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZ5jzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZYg//a44CFGZYEMbneo69W8/kK+lt1xSt4aZcsG2ZddmjzZ4FqziF\r\nO47x5egtIUVgmK4mnZ1F5w8EPf9uomQjkGlhcOx3CDCYr6KRh/kxQ+kxZg1G\r\n0aeAkJmXtlt2jozZR0uXwg2v7X1hvI8u3YJw4FIVDNXwqZ75U2hXk5hXKraf\r\ndhR9dMJgcgdpOPr72ABaZjJ0qOXvIOg2/zV0nEhaOG8HIqeOogsOqKdC3j49\r\nnIFOxSQjpL85nnAN+xPF8+X6FphwaLxpXjDJBQYWFW5amcDfSm/+NyWtf1wr\r\nfmkaSLsGUD+66n2PMtM8kMxT4fMYL5zM1Se9jmNd1I7LvAQGCsxNdopqrXI2\r\n3kOblBVxv+Z4wpx6/uD9RZOQOOEQznRgJKS+9DLE+HdhYOJr8j5crYKSFLND\r\nEbF7Ea0qSyhpUt61x5HGsSZLJIEdT7nmIpsyO3cv+8DYqnkZ/pcXzYLqh1gD\r\nXUPRVUZ7+D8WIJt7ZxSGJhJl0t+dUIvL3ltdNbiXMZ0X9+lpjlr3LUA4Ye8r\r\n3rfWMoUkjXLh6sxHli0TMyXEIG+GSmTyUnE9t39K8Ifo9STrZ5LGprP1WrA0\r\npAE54HR3MWIk2/2uHeHSm6qU+Fk5wfiswBeYVrly/1v3LlbQauvpvOTRBsNY\r\nUwLvfARImSP0dqMyJHmIQvQP8XffQqNhsfs=\r\n=/MaK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.3_1650956531025_0.12959430911863112"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.4-7165bf71.0":{"name":"ipfs-message-port-server","version":"0.11.4-7165bf71.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.4-7165bf71.0","ipfs-message-port-protocol":"^0.11.4-7165bf71.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"0ef2fedb9b9cbed1b4855c48b5f03d343ceb573b","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.4-7165bf71.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-4olwYc/O6IFelH0fZ5MXOb4D7tz4Sx1zKWSdGXDd9QrArFHHTs94z1G0H6EIoak8GEdSIeNaAdnUVicTBGCc5g==","shasum":"1370344e404e2ee03c89f2d575334f68be69963e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.4-7165bf71.0.tgz","fileCount":24,"unpackedSize":72581,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCb/nrkStOJ/e3y31MPiMI70efD9nRmMONQujvPAm1oAgIhAJABmg7j0WI/Y51OEgW/Js1aOFlI50BFmVgwdmaZkDo/"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJigq8dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCPhAAocgg73WRcJfsox4DhS8y0KjIZ4vyl6fXCDZ1PHMEpw5wRTSW\r\nb3R9DIk7IISxOSdRm35WXVdEFmHaeUurz39no7sDx0KKy3M9riKPxYWVMRZQ\r\nvI44DNzVkZIYFMriVZ+d0Qmc5zS4Z1s7kFpr1J3e5hH61HGRUzs6WbgcTheM\r\nbFUCNgYYH5BEaGBtKmQqXCn8nUfqyHK7NfgA2f725TAWcKOn/ZMcDp3ttZxL\r\nbPAMsaa3iE8uecPPPHqTyKpfNgC2V61aNh/Cu95JPHfbYu7czhSQ3faw5k07\r\nFuBoJQ7xJoKyFVBEAjHLTO8bJP706SiyPKeOgIPrOtRiFThthjm8rl6Myaws\r\naEpLVQyabKygXcboEAuSgcNXQ0FwkZKZ+zNd8bhAM1xXb78Y+ui5iR27AzCE\r\nyGVJq4Vt0l0VCzEc1CsdAdLhVmbWdj2hG4vbfAYMVEon8M/Je/tGH0M8kuu+\r\nne5VbJKG+3hemCN6XDECqxHAT4BGUEKLt1sNTrnMC7laTqj0jTUVyhG3q7ml\r\nHYvL4thirxWM/BkZ9nkbifYJeTrpU3qSQNPaSKRjcfK/3D5UYE4HAnLCIu89\r\nATRabnn7ZsOAta8Bk7IXH6tP35FVVzliTqXEbhc79FBfNEtDeGG8mgw6kmtz\r\n4R6XlEVbobIMdQNffGrFp9vFP27BVJCn2JI=\r\n=OzYs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.4-7165bf71.0_1652731677283_0.6984869518490469"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.4-4e93dd5d.0":{"name":"ipfs-message-port-server","version":"0.11.4-4e93dd5d.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.4-4e93dd5d.0","ipfs-message-port-protocol":"^0.11.4-4e93dd5d.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"102f592858ec8237081913452cf185a3e44d2596","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.4-4e93dd5d.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-mJKmps1pJCRm84eDRw+P18ql6yx5nL45OJ+c940dsgPEyxpXXTM+CiRogMTbQhMghJEiRoRaOxUo8QrhJBmoHQ==","shasum":"11285b4b124c75c564d8dba389982cc34300325f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.4-4e93dd5d.0.tgz","fileCount":24,"unpackedSize":72613,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVRIzp6bjOiUccTtts/beHDGIYUDVM+wsT6o0mZF6UdQIgT9u7nwjbs2p0WnRuoH1bdmfF/ewF+0FhhLE0cZWwv0k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikNVxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKeBAAjocIvHtXbbjmFxdAj9Ow9OEttJsgQXPoJ8HxA07KhRHz4Ebb\r\nxdx6gDqDrEauxYq9BH9ScWMjePm1JJs9cvXu3jPo4uxgiMVkuaG8MOD/1R2E\r\nPdBglAb15GIqQCLkcc7+6TKlpJCj4+OfOHESps7VRItcO0cucc6pLtErIbU+\r\nrxSfj9+1OrM7k6ASVsEqzC4+R8nIDnRA1vKVti7mGRD2ZkZvnnkN5DfQTKHO\r\nOiQQXkqEjPrUHHhvOB+0gFXw11MAonhEiSzj746Q2S+JQq3e8Qe0RV81QFn0\r\nMkKNUOuk5kbKFwXWpRquCcr9NAMpcIV5Ov0zSsNQasfq8WzNN7XqBReCxo9P\r\nPKeqLO8NA0QOkALr9BGpQpQOZHmzVaup1FILuvi2k+oP+UgVBIa0mHWgtrYS\r\nK5eiI03t8L+AM4sRk8+u2zsnC8NUSn0SPcqCaAGcB4Fqc2ugSF8qKeQ29g7S\r\nOv6JbbWdLwdjdEy7/+CpzFJ/ULU9Bpexehhb814E9JmwkUU0wxO1ZXcBE4De\r\nCoGgOLC/t4kc9QS9gtsJv0genYNSQ3rzhrISoNCUFhxhdDcTIDw7J4OKcSgE\r\nNNCvtU1+sZc4WLYLwVQtRZyLSNK7l+AbtVsToMc9sXruej5lUbMEFWKWoihV\r\nYYM93gez6//q4JQF/l7at0qumnsgF6VMYRc=\r\n=U9li\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.4-4e93dd5d.0_1653658993085_0.6733998389426885"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.11.4-919b27a8.0":{"name":"ipfs-message-port-server","version":"0.11.4-919b27a8.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.10.4-919b27a8.0","ipfs-message-port-protocol":"^0.11.4-919b27a8.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"b3b172fe34f542a72746b3af9351bcaf25bedda7","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.11.4-919b27a8.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-q4MkszW8vVRU1BPle+rlHd+REvvgr/e6Qjsym/9t99gBunhyrqhZA6jj+PP2Ej25EZ7RYzgJEm24OJmsy+Oatg==","shasum":"c89eb96e20209634dadeab53b23d44296d7857d1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.11.4-919b27a8.0.tgz","fileCount":24,"unpackedSize":72637,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAwDTWKVONIiBauxsgNPkbEqwPzgmtJ8VbZ4ODAbpDqWAiEAtJilGlrRp+eo0d6yPTK8zU+pOOD094lELwQZ9iXyYSY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikPneACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKNw//c0T1Rxg1mi6hktaG7p5aUdujWI+OQ1g+PFodIKQAwSdbdPgO\r\nAIM12wSpSw6WteX0/GBqfwkhZ8nYkavzKOQuSb9CTxDy4qHP5EUPpeb6sTYY\r\nsIvB2gSL1K+VoTB0BVBUI+gGH1JyIeyfkUsIQr8SJck73r4aoff+68f/0j2U\r\nhdiyKYIQcft6p8GPVMmH4nYsrgwgR6gPg7SFSey5OfODiINX2gGv8QrL1BpO\r\ncB6nGBavxWyAvUFK1bAlmpz08akPBfeWVg8QJk1wKaqEywstA/SaiXtmwkz7\r\nGBKIAyAowf7wwQKraQBXr2V8X+XUuvOPM9xUCDEeYDq7JphrG8nYgfW4tUef\r\nnMDFkKk+MTjQpSNWp2B3DFW3/7wfGEi7UvBXmqrNeZO2YoJpzWYPOsHXDrCD\r\nFA28pFgqliq3kFeRXU6y3Xk/R8yai40XQAoAYKoyB4HpJ69l2UssWYc8eelU\r\n+60LulBrIqHi6inmGvQMeNwnY7ShhdTBTocmRy4EeWHAEeKEVI+rZ44TFwt9\r\nuQqv9wfRwxqTPWUo/HJjR9b55BlZc1SbEEWIVVYh/pGqj38H/X3g6Q0N3Jbb\r\nHIhjj6fwQ1sX+qfGKj6vLJywxbURzWG9rXQARsv4nVnxG8wmU+htmHRtPg3w\r\nIdYJcPPB5rcbRMKSXiqwkXyzXp9x2SexSZU=\r\n=8o1H\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.11.4-919b27a8.0_1653668318394_0.7395058438724749"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.0":{"name":"ipfs-message-port-server","version":"0.12.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.0","ipfs-message-port-protocol":"^0.12.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"38e78cc875309ba6316706b63865e399dbcd18c0","_id":"ipfs-message-port-server@0.12.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-c0LprquH0q4Wt7SQIxvHarwu4QAmp3ws0iYLFPPEV4K6H7k5OWfwqvz4rtz5slNhdg4J+u/7t0xHZXPbeG1fTg==","shasum":"3874fd2aece25588bbb1b657073505c4795f59ef","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.0.tgz","fileCount":24,"unpackedSize":72604,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCs771SfS2tnN23lR1kzx3m0RNcgC0Hxmw+UXjjm4kNvwIhAPkI+Wqf3XAkIk/OFpyTvTtAgatPOoTqKAv2h4ydQOQN"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilRhFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp94Q/9E5PfP2Rd+YPga+l0QjYCaifff+4Lqtx9tcxblHNSjDk98Mg2\r\nc2EAgoV3Q04SU9f2YBWssDfY/6YDSQp7Xt1P37rlYJ7OzF+HLgHxgRnHh65h\r\nR0bPECCj0vxBFLvV3grQuPKYbmn+r6IMO/qrkdyYvsC5czVjebvyNcM+yH3W\r\nr5UoXItaCkJ34HwexlddiLs7f3TMvMmHZC3vG5h38+MgeuNv5lDCFIVHUHfK\r\n62hOwRsCE++B/otHr9qbk/2aIiR6ZCznhgXHW3rB4H99KWKVKFOEC3kKR+WT\r\naWelk7AIuPFcFT4xyedNp4OnluBDOW98O8x/h1sA/7lNEqAKx3pfPWWnUBqM\r\nXzBiXFkABbH9pWbdgrG9qc84i83Dq+7UquGkD5XtTA9K7Dh6MmXuK0VnrsoR\r\nOiliVCLD4kzFuxo+sSaqZGUPsoeJ4CygzfcGPF5fTqsMGPRvOZxlMMKTVqPf\r\nifTArdUrRbCjAjQMwElIXpQL1u46IOeonIFuKrhxJP4Sre3/wPZCM41NNWK5\r\n2vBO6iF8i3boit+Z6nfEJ3ZjvFHSntp2r1K10719FNt4sQoNRHrVk/EbzjoN\r\nqs1OmzinNeLAKOLKA2PN5OIrsdwjgXCf+w9LjoELZuC/IjNeN/AuHva1niqi\r\ndV9dI0LBeiGKry/1xJgoFlZU/MGDrvj/Dps=\r\n=Apkv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.0_1653938244777_0.8075374372357236"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.1-ddfb899f.0":{"name":"ipfs-message-port-server","version":"0.12.1-ddfb899f.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.1-ddfb899f.0","ipfs-message-port-protocol":"^0.12.1-ddfb899f.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"87fbbf38470547cf82ced4c9fd2679df026170bd","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.1-ddfb899f.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-ew46g/zR7K64JSMY/OhCkXV6P2TswIXvOqIDCVThZIH2rGQgjb5hGNZGeN9saUKOk9CSSaiJxyDZbTx4vD5YIQ==","shasum":"dc8cb237572c4e4e9f748079bc68f56ea4f26210","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.1-ddfb899f.0.tgz","fileCount":24,"unpackedSize":72637,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDC9Im0CTDbGeUicBWp8VjSz9G8SGVIwISrVHy66dJx6AIgAkLvz8w1+w0qbTpce92pbKeRswYE8ZV7VDxiq5EHitI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilSGOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJQQ//ThbT3pBeZIcHOlrtfktOzjSapeQIGzv4GGnFGtK8AI1E8vMy\r\n7G3VC7e5+M0X6wkhZ+JgLeTJEYXsNXzwsul9DBbEqwhJFY3jkisRLEAjysI1\r\n5DJSRDA15ubdSuzoSEewleG38LgR9yBWO5r4ucbwCBODffxuQY8nMQIyvxWR\r\nF0BlgbzZig4zzmxWg+ELEpGhv0FcdcGS9Ptg7qUVUFOk1b1S+HyOJ6n4PWOi\r\nG9Poum5BbJcV8lEhAqMFSakdI1gf0utw7Mg22vGMSbX8XWwYFDa29k26tXvn\r\nLJq0/uvHqYbnO2ewFtir8lkfyNVjOA8t0tcgb1m8QIS9fl9DbZYo2SuKxgCd\r\n1KKpYimdsUuCYgUEJlt+Xe5Spdjm2IQ2nYtSIqVFV+y2rqVS3gkdrdFfiKun\r\nz6t8Fzd6mGeTHzpDmh2Pais3nY+TCKPM2RSZUXMckDG1Z/UGJ0HjYvOsqB2z\r\nmm8CpJOYMj/9Tq6KLnaM4N1w8mTt3edRXGrRFDjefKo3pRGIuPFA53f23CV6\r\nTf1yGgxPXYySTqQXBkXkB3XpLM/q0OMsAUOrgv7y+LXIttsznHSfm3Y+88S/\r\nwX8P1eHCaJoWjuncqJNHagZ3VsYiCFoS3AppFlyBSOOp9+j8ZK4gbHNxET7n\r\neq0lOSZQOdLfPeGGGNARMI75KOChcRGk3Oo=\r\n=ltUk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.1-ddfb899f.0_1653940621901_0.4926723565339004"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.1-764b4adc.0":{"name":"ipfs-message-port-server","version":"0.12.1-764b4adc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.1-764b4adc.0","ipfs-message-port-protocol":"^0.12.1-764b4adc.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"e174046b9ececfd2fb7fffcd8f6ad6211adc7499","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.1-764b4adc.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-SNrnz/7doLmclDRZkq0ksiGSeZcusIINayrWRKj0esu68CSQgZ5pQ0o35Uj09SRq902tdmW8QzcvKfJJICn8lw==","shasum":"cb59d44e0488de6090f394e63d9e2fc019e12e75","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.1-764b4adc.0.tgz","fileCount":24,"unpackedSize":72637,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7zk8HrX97TRu5ZdfHfDcCvWkJZ+j3xBOVJr2Z8CYGOAIgZJdOiU+mwo5nnIfHa7uptRTc6QbQAiQOO+zkeIcAvq8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil3cVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmomnQ/+KQJkutph+IFFlw1Itmw8/Qp+PC5zrVM8gxYqMrAPjIBQ/lwF\r\nl/nWYFnLZWk6p9GrtDwCbtyBwux/mqw4mKwicikwQZaKeVCNMb/f2RqXv7zR\r\n5bubuwziPKFDrY+ExUXzFx5HUnbkcXUWFZiRUHkj83xZvZmvk+yXs6+r9PJs\r\n9rnU1oXYviut69Z7gzBfbg53eQyHMFAze/h50Puz3b/kt2kZzs/xmhz1ax4y\r\n+SlRgd8muP++BTzoU3KXBvWBZHyFEm23VvC0dJnKtdKvdd524iCct8Mc5a5W\r\nW+anRQSSj9DYnF6HX19Q1T6vcmPbpvFjI8jk8tOhbVvzU3aMuV6T/DfIV0K3\r\nzUlNsGrBfgnYPjWOlal31771Q4seLwECPw1VHvpaOYvRkKQ7u7tQdF24pwer\r\nm1IgxpV3wtsM559qW9fIPdRcWjLweNtHmwJkl4K9GejOHD3hEOCtBNkQl7Y0\r\n2qydDsMONyN2L12+oUPkfq6WsMfrbcdkV+7isO6AwSwNktjX2jT+GPRIb5j4\r\nc5pHu0GxpBurdDjOd8gtzhvI048667yZsOcG++Jc5oZrDvL4OOZm3ERnZ24S\r\ndt3DlQMWu1p+xNjRsWo7N7GtrqUoQldKXH0/j2nCbuzgZqW/Y43pRn+rPeVI\r\nmTwBosqRtqPVJhEqLgHN6IRyfh6bfjEebIs=\r\n=dBgC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.1-764b4adc.0_1654093589277_0.644447189517803"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.1-be025c89.0":{"name":"ipfs-message-port-server","version":"0.12.1-be025c89.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.1-be025c89.0","ipfs-message-port-protocol":"^0.12.1-be025c89.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"624dbe983b6f235125107b73ccce5ca3e45cbe7d","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.1-be025c89.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-Kg8nMOOxQKUPvzJHD2rZKYLJmy9M1U4nfFPLxpCi4i/DKvvjt5VtxGJLXEqn7OZUehgn9f5mi7tVzeL9nDBYnw==","shasum":"350c5ccd21e98dffe5512856f7df39705bdb872e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.1-be025c89.0.tgz","fileCount":24,"unpackedSize":72637,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3LxZqv+DWsLgFdFh+1tPBqb9LiGBazjIWWtNSzFPQMwIgPxAm5iMP0nhb0dGkCmvn3Kn81OtXcNcWu+05dOc9O7Q="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil3hHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHbBAAmRHpTdyfqjLxmMfpPg5xsYYB5lZTEjggqkl/54PwtRLG+3hh\r\nXVYv/476WjoTlqsn0Qwc1+CH5txaCxlTp1Qhzrg2Bw+R40FftPRbFJ5cstt0\r\nIaKpUg9TB5kA64QcdBIqiFTyf0P5kO8Ugt+V+hkK7AQM+s6C9Wtwgz+/vBFE\r\nt3B9M9av5AzwqhaiJwag3OwS24pmLjPpH351MmiewtZxXHkhAGeV7KJXOJUZ\r\nGf2oRo/lPNIIMKognmg9zps9d5347STgi3pXZvq5IVqfk4Z4Nh/5OPWHl+4r\r\n3kBVf1OJ47wEDZFqSrrxmJhl1kI/stT3Y5L4TgwhjMhU+Pw8tG6D4i/bQNSW\r\nHcU9kuYquA+91Fgae5ua6EAJ43Q6pg3vt4kzGPfnEPDyIwiHzli18IC9woQt\r\nwcctwdlLu9joQjrl6wXq5HNmvob5/4010qUJO4NMWETIvajmv2uoZiBZ9Pog\r\nIlKdjtNYhYvlX2XXFCqwT+EKBU8VKtLJ7gMYehdI/uQGF2HIOjlwN8PNN1n2\r\n3+yB0Hj3Av64ec0m+Wd/HpTWtijM8rKqYYr/K/bc8NBZ7P5NNJLRwT3Sno5T\r\n1PjZdyS7bON9muodi02IJv8J+dNbYcRJTfU+o1XBxCDfA9YaMcJk+ptknawx\r\nzfzBN5hSqp5MawJ1lRGIKt93K7ZwzqGpp6M=\r\n=a17B\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.1-be025c89.0_1654093895721_0.5011344338314803"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.1-87e00a69.0":{"name":"ipfs-message-port-server","version":"0.12.1-87e00a69.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.1-87e00a69.0","ipfs-message-port-protocol":"^0.12.1-87e00a69.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"4aa63330e4f3184df8f4d39cd0880c0ac903e795","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.1-87e00a69.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-YvQT4PT9MkEi/3a3CmZAIBQpmGsAtSFeic6psZ9osqRqJa3Vl7HSrbl2rN68PP0ND49h+X4sVy84yZmcKI/WNg==","shasum":"d7eedec416d238c3b3b1dcefde470d337944cf60","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.1-87e00a69.0.tgz","fileCount":24,"unpackedSize":72637,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBUZuwurfegMsE5woK7ytK25hFiY77QTSx3OoDPQl7lkAiEAvz3AEtArvRF4zjhKl/fWkgyJFpg99qVkKRKbefQZdps="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil3liACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYgw/8DSL6km6WvGjUzXqEJJ2oR8O1xIJ7D/XknaOeHV6T5uC0m0sQ\r\nMGHh0OoVgimzSUMhJBezTMPwVq8jF2+p89i1rdeHvCSbTBYJ64UCeo18BstH\r\nZiommGdedqUMMiVtxhpd0OmOrTXArf7W3KwlY3/q4HDEILxEV81idLD5KWoh\r\ncIuhhiZFBCGEt2MmQQhoiTs68OWp44C9rjkdzQcot8zdFzb1QcfgHlFafq7Q\r\nQe7tS0GiPlmswAm++WVBZGbMpsPcganLyH0rz1jiVNmm9K+H7B/KoIQ9IEqF\r\n+c0pYVplCnKBD8qwZbk43D6MUuwkJPLMr+D2XrEaR6p6Lcm1hR83pfdB4Ntv\r\nXxGrtaET8/2zffXbGwdNITFoM5Ax4B8LNC+p/r9fnQDbh2cBbCS7WGLf/zDf\r\nwob2BVcDvGbExNoRd/FEdiyV3CBXMK2us/Eu6qYmRTa9HJ1YNlERAiD8fwsX\r\naZGY1PlYGxl6noH81BSOD+mkdNVyZfmPj/IERSFH0DM30+1z2bnoAxSC/brW\r\nKD2zrFB4UahYXwZ2nugGhbk8RNppETsZcF3N3RgI1FTnve/oKdpzXLOmptQS\r\nstJ6uLBotAggmCQ8OCkunc9xHoY7S/533GuJRgsoi/K8rWTu7N3IyMSqPMyO\r\nRRY+V2OWilbKe17tP0bQGNJihMrJGakqCMk=\r\n=+6PE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.1-87e00a69.0_1654094177828_0.3009621438289223"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.1-70e142ac.0":{"name":"ipfs-message-port-server","version":"0.12.1-70e142ac.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.1-70e142ac.0","ipfs-message-port-protocol":"^0.12.1-70e142ac.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"1a6e6bef85bf35b9328b61ce15d312f1961f5fef","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.1-70e142ac.0","_nodeVersion":"16.15.1","_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (linux)","dist":{"integrity":"sha512-0wQ7GuqCEV7It1js6OL11WwxTjj78slF9HBaaxKNPdalw/RUNQqXVfnfgNDVVQ0MS4YfV5ekpwV2/+aqcET9mg==","shasum":"d77b782da462cfc5c787ad5b7c42bad2771dac83","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.1-70e142ac.0.tgz","fileCount":24,"unpackedSize":72637,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCllGGq9xcC92rWNYmqq7bxpMKDUNgkN+Ygm8lGu3BqdwIhANiP7cIRWpbTW8urZOvGPt2we+nPfg/hMLVRtxjtzk9q"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJip18kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrEmA//awD2i//84gx4Qaqj6jfVKIxRkzT6vB63HIzSBx8vT70ux2Eq\r\nkijYCvVoy32kbaf+n+dQGPbC1ogGzNAHi6C6bYXG849Qb0hXFfqvHbww6kxs\r\n3o8ImtmdfmBMhmgdKBYV8FsKzn7mcMD/nlDFWSOA7x6oNATOzN33Ami/SOOl\r\n8ilBGgsoIp7WrGXLobNV4fJMY5rZwOLFQKkXlBTX+GYMpP1yHQL5tCIAZr8c\r\nKSw3GpGACsi9hpGHIh/fUdHsA6VZQAcPGHLRJce7QAcV2f0bFRNyhliP8kLI\r\ne1H4gPXxjVlkKOotYoqpFJhdPr+2q8kfVBYCSbxHnGdl9hjGJodLVykn4fbb\r\nX5jPcArRZXf92l0KxwGi5gyWWqRw04JunAJHcsY+kZbW1ueOVLkhK5f3ImaR\r\nCgrOIVu3DpsVZd+O0le5bPyFX8YrCHxJSktSQ60pBWSMiDPhq6t436RWDS3K\r\nykjJmLu4LkIWeNTd/JrcVdqxii5SpC0FcbTtNNFIeRCdBnyuIcbUzka7ijv4\r\nUz3ct9KSD3pDwLYLMT+jTDrKmIrfKODDOAY3cXyKlwQFVb5MbTuzRjWHaufN\r\n4qNBI7UxfB1gCngemz+0RHogrt0Q1zkl5Yye8Fr0P0vYH84hegaF0bdXGIAo\r\nuDyucAazRqDQWcXfBqGOgvdqz1EFakHOIi4=\r\n=cHhg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.1-70e142ac.0_1655136035888_0.14091541183170175"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.1-7be50bd1.0":{"name":"ipfs-message-port-server","version":"0.12.1-7be50bd1.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.1-7be50bd1.0","ipfs-message-port-protocol":"^0.12.1-7be50bd1.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"8d1e141b6d72e6dca9162859d36425eab90d8b12","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.1-7be50bd1.0","_nodeVersion":"16.15.1","_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (linux)","dist":{"integrity":"sha512-BNll2/3V+c/A9ISqiAnEoP9Hm0gT6t0Ml0JZeDkeISe1OmRAB7zOyLHOy37p6zEmkOYi00ajHZK8cNXVp12aCw==","shasum":"af4dfb7e5cfba15b78a8e3d72289f72b8992d249","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.1-7be50bd1.0.tgz","fileCount":24,"unpackedSize":72650,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAeDzbXtJO4qVMxnS9SsrN+PgRie7MNA14ZsMBzfRE+/AiAg6g2WIci9uiAHsqtAsKZ3AF88TUp3rnka2ktHPNFHYg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJis1X3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofqA//YhTOyPCT34zsvGTog9gxEi3bjIdrJZR24tl+5TaUHSluUfOT\r\nBkmXdq7jzHbRzGqCyCC4Ze2ZwTqwAcNMgvXvaRa/+ujP5+uGVIczZHM1vip8\r\nYQPyf8U+4G6+BYT1WMXec/7Ol6N1PNvp+/XAL5pZ+ff2xZ01Sl8YIkbK35cM\r\nH109TMrAbJxRbhLqGQ+gJwli1fvEps1Doz6oZ9fboKhRk5Awz6EFB7KtOOub\r\neWoxyP7ux1LW5FyARTPGzcbqf1PXKh4u8rgjJDU+CA9uf1u2NHmcWLJAK7+6\r\nqIuKZ1wEeRaxKOw+2R0lnARGaPCi5Pn45F3iAC0mXZbKWwZ0Hg2JBv5yljLN\r\nikwz3zAsGVpZyWmvbmrk8rMY56fwMoD9Sg2cGudL0Jueb5GV4Wm+7V/rVgnQ\r\n2FtRjKjbHSseJANcrqr0r5TDVNE5Ywsg30E7Y94kmSQ8ZCMdYvJkoNegbg2T\r\nFODIqExbzBPQDv+BkzDqrGep/H8G4+tlDcX1B3hdx/jXmmY2JjrXJcSgcsbx\r\nrZ/pvWq9QdEcXL2AbWIfhHd7CeDtuH+l4goS6FJCZnH4rbvi1pne8LhvfZKO\r\n0PSWXVyfL3HXbqkjd4M0RmoIXWo5J3DwJHdsUt8BgrRRRygPc8qDVArUh5UF\r\nLQoIqmhBOplo1XsiTKlRmSXxB7VOY3t/yCI=\r\n=EXl+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.1-7be50bd1.0_1655920119397_0.09074615120447649"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.1":{"name":"ipfs-message-port-server","version":"0.12.1","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.1","ipfs-message-port-protocol":"^0.12.1","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"c1cbc810679405d5a5c0fcca0c5c7aaf023b2d22","_id":"ipfs-message-port-server@0.12.1","_nodeVersion":"16.15.1","_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (linux)","dist":{"integrity":"sha512-pryvGGjJnzHBZSPJtlc9Efj13iwJwtRwkdG+qhCaVLoQzFshPCU2nYkLQoQ0SeFLWynrqulF776WW5NeITRGNA==","shasum":"ab5e4d42f5d4c36e4b9ad78a5d37df5ae67dfc1b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.1.tgz","fileCount":24,"unpackedSize":72751,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxOeGR5bwOiYnmY60BICtptCQcmeOSVluWypi5w3r9CwIgV98YygROjRZP4NjknZIOBI/jOal/ig8uevmjcWlFptc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitFaHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmospg/+OjYeJkkPAn/6LdRnlsmA3XvKOq+OlMYhswSuQ5P+9fhoxu7N\r\nWB1Lnxv5JYgITetpgWE3OG/u8uY6WGN7u9vKnqzSRn1TsFhOoX3TUp9OTvt5\r\n5lYiLifnKV/boxKjCxaKa45Zklr0VNXdiaYpEDHrMz5pDPExA4542HcEjeBX\r\nF63TTYdAUB7aX0DBSSHLbIyv5x0vIDgbFUYLNIt1WJM7H9Uf6CEu1IiVWM7o\r\n6JHGe05S5wX1Lr8n2E9bhyijzyOQdc5En7jzLqMJ0CnPvcoQyv7gEK+an/Wo\r\nqefvfzr72a6mojJofVXWwno1AWobD0F96xk6AKY0bX0CQ+pWoDw2HGYcrW7B\r\n4JJgWmfhQMo8u01J2wURw5VS3h7aJ3Tf/n293QOcBI7r7Bm/PoBP5gF4QMMn\r\nUvRZ54PcINpXysxNGtiuj0dbzuWbpmAE1U7dzJFH8JTgvDDjBYDb4feav0xg\r\n0zt5P2uFDpBxIEW0lVPVxWYz7BWnPcO11YPBlQwjjx8Xgy7ol/KPnae8/TpA\r\nCYCMA8eJcztfBaboNRoo51KTbouIt9Eh+ZmFWwZPldqIiXvpJCxRKyQc/9t7\r\nn6dUhuhtqIIFa+gy/nei2LA6HS1GAP0rjAYbwq0LGYGpoXlw0TYtev8qfhDt\r\n9fuWkv4PtXjBska9fP03adEmt+Tv1uOj0zw=\r\n=MTR/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.1_1655985799548_0.5405112578653166"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.2-00bd3dd0.0":{"name":"ipfs-message-port-server","version":"0.12.2-00bd3dd0.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.2-00bd3dd0.0","ipfs-message-port-protocol":"^0.12.2-00bd3dd0.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"5e5669eefa320838c4810adf62356b0039209ed2","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.2-00bd3dd0.0","_nodeVersion":"16.15.1","_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (linux)","dist":{"integrity":"sha512-GK4Kbi9zMskOleSlGuNEBsBxuT6CZwkBsgSPr+3Q6QLNChGHUpsmKw063L6+hO74riPsBd/dAUzIQUnQqdy0uQ==","shasum":"49c2ce77de598dce8988fbcc28a5e87518cba333","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.2-00bd3dd0.0.tgz","fileCount":24,"unpackedSize":72784,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBxBjfg5KDO3CjmmJd9bjhhxaUQf6X0KvD8tgeEqWUCUAiA82HMYysJ5w50+M1ITdPz0FJpyYoxASZSnN6SaEal4Bg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitYRMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpm4g//bmcmEJBjvp7SOYfDEbqErOyZmNMtlrULq3eJTvsrDcaEr4iz\r\nvEQH9+Nw2nyODTTI7yAlV1DGYckq/QmnqSi0DVWJdlJ5nCrxEufQRivt6nis\r\n8Xzdt6dobydc59AmIwPswFJ5RbSIgeDGQVP3Ugv9nhhQc9hHkgRwZM7A+J5Y\r\n4Qsl6hV0p0eZfXFbtq3UEV0CTERfQ3/rl7kb7GPatTWle9Z328v/LMvkYwLv\r\nwZ9y5a/I8PyyZaLWMzFd9XM4nOk1uvC/cyd1nwx2FeqC6SNLUPDPg2HOCadn\r\nLqfDxNC0cVnKkjKPtNnZswkDstSLG2/TWdQhtqX9DbGexwTVbmRKqF9bbzlv\r\n4ACa5MabOOH24DPLIyWtOjq5pOsMyolbt3uyirsakWKMDNx9eYVR3LBVq3pK\r\nh1W3UJ8bbeKXP/HjpAc3QXhqSuMHiZyVKVbJAmkjR2ien1NkGlBWn9y81wp5\r\nRW+uApyHaoFE8EUJZbJdnv1PzSgolJpp0/KZ0PKny8bwt1O41TQtOx/LRZaw\r\nEABEYLE68iP3MBr7S5cxUb8uwFd+8Pt4wAKoixBSRAoD55SqzD2egNGrFDcY\r\n6VcnYjLENHdKJsOdNJsu1hYAHuCLuQRL6XkAE3LL2F/eLFxjKn4+ozeyDvKW\r\nsXl7DwNVW9PoDsqUEVXyZH6Gz5kqTM43MjE=\r\n=DbkY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.2-00bd3dd0.0_1656063052007_0.3043026248492402"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.2-a05695fc.0":{"name":"ipfs-message-port-server","version":"0.12.2-a05695fc.0","description":"IPFS server library for exposing IPFS node over message port","keywords":["ipfs","message-port","worker"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","main":"src/index.js","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"},"./block":{"import":"./src/block.js"},"./core":{"import":"./src/core.js"},"./dag":{"import":"./src/dag.js"},"./files":{"import":"./src/files.js"},"./server":{"import":"./src/server.js"},"./service":{"import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"worker_threads":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.2-a05695fc.0","ipfs-message-port-protocol":"^0.12.2-a05695fc.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"gitHead":"06da5952a6d61e890ae37d305b99a5f174a1555d","readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\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[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs)](https://travis-ci.com/ipfs/js-ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs/status.svg?path=packages/ipfs-message-port-server)](https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-message-port-server)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> A library for providing IPFS node over [message channel][]. This library enables\napplications running in the different JS context to use [IPFS API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) (subset) via `ipfs-message-port-client`.\n\n## Table of Contentens <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\n\n\n[message channel]:https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n[SharedWorker]:https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n[`MessagePort`]:https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n[structured cloning algorithm]:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n[Transferable]:https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n[Blob]:https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[File]:https://developer.mozilla.org/en-US/docs/Web/API/File\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).\n\nCheck out 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. Please 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\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.2-a05695fc.0","_nodeVersion":"16.16.0","_npmVersion":"lerna/4.0.0/node@v16.16.0+x64 (linux)","dist":{"integrity":"sha512-BLQDd+gYi3Bn0TrUWlmjAdpSJlhnc9lF/wJByjYpZDoJv9TC8dsi5EoRs7MHOMjSlX8S/vb247+db7U7tcWPOg==","shasum":"01bbe7d185934fc25e42b4fcea377af6d738b53a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.2-a05695fc.0.tgz","fileCount":24,"unpackedSize":72784,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDkhNyLqFtP74egr2CW5vDXvb24t0tE4ByT8LrdxTipqAiBqji13nVwhg4GxYBh4h1smmonvzCNWOAhFXQegKwS4jQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2AGOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqmBAAmEO8vron3DOndk4fu2km3y3WBHCEMLe5hbiBI9OP/FizhnNd\r\n9E7Te1Eft90tgrFrfaXj1oKbjEqHhWRCnBNO8gviDNVwQg1fkFElsYuG2EDB\r\n6QpZNJJwut+ROYCm1rz4S52NfhxwKuvcgjikN9fWxR1OuVur7dsqn4myf0VI\r\nom103yj1QMol56F8rvqeTdeTl8tlno+i2UQpOtF6oTIcpp16St05yIOLi0sO\r\nniqeaOEgSk982j55EiVmkgHc9EcdY6MdNq4ZG+8AttUV4fAMEJ/mVFc+MDAR\r\nw0sjqsusURF7YUwyTO0U3PSgYdcKlF31BMHVzajTmvudQy8PbltI1mUhZnx/\r\nRRNhaygQ9R7G60/ZRDIAD5hMRYEUynXn0z7VZaacu82qi3irL4+c3WJYHync\r\n7wUSdNT5VVYbF45/5rUTi1G/beGDqFwS/KVfO7VKNuTJC6WiSZwmCcvzxxVP\r\nPfufejweijpABf7kZh33z2PGeYm6xcah9FRikiuYzo8jPnlSi7dRv48bAz/4\r\n38Pys55YtQfHloGrwrKeG6qkErEdUfio0kBPLmiVPT88meRhf9I8tEtiHUhq\r\nnnMzkKgy55o6/5hl0NbYCc/z5SiqI3fitWnz9voW7lvfWvF5Rmp6+sZbW2PM\r\nSCCu3o6TCHNz7A1mixjUqJeSVSdZraJbofM=\r\n=jJ9x\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.2-a05695fc.0_1658323342296_0.011558619993659924"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.2-39dbf708.0":{"name":"ipfs-message-port-server","version":"0.12.2-39dbf708.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.2-39dbf708.0","ipfs-message-port-protocol":"^0.12.2-39dbf708.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"a2f1f57d7993d04b2d19c3d7ecbeecc95a54d2ae","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.2-39dbf708.0","_nodeVersion":"16.16.0","_npmVersion":"lerna/5.4.3/node@v16.16.0+x64 (linux)","dist":{"integrity":"sha512-ZZRD2c9jV3epp5HcGl8UPGTt1+OUFzkfr6t57QdIzOWX+9w6DGlsEGfWiW7vk/saoxbUsLXwMLRFxYCqj3RGiQ==","shasum":"cbb9f865defc8a8139158135f4f0673edd84c967","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.2-39dbf708.0.tgz","fileCount":25,"unpackedSize":73159,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDm6PWnNjNytSNxvE6aMV304OIq4grtRFODRV+M9w7oCwIhAOUZuIGiFJW7+W7mHCRHcVyB3EWvzzqNOzhK53QuI8Xb"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/WDiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMvg//Q4V8yI25SNNeEbqLtvtnyAjWOw3kIFp+Anyi+K1aeAHpYy5S\r\n868GiqP4/AxsXMG33BMHy0GAkQYGdymjsfww7hOFS/igsGBv6oAL+cqmP7qP\r\n7dyUOBapVX5DmF2EG2Z/QfCNbjUkpE3j7RgEsU2YSCRMSRc+XM5+n58j97G3\r\nIONrIFDPnk1XXgklXGxZq9LRBRW04w5lHcKF+4o95o9XIsDgxoVLBBEWbCU/\r\nOmoQEGcnaMpbLZ49CxtIIOXhsvy9Jv76Og5KBaDWw9Tq3ejCu8IT3FLo4lLG\r\nib5yveEDvGR4mZ0hAa2+47VWqoX+bdekrWXPd8/fcRxLXpPFzQ6wA+GF9erY\r\nL1GsqPYeCo9+3Ae+7UYVnJjrb1ZEmiuGPth7xqC4cqwGvpvAqvEL+waGG7fe\r\nqsAptZmUZzX9isCTpD6LlVPZc542S4ZBtLjlLf8Lvu3PrAPtUHKhaDBc7nl3\r\na3eRN4P4f/YOhmB1+ozyk0fSWr2WWFocd8Oh+NmgPUca+C8OsXiycXR1pV3I\r\nDP+EHK/yhIIY9kIM3CwEePLrlANAhMcOd20KVxsKvVizFjKTphtAXfKlrQoL\r\n/0asdW9v5EZR65SgCbfRbnFEsAIrFBjWw4aykg478t+NdTjVwe2wqtNmByix\r\njxdf/e6Dy0ztQkd8Ad92s+dczc1GdX/nrc8=\r\n=SpJT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.2-39dbf708.0_1660772577855_0.3274020346536659"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.2-8f351a89.0":{"name":"ipfs-message-port-server","version":"0.12.2-8f351a89.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.2-8f351a89.0","ipfs-message-port-protocol":"^0.12.2-8f351a89.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"59229f179fc680ee9075d2cc8deeceb7ff1b27d8","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.2-8f351a89.0","_nodeVersion":"16.16.0","_npmVersion":"lerna/5.4.3/node@v16.16.0+x64 (linux)","dist":{"integrity":"sha512-3Jw8xcV5k3xpE6dKAXXtBCne7zclwwsxFGzZXQZ7CImvlYgLnEe+JXcI3E798B9YFq3mOZhFlk1TaaU+UjLZyA==","shasum":"530558804ca655e0fed1b908f3b107de37261695","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.2-8f351a89.0.tgz","fileCount":25,"unpackedSize":73159,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIsaX7Ivgk2E8rQoeavravJqK1K3K7QIJA/y+B6ATIvAIgciyDBK450CvAfeDUis/RPu+PuqzltmdXJVw6/U7L73M="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/XdaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmotuw/9HGrFV8UcdI8ACJ315B4t5yq0qyPqqh/kcPc+X84GZngsSrEA\r\nuY0ha1kcw6hJMkqTuTniSSPDHpsTcID4WH0dupJ9JCLF37Bep9gpYJaBIOb9\r\nic4Haq5QrC+Ti6kfEjLSyICVsjJM5A9uq+nKdkGUtV9wSc/+Eq4bUTS90oV/\r\n4vB/IxfiHgDicE9c2EoM93AEqm/A5aWSeJLKskQtKVwxmCnbWnTH0F98RiNO\r\nNaFbEI5BPFTWe/m9h2XCrJztfFJ6HHr0Xwg3qTyZx1JjZoF8d6n1zr60rgnl\r\nIjKjjfgduYK3HGZcCkOHWg1PXqwNljPydC3Vr0pq7Vtusndx+OdnMU4LV8Og\r\nn9v4F4e7h0Tv966c0bmwfTgV4PDFcp4VjCjFth5ZWxZ0J7WqadqDZuR68avf\r\nj2oCnOSWeXWH6mZ4eYiEUintbXtoqW3PyribekRMsv3MGaTELP/PvdzHMDGV\r\n9jgXfdVBMvRePoj8T/3MhutY0xm7kCuZrJE+4EylPl7+62mylCwkLnXfIjow\r\nRDK48wzJHNzPmSfCO9QVg1+3u7JfSJRJHG3/q2VzWIp7R8zoHmqBpbxL1Jgj\r\ngjyRfh04jq0PbA8gtP8MzmST7J2yYbhUp70qTDk17rGBnDJtzvBl4CQ0oeqC\r\n74Ojw3ZEGNIe9XUwGRpjgNDPQVBaqUi/nQY=\r\n=a1z+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.2-8f351a89.0_1660778330335_0.0762119406512678"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.2-83f9882e.0":{"name":"ipfs-message-port-server","version":"0.12.2-83f9882e.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.2-83f9882e.0","ipfs-message-port-protocol":"^0.12.2-83f9882e.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"368c95b50c87246f0c5b143b79deaa4329d0727a","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.2-83f9882e.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.0/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-l2akpJeElb1DRDPjOTLN5CW3aKbf5bjfhr9AWAaC94t5rXdN7YMcx2CjuMACdAEXWrkoF/WvOhc6GU+Mx/xXyA==","shasum":"2201fb5f0d260ab549a61d8af1bea6172d091bb6","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.2-83f9882e.0.tgz","fileCount":25,"unpackedSize":73159,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHF6vx0KCm06X5jA3Y7XkfHMd2R1JPnW2PKh6lL36ySpAiBuhDkB0HOQQG2MO8s0qcmCHXI3Z+nPYnXqRhjz6RCUAA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFy9ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSYA//bW9rujQkFKLesZW8ndN9OdiSLKBgrM5r3DmmmCnsfyHUrJ6h\r\nB1TU9P0YjfZYIxzdeRVsGMhNwjLwHyjuedh5Gn04amhIOu1huiC47b5rrVaT\r\nbZUlAItAOIFQFqKCI4zRAATylbzvV9w3nR9S5aMAbnnTfDWidlx3964fPAMs\r\nVbJZa4cmMKsAv4yULwm/GaBWWGvkakHJYSn+y8dIVN9OHUuz/w5IZ2cL+5Rq\r\nqoM681vRWIrE1o2cT4KjGh/eBlCPcvmyyBvmaVruv5h0tziWYPSrUd5ptRQ0\r\n5zseOd6NZgZJMVJ9NAnKEERajZ4idLL3GHsS1iPEhiKIk3Exao28zzsASSoz\r\n0WS/zHedM7jNtSYzsYTVqPN0XdfFkzkpoFzdJ1GA4P6X2WextWaSmP5BKfAE\r\nT9YgUCzPbo3202w1aEAvR2ejUQyX8RqbKufDwsXHMoE6novBLI85VR1lLg57\r\nqj80u5OWkUJkgTIWJOADy2AMPxk+5ZA1FIxqTOjrsYUD72YdBa91RWBjZj/g\r\nnmQkMRdh6X6zbAjnHrLzgkYWqn2ttvhPzXVFwjIPtzn31v+iQkd2LaHGn5q/\r\nhSazEUzQghpqDO0hx8HVHKeWYk3lpjYWrgndUXwTG4Jz5JzI12WogTWIdMDN\r\nbvR9A42YCeJK94XzBW20iaSpYZ8hKGne18E=\r\n=4Ek6\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.2-83f9882e.0_1662463833219_0.7959841679084638"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.12.2-051da161.0":{"name":"ipfs-message-port-server","version":"0.12.2-051da161.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.11.2-051da161.0","ipfs-message-port-protocol":"^0.12.2-051da161.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"262c2c4e56b8de0c602251e9ea0ac3546fd2e28c","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.12.2-051da161.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.0/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-1HuW0MCnf99CND3GRMA1Nk9CuXpV/viFu74lT4Adnec8Sld/nrR7p3bS4q8a9RKCrwCQg/hIoQLpu3cn5kpDig==","shasum":"3364540c79116fadadd0d8646682e72c1abcf256","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.12.2-051da161.0.tgz","fileCount":25,"unpackedSize":73159,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBSVuefklmtat8BhLLyLEK9UmjX7X/f4wbVLBMuDxTpyAiAiScb5YmWfThtfcI/Wl7VQLVx1zp3FZgOrgFKdMel00A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGJTBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPlhAAhZjl/JVsTO4GsytyOgpF7ot5yQVXHMyHG3oz8RRheJuCmRm5\r\nY1CUACamxwjNyLYLwEfFBNvc8O4h552mgpka6Yx6aI2L28OfCQ8xu5fKsYPx\r\n6SXwH4Ovn24I9YN25gyk5rYT9FIczqj0NzZWb243cuBAlleOTDETMcLb0AwI\r\n/wuWZ81COr84vtqYKEd3mH99M0ob7Ej2bCILOe8Z4tDUe7j/4EWw0ZPgDKaG\r\nZjyQQECx6ifcgAJbiCHacvTReWDoA1ldmiy3UfAml7uTAzbPwOC51nO3rc0z\r\nbI22SgF6iYjB0TjiT0X4Im+oIU6ir7gAyTTD2xNHDgIcpkRnZXgAZkBQOVpM\r\niZv3vvwhmYjLkiP3FHYBewpRBFvMvx/7pv4lDRmKbr2bqIEMhzrFi0jJ5/Qx\r\nfG981BpIXvJp4rplo8LC7iAXDxmL5kgTiXEcajBCiqW9qn6IDS0MjvaypEYp\r\nxH7jKYHN5hAogBVgggg6OFRZ+MeBmBOTkZv+b9//aHsfjNGepCf28A8guXdQ\r\nThAlI8NdWivNoM0o1lLq6ApuiNO83+SNuKSbD12ex7GYaDl/48q1gFoByxp9\r\nVr5iiekZYSQekko5mJh8LlU09ONBa0FJhmE/JJy/sVFdxmVhzGABbO27Fqrn\r\njYw1j+CDeaU3PmzIdHSRTcCnEUwg9Flzxrg=\r\n=AUIi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.12.2-051da161.0_1662555329078_0.6476380971355207"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.0":{"name":"ipfs-message-port-server","version":"0.13.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.0","ipfs-message-port-protocol":"^0.13.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"89aeaf8e25320276391653104981e37a73f29de9","_id":"ipfs-message-port-server@0.13.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.0/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-bDc8Z61YWgIqDeSStZIz8tFIP/2WwRb4L0R4zbUT4UEhRu7cxHDdjlwED0Io2ow/87sR0ZpP5wRe+X10kHoZ5A==","shasum":"638622aee0ed47538ebd27c587fa313558b0a6df","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.0.tgz","fileCount":25,"unpackedSize":73126,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpd5Nh0ZUfkAUFwWBH4fRlT9KpgTmxTuydLySEY7S17AIhANxFgadjE4++p1fbklYcyjAURqbA32eLu+vgUgf0xe39"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGJ6tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo07g//UgNK4A1dxqBJnaOirBaIxW1XXd4goanjGgjpp5WZvT01nuy1\r\nRPJ1U7keV0hyik80/Qz0Pvf05ppzxYVrjfIZtEvvcUF/2WKs4H83bsMQ8V+s\r\nmggHb+/whOFlf6eaP7cOLwKuQ2humpYm0X7oO4TSY0u+n4yR1Cmkcjh4gXkA\r\ni4ET/d1NTZEROO/rZXs30XPo5tCOeuPqAJTChO1aCaEO6ZyPcqDZApzL6JyY\r\n8p3tbzba/2lH7S7EJd2YOiIKxECsww7BRRvn/ca286wE9aA8SIHZLtGQCcqQ\r\nF1e697mc62FjKDbPBQdbsr80fkZsqc7IiNPXvyaJxytXHcFbwV8aTGKharEa\r\n0Q4443TyJsnLC/wIZj6MNJSVLe4mCqIgpNfMYVIbOfJb/gO6ily7PZanCKu5\r\nUWaBvgNMpZddY/T+r7QdJMABervsWQbJ94UpODL3spD/MPu/s5Cjvq5AwDMG\r\nhT/CZGMBegTqvqqviZNagsLI3vETvu1VNFL+qZlTjaWNZUJAOf5NBCNlCjKy\r\neUJjVH3Mq39UQxdP8Fcb0E9uQ7ookIRCIFxT0spMD5zt+uws7YEm+ayag2+T\r\nAnTB8XLUCkKMZL9skEvCLb4A6zM2T2NJa7xSywzTNhIUrhUZ0Jq588yGkVG3\r\nlXAe0QXzuTpt79McadPG/XiM15ZEAeNPFLw=\r\n=l2/v\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.0_1662557869705_0.2112038623975545"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.1-b5456882.0":{"name":"ipfs-message-port-server","version":"0.13.1-b5456882.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.1-b5456882.0","ipfs-message-port-protocol":"^0.13.1-b5456882.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"bc139649f4cd3840696282fa6dc6b241b9ea1833","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.13.1-b5456882.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.1/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-lMY+Ovu18ZnUGtfvAFMO7eRJWmB7QYOpyzDJPqx+fZTisGLrC4p79WrkBTj59lMpu/DhlU2P9a13fmLDA+Kuug==","shasum":"809f8b74aee9cfac24218e85da3b5c477a1899a1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.1-b5456882.0.tgz","fileCount":25,"unpackedSize":73159,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFcYepw+2hsykw3lT6QPYZDHYhrru7/LdGhOmfO7GK5pAiEA4ZySYAGukbod6mSKmixYr6eQ3ipWdAxcuTfXU7bT7vU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJEC+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoR0xAAmVhhpsmkcojU87zlLB5ubGJK3nsEKxiMXGCDZ4hI9t+ehXuP\r\nZqPvJnyNMfuwTv+wBX+3544GmV/j1CkbVKN+PNMSk0NwwLGqye5Mt1mLUj2d\r\nYXKseYr1V242ifTjHigPB+TerhRNOpVcx4qMeD7XqsAzt4JFMK3xi2F8CORf\r\nVhv/afqPl1MggwHorHII+ACxodACVK7Or8L5jpIpJZ5BV7h4GiOpjV5cWt22\r\nVF3hKZUWIqkJAJ36rIbJZbfF/3q1vvHCOWiwkLiK2QFlyki5JM0nzEF7CgT6\r\nH4Dw8vq9v32BPdUCYKKDNiTQ2dPXjCfIrPWz2CYeppwawAGvb6+5O6owU1x4\r\ncrLp/sc7wCtE9KFKYVxqu5mLlnrq16npD9dYqIR8e/MtlCOkfkRcFx2LiZZn\r\nhG5jiRCfuwQTEUmGdyEpfY+rNex/mGAzGuiIJc62fELLP4wIbDrdJoDnZEmH\r\nLHJVhm1oK4esGqnqAjCu6Yet/jKv+1Ixrq4/qsGCK3cjEfvHttARB9aKHFaj\r\n0HrdaqMcb/TbDjjWLQ4xPWYUFxA7BILzBuHUbpEPC41Wqoh6hDM+dURN03wc\r\n9opGMvL24N4hn2FkA+qSzG1M5pVDo9XhG7jeqBfApaEM5MOKQn47/wA6T8Fl\r\nzb9QcsUxkymEEjknDlCl+2L8R5SbzIBvKUM=\r\n=dDHn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.1-b5456882.0_1663320254393_0.9883889257376384"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.1-7c676f63.0":{"name":"ipfs-message-port-server","version":"0.13.1-7c676f63.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.1-7c676f63.0","ipfs-message-port-protocol":"^0.13.1-7c676f63.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"90802df6c68ef286b155c31dc4f625a9f29ec7a7","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.13.1-7c676f63.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-0OXp3QPr3fsfeUSHnEk/3Qmkq35jXIXv/F0Kgrts7QNvjzoiaVT3xqyNKRFU+XMv+Hv20x0XLp6BH85O3+u1kQ==","shasum":"30b59c33018ad75ddca9dbc1ed8386b3a1d08d3a","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.1-7c676f63.0.tgz","fileCount":25,"unpackedSize":73167,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClAQkIUPXiwuJokhmmSr2rDhSo0cqscGU0pQJQptfM+AIgGdvGyCtYPNtRsN4OnfdjfFDwTxotjiCOIwUVetlTrn4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK2MHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3Sg//UK0knMBedtIGSXYDi5E3G2yJJbOt4YJ0wlXM6wKrx5DXJU+C\r\noghPakV08aWwAenfzRwy2vl4xgb/BaldE+2c2bic5r/nsJDW1U8gWECaTr0b\r\noALsMfghFhZcIdxGzaGTlZfRCAz+9deJNd9YPyjVy/r5EsPb63EyeSSf2HN/\r\nU9rFa2VQlOtgrnKybjyHo9g6kIgcJvQKcFMthViDpG7uZlgXvqYehE9ZBgyD\r\nc7cxCuJOcRriDr4Pd6xsVjVNyRU2wvQvRLrdgkBeqhFghm6pewejsuWa4q6/\r\n2NFk4bwCDkP5yjtstrTz4Q1TXujcGn8NYoe6wLX16pAOhO1KQUxUTQ55KRO5\r\ndR7XbAdUgOs7L1itLsR436HK7WJ+6KVehaDa4BGFSsGiNfxP4QX49HlzQsZ2\r\nvxr3nyHtMsNCqbmqAPHWo6YBYEBUXCaILqg8fY1e9/kyj3I/4wu0Pv+2hO3J\r\nxnTxgrrwiLq8yj0xHJnp89EKzpZQ9sh5DSIqYC6BIailFffpClnAVGbFS3Ga\r\nSJ5zkrW0Un3vRWgNtjZFWys9gbU2vzteRDx/F66Skvj1oa+GiFRho4GNqNku\r\nOR22LdVLlonPl/RbVLIluu5ZgLfAaOSYI0LpXNOMpTPjfPAM/FOvkj7EOQH8\r\nRhSu8vYYiB/07QlrlmSUp62tgpJkjmJJ/tM=\r\n=AWm1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.1-7c676f63.0_1663787783041_0.7705983710198727"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.1-2a830bf5.0":{"name":"ipfs-message-port-server","version":"0.13.1-2a830bf5.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.1-2a830bf5.0","ipfs-message-port-protocol":"^0.13.1-2a830bf5.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"ec3e046a48458e999e557f7adea92e304bd7b0e8","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.13.1-2a830bf5.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-dlvxqMc2OKVWyVq2hTs6Ndc/1qnK1nIj1W8SpIBk3yAsirMmOLDVloBibPPaErfEQsYSGYtVIbjOLSx5hSKKqQ==","shasum":"8d45b120e3461361acda160a4a8f7664bf6dc471","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.1-2a830bf5.0.tgz","fileCount":25,"unpackedSize":73167,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEE2nlScdspyR2PhgZQ7o+7vWBfwQvZMhisFsMrwZLyLAiEApvj1Rb7BHOtHyLj1HAz44SrmeeNrnNAAYCufsM+1D7A="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK3npACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp83A/+ITXLr19QhC2U14NWCGfJ8cy1ZdsrItbNFOkYKzhQ+fy08i63\r\n3up0yp3cAMBfI678HVIoeaHvYA5oLs+To90rvcHhSQN73CZUQ5hyYkKPwv0e\r\nZixzfNVMqRkFXekp1cPMn0G3kk/ieSY6nRNbHENlJz0jVWx2F7UrQnO4hIXQ\r\nJzUclJpguN4kvzQTTEGUwPUe/xEOWJBa6EfbdtGpnjvYU3pTxXxG4xMFHXrb\r\nVH0J0HxaPGV9yB1XGnMgf+J3LWVTZPSkCMVGnwt53FaQJ/K0N4nUayJMxAQD\r\nSZYaHnr5Ton/LCX8kBTUOCZ25J6bM4NRISyTJPZfXnw/JHQmn619YymE6C49\r\nhmQkOPw3R4dymrmLcRyazjWcz5UBX4sBLUuFiMmTYCKLnm91MrA64HDWggWD\r\nRzWjO8Xgqwf85pd3lUle9bNPLViZf+3cn0nm5lOLTIfZOA11nOH7zhdlgxNI\r\n4enQoqbWZCxISqtQEa1L8CyghUGQf+UG4k1EKJ/eu4aAka7lVnyfOCaIfDl3\r\nVJtCsxkCgD21FfTtBKrM2M/5rRwJsqwWd1+kIUsCW9vwsbR4r2n2GFB6GL0k\r\n99MVYbWPEehZJDPXgqZOQvIx/bPHMnHBJXVw88UIX4AMObU18nJZLqNLG2F2\r\nnGuZMHPlkDa854HUMC0mWp2Wx5SFm4P2o44=\r\n=4QIf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.1-2a830bf5.0_1663793641491_0.5938461213848978"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.1-7304a0f4.0":{"name":"ipfs-message-port-server","version":"0.13.1-7304a0f4.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.1-7304a0f4.0","ipfs-message-port-protocol":"^0.13.1-7304a0f4.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"95735ef611dd7b897d3d939e512b6229757532f3","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.13.1-7304a0f4.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-ZjfKLGreQ1g9xr85nUFIPrr7HjWoQGRJHm7MmMRN1TazOkX9iR+9NE4F+rYJG7Xrp5Askh2+szfHquD8UzgmpQ==","shasum":"a534a644897790244ed31d1b757254965db8728c","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.1-7304a0f4.0.tgz","fileCount":25,"unpackedSize":73167,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDDZUVyV31u3gBiFoZdUEPT+lUf2B9Tnkp9s5JHGTqTfAiBGECeqmuNR0Q8UFzYQlODMnVNpgdci6km/FdtCHTm+RA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK3oUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnqQ/5ADrsdtLepLYIDOY70a7eyKdUPgEcQS9mTLNOepyQYnfQ2uzH\r\n+uav600ZOlvkU7iV+GGypg9sSTyQ8u0OJf9F678AGs8UOkxbPNLjLBDDhyTV\r\n/0PlRg+Wqz6Pk/J5E51x6/hJRGjdVVpPqU18z7dCVep7y+W7o3AnLXHVwySi\r\nfCtB4qQyQrpQhgYAgCwveRSqe4Q2bQhPSuWCGnrZMCpWo2E8IJ5xLx0OYJ5W\r\nw6yugYdWuFaRXTgzFVcSJhiHbof2H3Y1pjJL+E9+PTFfFKx+NXzwrKy0aaQ7\r\n5jZw2FLkJ5TeiNDyBhgSTHpoYF5UfEdsyHQAs5FxLt+r4ycM3zYbmFiKuWsJ\r\nJMIh35F773nGpIyV9GEYsiYUMMj+Ez1G+cU1GmIxoYB61NDx9pGsuI3/PawP\r\nplcDFv2AdPpY/V6mTrGQLl5geRV80lxbZrzcdWM9HxaTb2TnRDUbuLhjOQ61\r\n7gL57M2bbBE570tjqyqc+8SebITWNmZdfNwbFGIcLXyM+AqJAoyfSfG/Ztdd\r\nZBBEKWjFaIhr3XbPo4oEYHg7JFul3ltUuBWF27bdd/Wjl7bj/HvSUhHDYpCp\r\niq6cHOHXMu31yOeULIwsA5wk+Ths5Gt+C0fTMUnvOzz1BHwkq32bzvMvfygp\r\nJQsjaVJy083Ley/RKwsXnAkpZONONOGq6do=\r\n=fycI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.1-7304a0f4.0_1663793684189_0.1714927929868515"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.1":{"name":"ipfs-message-port-server","version":"0.13.1","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.1","ipfs-message-port-protocol":"^0.13.1","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"d1f1e75b2060c5c2e64d133a7a6bbabd2641e5ef","_id":"ipfs-message-port-server@0.13.1","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-QhO08eVdxuiNEXb9uhlznMlFny8GWZgAYipWfe2E7mtk3ueShNhrpAt9J2379Uyh4Z/FGOOGgl2L13gPc4je8w==","shasum":"f5d42e0bea7d41d016a50c67d101656261fdaad3","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.1.tgz","fileCount":25,"unpackedSize":73134,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4QaxVlGRcdjYp5FuB0rFMUK6WElk50kQpTcrdt9TqjgIhAKOdg+LL9ZyQPB8FzOO4cVJXfuNABe7sXhalT95M/yK8"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK4gwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrC+BAAknvlzWUOCfmRBXUUK4kwcJjjcQ0+Jr/2Ow4pmnO62poF+KC9\r\nwzSrN11u02Sx3pQ3B1DvVVei1kBDznxDi3nHZRs42SgMej9LcdU1FLi7EzRC\r\n3IAxsFJ7lJqYgg3G4CH2TJMQI8nAhofON66E+fk2mZKNBaHzUVYbRGPrjb2F\r\nB+zHThE8o8UqTEMuL6nFQe7hfBbh2UPFRAqmkuUJ/vd8QUWz3wghSeK2ZSwy\r\nYyim7VlKPwOVY+BFmIJ+tQHzeZBJRkOOa37TFsr4uBGcGawyPsYa4T5CRyT/\r\njtqOxySrllEcil0f5rBrEuK1Utq9Q6AydNrwkn1VVzI0iys+aNMlGQm+CiOj\r\n1/1o0kP37xI4FBFbT13D51Wj3pGyYGIOk+nBi1r8/GEveX4ZCqPNTtY8kPVo\r\nPqRfyPFSPQ/K5mW23sqGLgpb5AQigKjOI8k3hvNtbq7/uWKbsLKBcmCW4V8y\r\nsS1JulCLSQl0anMbbkVAoq7/6Uxp4bMi6jdWISgQ9IvUZUwgknExGOuLAcPv\r\nYThs0ORrpc0WIA4ZX7j2oI/qFK9ktLJLgvF3wOg0LPkHZFnuIvHWEkKVFe7t\r\ny7Qf/eD+L17yC4RusekcTBw4SlzJk1H3qDd6eBmacGZMVtXJmaq5DhI8JnaV\r\nOqZn4jx6jWdc29bFwgLDG8OkeYA2AroIPpA=\r\n=GwL3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.1_1663797296671_0.6875137736434742"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.2-d75e0a39.0":{"name":"ipfs-message-port-server","version":"0.13.2-d75e0a39.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.2-d75e0a39.0","ipfs-message-port-protocol":"^0.13.2-d75e0a39.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"4233393ebc1f8526290235c1b52f4d459ff96e1b","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.13.2-d75e0a39.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-mY4wNZQSxuCSl3NjcgQFJBSMXey4KkXsCFIMzymY7SXKdNzZ6yZzBvowSX0LJIT8sfmFKKhomduGUR21l9AVMA==","shasum":"5eb518528b2cdd847847a2762a8a70bc549c6ecd","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.2-d75e0a39.0.tgz","fileCount":25,"unpackedSize":73167,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtVJRD46mAVYP9zhJPsIHYXxgsiWhQ9SYcdKKJ+J5e7QIgQnxRS6zPSxFIBOh+0wDjykY+tFI/5jAO5b9D2DQb+X0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLCI4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqA1xAAmSzFSPEED7m6Ngm7bkOKA6jHqG0yoA7oAMasziGYpFM4Lgj9\r\nj7OTOgpaPlRpNAwBn4x1yqmADbl1dv3ATotzXvfiyh8ptxe3NsNgvDUVx8m4\r\nsoY5xzpx4GzSZa1ozh+O6KvmB/6T5KO/rsU6E3bj3hG/Y8uZ9cnW4/CL9flb\r\nga5q8uMC1mv90hsFp8B7mUItb42tNsYUZbhn3G8qXa8Y6iBATeL+V3UNwLyG\r\nMO+mCCjp//CnmC53ZU9NwxVDJrmxjvjaMUqdappbwqfHZa6/DX6I48ovxiK2\r\n7GMwblRPCClnQ6xvTR/dOyI1feBacVb91qFVkd+Fi7l/ZUZFnzzggPjqB39t\r\n18vY0C+wY5bd+VZ6V7PfYvYdTzShX/I6PUKh9YBVMYviXjw3IN9zgS/hJn26\r\nk8y0YINS7MQyzQBn69CNbOUwsryXgohQLN9yuT57zuMlnPc3f3AcXVZdSm0j\r\nDGCez9IYecrc/hHmY2hMCVetE28KJc+1UCu3LBNthDY0Ea4jhq9GK0Pa1Hpr\r\nvmmMKnAloHAFmpYdLxiRPTiEU6IpJNXoHLzgRjocctcqWBkIDuhjSmG9CiTZ\r\nTsI2BxNdj5LUJQJltMMmCJBebR+K1obBnfL+/T/Ll08TCxEWVOH2/NxeDFKO\r\nu6PZXYzqVCoCjY8EDme2OWP+jyPsqBE0q3A=\r\n=r4zm\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.2-d75e0a39.0_1663836728664_0.5627789812647785"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.2-d1b0a8a7.0":{"name":"ipfs-message-port-server","version":"0.13.2-d1b0a8a7.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.2-d1b0a8a7.0","ipfs-message-port-protocol":"^0.13.2-d1b0a8a7.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"de2a2b2cb3fb26e858af2319c63296a1ca411c25","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.13.2-d1b0a8a7.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-tyjFpsnmD2bkHChC+zV1rHMOO0jOBX6xO8HHNAaSrY1uJFuj3bR5DMYcaCJUpoRhPE/EmaiQVIGsyjCw7bMVmg==","shasum":"0089f01f26fdf5959706018839831d238854276c","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.2-d1b0a8a7.0.tgz","fileCount":25,"unpackedSize":73167,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBXbXNTNACvOqE1L71iHda6IFSsQkNlKm57dDN5y059nAiA3MxdJz58iP88hezpCFLRdcbRV0pt/LPHQIcgJImnzHg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLDvpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHQBAAkPvxuX4B8T47vLBzM4+hUa9Cf7x1LlAcbGRHFkmgq1ksCJgW\r\nkJuQbWlsRpzmtzPfr/4NoTBmX6k7x+x58SNiQRHPCKMDebksNWReTWflslRP\r\nTXKRrSWtZHsHBZG5l8aNmtFA9IliRe70j15WmkjxQ/a/qhySFVCI+bJbCGMi\r\ncmScBGGs4pkIfcuUUsloFVa1cfDsmNtghzpMztVnBvn21TSCQwPfkYdS8vZG\r\nTzbQPHIrCSR/AXRzd0Bx/Kcslwl5Rue7MdN5q0rNycYwLmClI9yKDVhHZGhj\r\nmtkJN76F0y/airVKKIUM2X6ZG9Qtom8sRKGIZVBh7lAQQsP/pDpyYhGt/LZr\r\nyMbnGlZVo5peAEOQEMZgxh5l7taTn5odw2/tDYCV5wEQwdxUngUZ4s8P/RHA\r\nf/nkgp7lN3xcATksmc//jHrmiJto4sXdN3fiWwm14Zv2B+rOQ/cWGC5BX0Mv\r\nwfXaWA+IGeecz6jRcjHZYCnongFnIjPr9YGUAmp2AVMSkEHjE4fPBtHzSQC1\r\nBR2iX6CCQkCQ9r8k/iy5bq78EfixuYHt6wHOLtpQWqBU7JP827tnDza0K/mb\r\n5AXlzlfKdlMUGSuPFhXc6QAIFj5aoUVwxt+ZKY3JR/eQ3mdB6zBlysD67np6\r\ndZA1l+gqr+78vzwHbYh8B4RPgRrWdaSwv34=\r\n=BQce\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.2-d1b0a8a7.0_1663843305429_0.57702336733367"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.2-acbc1c62.0":{"name":"ipfs-message-port-server","version":"0.13.2-acbc1c62.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.2-acbc1c62.0","ipfs-message-port-protocol":"^0.13.2-acbc1c62.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"60666473159284a7bf9067d10436033caafeef5c","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.13.2-acbc1c62.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-RwV1q+ob5Rcyu4Z3i5MDEeFGz0ghh9/BbJiwBPpEcZZVQtbcwPG8QsrTbpaNl+S9UaJsAsbztNphYFBE0+kf2g==","shasum":"717e1789a532ec96173f63de2460b630aedf6ba7","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.2-acbc1c62.0.tgz","fileCount":25,"unpackedSize":73167,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxYBV84IIAWvf9E0q82hs/OWkSRo1B2bVPwOkQcekxdwIgYT/tvmfELxtYs7C4QMY9DtRLIMNQz0mvbHNYO8he+cw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLFxHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLzQ//Xw/6+dsi9jGOZq27wwPymYGQloM2qFGj+WiMvbaOGgVfKpnt\r\n7E++TPYwlOumrpjgp1JM3E7PQSgl7B5pDt8ZcOp5XUhJJ6vgdvweIAR2lwPB\r\nFg6pZL7pnNBwo08XHOhcaQpWMtrXt8sTZTbCps9IzyW8GfDupJlplb+8qT2s\r\nkZSwN1yMAPrfVrkZrbJjl6wQ8dDU1DeRBR2Mqi9oyix8MH1ObeALSgaxQqLa\r\nIsF0/lWvo1odvzsXzse3l+5RQq22CNgxLin3Iq/rqPUDSx2PIpGJO1fpSL8A\r\nP0+GcH+RE4vHLNYj64s+z8RF4QL3uPzUr2FvVtRam/L4QytJx+OXFkfSDRsT\r\n+i1/lG2ETMLUvHUgwxKZ4pYggojWV00LqVPR6kjWJ5UIV56ExDYua3RAaQmy\r\n1T18yDfkfDURu4w/e35dUExZ5KWSbSAPSZfco4682p8NFRNH7FoKZrW7lSsG\r\n07JhVz9BeBPAqiiqQRxULdXRMB1linT+MqY9lEZh1Li3Rpy4J1YP4LJjln7D\r\n15F6gJZen1SyB4wALRmsEuTRdTpIYQ1rpt8WidYUmfsuZEtVu3qK/uv5jiPI\r\nMhaWPo57AfT9VBSoP8zyZHpoZ3yGubqL/Hh7aJqZXcf1Nf1CAq+yEhXXdE7t\r\nupZRdVLdK9fPKag/Bo+x0Z95wHPomr+RJOU=\r\n=C8Cs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.2-acbc1c62.0_1663851591784_0.9514679934152861"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.2-dfc43d4e.0":{"name":"ipfs-message-port-server","version":"0.13.2-dfc43d4e.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.2-dfc43d4e.0","ipfs-message-port-protocol":"^0.13.2-dfc43d4e.0","it-all":"^1.0.4"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^9.5.1"},"browser":{"worker_threads":false},"gitHead":"4eac92ae987d3ba6007c4742456913c865a06857","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.13.2-dfc43d4e.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-V2yzuphEgCexwNDI4U5WIpeU88IgJ1M2fNI1Un4WiD7AYwRavRDBW0+GsxxEH0o8gK93NlCnK4EaVk4X5Bm8Dg==","shasum":"68cd349e1bfc15be84533cc3f1f5b7b8ba1d209b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.2-dfc43d4e.0.tgz","fileCount":25,"unpackedSize":73167,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB6socYIWrfbDJSHMyHSCZUgBoPVjWbXrN1RuV87RVM5AiEAphrATKgo2/XwgXJHDIlpX0/GTmPROegyq3iDzvgMQao="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMbUiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBvA//RahCUVlX3WNKJBf8IlYSm1Lah3aOor9KeSsg39/D97SH6M/Z\r\nNIG8jAIojI2665dt4LIFQ+D3DV0HC/qRIoDNk1QdsrxIJZNt52l2JqhyPF9a\r\nCPt7WBE0W7JfFUx4ungSszUDoDn4G/+vo9AQ44vp1nt8IhTmbSI4R30q3Oyu\r\ncLcHPMQjkX/8iXOzwcX6UAkC7Z0AfB1UUbb7kC9gE6Lony1kuM6h1t18+gfO\r\nXt5MEggfUUphd27eUr3eCC1ogXf1xzrt7q1xVKO8OjEF9dYli/2XjOhr1W6+\r\nGDjeLKfu7nb7VYva23bWsTEm/0SCT4JuIGvTB3HDGT+oG9Zqnh9enn6qkoRT\r\nlZF+WO4eiElddREw8o5/TNmbi5SCay3LZEajaEu7WNMt01p16AATjDu//c0r\r\n8tPm6NOl6zO7VW67+GJsnfgVErKu1+3a70/On+NXsMBq28rpdMZST5pH3Kwv\r\nwUa7DOAn/N0P4MyKgYdQxz6PKzP2aHlKd5JEsh3AJnyP7pX2Rytm8pjiv6Vh\r\ngD+e+ClLgDNOdbtkPCHR8Kfl92w/UOjn8KG4Hz072tTeURvDFe183gPQyiv6\r\n92FtRQVbVP84wdrbvJnBh2qhdQL92kiphXsyMHWLD3NbSgi6dH+GyR8Cznbs\r\nhybqq+FKJVFFNbwjmBpa79XYgm4rwPiIrNY=\r\n=VXOx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.2-dfc43d4e.0_1664202018345_0.3267219349383008"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.13.2-0cee4a4c.0":{"name":"ipfs-message-port-server","version":"0.13.2-0cee4a4c.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.12.2-0cee4a4c.0","ipfs-message-port-protocol":"^0.13.2-0cee4a4c.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^10.0.0"},"browser":{"worker_threads":false},"gitHead":"b44ea59fdb45d3e8532d6a2d5f670e2df46d36ef","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.13.2-0cee4a4c.0","_nodeVersion":"16.17.1","_npmVersion":"lerna/6.0.1/node@v16.17.1+x64 (linux)","dist":{"integrity":"sha512-1dMmErhSAtoKZVgBIWFvJlr6F8cdwqZs6zzT2ajkKCidQIV51ISQpkZXpqwzyLzWKMc+lwgCOtmyb6LEw9jQAg==","shasum":"fbaacaa98ada0d020a115168d6913c9008792891","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.13.2-0cee4a4c.0.tgz","fileCount":25,"unpackedSize":72285,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICz5ZLkwP/Qme/QNL/KKK2taGQ001TUT2AseHiY3jzIsAiAS7SvvGi4d9pE13/CTMpKL+y+5Bw4cOTzpLQ7jtIrzxg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVlc1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpG3g//RiYxgLqyy8I2C2Wfe0jgnSM/tULqndsWrxMn02Prg8/k2TIk\r\n1BlJNLW5tzkUVm4iszsCgozbEbyAuPZdp2pPfmW7VSRuPaLqdtomPcoUDxev\r\n0H2ArriP9hwyqwnxA/4rp4zGa9mgeVC+CpUcPkmkOpORcfuzv0AuZnTy+YdP\r\ngE4lJAB0qHnY78RbCcjc7UcAG8nVk34sqpv4adE+J6siuYJ33jS4gQfMFKBK\r\nop9B0vYz7SbBALymAt/vj3bAWcl4apj101DyfhWIxf35tIsTWNT5aBwGXVlK\r\nwsz4QoMBBzNMKm7gl+dhb4YKg6Nbw1ilXcS0m1gDweE/3S5CxWNIMQvRmjhY\r\ncOxxyb8yeUPZD9GxWaJus+D9LIkW3J7YhE84B7Gafyc9WAyyPIdMxHDEP0yG\r\nEC8gzkXV2f7LtTO21ua6hn3UaVZuAQ+bF1axJ9m0wdHVyBHZ7j+S6WWfeT4g\r\nHvNeUNrJcCgIC1/jbTiJEorR5rER3YZ8QEOWMqY/MBvLyJwl8GGep27mBTIW\r\nrv+KNy7IcMj3bRHtUyzaIORBSvf62UB5ifgQxvU6EfvEEwKFxqFBIAjgzz7z\r\nQhosrrlNm9pzZ26Z34WjfdXbbyGFUSKHk9RqWYkWF5i+rPmtszHzF7xt+wne\r\nBOtwyB1sTYGNK+LNa24sbblEbD2YiIi67l4=\r\n=0fHj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.13.2-0cee4a4c.0_1666602805010_0.08227528950642804"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.0":{"name":"ipfs-message-port-server","version":"0.14.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.13.0","ipfs-message-port-protocol":"^0.14.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^10.0.0"},"browser":{"worker_threads":false},"gitHead":"e8b7b66bfa98c2a1c0d0bfc19f698d7d00b6c888","_id":"ipfs-message-port-server@0.14.0","_nodeVersion":"16.17.1","_npmVersion":"lerna/6.0.1/node@v16.17.1+x64 (linux)","dist":{"integrity":"sha512-wcufG5BbtNf9J5zM1V29pK0YM4GGSe95sh0+fYl66Gxm1ZeKOf5Uf06tWLWXScEYh89cbYjwYurGlpX3llZF4g==","shasum":"4b64966c7b3aaa8450ee15b5f5c72ce79e5c71e4","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.0.tgz","fileCount":25,"unpackedSize":72252,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzWNNeaScRQ4I9Kv1CTXUNqopSzhjk4hbamY/fCZ51LgIgdcUe1lZZIYKQpdaiUPGDDkehQxeFeIwRRp4B6vk0yBU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVm0+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrssg/7B9QgEPccNwyM20yLi67zIuf5EoJV9s052Pw3tc7Z50SgI8KL\r\neqkrsOM9AIVMvdg6FavKc4NguvAu7b+YA4ILK49xdxigjPkTimJ5R9rREB2S\r\n3AWFQvNJD/IBCQ77AK15RiOgc6xRAUh2P58IH18eLajPuYCNRseM55zqxa+v\r\nqPQdGmMnvKMdBVcpNfOBvIPPaguMrvv4yq2ybkjwoV7VppdrqruiFynsmBtT\r\ngrz2vjn/wyx6ok/olFCLndqyQ7xpGzehFzZxlwcvH7ZlHJetO0vhVE0UxfCE\r\niZbx88o0PCyMVQ5yCHF4263yzbgDuKdK4ATqKTfG9Erv2/5/EEgceq2pM6ID\r\nbESWCUV+7ZEQ4nAZt8aI7olssG6CczsdxwFwLrgF/sWhCCrb3CN2WPll8+8M\r\nhXDnhLnY9yjiKKIMN8JRgbYt5ymUaEhzOBNRFG9ny5bD50hN8nVPjqKl22Gz\r\nkmQF6FZe9qSBmTVuk4A5JrAPKCgMPGAMVbG5C+Krb10luXZiB0MWtBQBexbG\r\nrxAmneJ0+fQXZnCmd4jmfcjNMo1VlOdm6NtyKrsKsUuv1lRjkzgxwUZM2eNp\r\naeUaXjhspMtHrjxMYJoOSIwnmYtkMhKQPbptld2eIJNIqOrtxt9Hu557vbWa\r\nsYUPd12dCNgkgHmHWxeF6R8xgRs2rgJLTBw=\r\n=RR4G\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.0_1666608446701_0.29525332223105116"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.1-a77e40cc.0":{"name":"ipfs-message-port-server","version":"0.14.1-a77e40cc.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.13.1-a77e40cc.0","ipfs-message-port-protocol":"^0.14.1-a77e40cc.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^10.0.0"},"browser":{"worker_threads":false},"gitHead":"a614528c55b8b22866bbdd2ffcde2e38eb5f578f","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.14.1-a77e40cc.0","_nodeVersion":"16.17.1","_npmVersion":"lerna/6.0.1/node@v16.17.1+x64 (linux)","dist":{"integrity":"sha512-S0Yxl1HuWFX2MQj/v1wcV5YS1vLizzHvH5B0cBundLtY6UTfhoa7qgxFTKNzdYaWLv4T9qRo+BdQVX58yK/nsg==","shasum":"23352394b4e0125eec0e8fa7212dc6954eb6121f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.1-a77e40cc.0.tgz","fileCount":25,"unpackedSize":72285,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFMxekanWrDx3p9lAswBIu0MX7adVlmQx+rKx6MC6JJGAiBWEc3PVd2NOqDw7rpXh9mD+0jrtNyVWB50BVdd+Pj9Pg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV4wdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNmg//XExWDIJc78LBAaJsN95PTXIed/P5wqVimzhtCVz4HAlmwjHw\r\nht1sY6L+rLQ5q4v45pHhPsSZxbYGnit8pZIkC8KRAClmb8e7651Y1P4qKQNW\r\n9YThRQeN6FR4xSBvgGlBSCJPO23M9o2+h4DGySrrIvR/GCTmvl7RezZ/9+rB\r\njayzjrolxd7VQBwhFxC2aQtJhKrjJy36nvWzvOuYy9/QTOhN0beZpaQJJm57\r\nRlR84xNCdCgbmf1EU5Ain4BMfZxX7kFZ1VWQVZdXzIkKHBbyHzo5jDTmnH93\r\ng50wW26ncGUpPiXMuKnz7Ws0OYRYm/oeWjS1ShKtrFvXLpEWh23OnchidDRG\r\nnf3Td9wSLpWwZcTba5fYn783ttHwQarF+JJE+Gng8AHP+JqKYBWI2q/b6+bT\r\nCfZoJrEm4eBbj5fNa5r9rNBVv520q8p0lWJEk847CjXj7QVrS2DPg7dt7j8s\r\nLa5yjmvFL3H2iQ99pCv0RG5lXID7vNLwnbRXNHeiK/BcKIYV+e0c4eykS2Qy\r\nYxQPQLdk6KTR7Bep4ACqWwOfho0SxSpGhfonW4s8Zi9PBSFwzaesQZ3lUImR\r\nDzqkScuzazDwsGqmd/VJ5nHTr6CbvndCVsZ+xcW+F7NQyMKcgy5KMoDGETWT\r\nbt7ZcjtBUZz9W14QM4qggvaXYJMlehpSpXY=\r\n=xtRd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.1-a77e40cc.0_1666681884859_0.9524113233999822"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.1-58e6f468.0":{"name":"ipfs-message-port-server","version":"0.14.1-58e6f468.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.13.1-58e6f468.0","ipfs-message-port-protocol":"^0.14.1-58e6f468.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^10.0.0"},"browser":{"worker_threads":false},"gitHead":"2a13d94cabf2e6ca2f631dc9686f03de6aa42447","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.14.1-58e6f468.0","_nodeVersion":"16.17.1","_npmVersion":"lerna/6.0.1/node@v16.17.1+x64 (linux)","dist":{"integrity":"sha512-d05tBjC7GMaM4zT/MUYgi8jN4KHGTzQMORfzCK8LT22edBdu6nhGqAJ980SZKk0J9S3DxZC3mcFe9vKIwPznWA==","shasum":"74b7fb63cd018ba7655f714a037dcf2dd9d07931","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.1-58e6f468.0.tgz","fileCount":25,"unpackedSize":72285,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcLaune3V9zc15f4odFWS2MdPZ6WNRt3dTVKzXMIKW6AiB6UjKyXNFXNKOXjNdWc1La8pqPBFLcljk1NwItU29kuw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV5srACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6yA/9HUh9pp1uGMlKE5dNsL9icEQd7hwbvMkoUg5SfJrK4AkAxBM1\r\nH3OqeQ3y9vBkS+wbrE8WKjS17YlkIV33pkJNevQQQ1j3mYzsMmiKPEkSuYmz\r\njabgN9DKoZTdDeKv66ezkjRjBVRFy7nOEG0mFFpZuUC7lgeyadSj3W2mjsIh\r\ns+uYBAr9mIP3xbUFFVx3k0bto+to8KUv9NumRHRzDILAdy9+uirGPohPdo+r\r\nt3Hs9X3kD01guvsJdBG+H1DDfPY3ul8D36xMJeVRpba1UTi6mcizL3D6vflv\r\nDEKNaeeMBKY6c/b7SkNmEmE9k2eIF5SihNz/ddXrGG0l/mJPPOMNYwUmSQel\r\nQfAp1MKZLQYFXcbY2i43gVL/J9JHVweM8OfMYSjhd3Q2akMjRaK1kAereJFy\r\nA/h2/LzOowh49gamdS90wuNVfeyp7nU6YNo73ZeBdty7JUfvvmB4mTUz2hd8\r\nnSdtWK5zShWn+JNz5W/euBw3GQClmlFLgtCNVMR2u/Ib5vSZCKhsR5qL92Ua\r\ndSfVis/Hc9g2lBNZJ0JzXiHySAEwoGp/hOBxfVgWILiwbsjRLhsHM5HDCDjx\r\nvkiY5SNHwV/5O4KDtCGgkUdw+IE5IBpLn+R6B0RzSavpXRBJ9T4meGsqeQ9D\r\nMGDcb+N+3B6GaJr09TjvOTWkPKwnLnb7aZE=\r\n=OsdI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.1-58e6f468.0_1666685739716_0.9868023403413304"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.1-6ae5eb7d.0":{"name":"ipfs-message-port-server","version":"0.14.1-6ae5eb7d.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.13.1-6ae5eb7d.0","ipfs-message-port-protocol":"^0.14.1-6ae5eb7d.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^10.0.0"},"browser":{"worker_threads":false},"gitHead":"848f64d53ffe001cdf63310c06e8f0ffe485278f","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.14.1-6ae5eb7d.0","_nodeVersion":"18.12.0","_npmVersion":"lerna/6.0.1/node@v18.12.0+x64 (linux)","dist":{"integrity":"sha512-ij5wb8jzX87XFuqYrnGPk8PD4ae4tX3InFvbC+DI7vefVuvjsaViVDK2hySIh4G/fK3cRoVy5fKr3WzieC3XcQ==","shasum":"d1f887f63e2f94ad6cd05b899f9cf6ea981a40c5","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.1-6ae5eb7d.0.tgz","fileCount":25,"unpackedSize":72285,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1VArCq0c2PIrCNZDDWypm5jFjsMj1NcbBXL+/8BTErAiB50yJkCom5GN94Hec4gM+6arbrenv8SWd9EenhWmU4kA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW4TsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiyRAAjDg9b33eVG5vDnkyRK6Ck9f7WlGw1BRmxDI25P7iqv8Udrni\r\naOsDtd98KNLLBJiW1rxKVZJ+KGpGEv3la4cuhc/yAjjY+VI0PVYYurKslSuy\r\njeV0GGZoaz5qEGiS2ZDrOH1MMAn7WIWPR+Fwh4Pq97imoK/yaxznfvsOmAc7\r\nFy09iSjmAmN/zI/h7gI93wL2k+LrwaaqBQVRLKXQ2Qb4B2/6OnzfLMRcI4nJ\r\nKUgRKj1GmQXuJDeeKeTvBowDcZsPHxvQocZPVakILJpvmEhfjFLSC0uzHCUH\r\nmdjU9K8hVbB9TPLRCS+Mz0AGMwsPJz2reEO5/UJhiguJtlP1TCySDm0fldoj\r\nXaq8sNjuQAWz9yMuwH1nL62AfIZ1DKP5f+b758bpHenqfnN8K+Wlqd9LKgUT\r\naf+sAoMuTXVg98pk7ylEcDBftAZQ0m6X/3Gr1rNJpL2wVdRqa+non2gLCUwV\r\n65/0Y3Gs/yFBQoxBbwjnuzMQ9ThSWohfwK1YNGbt3RQ37aFkxsoLLhql93yZ\r\n0dsKghxLarChHi4ei2y/tgoRPvBbsB3xJ2L6iy/z+eBQw4g/DlXJkDLPMdvG\r\n6lCcfxmfhpi5trFwwQ/94jnvKWvAxDLqPgNgiuqdMZsQM0NtNlks6R72gPQl\r\nTCxnCWxXJriDN7lX7uTs6/tOQEU1CPcw0y8=\r\n=B45Q\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.1-6ae5eb7d.0_1666942187885_0.5082043875168751"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.1-6be59068.0":{"name":"ipfs-message-port-server","version":"0.14.1-6be59068.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.13.1-6be59068.0","ipfs-message-port-protocol":"^0.14.1-6be59068.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.0.11","multiformats":"^10.0.0"},"browser":{"worker_threads":false},"gitHead":"81311d5fcc6a5512ed3414aa592bdc9e6c481b03","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.14.1-6be59068.0","_nodeVersion":"18.12.0","_npmVersion":"lerna/6.0.3/node@v18.12.0+x64 (linux)","dist":{"integrity":"sha512-f1dDOlE0uh1Y2E8oSxA8WnSyTgsLRV+WHJO4cYdvaMEkQpx4JWnehsrlgQOzrEQNBBKWU0rcqKIiYauE2CVy2Q==","shasum":"68e51fc483acf62b356289935583309b21e72139","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.1-6be59068.0.tgz","fileCount":25,"unpackedSize":72199,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9sNu/9dyQEueNp9RYDWLOKdOik3BSTi5wE8PO1XoGYwIhAN/oxq/MEvF1PuZyLGPpg36frtH/1gll55rpfghXyZJJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdo/oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqV/w/+O3oEw3nFhGes42v6L1r/2fabfqaEfNyxCcXpK7roLmTlGVsn\r\n9dmR02JU0pdP4U2pOyRV3WAZyTmMrAUL9qkIGqWwBdd5Y+NKl+wGl7RY+GC6\r\n8zu/X3yBgvzmokRy9j1veQwmXhr4jx32D0QDEsjnxD4Z/LwKahJQawWKe0t2\r\nIouwvTphrEmTAwAx3WFLxMoKJSZrKmNZP+xZzdY27IiVyv4qlA1CLUwyuU6w\r\nNCe8v5fWnBTwD5sl/zZckxVDSiPC858DNVeVQOOKLveyyVT4wXXCqyj0J3on\r\nJFm/cXkncWMocZeDXJ9MmCPgqS/YNRJWOFc0NSosz05yTnZNp5aNQeQml+up\r\nb/81w8PBI4VVZsMvMdorz/zPf4gCSH9JfYLZM4c14VEOJamfKNpwgsFNjf6G\r\nQpyi9cZgEsnk53wV+FF78h7vsT1DWnyoRIRFxQDT+RpCKF94GAQ+5ZNkTYdH\r\nML6vcep32nlApgQ4Z9n9UdbpjHnLwE9NaxVD90fB6aJV64lu7KIz+W7MzR8U\r\nragAnFztliAaLemn4kFwrHnTijwwa9q7m6XeoQwYU1ipStMMi2b1pxpXxMMe\r\nxfVBZDofObTsnGn2jFWKFSlpKk/rmbnTtBwScadq+2EXtFu/nZ/crBwCT005\r\n0iVdxyjCtYB2oW5cyeuAX2NWJpR18223bys=\r\n=Ge6t\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.1-6be59068.0_1668714472686_0.24689754969221767"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.0.1-563806f1.0":{"name":"ipfs-message-port-server","version":"0.0.1-563806f1.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.0.1-563806f1.0","ipfs-message-port-protocol":"^0.0.1-563806f1.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.9.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"gitHead":"19b0474216e0a7dd7363dcd6733379790b68a1f4","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.0.1-563806f1.0","_nodeVersion":"18.12.1","_npmVersion":"lerna/6.4.0/node@v18.12.1+x64 (linux)","dist":{"integrity":"sha512-rz3TuO6uf1OsXAf+Qan9EK02qRYow558h2ptRDkibJgKb8TvPjVXm4rYanp7SAZBWHlLpVBeYlmh6LhjRIB3tQ==","shasum":"99141eceeec2295b368c18b66cdcca428363a1c9","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.0.1-563806f1.0.tgz","fileCount":25,"unpackedSize":72156,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZCqMYE1X0zi32tmI6zsNpw9AG1gLwJm0gU2b9BQviYQIgXfZaSG0WRLHFcOi2TxvfuJzQtjVK3yH6b628RxlqCRE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvFjAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoGtRAAiTJx52GJ8ijT0ao/AwZxuRxrrRVma0rpiS4gK8agUenbvZYr\r\nkfMhM6umd56CAWG+TnuexfyOpDNrpP4ueUoKzAml76900bRX1wxwQg/nLh1J\r\ns3opqAG4m3bax7ZHWo0wYWMjCfjUHLyFv/G1zfEyTc94bj+DWlVExLk4a7Ob\r\nMhvGAb2QKS4QZxXx+/HQawRzJV+AC0s8q97yYSQVXE2rDaEt/GKmC6hNwZcV\r\nI8AJkgCX+nILDeUV8rk1JLxsPIYIGuwRf+tTF6cS7tfHcHb4ChN9nzBBiJ3p\r\n2tOlAiQfOvhsOjWovkuLoOJy29hShx/JpCGr2UioP1FAWSdNpZR/zTseS7E7\r\n1V0rtZzRq7r7Fb+A4IBlqAA3gLas1T8OIn8BQ7+A4A56iGkq436ONYTucGD4\r\nFLzFpLcEsAVS7qKfndna2PTV1h72BYpKQq5WoPwg1C3WUH6/40n7iXArKdIT\r\n4PwyTU0g5ZxI8ii5J/WLU3j2uudFD802JiC0TGG72ufTF/kunWtRrE7My0XF\r\ndd1uMBLUnhk145xytxs8mj5KbcV8OKSr12O3gL7e6F7esvKKBZLt6xXkADdX\r\nEhk09wbH0AdOjlYPv9VMYwazHIQiOFGVicppQgpxxPk4bPtWzxgfG5P67Sow\r\n8JVZM+Uu0cZ3hc8jyY0iPIc3jEtrUyuyLq0=\r\n=P3tT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.0.1-563806f1.0_1673287871977_0.6646608352184289"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.0.1-e85e5b6e.0":{"name":"ipfs-message-port-server","version":"0.0.1-e85e5b6e.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.0.1-e85e5b6e.0","ipfs-message-port-protocol":"^0.0.1-e85e5b6e.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.9.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"gitHead":"5d268429a92d15e22b1cbf7fafadca662b131420","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.0.1-e85e5b6e.0","_nodeVersion":"18.12.1","_npmVersion":"lerna/6.4.0/node@v18.12.1+x64 (linux)","dist":{"integrity":"sha512-Lfaata+LWqxuz795FDBSKlnj6UIBWjg6fWOjAzF5HeewN0CaDRR1aSSBpmfcKcleV0aMf4MGvBH7EVackTBqhg==","shasum":"0297fa12294cfa61a53fc86e542d1eeee4ad607b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.0.1-e85e5b6e.0.tgz","fileCount":25,"unpackedSize":72156,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDwrJAwZi/So8ywjNiFpIo2DN2BLoxqQFpA+nPT1hE5OAiEAr2Uq/hFSSDc620d850q12A+dQxpS14xTn72+sCN8Fvc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvGfuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr7nhAAhKOizWDvfzkyF+4C5vr0dAzUnhbv6EkXbTI8vCJo5qgbx0u/\r\nusMQbSP5nNDCi01QJzokZjPnrpBRoJdN5xB8IXiHP1FeJ/7o5NyI6mF2UBYn\r\nSfM+KPAIF4PKwN0ZLCnzCp6/WekyddrEoqdIBYuyApyxMlaFmWxOCSDl+bAc\r\nmVxKWy0HxVWBsWhiF+To+9Stmwi0FdCkMOaF3gq83fUjFChCBE0tWYi8jvFr\r\nFoPcshZYx0P9BouWrpg15Rw4OM6svgtdfo74TOXIKKZf6/+Y8k+EA8PQj+pw\r\nhgPOiY3PWyGRA3kU2xfHcT+gpXVhSEB4Ix7Q7u5SG7djahtqVG29s/PzTohm\r\naUEkdztpPsPRDvTLWp3s/OWr0k2kP2mnjB6WCuqXIOnkpiM+zfg1UIW0nzhq\r\ne9pXUKZX37O68hp2ddAIilVpTeGsBdbNJSXOoI2wRwrlpIDEbGBolWHxg/69\r\n2sS2oIusSOKrO2NM3AslJnFukIhqd5waUAvO2R2aXBfNPHTXMlKbAXELew+v\r\nlL3p2WYm8h2b9CT4GB7MfNHFA6c1xbggWZdI9Ylqex8tKDsKNnX54bdfFHuV\r\nhpQeqwo5sW3yDHE8P0FBwOhLrvup05PD3UvM82D8KCIjaENkfJu0uaOG+e9c\r\n24CdkRgPhOgGTZFdpQZ518JBP73nV41x8/8=\r\n=+5OJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.0.1-e85e5b6e.0_1673291758630_0.15444452788941643"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.0.1-2a6fede5.0":{"name":"ipfs-message-port-server","version":"0.0.1-2a6fede5.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.0.1-2a6fede5.0","ipfs-message-port-protocol":"^0.0.1-2a6fede5.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.9.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"gitHead":"12b210560953c0358e012a120d162b5f3f32d06c","readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","_id":"ipfs-message-port-server@0.0.1-2a6fede5.0","_nodeVersion":"18.12.1","_npmVersion":"lerna/6.4.0/node@v18.12.1+x64 (linux)","dist":{"integrity":"sha512-vujZm08ABh7WcHsZ3OtTOnORMwIMfTCyLaxsknUDhdOU2gzJSMuhMdU++n6qm6OY8Urx0NOc+GCWF39VE+QdUQ==","shasum":"acdaee005f2b6c772fc378167dbaa4e0a6cdb446","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.0.1-2a6fede5.0.tgz","fileCount":25,"unpackedSize":72156,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTfQP3WvBpd2dxl8msqLUCwmAtpMRtPXMJ0luPseG/OAiAW6k4X94LvMDa9vyvW8B9VrgUEUEheUYOXAtVBpmJxcQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvTF2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqyAw//RbPz86pcf6Qgn8UYqDnMoBDjLwMnoI2Hqr8ZW3og4XlPE/UX\r\n+5CzPsjUnlwpMMoJKL4FYxor2IHEfIsgRgCyS44z/7dQ9NIffpoI9f5xQ4lV\r\nDP+niGuz+EaikntStXMcAPmJSRxnfz21mg9pO2x6THyjOkfEazOVfqZRkeiF\r\nRoPbjvjHPTD8MTe7+jyL5y7sVxUPj+D5VcnZr/o9Lsch+IK34ZK/Hd2rGX3b\r\nEYSKfEcI/hyqy7cGZS00MZVQ9xfDafDM0UBJ4JQGVaeqysBYpeLeivn4IKcj\r\nfH8K0fE/nE1PKMovtCH1f/4+GC3HUL89otOavNYJ8WQJr0I3Mjr6EFa+/QI4\r\nilz9yG4JfE1moeHsXoUr0FtmHK3+GCJbsajerJUhdI2PWt2rAfAHQa6EKQ3S\r\nu4k0e04Qf4cDpicmBjjnGa1sHm7zUwm5mn9v8M7JcLt850rjZourJtYZInJn\r\nBxBJPq4ZukjaJNGp15i+zCpyXpxQVX6ZgNKrI0I/jtDfq8jQ9r+KRAyYGkI5\r\nWJYss+CMv+wXL8nz59UMmKf4Daxe/ef3iaFTC03R21veAgdCrsPxGSiKKpW2\r\nW9uNufgwErFyOPbVNTXwRXkxHoLi82AnfIGkASaGBFfGeMsIl1eFfk/FYaaB\r\nnlecKXhK7V4SLSeKC4lComNdPsd/x3FmxIY=\r\n=+YAj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.0.1-2a6fede5.0_1673343349945_0.9815940585189928"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.0-5f73ecad":{"name":"ipfs-message-port-server","version":"0.14.0-5f73ecad","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.13.0-5f73ecad","ipfs-message-port-protocol":"0.14.0-5f73ecad","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"5f73ecadd7d397029be8dd9bc0dcd82469f07359","_id":"ipfs-message-port-server@0.14.0-5f73ecad","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-CTO2QV9BkLvoEY67JfFq2DUf1o2LEZRubYDI8FWb7UbkVfaGmWE4p7GewHHNOiB5WpqPE8jeLQK7Tmifoj8HUQ==","shasum":"22e5ddf9ded4069d11be266b8f6b5a657ff5ed36","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.0-5f73ecad.tgz","fileCount":25,"unpackedSize":72095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTM9jKi4MPjZ+iTSpfFFpXXuER54lWVS7WuUBNS8blpQIhALHc6yvtiUB6lWJXNDbg6AqGST1/OkaJZ7Zbnqy3p+/p"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvZz4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBsQ/+JfaFOsCsYWYE8x9d8kPRrCs35SXEadiknSMQ4a9gR5eXuUa+\r\nBLbwQWp72rmcO8YBW2LJ8l307qv5HU+jYKU4ZBEuPNRlzG/O1/lMRMBFjA/a\r\n1PH2LtshBArhtYMSV6Ir9quhWktDcVkZkufk0Y3DphCOcMr7/neEOEXdJX7W\r\notBSTx4j2bX7a1i0UdTb/kfbXN1TmeXenx8DiGNL87IKtC+fCwkmvu0uRTXh\r\n6C8KIdIGs3ukaRWNkSwe0aWF+2uqvQHZBc82Gg8keV3OmQoGHSY2akIO1MjF\r\n7AwjgzhTo68HKu1Bi4R2zBMkCdCS2U8y+M7EHmjpmKJtXkcDLqCI9N3QIljg\r\nTj4WMbYENlgU3uSMNJnb3a02x1gxtex2VqyxxXCkifWPT42or40QNIlPo3DA\r\ni3fJj0nQukiZ3l/ATo1WZ0rrkrvrOmZ/ehxVid2wbDr7h2v0KIHUHvIBD9lU\r\ntTt1lVtVHnoTTNNDK1qkVgOoaL0e/dZUiDoge2SCDWzZeBuhLz/hKXQNoJse\r\ny35NPEpwsgdBy09eUDEhINc+dlACKmFqgnHM17XxHjOscOgS+EFQLf+rtdzV\r\nJU3pilDWuRHe/qYcrpmugzH9752EmzSgZc+EJqCMh3uW6yYcvV1LwdfdyZeA\r\n3bLNz6sYFAqvrQ8x8tRR5a18CDmDkTpZjiw=\r\n=7LBB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.0-5f73ecad_1673370872123_0.9140889330778157"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.0-4b4c124c":{"name":"ipfs-message-port-server","version":"0.14.0-4b4c124c","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.13.0-4b4c124c","ipfs-message-port-protocol":"0.14.0-4b4c124c","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"4b4c124c4c49b1c60a68b4b8e24f1f00dd7f0517","_id":"ipfs-message-port-server@0.14.0-4b4c124c","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-+8fVnz0i+UfY6/KGtid4D8VmedR+fZ4XLYr73V5eHdb/UZKjzZMPNPwkOQahZLQrDT5KfgP0b6BbYvwd6WURNg==","shasum":"40e2d56023fc8b4a075dbfbee5f22f007e27c943","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.0-4b4c124c.tgz","fileCount":25,"unpackedSize":72095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtHCq5f7973OoKMKqacbl/1N4xaiGcBa4YcLjY2F31+gIhANhIlqQtMVm9n9VhfqBAIBXdyBGBwDM4pBbVaV2T4NRJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvt5bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNLg/+N9tp4EX5ndQ0SMQe5+vTFD5cQ7wm7T06+cFUFxGpauTyt7e+\r\naVgBV79qUIgqA+AvySQfQDNOZeO9FzJFuvVRoeeVdTs8iUn+8RPcQBjn+qZp\r\nV/FbbPrHTt8NqE2wOxldyWckb2LeX3sogK2doOAmP2FOWHq1LP5Te58Xt9kA\r\nD6xTcGcOPxExNIGKiC4WHPGrnzcgmPbucCspi6aPJFIpa1eMHr2SpC153MiG\r\n/me2AjTyijTT3WCzDkZYOSs3ANh/O1GnQ7X+8BDBYt1+Zhg7vtVUTghZl49d\r\niZU9mJiFTOf37/bItAZVgEYPog2I1sF0USlEqTdk2I+vVPXXE1uIMJnyj6JS\r\nXXw5EyBkq0l01dIxs8GTvWFn8CQXfvfTOkcv/D4bDZFN0V0zj1TlmJ1VjTnE\r\n2NdkPfmPnLJCcVxM4tAfIjft/OrLBHYR9uz0RfdA9iQAgT/SKFpVKmaj9VqX\r\nxsKg21kJmIeJRy3GQMb6qiufWVxB3Ml6o7wUFLlO5aIvRKkDAgBeZLpdDGcg\r\nRqW7Txm13ERhoaQcVrmYnScHI/sGW6ZkpMODePXjZydB56CP0D70wbii08ZK\r\nwK7q1nuZFYwE9lkt7VgxHKtYK6uc5gROY3S5LvsZoQ6DS3KqDjysE9Yem5I+\r\nRV/kEIVHEYfBi7GPFoTRFWnOkiJlkc2KVKs=\r\n=+Xl4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.0-4b4c124c_1673453146897_0.7466929897098549"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.0-789ee585":{"name":"ipfs-message-port-server","version":"0.14.0-789ee585","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.13.0-789ee585","ipfs-message-port-protocol":"0.14.0-789ee585","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"789ee58556083ef71a4ef44e3358f86c5be101fb","_id":"ipfs-message-port-server@0.14.0-789ee585","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-MYjAANIHoUmjhV+uXP6Lm3ZUAKCzGfsZG8sNh7H6I3cvUfU9Gksr/dqwAWWGcb8E/3Ir1gwrfEiocYOd96NiBA==","shasum":"a475093152ce8d016238686876c323b6335d2a19","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.0-789ee585.tgz","fileCount":25,"unpackedSize":72095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb8qcBvbW40z98UDHKC0O9akcda/G8RneN6elCLNHI9wIgI6lto7u8y/kNHb8mdjZwVnuodo2gn2sS2xZkeVvLY6M="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvuxZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjDg//cVtgAjDu/kcju4UyYEpHhMLgpH2hnFWdl+54sBD5+56y/qpX\r\nN0tQJmv6SvSDwUrqxOyis5jmMYp0lGafi+dl+YZEvUq41zGJFiGMnFOe0faC\r\n9LZicw2/zGIEqffwud4Vq05gbRrxP1Mk0SCLMHlhpYoWzzZmk0EZNNaql6iF\r\ndF7WqdtxzK57c/cUXVlw3JJ9xxwf7nrmmqcPtO6l7HjjqNRAuvWDpbzYJhbR\r\na3NBgJxOHV0UVqQqpz1kN3LpUibH7Amy3/amgShLkGOe8f/COXFjekCfbnww\r\nb79cV4ZGEqlXGA8VDeQB63rHqEWRtNhpVN99363I7UJxswtT72EImS84Df/E\r\ndeqYRPsW2BqsXcZbyMKdZ1IPBSIVD3h5eQ9M74K3ZG0+D2TsTZvisn8eLaTF\r\n0cfoy/N2a+4ygKiGGeBHAruVy7nWNtIj6HKpe8qjPKbS72q4to1e4yLcFWTl\r\nL6S+Jo5lIKkAzf3QlGLHB0AM/uF54t+7XU6WBHnBwkLccsF+gdm1Lm2V+l9w\r\nt1yStvsEsbfa2vAYeCj9KwJzmptZdbGjVw6KW4qbtmJcuEVdpHqncwC6KpHz\r\nhcY+o8d1Wqd5TCSo7If5pwXi58LGQyEHhuTAEDZvhKxdzl1FeM1dWOSzO5PA\r\nhHhPgdjeNwB+L+FlQlRw7mENdmtc/xtUXtE=\r\n=KnRu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.0-789ee585_1673456728813_0.011095958061025035"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.0-fa578bac":{"name":"ipfs-message-port-server","version":"0.14.0-fa578bac","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.13.0-fa578bac","ipfs-message-port-protocol":"0.14.0-fa578bac","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"fa578bace93e459849a0ffcebbd6f222dc05652d","_id":"ipfs-message-port-server@0.14.0-fa578bac","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-qs0BjxvHVqw7qEnBIn98qc7tCH+BJ4yjO5LIl7YaoMxVDoPrKSByF5o4z+9+qtsNGrZPrT2Vgt/SY+3ji1sLAQ==","shasum":"ad3db5e05a9a38248b5830c049ddae8f8e31b590","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.0-fa578bac.tgz","fileCount":25,"unpackedSize":72095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlqmZM1TtqRkLzneCpuLeKn5z+ZpCN2rQJ17n4BO2t7QIgM68sGn1hQXEMzQRxFE1vEt5U6ou9oXrNBglDwvmG6o8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvvbRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq71g//UH/PiEoa/8qxHBn/MG23rRLl8uD0qoN3Vhq3bScJ6E2nEThp\r\n1tUx9vDc1FA36JV352S0MRRKXP6SaNv6zipeIUaIiZrnChQK13jNH9KUxkAa\r\necFeJZjpHqhq0R8g0ign714nipiqXoImP/nx1JRm6OJgPMeFfxH4GUPI1R47\r\nv+Vrw3n4L61Th+ij8r6YRFFqTPOpguSN2QnUTnQrMs/Ph/t1jenTN9SRkoeA\r\nenyPtkFRFqq8bZPV35POiLnb6JosjLfZoxCPUdXLpiWPfin8yUQSeqPharUb\r\nkdhoztdGg2RmAWWk6W+kGyNCGcEpt8EnSWaR00j+68NStRiFiwY85kHDBpSh\r\npASXwKTv/rZKfiMe40NsZpCmZK00TJtAHXk9MGE4UsHrOLhY7FpFQ57Ulchk\r\nPdWaxm1jesO1dfvJ+gCcrEWFBOQsFEKyQjz9wt4VC+TLWUGpgau8yNoMOkNg\r\n2wcoO22smuolNm/qXHg0OcZPxHhNRZt8SADkbiz0Surxc+ni7RkEQ7zIsZJb\r\nF+GNTpQqXpOfQIq7BgjqDFjvYIj12k08tKTuh8m+oxzZhNygAFu/TvDBQ1j/\r\n5g+eQFLqQTvzZizBJ2do6Cj9X8bi4kpGi/9qpCJxCE3GFQHEdE+UVolceVIC\r\nVtCkLiWO0QuLA2Ozp6XzxdM/4qi9KgNi0Jk=\r\n=GCGR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.0-fa578bac_1673459409187_0.6674697042003528"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.14.0-d1c3abb3":{"name":"ipfs-message-port-server","version":"0.14.0-d1c3abb3","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.13.0-d1c3abb3","ipfs-message-port-protocol":"0.14.0-d1c3abb3","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"d1c3abb32b57379b5446d5eda232d7750a2ecff0","_id":"ipfs-message-port-server@0.14.0-d1c3abb3","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-5VvOMCP3U+yS3dBpGdjhkFp1zDAAPSrW5VMS1aa/6DqyIXJPtqIwWwwyWB7Y8x4l4l+v/KXAECvQVB314Gh5LA==","shasum":"ac7e00c01f927d4a9654ab3fa2b7e0692e4a01dd","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.14.0-d1c3abb3.tgz","fileCount":25,"unpackedSize":72095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFb0lHidObNF2rDYBwb3dLHMrkHqr7QlG2ommT2hKBjwIhAJMg60emgpZJrNbCpxyrttob5Tol3afvErjEEqJg6iUI"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvvs0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmozbg/+PSOMx3VsGKdHDVTF82o/cMu9n+ge5t8RWlY80kS3+/irKX9Y\r\nypHNxJSBu4VIYafM/0Vlx664Bk50xQGyHKVskXpR1nTJehL9LDg9RNzWCKZb\r\nnjqPPwMsqSMcf0uW7MLXD6iu/Mcm/Ngt+j0SlwSYejv2rFtN5ttNkW93yLvn\r\nJ0ljEmuSqARp5gPg70yU5wYA/NP5nGbffsJGfyFHXcuPI3VbJKG7OPACdw+1\r\ntbNaG2bF2RrGhf88Odu/We2cOmvc1O7IA6YSjuJeMjJQBhPxVRw7KBy6ZMQk\r\nWX64wAPJqANcApPbVz+gMSvdR1HL0XZRIkxm9Wr58olqh+0p4YE3mIT1t6cP\r\nq2MZiIs1Nnk9IV4w7YrQxpJObQLeo9q9fqtFENJrvi0Ia8DlMJDEhaPndj1R\r\nAjx/dLWN1sO/AfemXtPf6+wJAyec86TRCTsy+LuBiiWAEWp4QzJdWsPJHVPo\r\nM+Ra6+b+1hxGgV8+62VJYPmrtCxrzfSSaLnrDZ7Ggr5astnbhh0K831fqPFE\r\nj12PRc7QUrNyWIAVsj2e7WYI22xmuiA9kLob/qeWYOJ1EtWRqAgw2UAICLLK\r\n6Ix5Nm3npyXUnqtTngiRTgW/4wEFicPu+nzmWAQmR0+omXS2ZOdBIxdiYmI6\r\no3/DGjaCEC5te0NQIJK63Nwr9HO1D/xlwtM=\r\n=eDlT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.14.0-d1c3abb3_1673460532380_0.9957487094296087"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.0":{"name":"ipfs-message-port-server","version":"0.15.0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.14.0","ipfs-message-port-protocol":"^0.15.0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"gitHead":"6e940670681859682d41ca1339744955c9ee20bf","_id":"ipfs-message-port-server@0.15.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-2ZmLdJ9fRXw2qdjHUlRxOWYyXY/D/5dadE7+0vHI0+SE5Ob2IXF2nxPo+kfs9E0X6LIL8u2DOf/Xl3IOPNDtiQ==","shasum":"931bc56473c75a289dbcaccec1e16c8e56f57e1e","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.0.tgz","fileCount":25,"unpackedSize":72070,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8zF5tCb8yrcR0jC2JlPJVzd95TaHmd2KIMdod2ztoCgIhAK34u4qTOyQrO7ctsPhorpBrolJCq7OdYnLw4SDRv3Ij"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjv/DJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0LQ//Tq814YgYGB0+4QWoovPas1tasgX0hOd0LNNeT89EzzIp2qOB\r\nXkBwUvN7lHEHoquBx4dqLbYxxDBt/T6QVdeFYaFOkI9un0LVddF91/g55XeL\r\njO05QfX86nyP6eWCgRj3VvEgZgYE+OvLW5y0Op4zm3Lk5OadNQ8gxPRCVUVP\r\nPiY9HfeCKmu7hv8LmziIkyi3Ptkd8sXHLqi28EVQmLs6zK0K5Pzd3H4E+hMZ\r\no9jF70XZOt5bdpTyiTcbf4YheP5xPBFvVfFA2fF/mmij2rVewQbV7RpQbidb\r\nc0SHRqo1Uqop9qe2p8TKOzjg0Ah2LqsXR8EhBZzz554BlRBIr9wg/u/FoQm2\r\nMFRfo+ADsTSB3KF4bPYogM/a74wc9vS0C8+KYQUkVefkOGVAuho2Q3/RAKck\r\nwsahcKChCFATzQQGtfq4nJi5klhW0zGyhWBO6IchUtWgr2StJUdp05s4Qc+g\r\nU6Nl3Ib9/9toeCDkfnHYwYhWGK8nOXHatgYY1ZgQxPZoNkMK+gTWr4M8JSsL\r\nmmeGArfHOeI35t+WhD3yfJlyxzn3iB/wOIAOp8bFe9UJUAS2ntU0L53rcySB\r\nAr3tDCCo5Po99jl0OSx4d0Ub/2SYdgaH+aZOeZ3B8r1nvVmLlTMTyoe6zzFq\r\n1C9WX+Iw1ltKk2Ii8r9nY1iMz/KEDXaru/A=\r\n=DXk+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.0_1673523401592_0.9605515607592718"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.0-6eeb1be5":{"name":"ipfs-message-port-server","version":"0.15.0-6eeb1be5","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.14.0-6eeb1be5","ipfs-message-port-protocol":"0.15.0-6eeb1be5","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"# ipfs-message-port-server <!-- 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> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"6eeb1be57c8366b82351030e49a5886d1aff8bf6","_id":"ipfs-message-port-server@0.15.0-6eeb1be5","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-6Xl/92rn6VdyZMIFlyKuSb698QrZljZ2resnFXpiStzc/drmOmsSvVzIkKetGv7fUb16q7/Na+oW5iLaKiUY7A==","shasum":"f288ff700bfe3e542956573f9e0d95982809131f","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.0-6eeb1be5.tgz","fileCount":25,"unpackedSize":72095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE9UEA9p9jkA2fsuJMpOXK9WdPpz1wbfyyILaJmn55k+AiEA08F8PbY0od0yc7CcpovyE8UKZ88BmIEMUUiW23bw7xQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwaD3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+tA//dI0132F5XKSz3nWF6whuYHeIzXqlpkN2mqTqScweoLtAu1tK\r\nw3huyWuIfPl+DThsgy6q+D4YCswvuYX1tTJcLJOcWwC+/f1oIZjuzt3u2JKe\r\nJz8cZdIwpexUBBfDtjoZR+KWIRzog/isdUu1vs4EEii+VukfAN0qn34Vny/a\r\nkmUJY+x69ghP4cI5S7LN992F7hk5uQyzpSmj0GTKPDNEuCQGxCibs5D1pWa3\r\ndVxa2M9eMVjHkwFNPZJEAYxSENqTJf10o3RfV0gRPSXlHvVL71GMfin2N0V8\r\ndlFu5CygrIYqAFLRrDvP6kM6X8ro5m1Lxz8HAyBnxpcQB23krd9IqqzV9+OR\r\nmMUGChEkh6BmMXfw5DKu3KNs+/g9pielknNYPOSpexYD0CceRSzw88SchQZy\r\nG2E/gMia1+l6G8X5MYBJ1dZ4VRMwcFepEOiQgIN2Z491mm4+V5tb/5DzePnF\r\nxb1gzch8VZDb10C+NEZHK3IXPlNrHsUhg7BB/NDiL3+K1kjZ0FivmxM+pPW+\r\nwkYMFhhyxsteANX5PrwiaTtHVu+P561NoM7MUyG7QkIt7Ych2bg/lloX3z7e\r\nojluMKXQSvHNab8Q+GBcNMW6K4AohwgY8hrk8MX0Aw+0UUXtLm6e1yxVeVgs\r\n6pBeCQEksyx1msccC8ex0AwTKkR8f7OStUY=\r\n=ofUx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.0-6eeb1be5_1673634039170_0.4523379757407777"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.0-ab02e8f8":{"name":"ipfs-message-port-server","version":"0.15.0-ab02e8f8","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.14.0-ab02e8f8","ipfs-message-port-protocol":"0.15.0-ab02e8f8","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\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/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)\n\n> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsMessagePortServer` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-message-port-server/dist/index.min.js\"></script>\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"ab02e8f8b3cf8f4eeb9991fef3b0104728ced675","_id":"ipfs-message-port-server@0.15.0-ab02e8f8","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-sDl56h8tqT0iF0MSEVAk3dl1VoVPmDz8eEINbWn7EdZtQ154xRmVDuBunnQ89ZyGwpwbWhxfSUUQNNLTXBcyPg==","shasum":"7dcc5da69ba9198d15d9a1128809fddda049d07d","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.0-ab02e8f8.tgz","fileCount":25,"unpackedSize":72327,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJA5xsT85Ns5fhv4nfF7UTwsOttRANRv1FFQdDHCpO3AiADTWB3OhYhjkC9ZmNzolnWAMXVFdE17Dk57xvOdmvp8A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxpNyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrelQ/+JJQP1jajEQmjBSZYWT16+NwcYJ7LWSkcUppcDuJU646iOzis\r\niSJ4hWaPnnefr4n64an5thwSlUvMqGmy2Zk9IeiYdPxBOIN2jGJ0aijfiWyN\r\nUgDInpyLO9YnAIPJX9b/qXNgeQVz3H8wqKet6befrBvSBEgfNW2F2niz14hr\r\n0+HbswBpsLjLgvWuRozxP9iDZYsjbsGQv4BE0pPA7ic1F3/PAxruMqhUlX+a\r\n9LNkTiGo48VUXmgrrn0eEgx0xlJpSW4nBVdjsDGlCulI+G3BCOtYqdgfqegd\r\n6tAX6cvR9deYsQ2fghwhbB6I7yMnmXF5K0Q6ATa+dMCNKSAMJ5qVtFe/zPby\r\nXax3V1ZBDwVm+tNj2xv5CKntTKWOtpNdkJvUtGZG/aw2vJF3j354wnOhYJs/\r\nGkd/dsv0NFrYDDfkgrR9PyvjcMwr6sCzw5U5qPpaYqmbRvBSsPDCftDKmpwC\r\nb5ObTMWIcjuaTnNJNx5VGj7oYqiu7kAkrvOYcEsOhBQffM6gMfw5uA9lvlpj\r\nBslH5Evpc1eBuCMpTVWdFhT7L28GimVwMq/lFjREsy9DXBkka72IXqhOeYjS\r\n/0FjF28o8yEe5/7Sc1ULBhn4e8wHs5+qw8Np0qF9cvk11sio7XKyAB1rxVCg\r\nFtNmZtRNwwmOkomhAsrUqc1d53g3eqGhQRM=\r\n=JOfy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.0-ab02e8f8_1673958257730_0.028730207557057685"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.0-3bcabe38":{"name":"ipfs-message-port-server","version":"0.15.0-3bcabe38","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.14.0-3bcabe38","ipfs-message-port-protocol":"0.15.0-3bcabe38","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\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/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster)\n\n> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsMessagePortServer` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-message-port-server/dist/index.min.js\"></script>\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"3bcabe3818ce8bbbafe0cbb68749b286d8a7edd9","_id":"ipfs-message-port-server@0.15.0-3bcabe38","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-N8RPr1MAR5cb4/XkGdzxz/gUCkzSBHGCJUpEbDZd8xfibHbPSkPrTm7y6tYq0f3+LdXqzph706nhiUgPgce2sQ==","shasum":"7bdf127fe1293a7cee16890ebe60f572f7f2b016","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.0-3bcabe38.tgz","fileCount":25,"unpackedSize":72297,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMNQnftos/t4wx6i6Dje7ohVSYUffspwrLqGUQYSmz7AiA4Y35RZTDDkdKRtKh8556Rci8QhAWHH5fSExQU1H/1aw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxr9PACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBag//fra6X9QjCZuCUV0aJ6kY6SK8CGd/tusTmEcAQ8BoygkXDkpM\r\n5iDBrTJMhtL7iPA0U5bVNtMncA6Ej7UQxr9Vet5vqwz6gVjIO4Tj9NNKDck0\r\nJJjGjPSTyllhZIfHfMV8dk4g03AuBp1e9mu0zukJCpK7/3wvL67R6ptVreGd\r\no6U7Wyi2HGHH0n7Vqjoyi0XGihTFc1TLyGCWq927oE0/P3k0S1w/J2sHHhnz\r\ntSfLiZ1FyYC01J0b2b28LGfNWiLoZJobT2KWfSjBxxmevJQ2wlI25nkFa2w5\r\ndHObzDTEqrOIMbmg91xhB2s/ZtmeI6syLYbB1KR8yZuh3VzWeClrkljvSjuo\r\n2vqpymh/mA/GekV9QVZWqfbX9deiN88sZNetsSK/bzrsmUkAe9zA6jQEL3O9\r\nNGe0vUns0znvI89HfQfj2Wev0AhFpYW7hv8zaXTwnCk8x8Kqwj4fOwFWfplG\r\nQeZG0kP6nVBJbPmD/aOYr2DaQsNaf5drglZYWgtOHNTdSUSG7yfg99u8FW8O\r\nznoRD2upSWLgG8TT/N5L6ZcBjIhj4Bv3GU9Znyjk2AOJFIVL/c4MuBsMfrDo\r\nC2uzxacGGebAl8gzMQ/g6WemsCsyA5PTbuXF0U/OrxTahW1vBPXxHLHhpcKN\r\n9s0mMYOhLZoOmmIQ9MtFKExdIJp+5BX9Yxs=\r\n=DjLC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.0-3bcabe38_1673969487648_0.5113986819631235"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.0-b64d4af0":{"name":"ipfs-message-port-server","version":"0.15.0-b64d4af0","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.14.0-b64d4af0","ipfs-message-port-protocol":"0.15.0-b64d4af0","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"# ipfs-message-port-server <!-- omit in toc -->\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\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/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster)\n\n> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsMessagePortServer` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-message-port-server/dist/index.min.js\"></script>\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"b64d4af034f27aa7204e57e6a79f95461095502c","_id":"ipfs-message-port-server@0.15.0-b64d4af0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-i7XFm8wsBqQpknZQpaFzhvbNnU+l9g9XYdNdU/hGJF33JJyM6fc+haaxHjEnCpCbDmIqSuhtbcCn6lb7gO3JzA==","shasum":"d67fb1104bdefbf21eb28ea5e17d8a25cbbbec6b","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.0-b64d4af0.tgz","fileCount":25,"unpackedSize":72396,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICr9ukzzMw2+8IRRAJNfjZIAzTqS1+FLEgt4FzYJruhXAiBD5TEtBdBXeflX+vzCM7WIntvdRqwgBMyNvGIw4QO1EQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2kwjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBig/9EvRO5hKzzpmMSdwGQCuyVLMsS1h4ZBJqMkkdZdQLN0UT0rDY\r\nIhU8y4pz/5Jras46WkyJld68+27bY6z0L7ElS6ouacWKARvbSajIK4wWM2YJ\r\nKV6cLbn7u3JRrUR/RFMEjrrUuOAkEmBPY9LxegFwH/4wpENr71BFVfPQXkp7\r\nbYc379aUbPMblP60/ecldIGvnQ+DrRNULjZ2w3b8f2s3jb2PoRxeJSG9rdiH\r\nUG2jGCwNAUvrr/SiJdGjEKyjA4wGhGoiepVUD6st9vZqwN00YMRLLQ/QixFj\r\nQDJGtUA4ZSjdfd1lOYLnjicbe9qE6Y/UNItZxmPIuvRZqEUJMhAAmUw1AFjX\r\nGXNooRU47L0AWaJofWq7BnRWS4GHBpvdsuQHX/WrOWOilhh40ZeR1FhFAnVJ\r\nZUOB4y25k4hBd9iE1J3NprJDmONqvsT9URtij5FuoXmJdwA9bZLHkLrnapG0\r\n9O7XNdC3Wm+jzTUK5Bw3nXZhpIQXcunzRxb/JN+1ql4r12KTWei0b01akBxk\r\nxu4b7hGAUA4qplp1MGSNR1FQpS8y5gylX4KY3Nmfi8N6VTsPoKtKYSHnEjIB\r\nHZHamQFOMwCzxtz0kTyDMQAO8rwkVqwoOO/hp6fAiRhBZwugCHcTyVC58t7f\r\nLgFbICJZRpPPThKKoRn8wpLAvDwJABfnrq4=\r\n=Gq0C\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.0-b64d4af0_1675250723597_0.029819600124493917"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.0-e64813f6":{"name":"ipfs-message-port-server","version":"0.15.0-e64813f6","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.14.0-e64813f6","ipfs-message-port-protocol":"0.15.0-e64813f6","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"> # ⛔️ DEPRECATED: [js-IPFS](https://github.com/ipfs/js-ipfs) has been superseded by [Helia](https://github.com/ipfs/helia)\n>\n> 📚 [Learn more about this deprecation](https://github.com/ipfs/js-ipfs/issues/4336) or [how to migrate](https://github.com/ipfs/helia/wiki/Migrating-from-js-IPFS)\n>\n> ⚠️ If you continue using this repo, please note that security fixes will not be provided\n\n# ipfs-message-port-server <!-- omit in toc -->\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\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/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster)\n\n> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsMessagePortServer` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-message-port-server/dist/index.min.js\"></script>\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"e64813f6fdc681328da7cb893c93e1f4f70bfc99","_id":"ipfs-message-port-server@0.15.0-e64813f6","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-QpEE8AGhxx9yr37swmUynSBOnEZ3zFZP+skORgdpgBqXgN6Uvxs4KmMjP9Rvbh0pCHoKC1xmyD2rEO8azwrOkw==","shasum":"df8c79749c07f45c7f2e71513e8bb87169c0c678","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.0-e64813f6.tgz","fileCount":25,"unpackedSize":72791,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbpUkBS05uFyzIA6YNY9776OIie4wHgqC6p8nfBR1zsQIhAIQaewR3a8A7vL0QKBU3+i0tI5aaiO8J+kvY6ZkZ0v0R"}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.0-e64813f6_1684953937644_0.42926122966072167"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.0-4694e806":{"name":"ipfs-message-port-server","version":"0.15.0-4694e806","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.14.0-4694e806","ipfs-message-port-protocol":"0.15.0-4694e806","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"> # ⛔️ DEPRECATED: [js-IPFS](https://github.com/ipfs/js-ipfs) has been superseded by [Helia](https://github.com/ipfs/helia)\n>\n> 📚 [Learn more about this deprecation](https://github.com/ipfs/js-ipfs/issues/4336) or [how to migrate](https://github.com/ipfs/helia/wiki/Migrating-from-js-IPFS)\n>\n> ⚠️ If you continue using this repo, please note that security fixes will not be provided\n\n# ipfs-message-port-server <!-- omit in toc -->\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\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/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster)\n\n> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsMessagePortServer` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-message-port-server/dist/index.min.js\"></script>\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"4694e806aea15c66db32e3b4be81c0a5e2fb8ade","_id":"ipfs-message-port-server@0.15.0-4694e806","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-3Z07iCfWZ0Pp+5Ao8gPTvPvDBOg22p+K0vnAn4oOsAm8vbeNFpD2gM1IYXwsS0aFzoiPYixUtXFPgS2/1p0mBg==","shasum":"3e86a2586b33226e9c94dedfc5090fc183afb9d1","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.0-4694e806.tgz","fileCount":25,"unpackedSize":72791,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDP+hl2XxeLFdToq5LqIybFZmdZyvECsBPFe0d7enJY2QIhAMDMRhT4bXy+mFKTqPvAUd8aViPW/yuXcCajrvibHvbM"}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.0-4694e806_1685014296413_0.7076536020639637"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.0-6d95ce08":{"name":"ipfs-message-port-server","version":"0.15.0-6d95ce08","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.14.0-6d95ce08","ipfs-message-port-protocol":"0.15.0-6d95ce08","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"> # ⛔️ DEPRECATED: [js-IPFS](https://github.com/ipfs/js-ipfs) has been superseded by [Helia](https://github.com/ipfs/helia)\n>\n> 📚 [Learn more about this deprecation](https://github.com/ipfs/js-ipfs/issues/4336) or [how to migrate](https://github.com/ipfs/helia/wiki/Migrating-from-js-IPFS)\n>\n> ⚠️ If you continue using this repo, please note that security fixes will not be provided\n\n# ipfs-message-port-server <!-- omit in toc -->\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\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/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster)\n\n> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsMessagePortServer` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-message-port-server/dist/index.min.js\"></script>\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"6d95ce0864055e5236ac88c0999460ebc5075c10","_id":"ipfs-message-port-server@0.15.0-6d95ce08","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-Pbs1BmYrDwa8DoR+O+bFVmjViRZeyxgh5pxtSivhUoPO9qRI1ni6m5qrUqbkpJTlorf4h9fJqHeEdWEGWcEAUg==","shasum":"3354a6c51d057002b0b6dcb277085b425fc59268","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.0-6d95ce08.tgz","fileCount":25,"unpackedSize":72791,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDz2ylooFvTUkvat+0vVz6KqYnKJ784+2L5/MJ4vmYOowIgHsn/CW+g1nkFyyeXGWWRK/UAaF7+Dt8oBPovsDGBxII="}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.0-6d95ce08_1685016626372_0.0991522886308922"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.0-7b79c1b8":{"name":"ipfs-message-port-server","version":"0.15.0-7b79c1b8","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"0.14.0-7b79c1b8","ipfs-message-port-protocol":"0.15.0-7b79c1b8","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"readme":"> # ⛔️ DEPRECATED: [js-IPFS](https://github.com/ipfs/js-ipfs) has been superseded by [Helia](https://github.com/ipfs/helia)\n>\n> 📚 [Learn more about this deprecation](https://github.com/ipfs/js-ipfs/issues/4336) or [how to migrate](https://github.com/ipfs/helia/wiki/Migrating-from-js-IPFS)\n>\n> ⚠️ If you continue using this repo, please note that security fixes will not be provided\n\n# ipfs-message-port-server <!-- omit in toc -->\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\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/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster)\n\n> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsMessagePortServer` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-message-port-server/dist/index.min.js\"></script>\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md","gitHead":"7b79c1b8df5c818dc124b346ea28330455732d5c","_id":"ipfs-message-port-server@0.15.0-7b79c1b8","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-RSZOmf9eDzssymzEUBwiwuDqS2YE+uAHxBmjrATPOjKlKcvF1NwbAzZxp1J33KWmLu6D/DIJlj8bml6syMSK3Q==","shasum":"c1042ff1f1a41f089adb625ee44745fb33a42acc","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.0-7b79c1b8.tgz","fileCount":25,"unpackedSize":72791,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHDLkxGxxlBy1IZamUsWZAfwTchv+pYkuisFObZdO5WPAiEAysfvK+HmtHG5J45ZhuhUztyB4JtVZJ4v8phb4M6wvGI="}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.0-7b79c1b8_1685018770663_0.6892135895825511"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"0.15.1":{"name":"ipfs-message-port-server","version":"0.15.1","description":"IPFS server library for exposing IPFS node over message port","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs","message-port","worker"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./src/index.js"},"./block":{"types":"./src/block.d.ts","import":"./src/block.js"},"./core":{"types":"./src/core.d.ts","import":"./src/core.js"},"./dag":{"types":"./src/dag.d.ts","import":"./src/dag.js"},"./files":{"types":"./src/files.d.ts","import":"./src/files.js"},"./server":{"types":"./src/server.d.ts","import":"./src/server.js"},"./service":{"types":"./src/service.d.ts","import":"./src/service.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","lint":"aegir lint","clean":"aegir clean","dep-check":"aegir dep-check -i ipfs-core-types"},"dependencies":{"ipfs-core-types":"^0.14.1","ipfs-message-port-protocol":"^0.15.1","it-all":"^2.0.0"},"devDependencies":{"aegir":"^37.11.0","multiformats":"^11.0.0"},"browser":{"worker_threads":false},"gitHead":"bf1bc8b18d750d5591bdd575a6d0f4c067d61d0a","_id":"ipfs-message-port-server@0.15.1","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-R9mBMEJdzkpVH3/MNnlUwlcBbj+Ox+geYqssZX3pz10QJXKmYYu6+5XEgUwFzfeUR2NVhP4Wmegn1sZDBvP7xA==","shasum":"ed69f7fad4c6fd06afb28fb0c2653e4531de0649","tarball":"https://registry.npmjs.org/ipfs-message-port-server/-/ipfs-message-port-server-0.15.1.tgz","fileCount":25,"unpackedSize":72766,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNy57DkKPLGLB8P72FTN2cuFRJfsZdcdaPe4PhbyecXAIhAK0ZeZ5DbfVg5w2YeNpDea5sckZUqWCxVa64xklo3tYj"}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"gozala","email":"dev@gozala.io"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-message-port-server_0.15.1_1685026771464_0.8696990071850805"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"}},"time":{"created":"2020-07-15T19:57:25.427Z","0.0.0-dev":"2020-07-15T19:57:25.513Z","modified":"2023-06-01T16:28:31.432Z","0.1.0":"2020-08-12T10:51:33.743Z","0.1.1-rc.2":"2020-08-18T16:00:53.603Z","0.1.1":"2020-08-24T16:58:14.073Z","0.1.2-rc.0":"2020-08-25T07:12:24.343Z","0.1.2-rc.4":"2020-08-27T17:08:27.403Z","0.1.2-rc.3":"2020-08-27T17:28:08.156Z","0.1.2-rc.5":"2020-09-02T11:11:42.930Z","0.1.2-rc.12":"2020-09-03T12:59:29.873Z","0.2.0":"2020-09-03T14:18:33.630Z","0.2.1-rc.25":"2020-09-04T14:27:27.618Z","0.2.1":"2020-09-04T15:04:19.674Z","0.2.2-rc.2":"2020-09-09T11:49:54.474Z","0.2.2":"2020-09-09T14:26:32.959Z","0.2.3-rc.1":"2020-09-10T08:16:10.242Z","0.2.3-rc.2":"2020-09-11T15:12:08.522Z","0.2.3-rc.3":"2020-09-14T13:08:48.215Z","0.2.3-rc.4":"2020-09-25T13:48:47.951Z","0.2.3-rc.6":"2020-10-05T22:17:24.323Z","0.2.3-rc.7":"2020-10-06T03:02:45.064Z","0.2.3-rc.9":"2020-10-06T10:47:35.026Z","0.2.3-rc.10":"2020-10-06T12:43:14.009Z","0.2.3-rc.11":"2020-10-10T08:14:49.147Z","0.2.3-rc.12":"2020-10-10T10:13:08.920Z","0.2.3-rc.14":"2020-10-15T15:45:34.595Z","0.2.3-rc.15":"2020-10-15T16:03:52.463Z","0.2.3-rc.16":"2020-10-21T16:46:23.696Z","0.2.3-rc.22":"2020-10-22T14:05:03.276Z","0.2.3-rc.24":"2020-10-23T11:32:55.680Z","0.2.3-rc.25":"2020-10-27T07:53:44.335Z","0.2.3-rc.26":"2020-10-27T09:24:01.640Z","0.2.3-rc.28":"2020-10-27T13:16:34.030Z","0.2.3-rc.29":"2020-10-27T15:10:55.342Z","0.2.3-rc.31":"2020-10-28T14:35:08.586Z","0.3.0":"2020-10-28T15:52:04.248Z","0.3.1-rc.2":"2020-10-28T17:07:39.903Z","0.3.1-rc.4":"2020-10-30T11:31:17.054Z","0.3.1-rc.5":"2020-10-30T15:35:54.565Z","0.3.1-rc.6":"2020-10-30T16:53:52.467Z","0.3.1-rc.8":"2020-11-02T13:52:47.786Z","0.3.1-rc.10":"2020-11-06T18:26:42.511Z","0.3.1-rc.12":"2020-11-09T16:12:26.726Z","0.3.1-rc.13":"2020-11-09T16:54:51.707Z","0.4.0":"2020-11-09T17:09:24.049Z","0.4.1-rc.1":"2020-11-10T09:13:32.605Z","0.4.1-rc.3":"2020-11-12T12:37:40.853Z","0.4.1-rc.5":"2020-11-13T09:22:08.940Z","0.4.1-rc.7":"2020-11-16T09:39:32.476Z","0.4.1-rc.8":"2020-11-16T10:38:01.440Z","0.4.1":"2020-11-16T11:28:40.258Z","0.4.2-rc.2":"2020-11-16T13:20:52.067Z","0.4.2-rc.3":"2020-11-18T12:52:47.157Z","0.4.2-rc.6":"2020-11-20T23:37:38.648Z","0.4.2-rc.8":"2020-11-25T07:55:11.724Z","0.4.2":"2020-11-25T08:37:41.084Z","0.4.3-rc.1":"2020-11-26T08:24:29.382Z","0.4.3-rc.2":"2020-11-26T08:34:58.431Z","0.4.3-rc.3":"2020-11-26T15:32:31.206Z","0.4.3-rc.4":"2020-11-26T18:44:22.376Z","0.4.3-rc.7":"2020-12-03T17:04:00.887Z","0.4.3-rc.8":"2020-12-03T17:30:43.677Z","0.4.3-rc.11":"2020-12-05T08:28:18.952Z","0.4.3-rc.13":"2020-12-14T14:30:28.085Z","0.4.3":"2020-12-16T10:27:19.729Z","0.4.4-rc.1":"2020-12-18T14:43:07.530Z","0.4.4-rc.4":"2020-12-18T17:46:55.477Z","0.4.4-rc.5":"2021-01-13T12:26:18.412Z","0.4.4-rc.6":"2021-01-15T08:51:17.886Z","0.5.0":"2021-01-15T11:42:49.004Z","0.5.1-rc.13":"2021-01-30T08:09:07.368Z","0.6.0":"2021-02-01T11:36:41.800Z","0.6.1":"2021-02-02T09:06:37.420Z","0.6.2-rc.8":"2021-02-21T09:16:35.487Z","0.6.2-rc.9":"2021-02-22T16:41:50.845Z","0.6.2":"2021-03-09T10:47:26.389Z","0.6.3":"2021-03-10T11:13:10.613Z","0.6.4-rc.3":"2021-03-31T15:16:27.239Z","0.6.4-rc.11":"2021-04-28T12:16:33.212Z","0.6.4-rc.14":"2021-04-28T17:13:11.296Z","0.6.4-rc.17":"2021-04-29T16:56:46.450Z","0.6.4-rc.18":"2021-04-30T09:24:46.417Z","0.6.4-rc.19":"2021-04-30T17:05:05.970Z","0.6.4-rc.20":"2021-05-01T17:53:05.871Z","0.6.4-rc.21":"2021-05-02T09:00:47.011Z","0.6.4-rc.22":"2021-05-04T07:45:22.236Z","0.6.4-rc.24":"2021-05-04T10:57:13.339Z","0.6.4-rc.25":"2021-05-04T11:19:29.649Z","0.6.4-rc.26":"2021-05-04T13:56:03.246Z","0.6.4-rc.27":"2021-05-06T11:43:18.014Z","0.6.4-rc.28":"2021-05-06T14:18:04.369Z","0.6.4-rc.29":"2021-05-07T11:59:28.178Z","0.6.4-rc.30":"2021-05-07T13:40:00.377Z","0.6.4-rc.31":"2021-05-10T11:57:59.078Z","0.6.4-rc.32":"2021-05-10T12:21:22.252Z","0.7.0":"2021-05-10T14:53:07.688Z","0.7.1-rc.1":"2021-05-11T06:09:57.425Z","0.7.1-rc.5":"2021-05-11T20:27:33.366Z","0.7.1-rc.6":"2021-05-13T18:07:05.214Z","0.7.1-rc.7":"2021-05-25T14:40:26.333Z","0.7.1-rc.11":"2021-05-25T16:06:39.610Z","0.7.1":"2021-05-26T09:33:00.553Z","0.7.2-rc.1":"2021-05-26T12:25:16.169Z","0.7.2-rc.3":"2021-06-01T20:39:32.028Z","0.7.2-rc.4":"2021-06-05T06:17:34.985Z","0.7.2":"2021-06-05T06:32:52.807Z","0.7.3-rc.1":"2021-06-10T09:26:55.174Z","0.7.3-rc.2":"2021-06-15T16:49:19.712Z","0.7.3-rc.3":"2021-06-18T08:11:38.734Z","0.7.3-rc.4":"2021-06-18T09:21:18.450Z","0.7.3":"2021-06-18T11:16:00.427Z","0.7.4-rc.1":"2021-06-18T15:58:18.248Z","0.7.4-rc.2":"2021-06-25T15:14:08.867Z","0.7.4-rc.3":"2021-07-01T16:06:04.748Z","0.7.4-rc.6":"2021-07-19T15:31:49.147Z","0.7.4-rc.8":"2021-07-27T09:29:24.525Z","0.7.4-rc.9":"2021-07-27T10:01:30.562Z","0.7.4-rc.11":"2021-07-27T10:39:11.661Z","0.7.4-rc.14":"2021-07-27T12:20:24.026Z","0.7.4-rc.17":"2021-07-27T14:23:57.551Z","0.8.0":"2021-07-27T15:07:57.975Z","0.8.1-rc.1":"2021-07-28T11:30:23.201Z","0.8.1-rc.2":"2021-07-28T12:25:42.273Z","0.8.1-rc.5":"2021-07-28T16:56:54.776Z","0.8.1":"2021-07-30T17:08:31.325Z","0.8.1-rc.7":"2021-07-30T17:31:08.261Z","0.8.2-rc.1":"2021-07-30T18:57:29.822Z","0.8.2-rc.2":"2021-08-04T13:52:59.839Z","0.8.2-rc.3":"2021-08-05T11:48:25.833Z","0.8.2-rc.6":"2021-08-09T16:32:42.148Z","0.8.2-rc.8":"2021-08-10T07:19:38.033Z","0.8.2-rc.10":"2021-08-10T09:10:01.409Z","0.8.2-rc.11":"2021-08-11T09:23:01.954Z","0.9.0":"2021-08-11T15:11:50.902Z","0.9.1-rc.4":"2021-08-12T10:51:14.979Z","0.9.1-rc.5":"2021-08-12T11:07:25.765Z","0.9.1-rc.6":"2021-08-12T14:11:03.874Z","0.9.1-rc.7":"2021-08-16T15:47:30.779Z","0.9.1-rc.9":"2021-08-17T10:52:22.978Z","0.9.1-rc.10":"2021-08-17T11:09:47.908Z","0.9.1-rc.12":"2021-08-17T12:56:14.042Z","0.9.1-rc.15":"2021-08-17T21:56:08.351Z","0.9.1-rc.17":"2021-08-25T07:32:41.213Z","0.9.1-rc.18":"2021-08-25T08:53:09.991Z","0.9.1":"2021-08-25T15:56:16.264Z","0.9.2-rc.2":"2021-08-26T09:48:30.040Z","0.9.2-rc.3":"2021-08-26T11:10:20.939Z","0.9.2-rc.4":"2021-08-26T13:58:29.378Z","0.9.2-rc.5":"2021-08-26T15:43:24.004Z","0.9.2-rc.6":"2021-08-31T13:35:10.229Z","0.9.2-rc.7":"2021-09-02T15:00:11.522Z","0.9.2-rc.8":"2021-09-02T17:39:10.100Z","0.9.2":"2021-09-02T18:19:04.686Z","0.9.3-rc.1":"2021-09-06T11:19:10.889Z","0.9.3-rc.2":"2021-09-06T15:02:17.728Z","0.9.3-rc.4":"2021-09-07T17:04:00.392Z","0.9.3-rc.5":"2021-09-08T09:33:36.773Z","0.9.3-rc.8":"2021-09-14T13:40:28.406Z","0.9.3-rc.11":"2021-09-17T12:50:58.636Z","0.9.3":"2021-09-17T13:24:07.755Z","0.9.4-rc.0":"2021-09-17T13:30:19.228Z","0.9.5-rc.0":"2021-09-17T16:25:38.021Z","0.9.4":"2021-09-17T16:36:07.197Z","0.9.5-rc.1":"2021-09-21T16:10:52.149Z","0.9.5-rc.12":"2021-09-23T06:16:16.689Z","0.9.5-rc.14":"2021-09-23T10:47:58.408Z","0.9.5-rc.15":"2021-09-23T12:56:55.501Z","0.9.5-rc.16":"2021-09-23T18:33:18.520Z","0.9.5-rc.17":"2021-09-24T11:20:49.712Z","0.9.5-rc.18":"2021-09-24T12:45:38.890Z","0.10.0":"2021-09-24T12:49:20.576Z","0.10.1-rc.0":"2021-09-24T12:53:41.894Z","0.10.1-rc.1":"2021-09-25T17:26:17.057Z","0.10.1-rc.2":"2021-09-25T18:11:13.462Z","0.10.1-rc.3":"2021-09-27T16:37:33.268Z","0.10.1-rc.5":"2021-09-28T12:00:17.061Z","0.10.1":"2021-09-28T12:03:04.326Z","0.10.2-rc.0":"2021-09-28T12:07:43.704Z","0.10.2-rc.1":"2021-09-30T15:48:56.047Z","0.10.2-rc.2":"2021-09-30T17:39:16.625Z","0.10.2-rc.3":"2021-10-02T12:58:18.311Z","0.10.2-rc.4":"2021-10-08T14:33:05.148Z","0.10.2-rc.5":"2021-11-04T07:26:21.825Z","0.10.2-rc.6":"2021-11-12T11:31:16.106Z","0.10.2":"2021-11-12T11:54:21.679Z","0.10.3-rc.0":"2021-11-12T11:56:10.425Z","0.10.3-rc.1":"2021-11-19T15:42:20.204Z","0.10.3":"2021-11-19T15:46:09.337Z","0.10.4-rc.0":"2021-11-19T15:48:40.342Z","0.10.4-rc.1":"2021-11-19T17:23:40.033Z","0.10.4-rc.2":"2021-11-22T16:17:31.228Z","0.10.4-rc.3":"2021-11-24T09:35:55.904Z","0.10.4":"2021-11-24T09:37:53.532Z","0.10.5-rc.0":"2021-11-24T09:39:45.479Z","0.10.5-rc.1":"2021-12-03T10:52:08.523Z","0.10.5-rc.2":"2021-12-03T13:26:33.684Z","0.10.5-rc.3":"2021-12-03T14:05:40.476Z","0.10.5-rc.4":"2021-12-03T15:01:46.547Z","0.10.5-rc.5":"2021-12-06T10:37:57.665Z","0.10.5-rc.6":"2021-12-06T16:29:05.230Z","0.10.5-rc.7":"2021-12-06T22:23:48.923Z","0.10.5-rc.8":"2021-12-13T11:34:43.262Z","0.10.5-rc.9":"2021-12-13T12:09:46.046Z","0.10.5-rc.11":"2021-12-15T12:50:36.385Z","0.10.5-rc.10":"2021-12-15T12:50:48.688Z","0.10.5-rc.12":"2021-12-15T12:53:10.864Z","0.10.5-rc.13":"2021-12-15T18:25:19.496Z","0.10.5":"2021-12-15T20:27:32.239Z","0.10.6-rc.0":"2021-12-15T20:29:58.448Z","0.10.6-rc.1":"2021-12-16T09:07:00.216Z","0.10.6-rc.2":"2021-12-17T09:57:20.442Z","0.10.6-rc.3":"2022-01-13T18:31:24.496Z","0.10.6-rc.4":"2022-01-20T14:26:44.690Z","0.10.6-rc.5":"2022-01-21T15:46:19.959Z","0.10.6-7fe0da57f.0":"2022-01-26T12:13:53.309Z","0.10.6-5439a0e.0":"2022-01-26T13:07:40.267Z","0.10.6-a6b201af.0":"2022-01-27T15:37:31.378Z","0.10.6-fbe14923.0":"2022-01-27T18:17:35.364Z","0.10.6-6cb3a87e.0":"2022-01-27T19:12:49.701Z","0.11.1-2afef2eb.0":"2022-01-27T20:09:05.078Z","0.11.1-3a5d61d4.0":"2022-01-27T21:33:47.039Z","0.10.6-cca6e321.0":"2022-01-27T23:03:53.661Z","0.11.0":"2022-01-27T23:18:05.081Z","0.11.1-8d260215.0":"2022-01-27T23:53:07.724Z","0.11.1-2c8ec080.0":"2022-01-28T14:56:30.692Z","0.11.1-3a74c110.0":"2022-02-04T16:17:12.296Z","0.11.1-383dc07d.0":"2022-02-04T19:57:17.583Z","0.11.1-709831f6.0":"2022-02-06T16:03:31.141Z","0.11.1":"2022-02-07T16:51:38.499Z","0.11.2-1082fce9.0":"2022-02-18T16:15:05.114Z","0.11.2-125d42ba.0":"2022-03-01T09:47:00.147Z","0.11.2-df1bd1bb.0":"2022-03-01T11:11:15.458Z","0.11.2":"2022-04-05T15:10:20.537Z","0.11.3-e90b8f13.0":"2022-04-05T16:10:10.628Z","0.11.3-8f7ce23c.0":"2022-04-20T12:40:17.096Z","0.11.3":"2022-04-26T07:02:11.171Z","0.11.4-7165bf71.0":"2022-05-16T20:07:57.456Z","0.11.4-4e93dd5d.0":"2022-05-27T13:43:13.260Z","0.11.4-919b27a8.0":"2022-05-27T16:18:38.563Z","0.12.0":"2022-05-30T19:17:24.982Z","0.12.1-ddfb899f.0":"2022-05-30T19:57:02.070Z","0.12.1-764b4adc.0":"2022-06-01T14:26:29.493Z","0.12.1-be025c89.0":"2022-06-01T14:31:35.897Z","0.12.1-87e00a69.0":"2022-06-01T14:36:18.093Z","0.12.1-70e142ac.0":"2022-06-13T16:00:36.134Z","0.12.1-7be50bd1.0":"2022-06-22T17:48:39.564Z","0.12.1":"2022-06-23T12:03:19.811Z","0.12.2-00bd3dd0.0":"2022-06-24T09:30:52.137Z","0.12.2-a05695fc.0":"2022-07-20T13:22:22.468Z","0.12.2-39dbf708.0":"2022-08-17T21:42:58.106Z","0.12.2-8f351a89.0":"2022-08-17T23:18:50.501Z","0.12.2-83f9882e.0":"2022-09-06T11:30:33.447Z","0.12.2-051da161.0":"2022-09-07T12:55:29.288Z","0.13.0":"2022-09-07T13:37:49.832Z","0.13.1-b5456882.0":"2022-09-16T09:24:14.538Z","0.13.1-7c676f63.0":"2022-09-21T19:16:23.294Z","0.13.1-2a830bf5.0":"2022-09-21T20:54:01.708Z","0.13.1-7304a0f4.0":"2022-09-21T20:54:44.379Z","0.13.1":"2022-09-21T21:54:56.881Z","0.13.2-d75e0a39.0":"2022-09-22T08:52:08.910Z","0.13.2-d1b0a8a7.0":"2022-09-22T10:41:45.571Z","0.13.2-acbc1c62.0":"2022-09-22T12:59:51.917Z","0.13.2-dfc43d4e.0":"2022-09-26T14:20:18.534Z","0.13.2-0cee4a4c.0":"2022-10-24T09:13:25.198Z","0.14.0":"2022-10-24T10:47:26.876Z","0.14.1-a77e40cc.0":"2022-10-25T07:11:24.989Z","0.14.1-58e6f468.0":"2022-10-25T08:15:39.937Z","0.14.1-6ae5eb7d.0":"2022-10-28T07:29:48.163Z","0.14.1-6be59068.0":"2022-11-17T19:47:52.826Z","0.0.1-563806f1.0":"2023-01-09T18:11:12.142Z","0.0.1-e85e5b6e.0":"2023-01-09T19:15:58.856Z","0.0.1-2a6fede5.0":"2023-01-10T09:35:50.143Z","0.14.0-5f73ecad":"2023-01-10T17:14:32.261Z","0.14.0-4b4c124c":"2023-01-11T16:05:47.109Z","0.14.0-789ee585":"2023-01-11T17:05:29.008Z","0.14.0-fa578bac":"2023-01-11T17:50:09.476Z","0.14.0-d1c3abb3":"2023-01-11T18:08:52.514Z","0.15.0":"2023-01-12T11:36:41.828Z","0.15.0-6eeb1be5":"2023-01-13T18:20:39.328Z","0.15.0-ab02e8f8":"2023-01-17T12:24:17.988Z","0.15.0-3bcabe38":"2023-01-17T15:31:27.848Z","0.15.0-b64d4af0":"2023-02-01T11:25:23.771Z","0.15.0-e64813f6":"2023-05-24T18:45:37.828Z","0.15.0-4694e806":"2023-05-25T11:31:36.601Z","0.15.0-6d95ce08":"2023-05-25T12:10:26.579Z","0.15.0-7b79c1b8":"2023-05-25T12:46:10.882Z","0.15.1":"2023-05-25T14:59:31.621Z"},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"npm-service-account+ipfs@protocol.ai","name":"npm-service-account-ipfs"}],"description":"IPFS server library for exposing IPFS node over message port","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme","keywords":["ipfs","message-port","worker"],"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"Apache-2.0 OR MIT","readme":"> # ⛔️ DEPRECATED: [js-IPFS](https://github.com/ipfs/js-ipfs) has been superseded by [Helia](https://github.com/ipfs/helia)\n>\n> 📚 [Learn more about this deprecation](https://github.com/ipfs/js-ipfs/issues/4336) or [how to migrate](https://github.com/ipfs/helia/wiki/Migrating-from-js-IPFS)\n>\n> ⚠️ If you continue using this repo, please note that security fixes will not be provided\n\n# ipfs-message-port-server <!-- omit in toc -->\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\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/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster)\n\n> IPFS server library for exposing IPFS node over message port\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Usage](#usage)\n  - [Notes on Performance](#notes-on-performance)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-message-port-server\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsMessagePortServer` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-message-port-server/dist/index.min.js\"></script>\n```\n\n## Usage\n\nThis library can wrap a JS IPFS node and expose it over the [message channel][].\nIt assumes `ipfs-message-port-client` on the other end, however it is not\nstrictly necessary anything complying with the wire protocol will do.\n\nIt provides following API subset:\n\n- [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)\n- [`ipfs.block`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)\n- [`ipfs.add`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options)\n- [`ipfs.cat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options)\n- [`ipfs.files.stat`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfilesstatpath-options)\n\nThe server is designed to run in a [SharedWorker][] (although it is possible to\nrun it in the other JS contexts). The example below illustrates running a js-ipfs\nnode in a [SharedWorker][] and exposing it to all connected ports\n\n```js\nimport { create } from 'ipfs'\nimport { IPFSService, Server } from 'ipfs-message-port-server'\n\nconst main = async () => {\n  const connections = []\n  // queue connections that occur while node was starting.\n  self.onconnect = ({ports}) => connections.push(...ports)\n\n  const ipfs = await create()\n  const service = new IPFSService(ipfs)\n  const server = new Server(service)\n\n  // connect new ports and queued ports with the server.\n  self.onconnect = ({ports}) => server.connect(ports[0])\n  for (const port of connections.splice(0)) {\n    server.connect(port)\n  }\n}\n\nmain()\n```\n\n### Notes on Performance\n\nSince the data sent over the [message channel][] is copied via\nthe [structured cloning algorithm][] it may lead to suboptimal\nresults (especially with large binary data). In order to avoid unnecessary\ncopying the server will transfer all passed [Transferable][]s which will be emptied\non the server side. This should not be a problem in general as IPFS node itself\ndoes not retain references to returned values, but is something to keep in mind\nwhen doing something custom.\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[message channel]: https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\n\n[SharedWorker]: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\n\n[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\n\n[structured cloning algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n\n[Transferable]: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n\n[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n\n[File]: https://developer.mozilla.org/en-US/docs/Web/API/File\n","readmeFilename":"README.md"}